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

Side by Side Diff: components/html_viewer/media_factory.cc

Issue 1161183003: Revert "Chromium changes to statically link ffmpeg." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « components/components_unittests.isolate ('k') | content/app/content_main_runner.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 "components/html_viewer/media_factory.h" 5 #include "components/html_viewer/media_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 audio_manager_(media::AudioManager::Create(&fake_audio_log_factory_)), 81 audio_manager_(media::AudioManager::Create(&fake_audio_log_factory_)),
82 audio_hardware_config_( 82 audio_hardware_config_(
83 audio_manager_->GetInputStreamParameters( 83 audio_manager_->GetInputStreamParameters(
84 media::AudioManagerBase::kDefaultDeviceId), 84 media::AudioManagerBase::kDefaultDeviceId),
85 audio_manager_->GetDefaultOutputStreamParameters()), 85 audio_manager_->GetDefaultOutputStreamParameters()),
86 #endif 86 #endif
87 enable_mojo_media_renderer_(base::CommandLine::ForCurrentProcess() 87 enable_mojo_media_renderer_(base::CommandLine::ForCurrentProcess()
88 ->HasSwitch(kEnableMojoMediaRenderer)), 88 ->HasSwitch(kEnableMojoMediaRenderer)),
89 compositor_task_runner_(compositor_task_runner), 89 compositor_task_runner_(compositor_task_runner),
90 shell_(shell) { 90 shell_(shell) {
91 media::InitializeMediaLibrary(); 91 if (!media::IsMediaLibraryInitialized()) {
92 base::FilePath module_dir;
93 CHECK(PathService::Get(base::DIR_EXE, &module_dir));
94 CHECK(media::InitializeMediaLibrary(module_dir));
95 }
92 } 96 }
93 97
94 MediaFactory::~MediaFactory() { 98 MediaFactory::~MediaFactory() {
95 } 99 }
96 100
97 blink::WebMediaPlayer* MediaFactory::CreateMediaPlayer( 101 blink::WebMediaPlayer* MediaFactory::CreateMediaPlayer(
98 blink::WebLocalFrame* frame, 102 blink::WebLocalFrame* frame,
99 const blink::WebURL& url, 103 const blink::WebURL& url,
100 blink::WebMediaPlayerClient* client, 104 blink::WebMediaPlayerClient* client,
101 blink::WebContentDecryptionModule* initial_cdm, 105 blink::WebContentDecryptionModule* initial_cdm,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 scoped_refptr<base::SingleThreadTaskRunner> 186 scoped_refptr<base::SingleThreadTaskRunner>
183 MediaFactory::GetMediaThreadTaskRunner() { 187 MediaFactory::GetMediaThreadTaskRunner() {
184 if (!media_thread_.IsRunning()) 188 if (!media_thread_.IsRunning())
185 media_thread_.Start(); 189 media_thread_.Start();
186 190
187 return media_thread_.task_runner(); 191 return media_thread_.task_runner();
188 } 192 }
189 #endif // !defined(OS_ANDROID) 193 #endif // !defined(OS_ANDROID)
190 194
191 } // namespace html_viewer 195 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/components_unittests.isolate ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698