7 #ifndef MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_
8 #define MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_
14 #include "packager/base/macros.h"
15 #include "packager/media/base/video_stream_info.h"
17 namespace edash_packager {
24 COLOR_SPACE_UNSPECIFIED = 0,
25 COLOR_SPACE_BT_601 = 1,
26 COLOR_SPACE_BT_709 = 2,
27 COLOR_SPACE_SMPTE_170 = 3,
28 COLOR_SPACE_SMPTE_240 = 4,
29 COLOR_SPACE_BT_2020_NON_CONSTANT_LUMINANCE = 5,
30 COLOR_SPACE_BT_2020_CONSTANT_LUMINANCE = 6,
34 enum ChromaSubsampling {
35 CHROMA_420_VERTICAL = 0,
36 CHROMA_420_COLLOCATED_WITH_LUMA = 1,
47 uint8_t chroma_subsampling,
48 uint8_t transfer_function,
49 bool video_full_range_flag,
50 const std::vector<uint8_t>& codec_initialization_data);
55 bool Parse(
const std::vector<uint8_t>& data);
59 void Write(std::vector<uint8_t>* data)
const;
64 void set_profile(uint8_t profile) { profile_ = profile; }
65 void set_level(uint8_t level) { level_ = level; }
66 void set_bit_depth(uint8_t bit_depth) { bit_depth_ = bit_depth; }
67 void set_color_space(uint8_t color_space) { color_space_ = color_space; }
68 void set_chroma_subsampling(uint8_t chroma_subsampling) {
69 chroma_subsampling_ = chroma_subsampling;
71 void set_transfer_function(uint8_t transfer_function) {
72 transfer_function_ = transfer_function;
74 void set_video_full_range_flag(
bool video_full_range_flag) {
75 video_full_range_flag_ = video_full_range_flag;
78 uint8_t profile()
const {
return profile_; }
79 uint8_t level()
const {
return level_; }
80 uint8_t bit_depth()
const {
return bit_depth_; }
81 uint8_t color_space()
const {
return color_space_; }
82 uint8_t chroma_subsampling()
const {
return chroma_subsampling_; }
83 uint8_t transfer_function()
const {
return transfer_function_; }
84 bool video_full_range_flag()
const {
return video_full_range_flag_; }
91 uint8_t chroma_subsampling_;
92 uint8_t transfer_function_;
93 bool video_full_range_flag_;
94 std::vector<uint8_t> codec_initialization_data_;
104 #endif // MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_