Android JNI generation: Set JNI namespace in build files
This CL removes the use of the @JNINamespace annotation and instead sets the correct JNI namespace in the build file. Bug: webrtc:8278 Change-Id: Ia4490399e45a97d56b02c260fd80df4edfa092bf Reviewed-on: https://webrtc-review.googlesource.com/76440 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23299}
This commit is contained in:
committed by
Commit Bot
parent
7e6fcea7de
commit
c7da266cb8
@ -11,7 +11,6 @@
|
||||
package org.webrtc;
|
||||
|
||||
/** Java wrapper for a C++ AudioTrackInterface */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class AudioTrack extends MediaStreamTrack {
|
||||
public AudioTrack(long nativeTrack) {
|
||||
super(nativeTrack);
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class CallSessionFileRotatingLogSink {
|
||||
private long nativeSink;
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/** Java wrapper for a C++ DataChannelInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class DataChannel {
|
||||
/** Java wrapper for WebIDL RTCDataChannel. */
|
||||
public static class Init {
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
package org.webrtc;
|
||||
|
||||
/** Java wrapper for a C++ DtmfSenderInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class DtmfSender {
|
||||
final long nativeDtmfSender;
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ import javax.annotation.Nullable;
|
||||
|
||||
/** Factory for android hardware video encoders. */
|
||||
@SuppressWarnings("deprecation") // API 16 requires the use of deprecated methods.
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
private static final String TAG = "HardwareVideoEncoderFactory";
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ import org.webrtc.VideoFrame;
|
||||
// This class is an implementation detail of the Java PeerConnection API.
|
||||
@TargetApi(19)
|
||||
@SuppressWarnings("deprecation")
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class MediaCodecVideoEncoder {
|
||||
// This class is constructed, operated, and destroyed by its C++ incarnation,
|
||||
// so the class and its methods have non-public visibility. The API this
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
package org.webrtc;
|
||||
|
||||
/** Java wrapper for a C++ MediaSourceInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class MediaSource {
|
||||
/** Tracks MediaSourceInterface.SourceState */
|
||||
public enum State {
|
||||
|
||||
@ -15,7 +15,6 @@ import java.util.List;
|
||||
import java.util.Iterator;
|
||||
|
||||
/** Java wrapper for a C++ MediaStreamInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class MediaStream {
|
||||
private static final String TAG = "MediaStream";
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** Java wrapper for a C++ MediaStreamTrackInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class MediaStreamTrack {
|
||||
public static final String AUDIO_TRACK_KIND = "audio";
|
||||
public static final String VIDEO_TRACK_KIND = "video";
|
||||
|
||||
@ -28,7 +28,6 @@ import java.util.Map;
|
||||
// Most histograms are not updated frequently (e.g. most video metrics are an
|
||||
// average over the call and recorded when a stream is removed).
|
||||
// The metrics can for example be retrieved when a peer connection is closed.
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class Metrics {
|
||||
private static final String TAG = "Metrics";
|
||||
|
||||
|
||||
@ -278,18 +278,13 @@ public class NetworkMonitor {
|
||||
return connectionType != ConnectionType.CONNECTION_NONE;
|
||||
}
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyConnectionTypeChanged(long nativePtr);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyOfNetworkConnect(long nativePtr, NetworkInformation networkInfo);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyOfNetworkDisconnect(long nativePtr, long networkHandle);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyConnectionTypeChanged(long nativeAndroidNetworkMonitor);
|
||||
private native void nativeNotifyOfNetworkConnect(
|
||||
long nativeAndroidNetworkMonitor, NetworkInformation networkInfo);
|
||||
private native void nativeNotifyOfNetworkDisconnect(
|
||||
long nativeAndroidNetworkMonitor, long networkHandle);
|
||||
private native void nativeNotifyOfActiveNetworkList(
|
||||
long nativePtr, NetworkInformation[] networkInfos);
|
||||
long nativeAndroidNetworkMonitor, NetworkInformation[] networkInfos);
|
||||
|
||||
// For testing only.
|
||||
@Nullable
|
||||
|
||||
@ -21,7 +21,6 @@ import javax.annotation.Nullable;
|
||||
* JS APIs: http://dev.w3.org/2011/webrtc/editor/webrtc.html and
|
||||
* http://www.w3.org/TR/mediacapture-streams/
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class PeerConnection {
|
||||
/** Tracks PeerConnectionInterface::IceGatheringState */
|
||||
public enum IceGatheringState {
|
||||
|
||||
@ -20,7 +20,6 @@ import org.webrtc.audio.LegacyAudioDeviceModule;
|
||||
* Java wrapper for a C++ PeerConnectionFactoryInterface. Main entry point to
|
||||
* the PeerConnection API for clients.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class PeerConnectionFactory {
|
||||
public static final String TRIAL_ENABLED = "Enabled";
|
||||
@Deprecated public static final String VIDEO_FRAME_EMIT_TRIAL = "VideoFrameEmit";
|
||||
|
||||
@ -14,7 +14,6 @@ import javax.annotation.Nullable;
|
||||
import org.webrtc.MediaStreamTrack;
|
||||
|
||||
/** Java wrapper for a C++ RtpReceiverInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class RtpReceiver {
|
||||
/** Java wrapper for a C++ RtpReceiverObserverInterface*/
|
||||
public static interface Observer {
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** Java wrapper for a C++ RtpSenderInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class RtpSender {
|
||||
final long nativeRtpSender;
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ import org.webrtc.RtpParameters.Encoding;
|
||||
* <p>WebRTC specification for RTCRtpTransceiver, the JavaScript analog:
|
||||
* https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class RtpTransceiver {
|
||||
/** Java version of webrtc::RtpTransceiverDirection - the ordering must be kept in sync. */
|
||||
public enum RtpTransceiverDirection {
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
package org.webrtc;
|
||||
|
||||
/** Java wrapper for a C++ TurnCustomizer. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class TurnCustomizer {
|
||||
final long nativeTurnCustomizer;
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
/**
|
||||
* A combined video decoder that falls back on a secondary decoder if the primary decoder fails.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoDecoderFallback extends WrappedNativeVideoDecoder {
|
||||
private final VideoDecoder fallback;
|
||||
private final VideoDecoder primary;
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
/**
|
||||
* A combined video encoder that falls back on a secondary encoder if the primary encoder fails.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoEncoderFallback extends WrappedNativeVideoEncoder {
|
||||
private final VideoEncoder fallback;
|
||||
private final VideoEncoder primary;
|
||||
|
||||
@ -24,7 +24,6 @@ import java.util.concurrent.LinkedBlockingQueue;
|
||||
/**
|
||||
* Can be used to save the video frames to file.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoFileRenderer implements VideoSink {
|
||||
private static final String TAG = "VideoFileRenderer";
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ import javax.annotation.Nullable;
|
||||
* format and serves as a fallback for video sinks that can only handle I420, e.g. the internal
|
||||
* WebRTC software encoders.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoFrame implements RefCounted {
|
||||
/**
|
||||
* Implements image storage medium. Might be for example an OpenGL texture or a memory region
|
||||
|
||||
@ -21,7 +21,6 @@ import javax.annotation.Nullable;
|
||||
* drawer.drawYuv depending on the type of the buffer. The frame will be rendered with rotation
|
||||
* taken into account. You can supply an additional render matrix for custom transformations.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoFrameDrawer {
|
||||
/**
|
||||
* Draws a VideoFrame.TextureBuffer. Calls either drawer.drawOes or drawer.drawRgb
|
||||
|
||||
@ -20,7 +20,6 @@ import org.webrtc.VideoFrame;
|
||||
* class also provides a createGui() method for creating a GUI-rendering window
|
||||
* on various platforms.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoRenderer {
|
||||
/**
|
||||
* Java version of webrtc::VideoFrame. Frames are only constructed from native code and test
|
||||
|
||||
@ -15,7 +15,6 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* Java wrapper of native AndroidVideoTrackSource.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoSource extends MediaSource {
|
||||
private final NativeCapturerObserver capturerObserver;
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Java version of VideoTrackInterface. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class VideoTrack extends MediaStreamTrack {
|
||||
private final List<VideoRenderer> renderers = new ArrayList<>();
|
||||
private final IdentityHashMap<VideoSink, Long> sinks = new IdentityHashMap<VideoSink, Long>();
|
||||
|
||||
@ -13,7 +13,6 @@ package org.webrtc;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/** Wraps libyuv methods to Java. All passed byte buffers must be direct byte buffers. */
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class YuvHelper {
|
||||
/** Helper method for copying I420 to tightly packed destination buffer. */
|
||||
public static void I420Copy(ByteBuffer srcY, int srcStrideY, ByteBuffer srcU, int srcStrideU,
|
||||
|
||||
@ -12,7 +12,6 @@ package org.webrtc.audio;
|
||||
|
||||
import android.media.AudioManager;
|
||||
import android.content.Context;
|
||||
import org.webrtc.JNINamespace;
|
||||
import org.webrtc.JniCommon;
|
||||
import org.webrtc.Logging;
|
||||
|
||||
@ -20,7 +19,6 @@ import org.webrtc.Logging;
|
||||
* AudioDeviceModule implemented using android.media.AudioRecord as input and
|
||||
* android.media.AudioTrack as output.
|
||||
*/
|
||||
@JNINamespace("webrtc::jni")
|
||||
public class JavaAudioDeviceModule implements AudioDeviceModule {
|
||||
private static final String TAG = "JavaAudioDeviceModule";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user