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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10918052: create a separate WebMediaPlayer for URL derived from media stream (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/rtc_video_renderer.cc ('k') | media/video/capture/video_capture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
===================================================================
--- content/renderer/render_view_impl.cc (revision 155219)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -192,6 +192,7 @@
#include "webkit/glue/weburlresponse_extradata_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
#include "webkit/media/webmediaplayer_impl.h"
+#include "webkit/media/webmediaplayer_ms.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
@@ -2496,8 +2497,7 @@
}
WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableAcceleratedVideoDecode))
+ if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
if (context3d) {
scoped_refptr<base::MessageLoopProxy> factories_loop =
@@ -2523,6 +2523,15 @@
audio_source_provider, message_loop_factory, media_stream_impl_,
render_media_log);
if (!media_player) {
+ EnsureMediaStreamImpl();
piman 2012/09/22 01:03:37 This looks heavy the first time (e.g. it creates a
wjia(left Chromium) 2012/09/22 17:04:42 That's a good point. In MediaStreamImpl, IsMediaSt
+ if (cmd_line->HasSwitch(switches::kEnableWebMediaPlayerMS) &&
+ media_stream_impl_ && media_stream_impl_->IsMediaStream(url)) {
+ // TODO(wjia): when all patches related to WebMediaPlayerMS have been
+ // landed, remove the switch. Refer to crbug.com/142988.
+ return new webkit_media::WebMediaPlayerMS(
+ frame, client, AsWeakPtr(), media_stream_impl_, render_media_log);
+ }
+
media_player = new webkit_media::WebMediaPlayerImpl(
frame, client, AsWeakPtr(), collection, audio_source_provider,
audio_source_provider, message_loop_factory, media_stream_impl_,
« no previous file with comments | « content/renderer/media/rtc_video_renderer.cc ('k') | media/video/capture/video_capture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698