Index: webrtc/api/java/src/org/webrtc/PeerConnection.java |
diff --git a/webrtc/api/java/src/org/webrtc/PeerConnection.java b/webrtc/api/java/src/org/webrtc/PeerConnection.java |
index 3c9fa0ee21f248a87fc4f3e0ac860be6e733e8fc..d6ac66c3d6bb430609cf87823a881bb49fc5a6da 100644 |
--- a/webrtc/api/java/src/org/webrtc/PeerConnection.java |
+++ b/webrtc/api/java/src/org/webrtc/PeerConnection.java |
@@ -237,6 +237,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 |
terelius
2016/03/21 20:47:45
This is the current behavior, but is that how we w
ivoc
2016/03/22 13:44:54
I think it makes sense for the comments in this CL
|
+ // stopped and a new one will start using the provided file. Logging will |
+ // continue until the stopRtcEventLog function is called. The |
+ // filesize_limit_bytes argument is ignored, it is added for future use. |
+ public boolean startRtcEventLog( |
+ int file_descriptor, long filesize_limit_bytes) { |
+ return nativeStartRtcEventLog( |
+ nativePeerConnection, file_descriptor, filesize_limit_bytes); |
terelius
2016/03/21 20:47:45
Nit: I believe filesize_limit_bytes is called max_
ivoc
2016/03/22 13:44:54
Good point, will update.
|
+ } |
+ |
+ // 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(); |
@@ -285,4 +302,11 @@ public class PeerConnection { |
private native List<RtpSender> nativeGetSenders(); |
private native List<RtpReceiver> nativeGetReceivers(); |
+ |
+ private static native boolean nativeStartRtcEventLog( |
+ long nativePeerConnection, int file_descriptor, |
+ long filesize_limit_bytes); |
+ |
+ private static native void nativeStopRtcEventLog(long nativePeerConnection); |
+ |
} |