app: sequence management -- new-sequence dialog, folders, sequences in the project bin
- File > New > Sequence opens a real dialog (name, PAL/NTSC/HD presets, width/height/frame rate, progressive/interlaced); VideoParams gains an interlaced flag - File > New > Folder creates a folder in the project root - sequences are mounted under the root folder so they appear in the project explorer (including the auto-created Sequence 1 and orphans from older projects); right-click > Sequence Properties edits the parameters afterwards - dropping footage onto an empty, sequence-less timeline auto-creates a sequence from the footage's first video stream
This commit is contained in:
@@ -438,6 +438,10 @@ impl NodeBehavior for FootageBehavior {
|
||||
writer.attribute("framerate", &v.frame_rate.to_display_string());
|
||||
writer.attribute("pixelformat", &v.pixel_format.to_string());
|
||||
writer.attribute("channels", &v.channels.to_string());
|
||||
writer.attribute(
|
||||
"interlaced",
|
||||
if v.interlaced { "1" } else { "0" },
|
||||
);
|
||||
writer.end_element(); // video
|
||||
}
|
||||
if let Some(a) = s.audio {
|
||||
@@ -586,6 +590,10 @@ impl NodeBehavior for FootageBehavior {
|
||||
.attribute("channels")
|
||||
.and_then(|v| v.parse().ok())
|
||||
.unwrap_or(0),
|
||||
interlaced: reader
|
||||
.attribute("interlaced")
|
||||
.map(|v| v == "1")
|
||||
.unwrap_or(false),
|
||||
});
|
||||
// Consume the (self-closing) element.
|
||||
let _ = reader.read_element_text();
|
||||
@@ -673,6 +681,7 @@ fn streams_from_description(
|
||||
frame_rate: oak_core::Rational::new(num as i64, den as i64),
|
||||
pixel_format: vp.format().code(),
|
||||
channels: vp.channel_count(),
|
||||
interlaced: false,
|
||||
}),
|
||||
audio: None,
|
||||
duration: stream_duration_seconds(vp.duration(), vp.time_base()),
|
||||
|
||||
@@ -138,6 +138,7 @@ impl SequenceBehavior {
|
||||
frame_rate: oak_core::Rational::new(fps_num as i64, fps_den as i64),
|
||||
pixel_format: 4, // f32
|
||||
channels: 4,
|
||||
interlaced: false,
|
||||
}];
|
||||
self.audio_params = vec![AudioParams {
|
||||
sample_rate,
|
||||
|
||||
@@ -580,6 +580,8 @@ pub struct VideoParams {
|
||||
pub pixel_format: i32,
|
||||
/// Channel count.
|
||||
pub channels: i32,
|
||||
/// Whether the stream is interlaced.
|
||||
pub interlaced: bool,
|
||||
}
|
||||
|
||||
/// Audio parameters (plain data).
|
||||
|
||||
@@ -270,6 +270,7 @@ fn build_full_project() -> std::sync::Arc<std::sync::Mutex<oak_node::project::Pr
|
||||
frame_rate: Rational::new(25, 1),
|
||||
pixel_format: 4,
|
||||
channels: 4,
|
||||
interlaced: false,
|
||||
}),
|
||||
audio: None,
|
||||
duration: Rational::new(217600, 12800),
|
||||
|
||||
@@ -348,6 +348,7 @@ fn footage_probe() {
|
||||
frame_rate: Rational::new(30, 1),
|
||||
pixel_format: 4,
|
||||
channels: 4,
|
||||
interlaced: false,
|
||||
}),
|
||||
audio: None,
|
||||
duration: Rational::new(600, 1),
|
||||
|
||||
Reference in New Issue
Block a user