Index: webrtc/api/android/java/src/org/webrtc/PeerConnection.java |
diff --git a/webrtc/api/android/java/src/org/webrtc/PeerConnection.java b/webrtc/api/android/java/src/org/webrtc/PeerConnection.java |
index 70813a60d7a344e21548e72d72893b345f542be7..965cea4fd2fb6da04930b5d06dfc696272e97cde 100644 |
--- a/webrtc/api/android/java/src/org/webrtc/PeerConnection.java |
+++ b/webrtc/api/android/java/src/org/webrtc/PeerConnection.java |
@@ -257,6 +257,23 @@ public class PeerConnection { |
return nativeGetStats(observer, (track == null) ? 0 : track.nativeTrack); |
} |
+ // 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. Logging will |
+ // continue until the stopRtcEventLog function is called. The max_size_bytes |
+ // argument is ignored, it is added for future use. |
+ public boolean startRtcEventLog( |
+ int file_descriptor, long max_size_bytes) { |
+ return nativeStartRtcEventLog( |
+ nativePeerConnection, file_descriptor, max_size_bytes); |
+ } |
+ |
+ // 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(nativePeerConnection); |
+ } |
+ |
// TODO(fischman): add support for DTMF-related methods once that API |
// stabilizes. |
public native SignalingState signalingState(); |
@@ -307,4 +324,10 @@ public class PeerConnection { |
private native List<RtpSender> nativeGetSenders(); |
private native List<RtpReceiver> nativeGetReceivers(); |
+ |
+ private static native boolean nativeStartRtcEventLog( |
+ long nativePeerConnection, int file_descriptor, long max_size_bytes); |
+ |
+ private static native void nativeStopRtcEventLog(long nativePeerConnection); |
+ |
} |