| // 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/audio_parameters.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::IsSupportedAudioType(const media::AudioType& type) { |
| return GetContentClient()->renderer()->IsSupportedAudioType(type); |
| } |
| |
| bool RenderMediaClient::IsSupportedVideoType(const media::VideoType& type) { |
| return GetContentClient()->renderer()->IsSupportedVideoType(type); |
| } |
| |
| bool RenderMediaClient::IsSupportedBitstreamAudioCodec( |
| media::AudioCodec codec) { |
| return GetContentClient()->renderer()->IsSupportedBitstreamAudioCodec(codec); |
| } |
| |
| base::Optional<::media::AudioRendererAlgorithmParameters> |
| RenderMediaClient::GetAudioRendererAlgorithmParameters( |
| media::AudioParameters audio_parameters) { |
| return GetContentClient()->renderer()->GetAudioRendererAlgorithmParameters( |
| audio_parameters); |
| } |
| |
| } // namespace content |