1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_
6 #define MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_
10 #include "base/basictypes.h"
11 #include "media/base/media_export.h"
19 // The following values are extracted from ISO 14496 Part 1 Table 5 -
20 // objectTypeIndication Values. Only values currently in use are included.
23 kISO_14496_3
= 0x40, // MPEG4 AAC
24 kISO_13818_7_AAC_LC
= 0x67 // MPEG2 AAC-LC
27 // This class parse object type and decoder specific information from an
28 // elementary stream descriptor, which is usually contained in an esds box.
29 // Please refer to ISO 14496 Part 1 7.2.6.5 for more details.
30 class MEDIA_EXPORT ESDescriptor
{
32 // Utility function to check if the given object type is AAC.
33 static bool IsAAC(uint8 object_type
);
38 bool Parse(const std::vector
<uint8
>& data
);
40 uint8
object_type() const;
41 const std::vector
<uint8
>& decoder_specific_info() const;
46 kDecoderConfigDescrTag
= 0x04,
47 kDecoderSpecificInfoTag
= 0x05
50 bool ParseDecoderConfigDescriptor(BitReader
* reader
);
51 bool ParseDecoderSpecificInfo(BitReader
* reader
);
54 std::vector
<uint8
> decoder_specific_info_
;
61 #endif // MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_