pub struct MixedSourceConcatenator { /* private fields */ }Expand description
Analyses a list of annotated source segments and produces a ConcatPlan
that handles mixed resolutions, frame rates, and codecs.
§Algorithm
- Determine the reference properties (from the first segment, or from
the
ConcatConfigtarget resolution / fps overrides). - For each segment compare its properties to the reference.
- Under
ReEncodeAll: every segment is re-encoded. - Under
ReEncodeDiffers: only segments that differ from the reference. - Under
StreamCopy: all segments are stream-copied (caller assumes compatible sources).
Implementations§
Source§impl MixedSourceConcatenator
impl MixedSourceConcatenator
Sourcepub fn new(config: ConcatConfig, sources: Vec<AnnotatedSegment>) -> Self
pub fn new(config: ConcatConfig, sources: Vec<AnnotatedSegment>) -> Self
Creates a new concatenator.
sources must be in the same order as config.segments.
Sourcepub fn build_plan(&self) -> ConcatPlan
pub fn build_plan(&self) -> ConcatPlan
Builds the ConcatPlan from the configured sources and strategy.
Sourcepub fn reencode_count(&self) -> usize
pub fn reencode_count(&self) -> usize
Returns the number of sources that require re-encoding.
Sourcepub fn all_compatible(&self) -> bool
pub fn all_compatible(&self) -> bool
Returns true if all sources are format-compatible (no re-encoding).
Auto Trait Implementations§
impl Freeze for MixedSourceConcatenator
impl RefUnwindSafe for MixedSourceConcatenator
impl Send for MixedSourceConcatenator
impl Sync for MixedSourceConcatenator
impl Unpin for MixedSourceConcatenator
impl UnsafeUnpin for MixedSourceConcatenator
impl UnwindSafe for MixedSourceConcatenator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more