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_BT_2020_NON_CONSTANT_LUMINANCE = 3,
28 COLOR_SPACE_BT_2020_CONSTANT_LUMINANCE = 4,
32 enum ChromaSubsampling {
33 CHROMA_420_VERTICAL = 0,
34 CHROMA_420_COLLOCATED_WITH_LUMA = 1,
45 uint8_t chroma_subsampling,
46 uint8_t transfer_function,
47 bool video_full_range_flag,
48 const std::vector<uint8_t>& codec_initialization_data);
53 bool Parse(
const std::vector<uint8_t>& data);
57 void Write(std::vector<uint8_t>* data)
const;
62 void set_profile(uint8_t profile) { profile_ = profile; }
63 void set_level(uint8_t level) { level_ = level; }
64 void set_bit_depth(uint8_t bit_depth) { bit_depth_ = bit_depth; }
65 void set_color_space(uint8_t color_space) { color_space_ = color_space; }
66 void set_chroma_subsampling(uint8_t chroma_subsampling) {
67 chroma_subsampling_ = chroma_subsampling;
69 void set_transfer_function(uint8_t transfer_function) {
70 transfer_function_ = transfer_function;
72 void set_video_full_range_flag(
bool video_full_range_flag) {
73 video_full_range_flag_ = video_full_range_flag;
76 uint8_t profile()
const {
return profile_; }
77 uint8_t level()
const {
return level_; }
78 uint8_t bit_depth()
const {
return bit_depth_; }
79 uint8_t color_space()
const {
return color_space_; }
80 uint8_t chroma_subsampling()
const {
return chroma_subsampling_; }
81 uint8_t transfer_function()
const {
return transfer_function_; }
82 bool video_full_range_flag()
const {
return video_full_range_flag_; }
89 uint8_t chroma_subsampling_;
90 uint8_t transfer_function_;
91 bool video_full_range_flag_;
92 std::vector<uint8_t> codec_initialization_data_;
100 #endif // MEDIA_FILTERS_VP_CODEC_CONFIGURATION_H_