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

Unified Diff: media/mojo/services/media_type_converters.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
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/test/data/blackwhite_yuv420p_rec709.mp4 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_type_converters.cc
diff --git a/media/mojo/services/media_type_converters.cc b/media/mojo/services/media_type_converters.cc
index d3bfe37ca5ab2d1b9ba649e31751fe71d203469c..b0920a3343c02102d4c172fce6a10e83d0fec3c1 100644
--- a/media/mojo/services/media_type_converters.cc
+++ b/media/mojo/services/media_type_converters.cc
@@ -142,6 +142,15 @@ ASSERT_ENUM_EQ_RAW(VideoPixelFormat, PIXEL_FORMAT_ARGB, VIDEO_FORMAT_ARGB);
ASSERT_ENUM_EQ_RAW(VideoPixelFormat, PIXEL_FORMAT_XRGB, VIDEO_FORMAT_XRGB);
ASSERT_ENUM_EQ_RAW(VideoPixelFormat, PIXEL_FORMAT_MAX, VIDEO_FORMAT_FORMAT_MAX);
+// ColorSpace.
+ASSERT_ENUM_EQ_RAW(ColorSpace,
+ COLOR_SPACE_UNSPECIFIED,
+ COLOR_SPACE_UNSPECIFIED);
+ASSERT_ENUM_EQ_RAW(ColorSpace, COLOR_SPACE_JPEG, COLOR_SPACE_JPEG);
+ASSERT_ENUM_EQ_RAW(ColorSpace, COLOR_SPACE_HD_REC709, COLOR_SPACE_HD_REC709);
+ASSERT_ENUM_EQ_RAW(ColorSpace, COLOR_SPACE_SD_REC601, COLOR_SPACE_SD_REC601);
+ASSERT_ENUM_EQ_RAW(ColorSpace, COLOR_SPACE_MAX, COLOR_SPACE_MAX);
+
// VideoCodec
ASSERT_ENUM_EQ_RAW(VideoCodec, kUnknownVideoCodec, VIDEO_CODEC_UNKNOWN);
ASSERT_ENUM_EQ(VideoCodec, kCodec, VIDEO_CODEC_, H264);
@@ -425,6 +434,7 @@ TypeConverter<VideoDecoderConfigPtr, media::VideoDecoderConfig>::Convert(
config->codec = static_cast<VideoCodec>(input.codec());
config->profile = static_cast<VideoCodecProfile>(input.profile());
config->format = static_cast<VideoFormat>(input.format());
+ config->color_space = static_cast<ColorSpace>(input.color_space());
config->coded_size = Size::From(input.coded_size());
config->visible_rect = Rect::From(input.visible_rect());
config->natural_size = Size::From(input.natural_size());
@@ -446,8 +456,9 @@ TypeConverter<media::VideoDecoderConfig, VideoDecoderConfigPtr>::Convert(
static_cast<media::VideoCodec>(input->codec),
static_cast<media::VideoCodecProfile>(input->profile),
static_cast<media::VideoPixelFormat>(input->format),
- media::COLOR_SPACE_UNSPECIFIED, input->coded_size.To<gfx::Size>(),
- input->visible_rect.To<gfx::Rect>(), input->natural_size.To<gfx::Size>(),
+ static_cast<media::ColorSpace>(input->color_space),
+ input->coded_size.To<gfx::Size>(), input->visible_rect.To<gfx::Rect>(),
+ input->natural_size.To<gfx::Size>(),
input->extra_data.size() ? &input->extra_data.front() : NULL,
input->extra_data.size(), input->is_encrypted, false);
return config;
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/test/data/blackwhite_yuv420p_rec709.mp4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698