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..4a76c8e190b5a780f1e7866d9503739f43610abc 100644 |
--- a/media/base/video_decoder_config.cc |
+++ b/media/base/video_decoder_config.cc |
@@ -40,19 +40,20 @@ VideoDecoderConfig::VideoDecoderConfig() |
: codec_(kUnknownVideoCodec), |
profile_(VIDEO_CODEC_PROFILE_UNKNOWN), |
format_(PIXEL_FORMAT_UNKNOWN), |
- is_encrypted_(false) {} |
+ encryption_scheme_() {} |
xhwang
2016/03/03 22:33:01
This is not necessary.
dougsteed
2016/03/04 19:07:30
Done.
|
-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 +69,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 +78,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 +90,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 { |
@@ -113,4 +113,8 @@ std::string VideoDecoderConfig::AsHumanReadableString() const { |
return s.str(); |
} |
+bool VideoDecoderConfig::is_encrypted() const { |
+ return encryption_scheme_.is_encrypted(); |
+} |
xhwang
2016/03/03 22:33:01
nit: this can be inlined in the header file
dougsteed
2016/03/04 19:07:30
Done.
|
+ |
} // namespace media |