Chromium Code Reviews| Index: content/renderer/media/media_stream_dependency_factory.cc |
| diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc |
| index f15f1036fbd1830f86fdd17e2544e55cc306aff6..890d2d7badacd9666bfd8686ec10b845c2c570a2 100644 |
| --- a/content/renderer/media/media_stream_dependency_factory.cc |
| +++ b/content/renderer/media/media_stream_dependency_factory.cc |
| @@ -497,10 +497,17 @@ bool MediaStreamDependencyFactory::CreatePeerConnectionFactory() { |
| const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| if (cmd_line->HasSwitch(switches::kEnableWebRtcHWDecoding)) { |
| - scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories = |
| - RenderThreadImpl::current()->GetGpuFactories(); |
| - if (gpu_factories.get() != NULL) |
| - decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); |
| + scoped_ptr<base::Thread> vda_thread(new base::Thread("vda_thread")); |
|
scherkus (not reviewing)
2013/07/18 00:54:43
OOC what warrants using a separate thread? Is it y
wuchengli
2013/07/18 09:42:00
libjingle worker thread being pegged only means I
|
| + bool started = vda_thread->Start(); |
| + scoped_refptr<content::RendererGpuVideoDecoderFactories> gpu_factories; |
| + if (started) { |
| + gpu_factories = RenderThreadImpl::current()->GetGpuFactories( |
| + vda_thread->message_loop_proxy()); |
| + } |
| + if (gpu_factories.get() != NULL) { |
| + decoder_factory.reset( |
| + new RTCVideoDecoderFactory(vda_thread.Pass(), gpu_factories)); |
| + } |
| } |
| #if defined(GOOGLE_TV) |
| // PeerConnectionFactory will hold the ownership of this |