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

Class for parsing or writing VP codec configuration record. More...

#include <vp_codec_configuration_record.h>

Public Types

enum  ChromaSubsampling {
  CHROMA_420_VERTICAL = 0 , CHROMA_420_COLLOCATED_WITH_LUMA = 1 , CHROMA_422 = 2 , CHROMA_444 = 3 ,
  CHROMA_440 = 4
}
 
enum  ChromaSitingValues { kUnspecified = 0 , kLeftCollocated = 1 , kTopCollocated = kLeftCollocated , kHalf = 2 }
 

Public Member Functions

 VPCodecConfigurationRecord (uint8_t profile, uint8_t level, uint8_t bit_depth, uint8_t chroma_subsampling, bool video_full_range_flag, uint8_t color_primaries, uint8_t transfer_characteristics, uint8_t matrix_coefficients, const std::vector< uint8_t > &codec_initialization_data)
 
bool ParseMP4 (const std::vector< uint8_t > &data)
 
bool ParseWebM (const std::vector< uint8_t > &data)
 
void SetVP9Level (uint16_t width, uint16_t height, double sample_duration_seconds)
 Compute and set VP9 Level based on the input attributes.
 
void WriteMP4 (std::vector< uint8_t > *data) const
 
void WriteWebM (std::vector< uint8_t > *data) const
 
std::string GetCodecString (Codec codec) const
 
void MergeFrom (const VPCodecConfigurationRecord &other)
 
void SetChromaSubsampling (uint8_t subsampling_x, uint8_t subsampling_y)
 
void SetChromaSubsampling (ChromaSubsampling chroma_subsampling)
 
void SetChromaLocation (uint8_t chroma_siting_x, uint8_t chroma_siting_y)
 
void set_profile (uint8_t profile)
 
void set_level (uint8_t level)
 
void set_bit_depth (uint8_t bit_depth)
 
void set_video_full_range_flag (bool video_full_range_flag)
 
void set_color_primaries (uint8_t color_primaries)
 
void set_transfer_characteristics (uint8_t transfer_characteristics)
 
void set_matrix_coefficients (uint8_t matrix_coefficients)
 
bool is_profile_set () const
 
bool is_level_set () const
 
bool is_bit_depth_set () const
 
bool is_chroma_subsampling_set () const
 
bool is_video_full_range_flag_set () const
 
bool is_color_primaries_set () const
 
bool is_transfer_characteristics_set () const
 
bool is_matrix_coefficients_set () const
 
bool is_chroma_location_set () const
 
uint8_t profile () const
 
uint8_t level () const
 
uint8_t bit_depth () const
 
uint8_t chroma_subsampling () const
 
bool video_full_range_flag () const
 
uint8_t color_primaries () const
 
uint8_t transfer_characteristics () const
 
uint8_t matrix_coefficients () const
 
uint8_t chroma_location () const
 

Detailed Description

Class for parsing or writing VP codec configuration record.

Definition at line 153 of file vp_codec_configuration_record.h.

Member Function Documentation

◆ GetCodecString()

std::string shaka::media::VPCodecConfigurationRecord::GetCodecString ( Codec  codec) const
Returns
The codec string.

Definition at line 297 of file vp_codec_configuration_record.cc.

◆ MergeFrom()

void shaka::media::VPCodecConfigurationRecord::MergeFrom ( const VPCodecConfigurationRecord other)

Merges the values from the given configuration. If there are values in both |*this| and |other|, |*this| is not updated.

Definition at line 319 of file vp_codec_configuration_record.cc.

◆ ParseMP4()

bool shaka::media::VPCodecConfigurationRecord::ParseMP4 ( const std::vector< uint8_t > &  data)

Parses input (in MP4 format) to extract VP codec configuration record.

Returns
false if there is parsing errors.

Definition at line 156 of file vp_codec_configuration_record.cc.

◆ ParseWebM()

bool shaka::media::VPCodecConfigurationRecord::ParseWebM ( const std::vector< uint8_t > &  data)

Parses input (in WebM format) to extract VP codec configuration record.

Returns
false if there is parsing errors.

Definition at line 188 of file vp_codec_configuration_record.cc.

◆ WriteMP4()

void shaka::media::VPCodecConfigurationRecord::WriteMP4 ( std::vector< uint8_t > *  data) const
Parameters
datashould not be null. Writes VP codec configuration record to buffer using MP4 format.

Definition at line 249 of file vp_codec_configuration_record.cc.

◆ WriteWebM()

void shaka::media::VPCodecConfigurationRecord::WriteWebM ( std::vector< uint8_t > *  data) const
Parameters
datashould not be null. Writes VP codec configuration record to buffer using WebM format.

Definition at line 266 of file vp_codec_configuration_record.cc.


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