Skip to content

Commit

Permalink
Return duration of an Mp4 when possible + fix loop option (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozyra95 authored Dec 9, 2024
1 parent 2ecabeb commit a6d9b7d
Show file tree
Hide file tree
Showing 8 changed files with 587 additions and 467 deletions.
13 changes: 11 additions & 2 deletions compositor_pipeline/src/pipeline/input.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use crate::{
error::{InputInitError, RegisterInputError},
queue::PipelineEvent,
Expand Down Expand Up @@ -45,8 +47,15 @@ pub struct RawDataInputOptions {
pub audio: bool,
}

pub struct InputInitInfo {
pub port: Option<Port>,
pub enum InputInitInfo {
Rtp {
port: Option<Port>,
},
Mp4 {
video_duration: Option<Duration>,
audio_duration: Option<Duration>,
},
Other,
}

struct InputInitResult {
Expand Down
2 changes: 1 addition & 1 deletion compositor_pipeline/src/pipeline/input/decklink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl DeckLink {
sample_receiver: rec,
sample_rate: AUDIO_SAMPLE_RATE,
}),
init_info: InputInitInfo { port: None },
init_info: InputInitInfo::Other,
})
}
}
Expand Down
Loading

0 comments on commit a6d9b7d

Please sign in to comment.