OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "media/base/video_decoder_config.h" | 5 #include "media/base/video_decoder_config.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const EncryptionScheme& encryption_scheme) { | 60 const EncryptionScheme& encryption_scheme) { |
61 Initialize(codec, profile, format, color_space, coded_size, visible_rect, | 61 Initialize(codec, profile, format, color_space, coded_size, visible_rect, |
62 natural_size, extra_data, encryption_scheme); | 62 natural_size, extra_data, encryption_scheme); |
63 } | 63 } |
64 | 64 |
65 VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) = | 65 VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) = |
66 default; | 66 default; |
67 | 67 |
68 VideoDecoderConfig::~VideoDecoderConfig() {} | 68 VideoDecoderConfig::~VideoDecoderConfig() {} |
69 | 69 |
| 70 void VideoDecoderConfig::SetColorMetadata(const ColorMetadata& color_metadata) { |
| 71 color_metadata_ = color_metadata; |
| 72 } |
| 73 |
| 74 base::Optional<ColorMetadata> VideoDecoderConfig::GetColorMetadata() const { |
| 75 return color_metadata_; |
| 76 } |
| 77 |
70 void VideoDecoderConfig::Initialize(VideoCodec codec, | 78 void VideoDecoderConfig::Initialize(VideoCodec codec, |
71 VideoCodecProfile profile, | 79 VideoCodecProfile profile, |
72 VideoPixelFormat format, | 80 VideoPixelFormat format, |
73 ColorSpace color_space, | 81 ColorSpace color_space, |
74 const gfx::Size& coded_size, | 82 const gfx::Size& coded_size, |
75 const gfx::Rect& visible_rect, | 83 const gfx::Rect& visible_rect, |
76 const gfx::Size& natural_size, | 84 const gfx::Size& natural_size, |
77 const std::vector<uint8_t>& extra_data, | 85 const std::vector<uint8_t>& extra_data, |
78 const EncryptionScheme& encryption_scheme) { | 86 const EncryptionScheme& encryption_scheme) { |
79 codec_ = codec; | 87 codec_ = codec; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y() | 121 << " visible rect: [" << visible_rect().x() << "," << visible_rect().y() |
114 << "," << visible_rect().width() << "," << visible_rect().height() << "]" | 122 << "," << visible_rect().width() << "," << visible_rect().height() << "]" |
115 << " natural size: [" << natural_size().width() << "," | 123 << " natural size: [" << natural_size().width() << "," |
116 << natural_size().height() << "]" | 124 << natural_size().height() << "]" |
117 << " has extra data? " << (extra_data().empty() ? "false" : "true") | 125 << " has extra data? " << (extra_data().empty() ? "false" : "true") |
118 << " encrypted? " << (is_encrypted() ? "true" : "false"); | 126 << " encrypted? " << (is_encrypted() ? "true" : "false"); |
119 return s.str(); | 127 return s.str(); |
120 } | 128 } |
121 | 129 |
122 } // namespace media | 130 } // namespace media |
OLD | NEW |