fn track_extends(trak: &TrackBox, track_id: u32) -> TrackExtendsBox {
    let mut trex = TrackExtendsBox::default();
    trex.track_id = track_id;

    trex.default_sample_description_index = 1;

    let dfl = SampleDefaults::new(trak, 1, u32::MAX);
    if let Some(flags) = dfl.sample_flags.as_ref() {
        trex.default_sample_flags = flags.clone();
    }
    if let Some(duration) = dfl.sample_duration {
        trex.default_sample_duration = duration;
    }
    if let Some(size) = dfl.sample_size {
        trex.default_sample_size = size;
    }

    trex
}
// Create a TrackExtendsBox from the original trackbox.
Create a TrackExtendsBox from the original trackbox.
Create a TrackExtendsBox from the original trackbox .
fn track_extends(trak: &TrackBox, track_id: u32) -> TrackExtendsBox {
    let mut trex = TrackExtendsBox::default();
    trex.track_id = track_id;
    trex.default_sample_description_index = 1;
    let dfl = SampleDefaults::new(trak, 1, u32::MAX);
    if let Some(flags) = dfl.sample_flags.as_ref() {
        trex.default_sample_flags = flags.clone();
    }
    if let Some(duration) = dfl.sample_duration {
        trex.default_sample_duration = duration;
    }
    if let Some(size) = dfl.sample_size {
        trex.default_sample_size = size;
    }
    trex
}
fn track_extends ( trak : & TrackBox , track_id : u32 ) -> TrackExtendsBox { let mut trex = TrackExtendsBox :: default ( ) ; trex . track_id = track_id ; trex . default_sample_description_index = 1 ; let dfl = SampleDefaults :: new ( trak , 1 , u32 :: MAX ) ; if let Some ( flags ) = dfl . sample_flags . as_ref ( ) { trex . default_sample_flags = flags . clone ( ) ; } if let Some ( duration ) = dfl . sample_duration { trex . default_sample_duration = duration ; } if let Some ( size ) = dfl . sample_size { trex . default_sample_size = size ; } trex }
Create a TrackExtendsBox from the original trackbox.
Create a TrackExtendsBox from the original trackbox .
trak
&TrackBox
track_id
u32
trak
&TrackBox
track_id
u32