Index: media/base/video_decoder_config.cc |
diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc |
index 930ffd95d0855abb01e2f5701f693826e24d7246..a0edb401bc7e9ac183141e2fb0263ce97197311f 100644 |
--- a/media/base/video_decoder_config.cc |
+++ b/media/base/video_decoder_config.cc |
@@ -39,20 +39,20 @@ VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) { |
VideoDecoderConfig::VideoDecoderConfig() |
: codec_(kUnknownVideoCodec), |
profile_(VIDEO_CODEC_PROFILE_UNKNOWN), |
- format_(PIXEL_FORMAT_UNKNOWN), |
- is_encrypted_(false) {} |
+ format_(PIXEL_FORMAT_UNKNOWN) {} |
-VideoDecoderConfig::VideoDecoderConfig(VideoCodec codec, |
- VideoCodecProfile profile, |
- VideoPixelFormat format, |
- ColorSpace color_space, |
- const gfx::Size& coded_size, |
- const gfx::Rect& visible_rect, |
- const gfx::Size& natural_size, |
- const std::vector<uint8_t>& extra_data, |
- bool is_encrypted) { |
+VideoDecoderConfig::VideoDecoderConfig( |
+ VideoCodec codec, |
+ VideoCodecProfile profile, |
+ VideoPixelFormat format, |
+ ColorSpace color_space, |
+ const gfx::Size& coded_size, |
+ const gfx::Rect& visible_rect, |
+ const gfx::Size& natural_size, |
+ const std::vector<uint8_t>& extra_data, |
+ const EncryptionScheme& encryption_scheme) { |
Initialize(codec, profile, format, color_space, coded_size, visible_rect, |
- natural_size, extra_data, is_encrypted); |
+ natural_size, extra_data, encryption_scheme); |
} |
VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) = |
@@ -68,7 +68,7 @@ void VideoDecoderConfig::Initialize(VideoCodec codec, |
const gfx::Rect& visible_rect, |
const gfx::Size& natural_size, |
const std::vector<uint8_t>& extra_data, |
- bool is_encrypted) { |
+ const EncryptionScheme& encryption_scheme) { |
codec_ = codec; |
profile_ = profile; |
format_ = format; |
@@ -77,7 +77,7 @@ void VideoDecoderConfig::Initialize(VideoCodec codec, |
visible_rect_ = visible_rect; |
natural_size_ = natural_size; |
extra_data_ = extra_data; |
- is_encrypted_ = is_encrypted; |
+ encryption_scheme_ = encryption_scheme; |
} |
bool VideoDecoderConfig::IsValidConfig() const { |
@@ -89,14 +89,13 @@ bool VideoDecoderConfig::IsValidConfig() const { |
} |
bool VideoDecoderConfig::Matches(const VideoDecoderConfig& config) const { |
- return ((codec() == config.codec()) && |
- (format() == config.format()) && |
+ return ((codec() == config.codec()) && (format() == config.format()) && |
(profile() == config.profile()) && |
(coded_size() == config.coded_size()) && |
(visible_rect() == config.visible_rect()) && |
(natural_size() == config.natural_size()) && |
(extra_data() == config.extra_data()) && |
- (is_encrypted() == config.is_encrypted())); |
+ (encryption_scheme().Matches(config.encryption_scheme()))); |
} |
std::string VideoDecoderConfig::AsHumanReadableString() const { |