Shaka Packager SDK
Public Member Functions | List of all members
shaka::media::mp4::CompositionOffsetIterator Class Reference

#include <composition_offset_iterator.h>

Public Member Functions

 CompositionOffsetIterator (const CompositionTimeToSample &composition_time_to_sample)
 Create CompositionOffsetIterator from composition time to sample box.
 
bool AdvanceSample ()
 
bool IsValid () const
 
int64_t sample_offset () const
 
int64_t SampleOffset (uint32_t sample) const
 
uint32_t NumSamples () const
 

Detailed Description

Composition time to sample box (CTTS) iterator used to iterate through the compressed table. This class also provides convenient functions to query total number of samples and the composition offset for a particular sample.

Definition at line 23 of file composition_offset_iterator.h.

Member Function Documentation

◆ AdvanceSample()

bool shaka::media::mp4::CompositionOffsetIterator::AdvanceSample ( )

Advance the iterator to the next sample.

Returns
true if not past the last sample, false otherwise.

Definition at line 23 of file composition_offset_iterator.cc.

◆ IsValid()

bool shaka::media::mp4::CompositionOffsetIterator::IsValid ( ) const
Returns
true if the iterator is still valid, false if past the last sample.

Definition at line 34 of file composition_offset_iterator.cc.

◆ NumSamples()

uint32_t shaka::media::mp4::CompositionOffsetIterator::NumSamples ( ) const
Returns
Total number of samples.

Definition at line 52 of file composition_offset_iterator.cc.

◆ sample_offset()

int64_t shaka::media::mp4::CompositionOffsetIterator::sample_offset ( ) const
inline
Returns
Sample offset for current sample.

Definition at line 39 of file composition_offset_iterator.h.

◆ SampleOffset()

int64_t shaka::media::mp4::CompositionOffsetIterator::SampleOffset ( uint32_t  sample) const
Returns
Sample offset sample, 1-based.

Definition at line 39 of file composition_offset_iterator.cc.


The documentation for this class was generated from the following files: