| // Copyright 2014 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 "content/renderer/media/render_media_client.h" |
| |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/time/default_tick_clock.h" |
| #include "content/public/common/content_client.h" |
| #include "content/public/renderer/content_renderer_client.h" |
| #include "media/base/media_switches.h" |
| #include "media/base/video_color_space.h" |
| #include "ui/display/display_switches.h" |
| |
| namespace content { |
| |
| void RenderMediaClient::Initialize() { |
| static RenderMediaClient* client = new RenderMediaClient(); |
| media::SetMediaClient(client); |
| } |
| |
| RenderMediaClient::RenderMediaClient() {} |
| |
| RenderMediaClient::~RenderMediaClient() { |
| } |
| |
| void RenderMediaClient::AddSupportedKeySystems( |
| std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { |
| GetContentClient()->renderer()->AddSupportedKeySystems(key_systems); |
| } |
| |
| bool RenderMediaClient::IsKeySystemsUpdateNeeded() { |
| return GetContentClient()->renderer()->IsKeySystemsUpdateNeeded(); |
| } |
| |
| bool RenderMediaClient::IsSupportedAudioConfig( |
| const media::AudioConfig& config) { |
| return GetContentClient()->renderer()->IsSupportedAudioConfig(config); |
| } |
| |
| bool RenderMediaClient::IsSupportedVideoConfig( |
| const media::VideoConfig& config) { |
| return GetContentClient()->renderer()->IsSupportedVideoConfig(config); |
| } |
| |
| bool RenderMediaClient::IsSupportedBitstreamAudioCodec( |
| media::AudioCodec codec) { |
| return GetContentClient()->renderer()->IsSupportedBitstreamAudioCodec(codec); |
| } |
| |
| } // namespace content |