5 #ifndef MEDIA_CODECS_ES_DESCRIPTOR_H_
6 #define MEDIA_CODECS_ES_DESCRIPTOR_H_
24 kISO_13818_7_AAC_LC = 0x67,
39 bool Parse(
const std::vector<uint8_t>& data);
41 size_t ComputeSize()
const;
43 uint16_t esid()
const {
return esid_; }
44 void set_esid(uint16_t esid) { esid_ = esid; }
46 uint32_t max_bitrate()
const {
return max_bitrate_; }
47 void set_max_bitrate(uint32_t max_bitrate) { max_bitrate_ = max_bitrate; }
49 uint32_t avg_bitrate()
const {
return avg_bitrate_; }
50 void set_avg_bitrate(uint32_t avg_bitrate) { avg_bitrate_ = avg_bitrate; }
52 ObjectType object_type()
const {
return object_type_; }
53 void set_object_type(ObjectType object_type) { object_type_ = object_type; }
55 const std::vector<uint8_t>& decoder_specific_info()
const {
56 return decoder_specific_info_;
58 void set_decoder_specific_info(
59 const std::vector<uint8_t>& decoder_specific_info) {
60 decoder_specific_info_ = decoder_specific_info;
65 return object_type_ == kISO_14496_3 || object_type_ == kISO_13818_7_AAC_LC;
69 return object_type_ == kDTSC || object_type_ == kDTSE ||
70 object_type_ == kDTSH || object_type_ == kDTSL;
76 kDecoderConfigDescrTag = 0x04,
77 kDecoderSpecificInfoTag = 0x05,
81 bool ParseDecoderConfigDescriptor(BitReader* reader);
82 bool ParseDecoderSpecificInfo(BitReader* reader);
85 ObjectType object_type_;
86 uint32_t max_bitrate_;
87 uint32_t avg_bitrate_;
88 std::vector<uint8_t> decoder_specific_info_;
94 #endif // MEDIA_CODECS_ES_DESCRIPTOR_H_