Chromium Code Reviews| Index: webrtc/sdk/android/src/jni/null_audio_jni.cc |
| diff --git a/webrtc/sdk/android/src/jni/null_audio_jni.cc b/webrtc/sdk/android/src/jni/null_audio_jni.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c94cb02c9505a7d365125da07a13b670bbc145c6 |
| --- /dev/null |
| +++ b/webrtc/sdk/android/src/jni/null_audio_jni.cc |
| @@ -0,0 +1,41 @@ |
| +/* |
| + * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#include "webrtc/api/peerconnectioninterface.h" |
| +#include "webrtc/base/bind.h" |
| +#include "webrtc/base/scoped_ref_ptr.h" |
| +#include "webrtc/base/thread.h" |
| +#include "webrtc/call/callfactoryinterface.h" |
| +// Adding 'nogncheck' to disable the gn include headers check. |
| +// We don't want this null implementation target depend on audio and video |
| +// related targets |
| +#include "webrtc/media/engine/webrtcmediaengine.h" // nogncheck |
| + |
| +namespace webrtc { |
| + |
| +// This implementation is used for building WebRTC without audio and video |
| +// support. |
|
Taylor Brandstetter
2017/06/16 22:19:08
It's odd that this has an implementation of a Crea
Zhi Huang
2017/06/17 01:46:43
Instead of moving entire nativeCreatePeerConnectio
Taylor Brandstetter
2017/06/17 04:41:40
That makes sense; it's still the same general idea
|
| +rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory( |
| + rtc::Thread* network_thread, |
| + rtc::Thread* worker_thread, |
| + rtc::Thread* signaling_thread, |
| + AudioDeviceModule* default_adm, |
| + cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| + cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
| + return CreateModularPeerConnectionFactory( |
| + network_thread, worker_thread, signaling_thread, default_adm, |
| + nullptr /*audio_encoder_factory*/, nullptr /*audio_decoder_factory*/, |
| + encoder_factory, decoder_factory, nullptr /*audio_mixer*/, |
| + std::unique_ptr<cricket::MediaEngineInterface>(), |
| + std::unique_ptr<CallFactoryInterface>(), |
| + std::unique_ptr<RtcEventLogFactoryInterface>()); |
| +} |
| + |
| +} // namespace webrtc |