| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/mojo/services/mojo_media_client.h" | 5 #include "media/mojo/services/mojo_media_client.h" |
| 6 | 6 |
| 7 namespace media { | 7 namespace media { |
| 8 | 8 |
| 9 // PlatformMojoMediaClient default implementations. | 9 // PlatformMojoMediaClient default implementations. |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 scoped_ptr<VideoRendererSink> PlatformMojoMediaClient::CreateVideoRendererSink( | 35 scoped_ptr<VideoRendererSink> PlatformMojoMediaClient::CreateVideoRendererSink( |
| 36 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { | 36 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { |
| 37 return nullptr; | 37 return nullptr; |
| 38 } | 38 } |
| 39 | 39 |
| 40 const AudioHardwareConfig* PlatformMojoMediaClient::GetAudioHardwareConfig() { | 40 const AudioHardwareConfig* PlatformMojoMediaClient::GetAudioHardwareConfig() { |
| 41 return nullptr; | 41 return nullptr; |
| 42 } | 42 } |
| 43 | 43 |
| 44 scoped_ptr<CdmFactory> PlatformMojoMediaClient::CreateCdmFactory() { | 44 scoped_ptr<CdmFactory> PlatformMojoMediaClient::CreateCdmFactory( |
| 45 mojo::ServiceProvider* service_provider) { |
| 45 return nullptr; | 46 return nullptr; |
| 46 } | 47 } |
| 47 | 48 |
| 48 namespace internal { | 49 namespace internal { |
| 49 extern scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient(); | 50 extern scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient(); |
| 50 } // namespace internal | 51 } // namespace internal |
| 51 | 52 |
| 52 static base::LazyInstance<MojoMediaClient>::Leaky g_mojo_media_client = | 53 static base::LazyInstance<MojoMediaClient>::Leaky g_mojo_media_client = |
| 53 LAZY_INSTANCE_INITIALIZER; | 54 LAZY_INSTANCE_INITIALIZER; |
| 54 | 55 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 scoped_ptr<VideoRendererSink> MojoMediaClient::CreateVideoRendererSink( | 82 scoped_ptr<VideoRendererSink> MojoMediaClient::CreateVideoRendererSink( |
| 82 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { | 83 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { |
| 83 return mojo_media_client_->CreateVideoRendererSink(task_runner); | 84 return mojo_media_client_->CreateVideoRendererSink(task_runner); |
| 84 } | 85 } |
| 85 | 86 |
| 86 const AudioHardwareConfig* MojoMediaClient::GetAudioHardwareConfig() { | 87 const AudioHardwareConfig* MojoMediaClient::GetAudioHardwareConfig() { |
| 87 return mojo_media_client_->GetAudioHardwareConfig(); | 88 return mojo_media_client_->GetAudioHardwareConfig(); |
| 88 } | 89 } |
| 89 | 90 |
| 90 scoped_ptr<CdmFactory> MojoMediaClient::CreateCdmFactory() { | 91 scoped_ptr<CdmFactory> MojoMediaClient::CreateCdmFactory( |
| 91 return mojo_media_client_->CreateCdmFactory(); | 92 mojo::ServiceProvider* service_provider) { |
| 93 return mojo_media_client_->CreateCdmFactory(service_provider); |
| 92 } | 94 } |
| 93 | 95 |
| 94 MojoMediaClient::MojoMediaClient() | 96 MojoMediaClient::MojoMediaClient() |
| 95 : mojo_media_client_(internal::CreatePlatformMojoMediaClient().Pass()) { | 97 : mojo_media_client_(internal::CreatePlatformMojoMediaClient().Pass()) { |
| 96 DCHECK(mojo_media_client_); | 98 DCHECK(mojo_media_client_); |
| 97 } | 99 } |
| 98 | 100 |
| 99 MojoMediaClient::~MojoMediaClient() { | 101 MojoMediaClient::~MojoMediaClient() { |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace media | 104 } // namespace media |
| OLD | NEW |