Remove the old AndroidVideoCapturer stack code.

This code is no longer needed. Apps should be using the new API introduced here: https://codereview.webrtc.org/2127893002/

Review-Url: https://codereview.webrtc.org/2235893003
Cr-Commit-Position: refs/heads/master@{#13950}
This commit is contained in:
sakal
2016-08-29 02:20:21 -07:00
committed by Commit bot
parent de04f8e10e
commit 1b365a8db0
10 changed files with 2 additions and 725 deletions

View File

@ -111,21 +111,10 @@ public class PeerConnectionFactory {
nativeCreateLocalMediaStream(nativeFactory, label));
}
// The VideoSource takes ownership of |capturer|, so capturer.dispose() should not be called
// manually after this. Video capturer is automatically started so there is no need to call
// startCapture after this method.
public VideoSource createVideoSource(
VideoCapturer capturer, MediaConstraints constraints) {
final EglBase.Context eglContext =
localEglbase == null ? null : localEglbase.getEglBaseContext();
return new VideoSource(nativeCreateVideoSource(nativeFactory,
eglContext, capturer, constraints));
}
public VideoSource createVideoSource(VideoCapturer capturer) {
final EglBase.Context eglContext =
localEglbase == null ? null : localEglbase.getEglBaseContext();
long nativeAndroidVideoTrackSource = nativeCreateVideoSource2(nativeFactory, eglContext);
long nativeAndroidVideoTrackSource = nativeCreateVideoSource(nativeFactory, eglContext);
VideoCapturer.CapturerObserver capturerObserver
= new VideoCapturer.AndroidVideoTrackSourceObserver(nativeAndroidVideoTrackSource);
nativeInitializeVideoCapturer(nativeFactory, capturer, nativeAndroidVideoTrackSource,
@ -248,10 +237,6 @@ public class PeerConnectionFactory {
long nativeFactory, String label);
private static native long nativeCreateVideoSource(
long nativeFactory, EglBase.Context eglContext, VideoCapturer videoCapturer,
MediaConstraints constraints);
private static native long nativeCreateVideoSource2(
long nativeFactory, EglBase.Context eglContext);
private static native void nativeInitializeVideoCapturer(

View File

@ -39,53 +39,6 @@ public interface VideoCapturer {
void onOutputFormatRequest(int width, int height, int framerate);
}
// An implementation of CapturerObserver that forwards all calls from
// Java to the C layer.
static class NativeObserver implements CapturerObserver {
private final long nativeCapturer;
public NativeObserver(long nativeCapturer) {
this.nativeCapturer = nativeCapturer;
}
@Override
public void onCapturerStarted(boolean success) {
nativeCapturerStarted(nativeCapturer, success);
}
@Override
public void onCapturerStopped() {}
@Override
public void onByteBufferFrameCaptured(byte[] data, int width, int height,
int rotation, long timeStamp) {
nativeOnByteBufferFrameCaptured(nativeCapturer, data, data.length, width, height, rotation,
timeStamp);
}
@Override
public void onTextureFrameCaptured(
int width, int height, int oesTextureId, float[] transformMatrix, int rotation,
long timestamp) {
nativeOnTextureFrameCaptured(nativeCapturer, width, height, oesTextureId, transformMatrix,
rotation, timestamp);
}
@Override
public void onOutputFormatRequest(int width, int height, int framerate) {
nativeOnOutputFormatRequest(nativeCapturer, width, height, framerate);
}
private native void nativeCapturerStarted(long nativeCapturer,
boolean success);
private native void nativeOnByteBufferFrameCaptured(long nativeCapturer,
byte[] data, int length, int width, int height, int rotation, long timeStamp);
private native void nativeOnTextureFrameCaptured(long nativeCapturer, int width, int height,
int oesTextureId, float[] transformMatrix, int rotation, long timestamp);
private native void nativeOnOutputFormatRequest(long nativeCapturer,
int width, int height, int framerate);
}
// An implementation of CapturerObserver that forwards all calls from
// Java to the C layer.
static class AndroidVideoTrackSourceObserver implements CapturerObserver {