Android: One JNI file per Java file

This CL does the following:
 * Split out MediaStream JNI code from peerconnection.cc to mediastream.h/mediastream.cc.
 * Split out RtpSender JNI code from peerconnection.cc to rtpsender.h/rtpsender.cc.
 * Split out TurnCustomizer JNI code from peerconnection.cc to turncustomizer.h/turncustomizer.cc.
 * Add missing instanceof function to WrappedNativeVideoDecoder.java.
 * Move some PeerConnectionFactory JNI declarations from pc/video.cc to peerconnectionfactory.cc.
 * Add declaration to video.h for the JNI functions that depend on EglBase14_jni.h.
 * Use a scoped object to store the global Java MediaStream objects that also call dispose.

Bug: webrtc:8278
Change-Id: I3c56a599b8bcbc8f34e5c5a7b9c9fe1d192ff3f3
Reviewed-on: https://webrtc-review.googlesource.com/34645
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21380}
This commit is contained in:
Magnus Jedvert
2017-12-20 12:00:50 +01:00
committed by Commit Bot
parent 1ece1edddc
commit 1212f1e227
22 changed files with 395 additions and 308 deletions

View File

@ -84,7 +84,7 @@ public class MediaStream {
while (!preservedVideoTracks.isEmpty()) {
removeTrack(preservedVideoTracks.get(0 /* index */));
}
free(nativeStream);
JniCommon.nativeReleaseRef(nativeStream);
}
public String label() {
@ -141,6 +141,4 @@ public class MediaStream {
private static native boolean removeNativeVideoTrack(long nativeStream, long nativeVideoTrack);
private static native String getNativeLabel(long nativeStream);
private static native void free(long nativeStream);
}