Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: media/mojo/services/default_mojo_media_client.cc

Issue 1529063004: Pass MojoMediaClient instance to MojoMediaApplication constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added bug number Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "media/audio/audio_manager_base.h" 8 #include "media/audio/audio_manager_base.h"
9 #include "media/audio/audio_output_stream_sink.h" 9 #include "media/audio/audio_output_stream_sink.h"
10 #include "media/audio/fake_audio_log_factory.h" 10 #include "media/audio/fake_audio_log_factory.h"
11 #include "media/base/audio_hardware_config.h" 11 #include "media/base/audio_hardware_config.h"
12 #include "media/base/media.h" 12 #include "media/base/media.h"
13 #include "media/base/null_video_sink.h" 13 #include "media/base/null_video_sink.h"
14 #include "media/cdm/default_cdm_factory.h" 14 #include "media/cdm/default_cdm_factory.h"
15 #include "media/renderers/default_renderer_factory.h" 15 #include "media/renderers/default_renderer_factory.h"
16 #include "media/renderers/gpu_video_accelerator_factories.h" 16 #include "media/renderers/gpu_video_accelerator_factories.h"
17 17
18 namespace media { 18 namespace media {
19 namespace internal { 19 namespace internal {
20 20
21 class DefaultMojoMediaClient : public PlatformMojoMediaClient { 21 class DefaultMojoMediaClient : public PlatformMojoMediaClient {
22 public: 22 public:
23 DefaultMojoMediaClient() { 23 DefaultMojoMediaClient() {}
24
25 void Initialize() override {
24 InitializeMediaLibrary(); 26 InitializeMediaLibrary();
25 27
26 // TODO(dalecurtis): We should find a single owner per process for the audio 28 // TODO(dalecurtis): We should find a single owner per process for the audio
27 // manager or make it a lazy instance. It's not safe to call Get()/Create() 29 // manager or make it a lazy instance. It's not safe to call Get()/Create()
28 // across multiple threads... 30 // across multiple threads...
29 // 31 //
30 // TODO(dalecurtis): Eventually we'll want something other than a fake audio 32 // TODO(dalecurtis): Eventually we'll want something other than a fake audio
31 // log factory here too. We should probably at least DVLOG() such info. 33 // log factory here too. We should probably at least DVLOG() such info.
32 AudioManager* audio_manager = AudioManager::Get(); 34 AudioManager* audio_manager = AudioManager::Get();
33 if (!audio_manager) 35 if (!audio_manager)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 69
68 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient); 70 DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient);
69 }; 71 };
70 72
71 scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient() { 73 scoped_ptr<PlatformMojoMediaClient> CreatePlatformMojoMediaClient() {
72 return make_scoped_ptr(new DefaultMojoMediaClient()); 74 return make_scoped_ptr(new DefaultMojoMediaClient());
73 } 75 }
74 76
75 } // namespace internal 77 } // namespace internal
76 } // namespace media 78 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698