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

Unified Diff: chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc

Issue 1230593005: Reland: Change the video color space default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: big rebase Created 5 years, 5 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
Index: chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc
diff --git a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc
index 58fa2f3c14dbc19f887564df575ef08d4d96f800..1c07352eed3ce3e95648adce80721dcd19552a54 100644
--- a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc
+++ b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc
@@ -59,6 +59,7 @@ void VideoDecoderConfigMarshaller::Write(
CHECK(msg->WritePod(config.codec()));
CHECK(msg->WritePod(config.profile()));
CHECK(msg->WritePod(config.format()));
+ CHECK(msg->WritePod(config.color_space()));
SizeMarshaller::Write(config.coded_size(), msg);
RectMarshaller::Write(config.visible_rect(), msg);
SizeMarshaller::Write(config.natural_size(), msg);
@@ -74,6 +75,7 @@ void VideoDecoderConfigMarshaller::Write(
::media::VideoCodec codec;
::media::VideoCodecProfile profile;
::media::VideoPixelFormat format;
+ ::media::ColorSpace color_space;
gfx::Size coded_size;
gfx::Rect visible_rect;
gfx::Size natural_size;
@@ -84,6 +86,7 @@ void VideoDecoderConfigMarshaller::Write(
CHECK(msg->ReadPod(&codec));
CHECK(msg->ReadPod(&profile));
CHECK(msg->ReadPod(&format));
+ CHECK(msg->ReadPod(&color_space));
coded_size = SizeMarshaller::Read(msg);
visible_rect = RectMarshaller::Read(msg);
natural_size = SizeMarshaller::Read(msg);
@@ -96,6 +99,8 @@ void VideoDecoderConfigMarshaller::Write(
CHECK_LE(profile, ::media::VIDEO_CODEC_PROFILE_MAX);
CHECK_GE(format, ::media::PIXEL_FORMAT_UNKNOWN);
CHECK_LE(format, ::media::PIXEL_FORMAT_MAX);
+ CHECK_GE(color_space, ::media::COLOR_SPACE_UNSPECIFIED);
+ CHECK_LE(color_space, ::media::COLOR_SPACE_MAX);
CHECK_LT(extra_data_size, kMaxExtraDataSize);
if (extra_data_size > 0) {
extra_data.reset(new uint8[extra_data_size]);
@@ -103,7 +108,7 @@ void VideoDecoderConfigMarshaller::Write(
}
return ::media::VideoDecoderConfig(
- codec, profile, format,
+ codec, profile, format, color_space,
coded_size, visible_rect, natural_size,
extra_data.get(), extra_data_size,
is_encrypted);
« no previous file with comments | « chromecast/common/media/cma_param_traits_macros.h ('k') | chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698