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

#include <chunk_info_iterator.h>

Public Member Functions

 ChunkInfoIterator (const SampleToChunk &sample_to_chunk)
 Create ChunkInfoIterator from sample to chunk box.
 
bool AdvanceChunk ()
 
bool AdvanceSample ()
 
bool IsValid () const
 
uint32_t current_chunk () const
 
uint32_t samples_per_chunk () const
 
uint32_t sample_description_index () const
 
uint32_t NumSamples (uint32_t start_chunk, uint32_t end_chunk) const
 
uint32_t LastFirstChunk () const
 

Detailed Description

Sample to chunk box (STSC) iterator used to iterate through the compressed table by sample/chunk. This class also provides a convenient function to query total number of samples from start_chunk to end_chunk.

Definition at line 23 of file chunk_info_iterator.h.

Member Function Documentation

◆ AdvanceChunk()

bool shaka::media::mp4::ChunkInfoIterator::AdvanceChunk ( )

Advance to the next chunk.

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

Definition at line 29 of file chunk_info_iterator.cc.

◆ AdvanceSample()

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

Advance to the next sample.

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

Definition at line 39 of file chunk_info_iterator.cc.

◆ current_chunk()

uint32_t shaka::media::mp4::ChunkInfoIterator::current_chunk ( ) const
inline
Returns
Current chunk.

Definition at line 41 of file chunk_info_iterator.h.

◆ IsValid()

bool shaka::media::mp4::ChunkInfoIterator::IsValid ( ) const
Returns
true if not past the last chunk/sample, false otherwise.

Definition at line 46 of file chunk_info_iterator.cc.

◆ LastFirstChunk()

uint32_t shaka::media::mp4::ChunkInfoIterator::LastFirstChunk ( ) const
inline
Returns
The last first_chunk in chunk_info_table.

Definition at line 56 of file chunk_info_iterator.h.

◆ NumSamples()

uint32_t shaka::media::mp4::ChunkInfoIterator::NumSamples ( uint32_t  start_chunk,
uint32_t  end_chunk 
) const
Returns
Number of samples from start_chunk to end_chunk, both 1-based, inclusive.

Definition at line 51 of file chunk_info_iterator.cc.

◆ sample_description_index()

uint32_t shaka::media::mp4::ChunkInfoIterator::sample_description_index ( ) const
inline
Returns
Sample description index for current chunk.

Definition at line 47 of file chunk_info_iterator.h.

◆ samples_per_chunk()

uint32_t shaka::media::mp4::ChunkInfoIterator::samples_per_chunk ( ) const
inline
Returns
Samples per chunk for current chunk.

Definition at line 44 of file chunk_info_iterator.h.


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