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

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 171773014: Move ContextProvider binding to inside GpuVideoAcceleratorFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 12dbef7e Rebase. Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_dependency_factory.h" 5 #include "content/renderer/media/media_stream_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 #else 429 #else
430 // TODO(ronghuawu): Replace this call with InitializeSSL. 430 // TODO(ronghuawu): Replace this call with InitializeSSL.
431 net::EnsureNSSSSLInit(); 431 net::EnsureNSSSSLInit();
432 #endif 432 #endif
433 433
434 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; 434 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory;
435 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; 435 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory;
436 436
437 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 437 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
438 scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories = 438 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories =
439 RenderThreadImpl::current()->GetGpuFactories(); 439 RenderThreadImpl::current()->GetGpuFactories();
440 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) { 440 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) {
441 if (gpu_factories) 441 if (gpu_factories)
442 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); 442 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
443 } 443 }
444 444
445 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) { 445 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
446 if (gpu_factories) 446 if (gpu_factories)
447 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); 447 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
448 } 448 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 775 }
776 776
777 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 777 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
778 if (audio_device_) 778 if (audio_device_)
779 return; 779 return;
780 780
781 audio_device_ = new WebRtcAudioDeviceImpl(); 781 audio_device_ = new WebRtcAudioDeviceImpl();
782 } 782 }
783 783
784 } // namespace content 784 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/video_encode_accelerator.cc ('k') | content/renderer/media/renderer_gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698