OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webrtc/peer_connection_dependency_factory.h" | 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 DCHECK(!worker_thread_); | 157 DCHECK(!worker_thread_); |
158 DCHECK(!network_manager_); | 158 DCHECK(!network_manager_); |
159 DCHECK(!socket_factory_); | 159 DCHECK(!socket_factory_); |
160 DCHECK(!chrome_signaling_thread_.IsRunning()); | 160 DCHECK(!chrome_signaling_thread_.IsRunning()); |
161 DCHECK(!chrome_worker_thread_.IsRunning()); | 161 DCHECK(!chrome_worker_thread_.IsRunning()); |
162 | 162 |
163 DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()"; | 163 DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()"; |
164 | 164 |
165 #if BUILDFLAG(RTC_USE_H264) | 165 #if BUILDFLAG(RTC_USE_H264) |
166 // Building /w |rtc_use_h264|, is the corresponding run-time feature enabled? | 166 // Building /w |rtc_use_h264|, is the corresponding run-time feature enabled? |
167 if (base::FeatureList::IsEnabled(kWebRtcH264WithOpenH264FFmpeg)) { | 167 if (base::FeatureList::IsEnabled(kWebRtcH264WithOpenH264FFmpeg) || |
168 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
169 kEnableWebRtcHWH264Encoding)) { | |
hbos_chromium
2016/06/02 08:45:37
I don't think this is the right approach. If we're
emircan
2016/06/02 20:54:32
Done.
| |
168 // |H264DecoderImpl| may be used which depends on FFmpeg, therefore we need | 170 // |H264DecoderImpl| may be used which depends on FFmpeg, therefore we need |
169 // to initialize FFmpeg before going further. | 171 // to initialize FFmpeg before going further. |
170 media::FFmpegGlue::InitializeFFmpeg(); | 172 media::FFmpegGlue::InitializeFFmpeg(); |
171 } else { | 173 } else { |
172 // Feature is to be disabled, no need to make sure FFmpeg is initialized. | 174 // Feature is to be disabled, no need to make sure FFmpeg is initialized. |
173 webrtc::DisableRtcUseH264(); | 175 webrtc::DisableRtcUseH264(); |
174 } | 176 } |
175 #endif | 177 #endif |
176 | 178 |
177 base::MessageLoop::current()->AddDestructionObserver(this); | 179 base::MessageLoop::current()->AddDestructionObserver(this); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
569 | 571 |
570 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 572 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
571 DCHECK(CalledOnValidThread()); | 573 DCHECK(CalledOnValidThread()); |
572 if (audio_device_.get()) | 574 if (audio_device_.get()) |
573 return; | 575 return; |
574 | 576 |
575 audio_device_ = new WebRtcAudioDeviceImpl(); | 577 audio_device_ = new WebRtcAudioDeviceImpl(); |
576 } | 578 } |
577 | 579 |
578 } // namespace content | 580 } // namespace content |
OLD | NEW |