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>(), |