xref: /aosp_15_r20/external/webrtc/sdk/android/native_api/peerconnection/peer_connection_factory.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2018 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 #include "sdk/android/native_api/peerconnection/peer_connection_factory.h"
11 
12 #include <jni.h>
13 
14 #include <memory>
15 #include <utility>
16 
17 #include "sdk/android/src/jni/pc/peer_connection_factory.h"
18 
19 namespace webrtc {
20 
NativeToJavaPeerConnectionFactory(JNIEnv * jni,rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pcf,std::unique_ptr<rtc::SocketFactory> socket_factory,std::unique_ptr<rtc::Thread> network_thread,std::unique_ptr<rtc::Thread> worker_thread,std::unique_ptr<rtc::Thread> signaling_thread)21 jobject NativeToJavaPeerConnectionFactory(
22     JNIEnv* jni,
23     rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pcf,
24     std::unique_ptr<rtc::SocketFactory> socket_factory,
25     std::unique_ptr<rtc::Thread> network_thread,
26     std::unique_ptr<rtc::Thread> worker_thread,
27     std::unique_ptr<rtc::Thread> signaling_thread) {
28   return webrtc::jni::NativeToJavaPeerConnectionFactory(
29       jni, pcf, std::move(socket_factory), std::move(network_thread),
30       std::move(worker_thread), std::move(signaling_thread));
31 }
32 
33 }  // namespace webrtc
34