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

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

Issue 1472943002: Refactor MediaCodecBridge to add support for NDK APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crazy linker issue 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_bridge.h" 66 #include "media/base/android/media_codec_util.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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 328 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
329 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) { 329 if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
330 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) 330 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
331 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); 331 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
332 332
333 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) 333 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
334 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); 334 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
335 } 335 }
336 336
337 #if defined(OS_ANDROID) 337 #if defined(OS_ANDROID)
338 if (!media::MediaCodecBridge::SupportsSetParameters()) 338 if (!media::MediaCodecUtil::SupportsSetParameters())
339 encoder_factory.reset(); 339 encoder_factory.reset();
340 #endif 340 #endif
341 341
342 pc_factory_ = webrtc::CreatePeerConnectionFactory( 342 pc_factory_ = webrtc::CreatePeerConnectionFactory(
343 worker_thread_, signaling_thread_, audio_device_.get(), 343 worker_thread_, signaling_thread_, audio_device_.get(),
344 encoder_factory.release(), decoder_factory.release()); 344 encoder_factory.release(), decoder_factory.release());
345 CHECK(pc_factory_.get()); 345 CHECK(pc_factory_.get());
346 346
347 webrtc::PeerConnectionFactoryInterface::Options factory_options; 347 webrtc::PeerConnectionFactoryInterface::Options factory_options;
348 factory_options.disable_sctp_data_channels = false; 348 factory_options.disable_sctp_data_channels = false;
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 } 760 }
761 761
762 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 762 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
763 if (audio_device_.get()) 763 if (audio_device_.get())
764 return; 764 return;
765 765
766 audio_device_ = new WebRtcAudioDeviceImpl(); 766 audio_device_ = new WebRtcAudioDeviceImpl();
767 } 767 }
768 768
769 } // namespace content 769 } // 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