Shaka Packager SDK
Public Member Functions | Protected Member Functions | Friends | List of all members
shaka::media::mp4::Box Struct Referenceabstract

#include <box.h>

Inheritance diagram for shaka::media::mp4::Box:
shaka::media::mp4::AC3Specific shaka::media::mp4::AC4Specific shaka::media::mp4::AudioSampleEntry shaka::media::mp4::CodecConfiguration shaka::media::mp4::ColorParameters shaka::media::mp4::CueIDBox shaka::media::mp4::CuePayloadBox shaka::media::mp4::CueSettingsBox shaka::media::mp4::CueSourceIDBox shaka::media::mp4::CueTimeBox shaka::media::mp4::DTSSpecific shaka::media::mp4::DataInformation shaka::media::mp4::EC3Specific shaka::media::mp4::Edit shaka::media::mp4::FileType shaka::media::mp4::FullBox shaka::media::mp4::IAMFSpecific shaka::media::mp4::MHAConfiguration shaka::media::mp4::Media shaka::media::mp4::MediaData shaka::media::mp4::MediaInformation shaka::media::mp4::Movie shaka::media::mp4::MovieExtends shaka::media::mp4::MovieFragment shaka::media::mp4::OpusSpecific shaka::media::mp4::OriginalFormat shaka::media::mp4::PixelAspectRatio shaka::media::mp4::ProtectionSchemeInfo shaka::media::mp4::SampleTable shaka::media::mp4::SchemeInfo shaka::media::mp4::TextSampleEntry shaka::media::mp4::Track shaka::media::mp4::TrackFragment shaka::media::mp4::UDTSSpecific shaka::media::mp4::VTTAdditionalTextBox shaka::media::mp4::VTTCueBox shaka::media::mp4::VTTEmptyCueBox shaka::media::mp4::VideoSampleEntry shaka::media::mp4::WebVTTConfigurationBox shaka::media::mp4::WebVTTSourceLabelBox

Public Member Functions

bool Parse (BoxReader *reader)
 
void Write (BufferWriter *writer)
 
void WriteHeader (BufferWriter *writer)
 
uint32_t ComputeSize ()
 
virtual uint32_t HeaderSize () const
 
virtual FourCC BoxType () const =0
 
uint32_t box_size ()
 

Protected Member Functions

virtual bool ReadWriteHeaderInternal (BoxBuffer *buffer)
 

Friends

class BoxBuffer
 

Detailed Description

Defines the base ISO BMFF box objects as defined in ISO 14496-12:2012 ISO BMFF section 4.2. All ISO BMFF compatible boxes inherit from either Box or FullBox.

Definition at line 27 of file box.h.

Member Function Documentation

◆ box_size()

uint32_t shaka::media::mp4::Box::box_size ( )
inline
Returns
The size of result box including child boxes. Note that this

Definition at line 55 of file box.h.

◆ BoxType()

virtual FourCC shaka::media::mp4::Box::BoxType ( ) const
pure virtual
Returns
box type.

Implemented in shaka::media::mp4::VTTCueBox, shaka::media::mp4::VTTAdditionalTextBox, shaka::media::mp4::VTTEmptyCueBox, shaka::media::mp4::CuePayloadBox, shaka::media::mp4::CueSettingsBox, shaka::media::mp4::CueIDBox, shaka::media::mp4::CueTimeBox, shaka::media::mp4::CueSourceIDBox, shaka::media::mp4::MediaData, shaka::media::mp4::SegmentIndex, shaka::media::mp4::MovieFragment, shaka::media::mp4::TrackFragment, shaka::media::mp4::TrackFragmentRun, shaka::media::mp4::TrackFragmentHeader, shaka::media::mp4::MovieFragmentHeader, shaka::media::mp4::TrackFragmentDecodeTime, shaka::media::mp4::Movie, shaka::media::mp4::MovieExtends, shaka::media::mp4::TrackExtends, shaka::media::mp4::MovieExtendsHeader, shaka::media::mp4::Track, shaka::media::mp4::Media, shaka::media::mp4::MediaInformation, shaka::media::mp4::DataInformation, shaka::media::mp4::DataReference, shaka::media::mp4::DataEntryUrl, shaka::media::mp4::SubtitleMediaHeader, shaka::media::mp4::NullMediaHeader, shaka::media::mp4::SoundMediaHeader, shaka::media::mp4::VideoMediaHeader, shaka::media::mp4::MediaHeader, shaka::media::mp4::SampleTable, shaka::media::mp4::SampleToGroup, shaka::media::mp4::SampleGroupDescription, shaka::media::mp4::SyncSample, shaka::media::mp4::ChunkOffset, shaka::media::mp4::ChunkLargeOffset, shaka::media::mp4::CompactSampleSize, shaka::media::mp4::SampleSize, shaka::media::mp4::SampleToChunk, shaka::media::mp4::CompositionTimeToSample, shaka::media::mp4::DecodingTimeToSample, shaka::media::mp4::SampleDescription, shaka::media::mp4::TextSampleEntry, shaka::media::mp4::WebVTTSourceLabelBox, shaka::media::mp4::WebVTTConfigurationBox, shaka::media::mp4::AudioSampleEntry, shaka::media::mp4::ALACSpecific, shaka::media::mp4::FlacSpecific, shaka::media::mp4::IAMFSpecific, shaka::media::mp4::OpusSpecific, shaka::media::mp4::AC4Specific, shaka::media::mp4::EC3Specific, shaka::media::mp4::MHAConfiguration, shaka::media::mp4::AC3Specific, shaka::media::mp4::UDTSSpecific, shaka::media::mp4::DTSSpecific, shaka::media::mp4::ElementaryStreamDescriptor, shaka::media::mp4::VideoSampleEntry, shaka::media::mp4::PixelAspectRatio, shaka::media::mp4::ColorParameters, shaka::media::mp4::CodecConfiguration, shaka::media::mp4::Metadata, shaka::media::mp4::ID3v2, shaka::media::mp4::HandlerReference, shaka::media::mp4::Edit, shaka::media::mp4::EditList, shaka::media::mp4::TrackHeader, shaka::media::mp4::MovieHeader, shaka::media::mp4::ProtectionSchemeInfo, shaka::media::mp4::SchemeInfo, shaka::media::mp4::TrackEncryption, shaka::media::mp4::SchemeType, shaka::media::mp4::OriginalFormat, shaka::media::mp4::SampleEncryption, shaka::media::mp4::SampleAuxiliaryInformationSize, shaka::media::mp4::SampleAuxiliaryInformationOffset, shaka::media::mp4::ProtectionSystemSpecificHeader, shaka::media::mp4::SegmentType, and shaka::media::mp4::FileType.

◆ ComputeSize()

uint32_t shaka::media::mp4::Box::ComputeSize ( )

Compute the size of this box. It will also update box size.

Returns
The size of result box including child boxes. A value of 0 should be returned if the box should not be written.

Definition at line 52 of file box.cc.

◆ HeaderSize()

uint32_t shaka::media::mp4::Box::HeaderSize ( ) const
virtual
Returns
box header size in bytes.

Reimplemented in shaka::media::mp4::FullBox.

Definition at line 57 of file box.cc.

◆ Parse()

bool shaka::media::mp4::Box::Parse ( BoxReader reader)

Parse the mp4 box.

Parameters
readerpoints to a BoxReader object which parses the box.

Definition at line 21 of file box.cc.

◆ ReadWriteHeaderInternal()

bool shaka::media::mp4::Box::ReadWriteHeaderInternal ( BoxBuffer buffer)
protectedvirtual

Read/write mp4 box header. Note that this function expects that ComputeSize has been invoked already.

Returns
true on success, false otherwise.

Reimplemented in shaka::media::mp4::FullBox.

Definition at line 63 of file box.cc.

◆ Write()

void shaka::media::mp4::Box::Write ( BufferWriter writer)

Write the box to buffer. This function calls ComputeSize internally to compute and update box size.

Parameters
writerpoints to a BufferWriter object which wraps the buffer for writing.

Definition at line 27 of file box.cc.

◆ WriteHeader()

void shaka::media::mp4::Box::WriteHeader ( BufferWriter writer)

Write the box header to buffer. This function calls ComputeSize internally to compute and update box size.

Parameters
writerpoints to a BufferWriter object which wraps the buffer for writing.

Definition at line 40 of file box.cc.


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