Add JNI interface for functions to start and stop recording AEC dumps and RTC event logs.
BUG=webrtc:4741 Review URL: https://codereview.webrtc.org/1409323009 Cr-Commit-Position: refs/heads/master@{#10776}
This commit is contained in:
parent
c3ddb3e127
commit
b2514725a9
@ -1251,6 +1251,46 @@ JOW(jlong, PeerConnectionFactory_nativeCreateAudioTrack)(
|
||||
return (jlong)track.release();
|
||||
}
|
||||
|
||||
JOW(jboolean, PeerConnectionFactory_nativeStartAecDump)(
|
||||
JNIEnv* jni, jclass, jlong native_factory, jint file) {
|
||||
#if defined(ANDROID)
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||
factoryFromJava(native_factory));
|
||||
return factory->StartAecDump(file);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
JOW(void, PeerConnectionFactory_nativeStopAecDump)(
|
||||
JNIEnv* jni, jclass, jlong native_factory) {
|
||||
#if defined(ANDROID)
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||
factoryFromJava(native_factory));
|
||||
factory->StopAecDump();
|
||||
#endif
|
||||
}
|
||||
|
||||
JOW(jboolean, PeerConnectionFactory_nativeStartRtcEventLog)(
|
||||
JNIEnv* jni, jclass, jlong native_factory, jint file) {
|
||||
#if defined(ANDROID)
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||
factoryFromJava(native_factory));
|
||||
return factory->StartRtcEventLog(file);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
JOW(void, PeerConnectionFactory_nativeStopRtcEventLog)(
|
||||
JNIEnv* jni, jclass, jlong native_factory) {
|
||||
#if defined(ANDROID)
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||
factoryFromJava(native_factory));
|
||||
factory->StopRtcEventLog();
|
||||
#endif
|
||||
}
|
||||
|
||||
JOW(void, PeerConnectionFactory_nativeSetOptions)(
|
||||
JNIEnv* jni, jclass, jlong native_factory, jobject options) {
|
||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||
|
||||
@ -131,6 +131,32 @@ public class PeerConnectionFactory {
|
||||
nativeFactory, id, source.nativeSource));
|
||||
}
|
||||
|
||||
// Starts recording an AEC dump. Ownership of the file is transfered to the
|
||||
// native code. If an AEC dump is already in progress, it will be stopped and
|
||||
// a new one will start using the provided file.
|
||||
public boolean startAecDump(int file_descriptor) {
|
||||
return nativeStartAecDump(nativeFactory, file_descriptor);
|
||||
}
|
||||
|
||||
// Stops recording an AEC dump. If no AEC dump is currently being recorded,
|
||||
// this call will have no effect.
|
||||
public void stopAecDump() {
|
||||
nativeStopAecDump(nativeFactory);
|
||||
}
|
||||
|
||||
// Starts recording an RTC event log. Ownership of the file is transfered to
|
||||
// the native code. If an RTC event log is already being recorded, it will be
|
||||
// stopped and a new one will start using the provided file.
|
||||
public boolean startRtcEventLog(int file_descriptor) {
|
||||
return nativeStartRtcEventLog(nativeFactory, file_descriptor);
|
||||
}
|
||||
|
||||
// Stops recording an RTC event log. If no RTC event log is currently being
|
||||
// recorded, this call will have no effect.
|
||||
public void StopRtcEventLog() {
|
||||
nativeStopRtcEventLog(nativeFactory);
|
||||
}
|
||||
|
||||
public void setOptions(Options options) {
|
||||
nativeSetOptions(nativeFactory, options);
|
||||
}
|
||||
@ -215,6 +241,14 @@ public class PeerConnectionFactory {
|
||||
private static native long nativeCreateAudioTrack(
|
||||
long nativeFactory, String id, long nativeSource);
|
||||
|
||||
private static native boolean nativeStartAecDump(long nativeFactory, int file_descriptor);
|
||||
|
||||
private static native void nativeStopAecDump(long nativeFactory);
|
||||
|
||||
private static native boolean nativeStartRtcEventLog(long nativeFactory, int file_descriptor);
|
||||
|
||||
private static native void nativeStopRtcEventLog(long nativeFactory);
|
||||
|
||||
public native void nativeSetOptions(long nativeFactory, Options options);
|
||||
|
||||
private static native void nativeSetVideoHwAccelerationOptions(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user