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

Side by Side Diff: components/html_viewer/web_media_player_factory.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 | « 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/web_media_player_factory.h" 5 #include "components/html_viewer/web_media_player_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 56 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
57 bool enable_mojo_media_renderer) 57 bool enable_mojo_media_renderer)
58 : compositor_task_runner_(compositor_task_runner), 58 : compositor_task_runner_(compositor_task_runner),
59 enable_mojo_media_renderer_(enable_mojo_media_renderer), 59 enable_mojo_media_renderer_(enable_mojo_media_renderer),
60 media_thread_("Media"), 60 media_thread_("Media"),
61 audio_manager_(media::AudioManager::Create(&fake_audio_log_factory_)), 61 audio_manager_(media::AudioManager::Create(&fake_audio_log_factory_)),
62 audio_hardware_config_( 62 audio_hardware_config_(
63 audio_manager_->GetInputStreamParameters( 63 audio_manager_->GetInputStreamParameters(
64 media::AudioManagerBase::kDefaultDeviceId), 64 media::AudioManagerBase::kDefaultDeviceId),
65 audio_manager_->GetDefaultOutputStreamParameters()) { 65 audio_manager_->GetDefaultOutputStreamParameters()) {
66 66 media::InitializeMediaLibrary()
67 if (!media::IsMediaLibraryInitialized()) {
68 base::FilePath module_dir;
69 CHECK(PathService::Get(base::DIR_EXE, &module_dir));
70 CHECK(media::InitializeMediaLibrary(module_dir));
71 }
72 } 67 }
73 68
74 WebMediaPlayerFactory::~WebMediaPlayerFactory() { 69 WebMediaPlayerFactory::~WebMediaPlayerFactory() {
75 } 70 }
76 71
77 blink::WebMediaPlayer* WebMediaPlayerFactory::CreateMediaPlayer( 72 blink::WebMediaPlayer* WebMediaPlayerFactory::CreateMediaPlayer(
78 blink::WebLocalFrame* frame, 73 blink::WebLocalFrame* frame,
79 const blink::WebURL& url, 74 const blink::WebURL& url,
80 blink::WebMediaPlayerClient* client, 75 blink::WebMediaPlayerClient* client,
81 media::MediaPermission* media_permission, 76 media::MediaPermission* media_permission,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 123
129 scoped_refptr<base::SingleThreadTaskRunner> 124 scoped_refptr<base::SingleThreadTaskRunner>
130 WebMediaPlayerFactory::GetMediaThreadTaskRunner() { 125 WebMediaPlayerFactory::GetMediaThreadTaskRunner() {
131 if (!media_thread_.IsRunning()) 126 if (!media_thread_.IsRunning())
132 media_thread_.Start(); 127 media_thread_.Start();
133 128
134 return media_thread_.message_loop_proxy(); 129 return media_thread_.message_loop_proxy();
135 } 130 }
136 131
137 } // namespace html_viewer 132 } // 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