diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:47:57 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 17:47:57 +0000 |
commit | e82b2bd016395079f0f9c8080d3499dc9bccd347 (patch) | |
tree | ea29237902b246668fc1b82c632f25a646d3cb1a /content/renderer/render_view_impl.cc | |
parent | 693845e44965a358274812ff75aa23ca80625658 (diff) | |
download | chromium_src-e82b2bd016395079f0f9c8080d3499dc9bccd347.zip chromium_src-e82b2bd016395079f0f9c8080d3499dc9bccd347.tar.gz chromium_src-e82b2bd016395079f0f9c8080d3499dc9bccd347.tar.bz2 |
Vanquish the remnants of media::MessageLoopFactory.
Now that media code runs on a single thread we no longer need to worry about creating additional threads at runtime.
To make changes like this easier in the future, webkit_media::WebMediaPlayerParams is introduced to avoid plumbing parameters through Chrome's various abstraction layers.
BUG=116873
Review URL: https://codereview.chromium.org/11468033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r-- | content/renderer/render_view_impl.cc | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 87f363f..8f70fc6 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -115,7 +115,6 @@ #include "content/renderer/websharedworker_proxy.h" #include "media/base/filter_collection.h" #include "media/base/media_switches.h" -#include "media/base/message_loop_factory.h" #include "media/filters/audio_renderer_impl.h" #include "media/filters/gpu_video_decoder.h" #include "net/base/data_url.h" @@ -202,6 +201,7 @@ #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" #include "webkit/media/webmediaplayer_impl.h" #include "webkit/media/webmediaplayer_ms.h" +#include "webkit/media/webmediaplayer_params.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/plugin_utils.h" #include "webkit/plugins/npapi/webplugin_delegate.h" @@ -2615,9 +2615,6 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer( resource_context, gpu_channel_host, routing_id_)); #endif - media::MessageLoopFactory* message_loop_factory = - new media::MessageLoopFactory(); - media::FilterCollection* collection = new media::FilterCollection(); RenderMediaLog* render_media_log = new RenderMediaLog(); RenderAudioSourceProvider* audio_source_provider = NULL; @@ -2628,6 +2625,7 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer( audio_source_provider = new RenderAudioSourceProvider(routing_id_); } + scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; WebGraphicsContext3DCommandBufferImpl* context3d = NULL; if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); @@ -2640,24 +2638,19 @@ WebMediaPlayer* RenderViewImpl::createMediaPlayer( GpuChannelHost* gpu_channel_host = RenderThreadImpl::current()->EstablishGpuChannelSync( CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); - collection->GetVideoDecoders()->push_back(new media::GpuVideoDecoder( - message_loop_factory->GetMessageLoop( - media::MessageLoopFactory::kPipeline), - factories_loop, - new RendererGpuVideoDecoderFactories( - gpu_channel_host, factories_loop, context3d))); + gpu_factories = new RendererGpuVideoDecoderFactories( + gpu_channel_host, factories_loop, context3d); } + webkit_media::WebMediaPlayerParams params( + audio_source_provider, audio_source_provider, gpu_factories, + media_stream_impl_, render_media_log); WebMediaPlayer* media_player = GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( - this, frame, client, AsWeakPtr(), collection, audio_source_provider, - audio_source_provider, message_loop_factory, media_stream_impl_, - render_media_log); + this, frame, client, AsWeakPtr(), params); if (!media_player) { media_player = new webkit_media::WebMediaPlayerImpl( - frame, client, AsWeakPtr(), collection, audio_source_provider, - audio_source_provider, message_loop_factory, media_stream_impl_, - render_media_log); + frame, client, AsWeakPtr(), params); } return media_player; } |