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

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

Issue 2573933002: Restore switch kDisableWebRtcHWEncoding (Closed)
Patch Set: renew comments Created 3 years, 11 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 | « content/public/common/content_switches.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 new IpcPacketSocketFactory(p2p_socket_dispatcher_.get())); 232 new IpcPacketSocketFactory(p2p_socket_dispatcher_.get()));
233 233
234 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; 234 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory;
235 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; 235 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory;
236 236
237 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 237 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
238 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) { 238 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
239 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) 239 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
240 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); 240 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
241 241
242 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding) || 242 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
243 base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) {
244 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); 243 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
245 } 244 }
246 } 245 }
247 246
248 #if defined(OS_ANDROID) 247 #if defined(OS_ANDROID)
249 if (!media::MediaCodecUtil::SupportsSetParameters()) 248 if (!media::MediaCodecUtil::SupportsSetParameters())
250 encoder_factory.reset(); 249 encoder_factory.reset();
251 #endif 250 #endif
252 251
253 pc_factory_ = webrtc::CreatePeerConnectionFactory( 252 pc_factory_ = webrtc::CreatePeerConnectionFactory(
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 550
552 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 551 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
553 DCHECK(CalledOnValidThread()); 552 DCHECK(CalledOnValidThread());
554 if (audio_device_.get()) 553 if (audio_device_.get())
555 return; 554 return;
556 555
557 audio_device_ = new WebRtcAudioDeviceImpl(); 556 audio_device_ = new WebRtcAudioDeviceImpl();
558 } 557 }
559 558
560 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698