5 #ifndef PACKAGER_MEDIA_CODECS_ES_DESCRIPTOR_H_ 6 #define PACKAGER_MEDIA_CODECS_ES_DESCRIPTOR_H_ 21 enum class ObjectType : uint8_t {
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_ == ObjectType::kISO_14496_3 ||
66 object_type_ == ObjectType::kISO_13818_7_AAC_LC;
70 return object_type_ == ObjectType::kDTSC ||
71 object_type_ == ObjectType::kDTSE ||
72 object_type_ == ObjectType::kDTSH ||
73 object_type_ == ObjectType::kDTSL;
79 kDecoderConfigDescrTag = 0x04,
80 kDecoderSpecificInfoTag = 0x05,
84 bool ParseDecoderConfigDescriptor(
BitReader* reader);
85 bool ParseDecoderSpecificInfo(
BitReader* reader);
88 ObjectType object_type_;
89 uint32_t max_bitrate_;
90 uint32_t avg_bitrate_;
91 std::vector<uint8_t> decoder_specific_info_;
97 #endif // PACKAGER_MEDIA_CODECS_ES_DESCRIPTOR_H_
All the methods that are virtual are virtual for mocking.