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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address piman's review comments Created 7 years, 5 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/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index aaf2b41f45f5b433484af6ed212f4425bf20b37d..3c915f4efa6211e8d430313994500eef9f345eaf 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -68,6 +68,7 @@
#include "content/renderer/media/media_stream_dependency_factory.h"
#include "content/renderer/media/midi_message_filter.h"
#include "content/renderer/media/peer_connection_tracker.h"
+#include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/media/video_capture_message_filter.h"
#include "content/renderer/memory_benchmarking_extension.h"
@@ -870,6 +871,29 @@ void RenderThreadImpl::PostponeIdleNotification() {
idle_notifications_to_skip_ = 2;
}
+scoped_refptr<media::GpuVideoDecoder::Factories>
+RenderThreadImpl::GetGpuFactories() {
+ DCHECK(IsMainThread());
+
+ const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories;
+ WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
+ if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
+ context3d = GetGpuVDAContext3D();
+ if (context3d) {
+ scoped_refptr<base::MessageLoopProxy> factories_loop =
+ compositor_message_loop_proxy();
+ if (!factories_loop.get())
+ factories_loop = base::MessageLoopProxy::current();
+ GpuChannelHost* gpu_channel_host = EstablishGpuChannelSync(
+ CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
+ if (gpu_channel_host)
+ gpu_factories = new RendererGpuVideoDecoderFactories(
+ gpu_channel_host, factories_loop, context3d);
piman 2013/07/09 19:35:22 nit: if the statement spans more than 1 line, brac
wuchengli 2013/07/09 22:29:26 Done.
+ }
+ return gpu_factories;
+}
+
/* static */
void RenderThreadImpl::OnGpuVDAContextLoss() {
RenderThreadImpl* self = RenderThreadImpl::current();
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698