| Index: media/formats/mp4/box_definitions.h
|
| diff --git a/media/formats/mp4/box_definitions.h b/media/formats/mp4/box_definitions.h
|
| index 127140368985bfc83af94c556df7363a984dfce4..e5a552db9c1d69b3b8fd48b633cd41dcfc2addb9 100644
|
| --- a/media/formats/mp4/box_definitions.h
|
| +++ b/media/formats/mp4/box_definitions.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "media/base/media_export.h"
|
| +#include "media/base/video_decoder_config.h"
|
| #include "media/formats/mp4/aac.h"
|
| #include "media/formats/mp4/avc.h"
|
| #include "media/formats/mp4/box_reader.h"
|
| @@ -177,6 +178,52 @@ struct MEDIA_EXPORT AVCDecoderConfigurationRecord : Box {
|
| bool ParseInternal(BufferReader* reader, const LogCB& log_cb);
|
| };
|
|
|
| +#if defined(ENABLE_HEVC_DEMUXING)
|
| +struct MEDIA_EXPORT HEVCDecoderConfigurationRecord : Box {
|
| + DECLARE_BOX_METHODS(HEVCDecoderConfigurationRecord);
|
| +
|
| + // Parses HEVCDecoderConfigurationRecord data encoded in |data|.
|
| + // Note: This method is intended to parse data outside the MP4StreamParser
|
| + // context and therefore the box header is not expected to be present
|
| + // in |data|.
|
| + // Returns true if |data| was successfully parsed.
|
| + bool Parse(const uint8* data, int data_size);
|
| +
|
| + uint8 configurationVersion;
|
| + uint8 general_profile_space;
|
| + uint8 general_tier_flag;
|
| + uint8 general_profile_idc;
|
| + uint32 general_profile_compatibility_flags;
|
| + uint64 general_constraint_indicator_flags;
|
| + uint8 general_level_idc;
|
| + uint16 min_spatial_segmentation_idc;
|
| + uint8 parallelismType;
|
| + uint8 chromaFormat;
|
| + uint8 bitDepthLumaMinus8;
|
| + uint8 bitDepthChromaMinus8;
|
| + uint16 avgFrameRate;
|
| + uint8 constantFrameRate;
|
| + uint8 numTemporalLayers;
|
| + uint8 temporalIdNested;
|
| + uint8 lengthSizeMinusOne;
|
| + uint8 numOfArrays;
|
| +
|
| + uint8 length_size;
|
| +
|
| + typedef std::vector<uint8> HVCCNALUnit;
|
| + struct HVCCNALArray {
|
| + HVCCNALArray();
|
| + ~HVCCNALArray();
|
| + uint8 first_byte;
|
| + std::vector<HVCCNALUnit> units;
|
| + };
|
| + std::vector<HVCCNALArray> arrays;
|
| +
|
| + private:
|
| + bool ParseInternal(BufferReader* reader, const LogCB& log_cb);
|
| +};
|
| +#endif
|
| +
|
| struct MEDIA_EXPORT PixelAspectRatioBox : Box {
|
| DECLARE_BOX_METHODS(PixelAspectRatioBox);
|
|
|
| @@ -195,10 +242,15 @@ struct MEDIA_EXPORT VideoSampleEntry : Box {
|
| PixelAspectRatioBox pixel_aspect;
|
| ProtectionSchemeInfo sinf;
|
|
|
| - // Currently expected to be present regardless of format.
|
| - AVCDecoderConfigurationRecord avcc;
|
| + // avcConfig is used for H.264/avc video
|
| + AVCDecoderConfigurationRecord avcConfig;
|
| +#if defined(ENABLE_HEVC_DEMUXING)
|
| + // hevcConfig is used for H.265/hevc video
|
| + HEVCDecoderConfigurationRecord hevcConfig;
|
| +#endif
|
|
|
| - bool IsFormatValid() const;
|
| + VideoDecoderConfig video_decoder_config_;
|
| + VideoDecoderConfig GetVideoDecoderConfig() const;
|
| };
|
|
|
| struct MEDIA_EXPORT ElementaryStreamDescriptor : Box {
|
|
|