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

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

Issue 1525003002: Revert of Refactor MediaCodecBridge to add support for NDK APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase errors Created 5 years 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/common/gpu/media/avda_shared_state.h ('k') | media/BUILD.gn » ('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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "third_party/WebKit/public/platform/WebMediaStream.h" 56 #include "third_party/WebKit/public/platform/WebMediaStream.h"
57 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 57 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
58 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 58 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
59 #include "third_party/WebKit/public/platform/WebURL.h" 59 #include "third_party/WebKit/public/platform/WebURL.h"
60 #include "third_party/WebKit/public/web/WebDocument.h" 60 #include "third_party/WebKit/public/web/WebDocument.h"
61 #include "third_party/WebKit/public/web/WebFrame.h" 61 #include "third_party/WebKit/public/web/WebFrame.h"
62 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h" 62 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h"
63 #include "third_party/webrtc/base/ssladapter.h" 63 #include "third_party/webrtc/base/ssladapter.h"
64 64
65 #if defined(OS_ANDROID) 65 #if defined(OS_ANDROID)
66 #include "media/base/android/media_codec_util.h" 66 #include "media/base/android/media_codec_bridge.h"
67 #endif 67 #endif
68 68
69 namespace content { 69 namespace content {
70 70
71 namespace { 71 namespace {
72 72
73 enum WebRTCIPHandlingPolicy { 73 enum WebRTCIPHandlingPolicy {
74 DEFAULT, 74 DEFAULT,
75 DEFAULT_PUBLIC_AND_PRIVATE_INTERFACES, 75 DEFAULT_PUBLIC_AND_PRIVATE_INTERFACES,
76 DEFAULT_PUBLIC_INTERFACE_ONLY, 76 DEFAULT_PUBLIC_INTERFACE_ONLY,
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 409 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
410 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) { 410 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
411 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) 411 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
412 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); 412 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
413 413
414 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) 414 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
415 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); 415 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
416 } 416 }
417 417
418 #if defined(OS_ANDROID) 418 #if defined(OS_ANDROID)
419 if (!media::MediaCodecUtil::SupportsSetParameters()) 419 if (!media::MediaCodecBridge::SupportsSetParameters())
420 encoder_factory.reset(); 420 encoder_factory.reset();
421 #endif 421 #endif
422 422
423 pc_factory_ = webrtc::CreatePeerConnectionFactory( 423 pc_factory_ = webrtc::CreatePeerConnectionFactory(
424 worker_thread_, signaling_thread_, audio_device_.get(), 424 worker_thread_, signaling_thread_, audio_device_.get(),
425 encoder_factory.release(), decoder_factory.release()); 425 encoder_factory.release(), decoder_factory.release());
426 CHECK(pc_factory_.get()); 426 CHECK(pc_factory_.get());
427 427
428 webrtc::PeerConnectionFactoryInterface::Options factory_options; 428 webrtc::PeerConnectionFactoryInterface::Options factory_options;
429 factory_options.disable_sctp_data_channels = false; 429 factory_options.disable_sctp_data_channels = false;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 826
827 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 827 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
828 if (audio_device_.get()) 828 if (audio_device_.get())
829 return; 829 return;
830 830
831 audio_device_ = new WebRtcAudioDeviceImpl(); 831 audio_device_ = new WebRtcAudioDeviceImpl();
832 } 832 }
833 833
834 } // namespace content 834 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/avda_shared_state.h ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698