Shaka Packager SDK
Public Member Functions | Protected Member Functions | List of all members
shaka::media::BaseDescriptor Class Referenceabstract

#include <es_descriptor.h>

Inheritance diagram for shaka::media::BaseDescriptor:
shaka::media::DecoderConfigDescriptor shaka::media::DecoderSpecificInfoDescriptor shaka::media::ESDescriptor shaka::media::SLConfigDescriptor

Public Member Functions

 BaseDescriptor (DescriptorTag tag)
 
bool Parse (const std::vector< uint8_t > &data)
 
bool Read (BitReader *reader)
 
void Write (BufferWriter *writer)
 
size_t ComputeSize ()
 

Protected Member Functions

void WriteHeader (BufferWriter *writer)
 Write descriptor header.
 
size_t data_size () const
 

Detailed Description

Defines the base Descriptor object as defined in ISO 14496-1:2004 Systems section 7.2.2.2. All descriptors inherit from either BaseDescriptor.

Definition at line 42 of file es_descriptor.h.

Member Function Documentation

◆ ComputeSize()

size_t shaka::media::BaseDescriptor::ComputeSize ( )

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

Returns
The size of result descriptor including child descriptors.

Definition at line 110 of file es_descriptor.cc.

◆ data_size()

size_t shaka::media::BaseDescriptor::data_size ( ) const
inlineprotected
Returns
descriptor data size without header in bytes.

Definition at line 69 of file es_descriptor.h.

◆ Parse()

bool shaka::media::BaseDescriptor::Parse ( const std::vector< uint8_t > &  data)

Parse the descriptor from input data.

Parameters
datacontains the descriptor data.

Definition at line 83 of file es_descriptor.cc.

◆ Read()

bool shaka::media::BaseDescriptor::Read ( BitReader reader)

Read the descriptor.

Parameters
readerpoints to a BitReader object.

Definition at line 88 of file es_descriptor.cc.

◆ Write()

void shaka::media::BaseDescriptor::Write ( BufferWriter writer)

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

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

Definition at line 100 of file es_descriptor.cc.


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