Shaka Packager SDK
|
Public Member Functions | |
TrackRunIterator (const Movie *moov) | |
bool | Init () |
bool | Init (const MovieFragment &moof) |
bool | IsRunValid () const |
bool | IsSampleValid () const |
void | AdvanceRun () |
void | AdvanceSample () |
bool | AuxInfoNeedsToBeCached () |
bool | CacheAuxInfo (const uint8_t *buf, int size) |
int64_t | GetMaxClearOffset () |
const AudioSampleEntry & | audio_description () const |
Only valid if is_audio() is true. | |
const VideoSampleEntry & | video_description () const |
Only valid if is_video() is true. | |
std::unique_ptr< DecryptConfig > | GetDecryptConfig () |
Properties of the current run. Only valid if IsRunValid(). | |
uint32_t | track_id () const |
int64_t | aux_info_offset () const |
int | aux_info_size () const |
bool | is_encrypted () const |
bool | is_audio () const |
bool | is_video () const |
Properties of the current sample. Only valid if IsSampleValid(). | |
int64_t | sample_offset () const |
int | sample_size () const |
int64_t | dts () const |
int64_t | cts () const |
int64_t | duration () const |
bool | is_keyframe () const |
Definition at line 25 of file track_run_iterator.h.
|
explicit |
Create a new TrackRunIterator from movie box.
moov | should not be NULL. |
Definition at line 89 of file track_run_iterator.cc.
void shaka::media::mp4::TrackRunIterator::AdvanceRun | ( | ) |
Advance iterator to the next run. Require that the iterator point to a valid run.
Definition at line 442 of file track_run_iterator.cc.
void shaka::media::mp4::TrackRunIterator::AdvanceSample | ( | ) |
Advance iterator to the next sample. Require that the iterator point to a valid sample.
Definition at line 455 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::AuxInfoNeedsToBeCached | ( | ) |
Definition at line 464 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::CacheAuxInfo | ( | const uint8_t * | buf, |
int | size | ||
) |
Caches the CENC data from the given buffer.
buf | must be a buffer starting at the offset given by cenc_offset(). |
size | must be at least cenc_size(). |
Definition at line 471 of file track_run_iterator.cc.
std::unique_ptr< DecryptConfig > shaka::media::mp4::TrackRunIterator::GetDecryptConfig | ( | ) |
Only call when is_encrypted() is true and AuxInfoNeedsToBeCached() is false. Result is owned by caller.
Definition at line 605 of file track_run_iterator.cc.
int64_t shaka::media::mp4::TrackRunIterator::GetMaxClearOffset | ( | ) |
Definition at line 507 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::Init | ( | ) |
For non-fragmented mp4, moov contains all the chunk information; This function sets up the iterator to access all the chunks. For fragmented mp4, chunk and sample information are generally contained in moof. This function is a no-op in this case. Init(moof) will be called later after parsing moof.
Definition at line 162 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::Init | ( | const MovieFragment & | moof | ) |
Set up the iterator to handle all the runs from the current fragment.
Definition at line 287 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::IsRunValid | ( | ) | const |
Definition at line 495 of file track_run_iterator.cc.
bool shaka::media::mp4::TrackRunIterator::IsSampleValid | ( | ) | const |
Definition at line 497 of file track_run_iterator.cc.