pub fn clone_range(&self, from_sample: u32, to_sample: u32) -> SampleToGroupBox {
        let mut sbgp = SampleToGroupBox {
            grouping_type: self.grouping_type.clone(),
            grouping_type_parameter: self.grouping_type_parameter.clone(),
            entries: ArraySized32::<SampleToGroupEntry>::new(),
        };
        let mut begin = 1;
        for entry in self.entries.iter() {
            let end = begin + entry.sample_count - 1;
            if begin > to_sample {
                break;
            }
            if let Some(count) = overlap(from_sample, to_sample, begin, end) {
                sbgp.entries.push(SampleToGroupEntry{
                    sample_count: count,
                    group_description_index: entry.group_description_index,
                });
            }
            begin += entry.sample_count;
        }
        sbgp
    }
/// Clone a range of the SampleToGroupBox.
///
/// Used for building a TrackFragmentBox.
Clone a range of the SampleToGroupBox.
Used for building a TrackFragmentBox.
Clone a range of the SampleToGroupBox . Used for building a TrackFragmentBox .
pub fn clone_range(&self, from_sample: u32, to_sample: u32) -> SampleToGroupBox {
        let mut sbgp = SampleToGroupBox {
            grouping_type: self.grouping_type.clone(),
            grouping_type_parameter: self.grouping_type_parameter.clone(),
            entries: ArraySized32::<SampleToGroupEntry>::new(),
        };
        let mut begin = 1;
        for entry in self.entries.iter() {
            let end = begin + entry.sample_count - 1;
            if begin > to_sample {
                break;
            }
            if let Some(count) = overlap(from_sample, to_sample, begin, end) {
                sbgp.entries.push(SampleToGroupEntry{
                    sample_count: count,
                    group_description_index: entry.group_description_index,
                });
            }
            begin += entry.sample_count;
        }
        sbgp
    }
pub fn clone_range ( & self , from_sample : u32 , to_sample : u32 ) -> SampleToGroupBox { let mut sbgp = SampleToGroupBox { grouping_type : self . grouping_type . clone ( ) , grouping_type_parameter : self . grouping_type_parameter . clone ( ) , entries : ArraySized32 :: < SampleToGroupEntry > :: new ( ) , } ; let mut begin = 1 ; for entry in self . entries . iter ( ) { let end = begin + entry . sample_count - 1 ; if begin > to_sample { break ; } if let Some ( count ) = overlap ( from_sample , to_sample , begin , end ) { sbgp . entries . push ( SampleToGroupEntry { sample_count : count , group_description_index : entry . group_description_index , } ) ; } begin += entry . sample_count ; } sbgp }
Clone a range of the SampleToGroupBox.
Clone a range of the SampleToGroupBox .
&self
from_sample
u32
to_sample
u32
&self
from_sample
u32
to_sample
u32