Add a method for getting the native factory from PeerConnectionFactory.
Bug: webrtc:8662 Change-Id: Icfe09e82737e1b700e469afde00c4f0923bbeb42 Reviewed-on: https://webrtc-review.googlesource.com/39516 Reviewed-by: Anders Carlsson <andersc@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21628}
This commit is contained in:

committed by
Commit Bot

parent
c4f18fed26
commit
6f247e944c
@ -342,6 +342,11 @@ public class PeerConnectionFactory {
|
||||
nativeInvokeThreadsCallbacks(nativeFactory);
|
||||
}
|
||||
|
||||
/** Returns a pointer to the native webrtc::PeerConnectionFactoryInterface. */
|
||||
public long getNativePeerConnectionFactory() {
|
||||
return nativeGetNativePeerConnectionFactory(nativeFactory);
|
||||
}
|
||||
|
||||
private static void printStackTrace(Thread thread, String threadName) {
|
||||
if (thread != null) {
|
||||
StackTraceElement[] stackTraces = thread.getStackTrace();
|
||||
@ -415,4 +420,5 @@ public class PeerConnectionFactory {
|
||||
long factory, Object localEGLContext, Object remoteEGLContext);
|
||||
private static native void nativeInvokeThreadsCallbacks(long factory);
|
||||
private static native void nativeFreeFactory(long factory);
|
||||
private static native long nativeGetNativePeerConnectionFactory(long factory);
|
||||
}
|
||||
|
@ -490,5 +490,12 @@ static void JNI_PeerConnectionFactory_SetVideoHwAccelerationOptions(
|
||||
remote_egl_context);
|
||||
}
|
||||
|
||||
static jlong JNI_PeerConnectionFactory_GetNativePeerConnectionFactory(
|
||||
JNIEnv* jni,
|
||||
const JavaParamRef<jclass>&,
|
||||
jlong native_factory) {
|
||||
return jlongFromPointer(factoryFromJava(native_factory));
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user