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

Unified Diff: content/renderer/render_view_impl.cc

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 40a87b64da5db54340f446553d22e6abd15386ef..f6dd2a2a7b8435aa8afef3c754e94f748d0713c9 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -114,7 +114,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"
@@ -2580,26 +2579,17 @@ 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;
- // Add in any custom filter factories first.
+ // |audio_source_provider| "provides" audio to WebKit and is a sink from the
+ // perspective of the audio renderer.
if (!cmd_line->HasSwitch(switches::kDisableAudio)) {
- // audio_source_provider is a "provider" to WebKit, and a sink
- // from the perspective of the audio renderer.
audio_source_provider = new RenderAudioSourceProvider(routing_id_);
-
- // Add the chrome specific audio renderer, using audio_source_provider
- // as the sink.
- media::AudioRendererImpl* audio_renderer =
acolwell GONE FROM CHROMIUM 2012/12/10 18:12:16 Why is this change here? It appears unrelated to t
scherkus (not reviewing) 2012/12/21 22:41:39 This snuck in -- xhwang@ ended up landing this in
- new media::AudioRendererImpl(audio_source_provider);
- collection->AddAudioRenderer(audio_renderer);
}
+ scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories;
WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
@@ -2612,23 +2602,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);
}
WebMediaPlayer* media_player =
GetContentClient()->renderer()->OverrideCreateWebMediaPlayer(
- this, frame, client, AsWeakPtr(), collection, audio_source_provider,
- audio_source_provider, message_loop_factory, media_stream_impl_,
+ this, frame, client, AsWeakPtr(), audio_source_provider,
+ audio_source_provider, gpu_factories, media_stream_impl_,
render_media_log);
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_,
+ frame, client, AsWeakPtr(), audio_source_provider,
+ audio_source_provider, gpu_factories, media_stream_impl_,
render_media_log);
}
return media_player;

Powered by Google App Engine
This is Rietveld 408576698