OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chromecast/renderer/media/cast_media_client.h" |
| 6 |
| 7 #include "chromecast/media/base/media_codec_support.h" |
| 8 #include "chromecast/media/base/supported_codec_profile_levels_memo.h" |
| 9 #include "chromecast/public/media/media_capabilities_shlib.h" |
| 10 |
| 11 namespace chromecast { |
| 12 namespace media { |
| 13 |
| 14 CastMediaClient::CastMediaClient( |
| 15 content::ContentRendererClient* content_renderer_client, |
| 16 SupportedCodecProfileLevelsMemo* supported_profiles) |
| 17 : ContentMediaClient(content_renderer_client), |
| 18 supported_profiles_(supported_profiles) { |
| 19 DCHECK(content_renderer_client); |
| 20 } |
| 21 |
| 22 CastMediaClient::~CastMediaClient() {} |
| 23 |
| 24 bool CastMediaClient::IsSupportedVideoConfig( |
| 25 const ::media::VideoConfig& config) { |
| 26 // TODO(servolk): make use of eotf. |
| 27 #if defined(OS_ANDROID) |
| 28 return supported_profiles_->IsSupportedVideoConfig( |
| 29 ToCastVideoCodec(config.codec, config.profile), |
| 30 ToCastVideoProfile(config.profile), config.level); |
| 31 #else |
| 32 return MediaCapabilitiesShlib::IsSupportedVideoConfig( |
| 33 ToCastVideoCodec(config.codec, config.profile), |
| 34 ToCastVideoProfile(config.profile), config.level); |
| 35 #endif |
| 36 } |
| 37 |
| 38 } // namespace media |
| 39 } // namespace chromecast |
OLD | NEW |