Chromium Code Reviews| Index: media/base/video_decoder_config.h |
| diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h |
| index 50dee06534c3cab8c22ed0b208d69a8f3412e270..5e2122cc36bf3951e9bc8619c2f216b396a51fa0 100644 |
| --- a/media/base/video_decoder_config.h |
| +++ b/media/base/video_decoder_config.h |
| @@ -11,10 +11,13 @@ |
| #include <vector> |
| #include "base/macros.h" |
| +#include "base/optional.h" |
| #include "media/base/encryption_scheme.h" |
| +#include "media/base/hdr_metadata.h" |
| #include "media/base/media_export.h" |
| #include "media/base/video_codecs.h" |
| #include "media/base/video_types.h" |
| +#include "ui/gfx/color_space.h" |
| #include "ui/gfx/geometry/rect.h" |
| #include "ui/gfx/geometry/size.h" |
| @@ -95,7 +98,7 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| gfx::Size natural_size() const { return natural_size_; } |
| // Optional byte data required to initialize video decoders, such as H.264 |
| - // AAVC data. |
| + // AVCC data. |
| const std::vector<uint8_t>& extra_data() const { return extra_data_; } |
| // Whether the video stream is potentially encrypted. |
| @@ -108,11 +111,19 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| return encryption_scheme_; |
| } |
| + void set_color_space_info(const gfx::ColorSpace& color_space_info); |
| + base::Optional<gfx::ColorSpace> color_space_info() const; |
| + |
| + void set_hdr_metadata(const HDRMetadata& hdr_metadata); |
| + base::Optional<HDRMetadata> hdr_metadata() const; |
| + |
| private: |
| VideoCodec codec_; |
| VideoCodecProfile profile_; |
| VideoPixelFormat format_; |
| + |
| + // TODO(servolk): Deprecated, use color_space_info_ instead. |
| ColorSpace color_space_; |
| gfx::Size coded_size_; |
| @@ -123,6 +134,9 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| EncryptionScheme encryption_scheme_; |
| + base::Optional<gfx::ColorSpace> color_space_info_; |
|
hubbe
2016/09/15 17:30:10
I don't think this needs to be optional.
gfx::Colo
servolk
2016/09/15 20:29:03
I've made it optional mostly because I wasn't sure
hubbe
2016/09/15 20:42:53
I'm not actually sure this is what we want to do g
servolk
2016/09/15 23:12:41
Ok, I've looked at all code paths that invoke Vide
|
| + base::Optional<HDRMetadata> hdr_metadata_; |
| + |
| // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler |
| // generated copy constructor and assignment operator. Since the extra data is |
| // typically small, the performance impact is minimal. |