| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 DCHECK(!signaling_thread_); | 256 DCHECK(!signaling_thread_); |
| 257 DCHECK(!worker_thread_); | 257 DCHECK(!worker_thread_); |
| 258 DCHECK(!network_manager_); | 258 DCHECK(!network_manager_); |
| 259 DCHECK(!socket_factory_); | 259 DCHECK(!socket_factory_); |
| 260 DCHECK(!chrome_signaling_thread_.IsRunning()); | 260 DCHECK(!chrome_signaling_thread_.IsRunning()); |
| 261 DCHECK(!chrome_worker_thread_.IsRunning()); | 261 DCHECK(!chrome_worker_thread_.IsRunning()); |
| 262 | 262 |
| 263 DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()"; | 263 DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()"; |
| 264 | 264 |
| 265 #if BUILDFLAG(RTC_USE_H264) | 265 #if BUILDFLAG(RTC_USE_H264) |
| 266 // TODO(hbos): This is temporary. Disable the runtime effects of building with | |
| 267 // |rtc_use_h264|. We are planning to default the |rtc_use_h264| flag to | |
| 268 // |proprietary_codecs| so that it will be used by Chromium trybots. This | |
| 269 // would also make it used by Chrome, but this feature is not ready to be | |
| 270 // launched yet. An upcoming CL will add browser tests for H264. That CL will | |
| 271 // remove this line. It should remain disabled until tested. | |
| 272 webrtc::DisableRtcUseH264(); | |
| 273 // When building with |rtc_use_h264|, |H264DecoderImpl| may be used which | 266 // When building with |rtc_use_h264|, |H264DecoderImpl| may be used which |
| 274 // depends on FFmpeg, therefore we need to initialize FFmpeg before going | 267 // depends on FFmpeg, therefore we need to initialize FFmpeg before going |
| 275 // further. | 268 // further. |
| 276 // TODO(hbos): Temporarily commented out due to webrtc::DisableRtcUseH264(), | 269 media::FFmpegGlue::InitializeFFmpeg(); |
| 277 // no need to initialize FFmpeg when |H264DecoderImpl| is disabled. | |
| 278 // media::FFmpegGlue::InitializeFFmpeg(); | |
| 279 #endif | 270 #endif |
| 280 | 271 |
| 281 base::MessageLoop::current()->AddDestructionObserver(this); | 272 base::MessageLoop::current()->AddDestructionObserver(this); |
| 282 // To allow sending to the signaling/worker threads. | 273 // To allow sending to the signaling/worker threads. |
| 283 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 274 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
| 284 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true); | 275 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true); |
| 285 | 276 |
| 286 CHECK(chrome_signaling_thread_.Start()); | 277 CHECK(chrome_signaling_thread_.Start()); |
| 287 CHECK(chrome_worker_thread_.Start()); | 278 CHECK(chrome_worker_thread_.Start()); |
| 288 | 279 |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 791 } |
| 801 | 792 |
| 802 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 793 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 803 if (audio_device_.get()) | 794 if (audio_device_.get()) |
| 804 return; | 795 return; |
| 805 | 796 |
| 806 audio_device_ = new WebRtcAudioDeviceImpl(); | 797 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 807 } | 798 } |
| 808 | 799 |
| 809 } // namespace content | 800 } // namespace content |
| OLD | NEW |