Chromium Code Reviews| Index: chromecast/media/cma/base/decoder_config_adapter.cc |
| diff --git a/chromecast/media/cma/base/decoder_config_adapter.cc b/chromecast/media/cma/base/decoder_config_adapter.cc |
| index 691ee4768650621b1a71c03c474322afea1bc090..6172104fc7ecc2fb12c2b4358161036704b0714a 100644 |
| --- a/chromecast/media/cma/base/decoder_config_adapter.cc |
| +++ b/chromecast/media/cma/base/decoder_config_adapter.cc |
| @@ -236,8 +236,46 @@ VideoConfig DecoderConfigAdapter::ToCastVideoConfig( |
| video_config.extra_data = config.extra_data(); |
| video_config.encryption_scheme = ToEncryptionScheme( |
| config.encryption_scheme()); |
| + |
| + // TODO(servolk): gfx::ColorSpace currently doesn't provide getters for color |
| + // space components. We'll need to way to fix this. |
|
halliwell
2016/09/23 17:31:05
Can you file a bug to not forget this and add the
servolk
2016/09/23 18:28:08
Done.
|
| + // video_config.primaries = |
| + // static_cast<PrimaryID>(config.color_space_info().primaries()); |
| + // video_config.transfer = |
| + // static_cast<TransferID>(config.color_space_info().transfer()); |
| + // video_config.matrix = |
| + // static_cast<MatrixID>(config.color_space_info().matrix()); |
| + // video_config.range = |
| + // static_cast<RangeID>(config.color_space_info().range()); |
| + |
| + base::Optional<::media::HDRMetadata> hdr_metadata = config.hdr_metadata(); |
| + if (hdr_metadata) { |
| + video_config.have_hdr_metadata = true; |
| + video_config.hdr_metadata.max_cll = hdr_metadata->max_cll; |
| + video_config.hdr_metadata.max_fall = hdr_metadata->max_fall; |
| + |
| + const auto& mm1 = hdr_metadata->mastering_metadata; |
| + auto& mm2 = video_config.hdr_metadata.mastering_metadata; |
| + mm2.primary_r_chromaticity_x = mm1.primary_r_chromaticity_x; |
| + mm2.primary_r_chromaticity_y = mm1.primary_r_chromaticity_y; |
| + mm2.primary_g_chromaticity_x = mm1.primary_g_chromaticity_x; |
| + mm2.primary_g_chromaticity_y = mm1.primary_g_chromaticity_y; |
| + mm2.primary_b_chromaticity_x = mm1.primary_b_chromaticity_x; |
| + mm2.primary_b_chromaticity_y = mm1.primary_b_chromaticity_y; |
| + mm2.white_point_chromaticity_x = mm1.white_point_chromaticity_x; |
| + mm2.white_point_chromaticity_y = mm1.white_point_chromaticity_y; |
| + mm2.luminance_max = mm1.luminance_max; |
| + mm2.luminance_min = mm1.luminance_min; |
| + } |
| + |
| return video_config; |
| } |
| +MasteringMetadata::MasteringMetadata() {} |
| +MasteringMetadata::MasteringMetadata(const MasteringMetadata& rhs) = default; |
| + |
| +HDRMetadata::HDRMetadata() {} |
| +HDRMetadata::HDRMetadata(const HDRMetadata& rhs) = default; |
| + |
| } // namespace media |
| } // namespace chromecast |