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

Side by Side Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 2024303003: Enable RTCVideoDecoder SW H264 fallback only when it is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698