diff --git a/sdk/android/api/org/webrtc/VideoCapturer.java b/sdk/android/api/org/webrtc/VideoCapturer.java index 1f2f5806aa..99a07294ff 100644 --- a/sdk/android/api/org/webrtc/VideoCapturer.java +++ b/sdk/android/api/org/webrtc/VideoCapturer.java @@ -22,21 +22,6 @@ public interface VideoCapturer { void onCapturerStarted(boolean success); void onCapturerStopped(); - // Delivers a captured frame. Called on a Java thread owned by VideoCapturer. - @Deprecated - default void onByteBufferFrameCaptured( - byte[] data, int width, int height, int rotation, long timeStamp) { - throw new UnsupportedOperationException("Deprecated and not implemented."); - } - - // Delivers a captured frame in a texture with id {@code oesTextureId}. Called on a Java thread - // owned by VideoCapturer. - @Deprecated - default void onTextureFrameCaptured(int width, int height, int oesTextureId, - float[] transformMatrix, int rotation, long timestamp) { - throw new UnsupportedOperationException("Deprecated and not implemented."); - } - // Delivers a captured frame. Called on a Java thread owned by VideoCapturer. void onFrameCaptured(VideoFrame frame); } diff --git a/sdk/android/src/java/org/webrtc/NativeCapturerObserver.java b/sdk/android/src/java/org/webrtc/NativeCapturerObserver.java index 63a46b8804..1bd87ba143 100644 --- a/sdk/android/src/java/org/webrtc/NativeCapturerObserver.java +++ b/sdk/android/src/java/org/webrtc/NativeCapturerObserver.java @@ -44,32 +44,6 @@ class NativeCapturerObserver implements VideoCapturer.CapturerObserver { nativeCapturerStopped(nativeSource); } - // TODO(bugs.webrtc.org/9181): Remove. - @Override - @SuppressWarnings("deprecation") - public void onByteBufferFrameCaptured( - byte[] data, int width, int height, int rotation, long timestampNs) { - // This NV21Buffer is not possible to retain. This is safe only because the native code will - // always call cropAndScale() and directly make a deep copy of the buffer. - final VideoFrame.Buffer nv21Buffer = - new NV21Buffer(data, width, height, null /* releaseCallback */); - final VideoFrame frame = new VideoFrame(nv21Buffer, rotation, timestampNs); - onFrameCaptured(frame); - frame.release(); - } - - // TODO(bugs.webrtc.org/9181): Remove. - @Override - @SuppressWarnings("deprecation") - public void onTextureFrameCaptured(int width, int height, int oesTextureId, - float[] transformMatrix, int rotation, long timestampNs) { - final VideoFrame.Buffer buffer = surfaceTextureHelper.createTextureBuffer( - width, height, RendererCommon.convertMatrixToAndroidGraphicsMatrix(transformMatrix)); - final VideoFrame frame = new VideoFrame(buffer, rotation, timestampNs); - onFrameCaptured(frame); - frame.release(); - } - @Override public void onFrameCaptured(VideoFrame frame) { nativeOnFrameCaptured(nativeSource, frame.getBuffer().getWidth(), frame.getBuffer().getHeight(),