Index: webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java |
diff --git a/webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java b/webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java |
index ff6e89f80920d0f3333ef5982cd067fb20784a04..e71c12f38a9524fa8c8a561f909ec535e2bab776 100644 |
--- a/webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java |
+++ b/webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java |
@@ -108,10 +108,12 @@ public class PeerConnectionFactory { |
nativeCreateLocalMediaStream(nativeFactory, label)); |
} |
+ // The VideoSource takes ownership of |capturer|, so capturer.release() should not be called |
+ // manually after this. |
public VideoSource createVideoSource( |
- VideoCapturer capturer, MediaConstraints constraints) { |
+ VideoCapturerAndroid capturer, MediaConstraints constraints) { |
return new VideoSource(nativeCreateVideoSource( |
- nativeFactory, capturer.takeNativeVideoCapturer(), constraints)); |
+ nativeFactory, capturer, constraints)); |
} |
public VideoTrack createVideoTrack(String id, VideoSource source) { |
@@ -221,7 +223,7 @@ public class PeerConnectionFactory { |
long nativeFactory, String label); |
private static native long nativeCreateVideoSource( |
- long nativeFactory, long nativeVideoCapturer, |
+ long nativeFactory, VideoCapturerAndroid videoCapturer, |
MediaConstraints constraints); |
private static native long nativeCreateVideoTrack( |