OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
Ami GONE FROM CHROMIUM
2013/07/23 18:13:28
In future please rebase *after* addressing review
wuchengli
2013/07/24 08:54:14
Got it.
What happened was that I synced the code
| |
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" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 DVLOG(1) << "MediaStreamDependencyFactory::CreatePeerConnectionFactory()"; | 491 DVLOG(1) << "MediaStreamDependencyFactory::CreatePeerConnectionFactory()"; |
492 if (!pc_factory_.get()) { | 492 if (!pc_factory_.get()) { |
493 DCHECK(!audio_device_.get()); | 493 DCHECK(!audio_device_.get()); |
494 audio_device_ = new WebRtcAudioDeviceImpl(); | 494 audio_device_ = new WebRtcAudioDeviceImpl(); |
495 | 495 |
496 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; | 496 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; |
497 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; | 497 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; |
498 | 498 |
499 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 499 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
500 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWDecoding)) { | 500 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWDecoding)) { |
501 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories = | 501 scoped_refptr<base::MessageLoopProxy> media_loop_proxy = |
502 RenderThreadImpl::current()->GetGpuFactories(); | 502 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(); |
503 scoped_refptr<RendererGpuVideoDecoderFactories> gpu_factories = | |
504 RenderThreadImpl::current()->GetGpuFactories(media_loop_proxy); | |
503 if (gpu_factories.get() != NULL) | 505 if (gpu_factories.get() != NULL) |
504 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); | 506 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); |
505 } | 507 } |
506 #if defined(GOOGLE_TV) | 508 #if defined(GOOGLE_TV) |
507 // PeerConnectionFactory will hold the ownership of this | 509 // PeerConnectionFactory will hold the ownership of this |
508 // VideoDecoderFactory. | 510 // VideoDecoderFactory. |
509 decoder_factory.reset(decoder_factory_tv_ = new RTCVideoDecoderFactoryTv); | 511 decoder_factory.reset(decoder_factory_tv_ = new RTCVideoDecoderFactoryTv); |
510 #endif | 512 #endif |
511 | 513 |
512 #if defined(ENABLE_WEBRTC) && defined(OS_CHROMEOS) | 514 #if defined(ENABLE_WEBRTC) && defined(OS_CHROMEOS) |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
833 // processed before returning. We wait for the above task to finish before | 835 // processed before returning. We wait for the above task to finish before |
834 // letting the the function continue to avoid any potential race issues. | 836 // letting the the function continue to avoid any potential race issues. |
835 chrome_worker_thread_.Stop(); | 837 chrome_worker_thread_.Stop(); |
836 } else { | 838 } else { |
837 NOTREACHED() << "Worker thread not running."; | 839 NOTREACHED() << "Worker thread not running."; |
838 } | 840 } |
839 } | 841 } |
840 } | 842 } |
841 | 843 |
842 } // namespace content | 844 } // namespace content |
OLD | NEW |