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

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

Issue 1179953006: [Merge to M44] Chromium changes to statically link ffmpeg. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: Created 5 years, 6 months 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/media_unittests.isolate ('k') | media/test/pipeline_integration_test.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/renderer_config.h" 5 #include "media/mojo/services/renderer_config.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "media/audio/audio_manager_base.h" 9 #include "media/audio/audio_manager_base.h"
10 #include "media/audio/audio_output_stream_sink.h" 10 #include "media/audio/audio_output_stream_sink.h"
(...skipping 23 matching lines...) Expand all
34 void PaintFrameUsingOldRenderingPath( 34 void PaintFrameUsingOldRenderingPath(
35 const scoped_refptr<VideoFrame>& frame) override {} 35 const scoped_refptr<VideoFrame>& frame) override {}
36 36
37 private: 37 private:
38 DISALLOW_COPY_AND_ASSIGN(DummyVideoRendererSink); 38 DISALLOW_COPY_AND_ASSIGN(DummyVideoRendererSink);
39 }; 39 };
40 40
41 class DefaultRendererConfig : public PlatformRendererConfig { 41 class DefaultRendererConfig : public PlatformRendererConfig {
42 public: 42 public:
43 DefaultRendererConfig() { 43 DefaultRendererConfig() {
44 // TODO(dalecurtis): This will not work if the process is sandboxed... 44 InitializeMediaLibrary();
45 if (!media::IsMediaLibraryInitialized()) {
46 base::FilePath module_dir;
47 CHECK(PathService::Get(base::DIR_EXE, &module_dir));
48 CHECK(media::InitializeMediaLibrary(module_dir));
49 }
50 45
51 // TODO(dalecurtis): We should find a single owner per process for the audio 46 // TODO(dalecurtis): We should find a single owner per process for the audio
52 // manager or make it a lazy instance. It's not safe to call Get()/Create() 47 // manager or make it a lazy instance. It's not safe to call Get()/Create()
53 // across multiple threads... 48 // across multiple threads...
54 // 49 //
55 // TODO(dalecurtis): Eventually we'll want something other than a fake audio 50 // TODO(dalecurtis): Eventually we'll want something other than a fake audio
56 // log factory here too. We should probably at least DVLOG() such info. 51 // log factory here too. We should probably at least DVLOG() such info.
57 AudioManager* audio_manager = AudioManager::Get(); 52 AudioManager* audio_manager = AudioManager::Get();
58 if (!audio_manager) 53 if (!audio_manager)
59 audio_manager = media::AudioManager::Create(&fake_audio_log_factory_); 54 audio_manager = media::AudioManager::Create(&fake_audio_log_factory_);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 110
116 DISALLOW_COPY_AND_ASSIGN(DefaultRendererConfig); 111 DISALLOW_COPY_AND_ASSIGN(DefaultRendererConfig);
117 }; 112 };
118 113
119 scoped_ptr<PlatformRendererConfig> CreatePlatformRendererConfig() { 114 scoped_ptr<PlatformRendererConfig> CreatePlatformRendererConfig() {
120 return make_scoped_ptr(new DefaultRendererConfig()); 115 return make_scoped_ptr(new DefaultRendererConfig());
121 } 116 }
122 117
123 } // namespace internal 118 } // namespace internal
124 } // namespace media 119 } // namespace media
OLDNEW
« no previous file with comments | « media/media_unittests.isolate ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698