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

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

Issue 19638008: Refactor GpuVideoDecoder::Factories out of GpuVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 DVLOG(1) << "MediaStreamDependencyFactory::CreatePeerConnectionFactory()"; 490 DVLOG(1) << "MediaStreamDependencyFactory::CreatePeerConnectionFactory()";
491 if (!pc_factory_.get()) { 491 if (!pc_factory_.get()) {
492 DCHECK(!audio_device_.get()); 492 DCHECK(!audio_device_.get());
493 audio_device_ = new WebRtcAudioDeviceImpl(); 493 audio_device_ = new WebRtcAudioDeviceImpl();
494 494
495 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; 495 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory;
496 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; 496 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory;
497 497
498 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 498 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
499 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWDecoding)) { 499 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWDecoding)) {
500 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories = 500 scoped_refptr<media::GpuVideoDecoderFactories> gpu_factories =
501 RenderThreadImpl::current()->GetGpuFactories(); 501 RenderThreadImpl::current()->GetGpuFactories();
502 if (gpu_factories.get() != NULL) 502 if (gpu_factories.get() != NULL)
503 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); 503 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
504 } 504 }
505 #if defined(GOOGLE_TV) 505 #if defined(GOOGLE_TV)
506 // PeerConnectionFactory will hold the ownership of this 506 // PeerConnectionFactory will hold the ownership of this
507 // VideoDecoderFactory. 507 // VideoDecoderFactory.
508 decoder_factory.reset(decoder_factory_tv_ = new RTCVideoDecoderFactoryTv); 508 decoder_factory.reset(decoder_factory_tv_ = new RTCVideoDecoderFactoryTv);
509 #endif 509 #endif
510 510
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 // processed before returning. We wait for the above task to finish before 825 // processed before returning. We wait for the above task to finish before
826 // letting the the function continue to avoid any potential race issues. 826 // letting the the function continue to avoid any potential race issues.
827 chrome_worker_thread_.Stop(); 827 chrome_worker_thread_.Stop();
828 } else { 828 } else {
829 NOTREACHED() << "Worker thread not running."; 829 NOTREACHED() << "Worker thread not running.";
830 } 830 }
831 } 831 }
832 } 832 }
833 833
834 } // namespace content 834 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698