| Index: media/base/video_decoder_config.cc
|
| diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc
|
| index dfe7254e9aff1919d7cd0c442eed5df11b20faac..8c81a6de63eef2d428677a5e3977635a5688632b 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_(false) {}
|
|
|
| -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() {}
|
| @@ -65,7 +66,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;
|
| @@ -74,7 +75,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 {
|
| @@ -86,14 +87,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 {
|
| @@ -110,4 +110,8 @@ std::string VideoDecoderConfig::AsHumanReadableString() const {
|
| return s.str();
|
| }
|
|
|
| +bool VideoDecoderConfig::is_encrypted() const {
|
| + return encryption_scheme_.is_encrypted();
|
| +}
|
| +
|
| } // namespace media
|
|
|