DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Attributes | List of all members
shaka::media::H26xByteToUnitStreamConverter Class Referenceabstract

A base class that is used to convert H.26x byte streams to NAL unit streams. More...

#include <h26x_byte_to_unit_stream_converter.h>

Inheritance diagram for shaka::media::H26xByteToUnitStreamConverter:
shaka::media::H264ByteToUnitStreamConverter shaka::media::H265ByteToUnitStreamConverter

Public Member Functions

 H26xByteToUnitStreamConverter (Nalu::CodecType type)
 
bool ConvertByteStreamToNalUnitStream (const uint8_t *input_frame, size_t input_frame_size, std::vector< uint8_t > *output_frame)
 
virtual bool GetDecoderConfigurationRecord (std::vector< uint8_t > *decoder_config) const =0
 

Static Public Attributes

static constexpr size_t kUnitStreamNaluLengthSize = 4
 

Detailed Description

A base class that is used to convert H.26x byte streams to NAL unit streams.

Definition at line 22 of file h26x_byte_to_unit_stream_converter.h.

Member Function Documentation

bool shaka::media::H26xByteToUnitStreamConverter::ConvertByteStreamToNalUnitStream ( const uint8_t *  input_frame,
size_t  input_frame_size,
std::vector< uint8_t > *  output_frame 
)

Converts a whole byte stream encoded video frame to NAL unit stream format.

Parameters
input_frameis a buffer containing a whole H.26x frame in byte stream format.
input_frame_sizeis the size of the H.26x frame, in bytes.
output_frameis a pointer to a vector which will receive the converted frame.
Returns
true if successful, false otherwise.

Definition at line 28 of file h26x_byte_to_unit_stream_converter.cc.

virtual bool shaka::media::H26xByteToUnitStreamConverter::GetDecoderConfigurationRecord ( std::vector< uint8_t > *  decoder_config) const
pure virtual

Creates either an AVCDecoderConfigurationRecord or a HEVCDecoderConfigurationRecord from the units extracted from the byte stream.

Parameters
decoder_configis a pointer to a vector, which on successful return will contain the computed record.
Returns
true if successful, or false otherwise.

Implemented in shaka::media::H264ByteToUnitStreamConverter, and shaka::media::H265ByteToUnitStreamConverter.


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