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

Unified Diff: media/mojo/services/media_type_converters.cc

Issue 1221903003: Change the video color space default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 d1630df114450c82bd2e8bdbaf64c5559b42cfa4..849739fb3090d929c3a02ca31b2dee102209fe12 100644
--- a/media/mojo/services/media_type_converters.cc
+++ b/media/mojo/services/media_type_converters.cc
@@ -143,6 +143,23 @@ ASSERT_ENUM_EQ_RAW(VideoFrame::Format,
VideoFrame::FORMAT_MAX,
VIDEO_FORMAT_FORMAT_MAX);
+// ColorSpace.
+ASSERT_ENUM_EQ_RAW(VideoFrame::ColorSpace,
+ VideoFrame::COLOR_SPACE_UNSPECIFIED,
+ COLOR_SPACE_UNSPECIFIED);
+ASSERT_ENUM_EQ_RAW(VideoFrame::ColorSpace,
+ VideoFrame::COLOR_SPACE_JPEG,
+ COLOR_SPACE_JPEG);
+ASSERT_ENUM_EQ_RAW(VideoFrame::ColorSpace,
+ VideoFrame::COLOR_SPACE_HD_REC709,
+ COLOR_SPACE_HD_REC709);
+ASSERT_ENUM_EQ_RAW(VideoFrame::ColorSpace,
+ VideoFrame::COLOR_SPACE_SD_REC601,
+ COLOR_SPACE_SD_REC601);
+ASSERT_ENUM_EQ_RAW(VideoFrame::ColorSpace,
+ VideoFrame::COLOR_SPACE_MAX,
+ COLOR_SPACE_MAX);
+
// VideoCodec
ASSERT_ENUM_EQ_RAW(VideoCodec, kUnknownVideoCodec, VIDEO_CODEC_UNKNOWN);
ASSERT_ENUM_EQ(VideoCodec, kCodec, VIDEO_CODEC_, H264);
@@ -426,6 +443,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());
@@ -447,7 +465,7 @@ TypeConverter<media::VideoDecoderConfig, VideoDecoderConfigPtr>::Convert(
static_cast<media::VideoCodec>(input->codec),
static_cast<media::VideoCodecProfile>(input->profile),
static_cast<media::VideoFrame::Format>(input->format),
- media::VideoFrame::COLOR_SPACE_UNSPECIFIED,
+ static_cast<media::VideoFrame::ColorSpace>(input->color_space),
input->coded_size.To<gfx::Size>(),
input->visible_rect.To<gfx::Rect>(),
input->natural_size.To<gfx::Size>(),
« 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