Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Unified Diff: media/base/video_decoder_config.cc

Issue 1786733004: Revert of media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_decoder_config.h ('k') | media/base/video_decoder_config_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_decoder_config.cc
diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc
index a0edb401bc7e9ac183141e2fb0263ce97197311f..930ffd95d0855abb01e2f5701f693826e24d7246 100644
--- a/media/base/video_decoder_config.cc
+++ b/media/base/video_decoder_config.cc
@@ -39,20 +39,20 @@
VideoDecoderConfig::VideoDecoderConfig()
: codec_(kUnknownVideoCodec),
profile_(VIDEO_CODEC_PROFILE_UNKNOWN),
- format_(PIXEL_FORMAT_UNKNOWN) {}
+ format_(PIXEL_FORMAT_UNKNOWN),
+ is_encrypted_(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,
- const EncryptionScheme& encryption_scheme) {
+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) {
Initialize(codec, profile, format, color_space, coded_size, visible_rect,
- natural_size, extra_data, encryption_scheme);
+ natural_size, extra_data, is_encrypted);
}
VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) =
@@ -68,7 +68,7 @@
const gfx::Rect& visible_rect,
const gfx::Size& natural_size,
const std::vector<uint8_t>& extra_data,
- const EncryptionScheme& encryption_scheme) {
+ bool is_encrypted) {
codec_ = codec;
profile_ = profile;
format_ = format;
@@ -77,7 +77,7 @@
visible_rect_ = visible_rect;
natural_size_ = natural_size;
extra_data_ = extra_data;
- encryption_scheme_ = encryption_scheme;
+ is_encrypted_ = is_encrypted;
}
bool VideoDecoderConfig::IsValidConfig() const {
@@ -89,13 +89,14 @@
}
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()) &&
- (encryption_scheme().Matches(config.encryption_scheme())));
+ (is_encrypted() == config.is_encrypted()));
}
std::string VideoDecoderConfig::AsHumanReadableString() const {
« no previous file with comments | « media/base/video_decoder_config.h ('k') | media/base/video_decoder_config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698