1 // Copyright 2014 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.
5 #include "media/mojo/services/renderer_config.h"
10 extern scoped_ptr
<PlatformRendererConfig
> CreatePlatformRendererConfig();
11 } // namespace internal
13 static base::LazyInstance
<RendererConfig
>::Leaky g_platform_config
=
14 LAZY_INSTANCE_INITIALIZER
;
17 RendererConfig
* RendererConfig::Get() {
18 return g_platform_config
.Pointer();
21 ScopedVector
<AudioDecoder
> RendererConfig::GetAudioDecoders(
22 const scoped_refptr
<base::SingleThreadTaskRunner
>& media_task_runner
,
23 const LogCB
& media_log_cb
) {
24 return renderer_config_
->GetAudioDecoders(media_task_runner
, media_log_cb
);
27 ScopedVector
<VideoDecoder
> RendererConfig::GetVideoDecoders(
28 const scoped_refptr
<base::SingleThreadTaskRunner
>& media_task_runner
,
29 const LogCB
& media_log_cb
) {
30 return renderer_config_
->GetVideoDecoders(media_task_runner
, media_log_cb
);
33 scoped_refptr
<AudioRendererSink
> RendererConfig::GetAudioRendererSink() {
34 return renderer_config_
->GetAudioRendererSink();
37 const AudioHardwareConfig
& RendererConfig::GetAudioHardwareConfig() {
38 return renderer_config_
->GetAudioHardwareConfig();
41 RendererConfig::RendererConfig()
42 : renderer_config_(internal::CreatePlatformRendererConfig().Pass()) {
45 RendererConfig::~RendererConfig() {