| Index: chromecast/renderer/media/cast_media_client.cc
|
| diff --git a/chromecast/renderer/media/cast_media_client.cc b/chromecast/renderer/media/cast_media_client.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a14c64bb1ef277e1b2ac5b0a5b5af68474e5023c
|
| --- /dev/null
|
| +++ b/chromecast/renderer/media/cast_media_client.cc
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chromecast/renderer/media/cast_media_client.h"
|
| +
|
| +#include "chromecast/media/base/media_codec_support.h"
|
| +#include "chromecast/media/base/supported_codec_profile_levels_memo.h"
|
| +#include "chromecast/public/media/media_capabilities_shlib.h"
|
| +
|
| +namespace chromecast {
|
| +namespace media {
|
| +
|
| +CastMediaClient::CastMediaClient(
|
| + content::ContentRendererClient* content_renderer_client,
|
| + SupportedCodecProfileLevelsMemo* supported_profiles)
|
| + : ContentMediaClient(content_renderer_client),
|
| + supported_profiles_(supported_profiles) {
|
| + DCHECK(content_renderer_client);
|
| +}
|
| +
|
| +CastMediaClient::~CastMediaClient() {}
|
| +
|
| +bool CastMediaClient::IsSupportedVideoConfig(
|
| + const ::media::VideoConfig& config) {
|
| +// TODO(servolk): make use of eotf.
|
| +#if defined(OS_ANDROID)
|
| + return supported_profiles_->IsSupportedVideoConfig(
|
| + ToCastVideoCodec(config.codec, config.profile),
|
| + ToCastVideoProfile(config.profile), config.level);
|
| +#else
|
| + return MediaCapabilitiesShlib::IsSupportedVideoConfig(
|
| + ToCastVideoCodec(config.codec, config.profile),
|
| + ToCastVideoProfile(config.profile), config.level);
|
| +#endif
|
| +}
|
| +
|
| +} // namespace media
|
| +} // namespace chromecast
|
|
|