| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FORMATS_MP4_DOLBY_VISION_H_ | 5 #ifndef MEDIA_FORMATS_MP4_DOLBY_VISION_H_ |
| 6 #define MEDIA_FORMATS_MP4_DOLBY_VISION_H_ | 6 #define MEDIA_FORMATS_MP4_DOLBY_VISION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 12 #include "media/formats/mp4/box_definitions.h" | 12 #include "media/formats/mp4/box_definitions.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 namespace mp4 { | 16 namespace mp4 { |
| 17 | 17 |
| 18 // The structure of the configuration is defined in Dolby Streams Within the ISO | 18 // The structure of the configuration is defined in Dolby Streams Within the ISO |
| 19 // Base Media File Format v1.1 section 3.2. | 19 // Base Media File Format v1.1 section 3.2. |
| 20 struct MEDIA_EXPORT DolbyVisionConfiguration : Box { | 20 struct MEDIA_EXPORT DolbyVisionConfiguration : Box { |
| 21 DECLARE_BOX_METHODS(DolbyVisionConfiguration); | 21 DECLARE_BOX_METHODS(DolbyVisionConfiguration); |
| 22 | 22 |
| 23 // Parses DolbyVisionConfiguration data encoded in |data|. | 23 // Parses DolbyVisionConfiguration data encoded in |data|. |
| 24 // Note: This method is intended to parse data outside the MP4StreamParser | 24 // Note: This method is intended to parse data outside the MP4StreamParser |
| 25 // context and therefore the box header is not expected to be present | 25 // context and therefore the box header is not expected to be present |
| 26 // in |data|. | 26 // in |data|. |
| 27 // Returns true if |data| was successfully parsed. | 27 // Returns true if |data| was successfully parsed. |
| 28 bool Parse(const uint8_t* data, int data_size); | 28 bool ParseForTesting(const uint8_t* data, int data_size); |
| 29 | 29 |
| 30 uint8_t dv_version_major; | 30 uint8_t dv_version_major; |
| 31 uint8_t dv_version_minor; | 31 uint8_t dv_version_minor; |
| 32 uint8_t dv_profile; | 32 uint8_t dv_profile; |
| 33 uint8_t dv_level; | 33 uint8_t dv_level; |
| 34 uint8_t rpu_present_flag; | 34 uint8_t rpu_present_flag; |
| 35 uint8_t el_present_flag; | 35 uint8_t el_present_flag; |
| 36 uint8_t bl_present_flag; | 36 uint8_t bl_present_flag; |
| 37 | 37 |
| 38 VideoCodecProfile codec_profile; | 38 VideoCodecProfile codec_profile; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 bool ParseInternal(BufferReader* reader, | 41 bool ParseInternal(BufferReader* reader, MediaLog* media_log); |
| 42 const scoped_refptr<MediaLog>& media_log); | |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 } // namespace mp4 | 44 } // namespace mp4 |
| 46 } // namespace media | 45 } // namespace media |
| 47 | 46 |
| 48 #endif // MEDIA_FORMATS_MP4_DOLBY_VISION_H_ | 47 #endif // MEDIA_FORMATS_MP4_DOLBY_VISION_H_ |
| OLD | NEW |