From ed6e077263eefff2b7f8595c85b70ee3193bbe9f Mon Sep 17 00:00:00 2001 From: skvlad Date: Wed, 30 Nov 2016 14:40:18 -0800 Subject: [PATCH] Make SurfaceTextureHelper and I420Frame public in Java. This change makes the Java classes and constructors for SurfaceTextureHelper and I420Frame public. This allows applications to use the WebRTC CameraVideoCapturer to obtain raw frames, and to render frames on the WebRTC VideoRenderer without having to pass them through a VideoTrack - such as when using Quartc. BUG=None. Review-Url: https://codereview.webrtc.org/2544563002 Cr-Commit-Position: refs/heads/master@{#15344} --- .../android/java/src/org/webrtc/SurfaceTextureHelper.java | 2 +- webrtc/api/android/java/src/org/webrtc/VideoRenderer.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webrtc/api/android/java/src/org/webrtc/SurfaceTextureHelper.java b/webrtc/api/android/java/src/org/webrtc/SurfaceTextureHelper.java index 48a57bca5e..c4de0da859 100644 --- a/webrtc/api/android/java/src/org/webrtc/SurfaceTextureHelper.java +++ b/webrtc/api/android/java/src/org/webrtc/SurfaceTextureHelper.java @@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit; * wrapping texture frames into webrtc::VideoFrames and also handles calling returnTextureFrame() * when the webrtc::VideoFrame is no longer used. */ -class SurfaceTextureHelper { +public class SurfaceTextureHelper { private static final String TAG = "SurfaceTextureHelper"; /** * Callback interface for being notified that a new texture frame is available. The calls will be diff --git a/webrtc/api/android/java/src/org/webrtc/VideoRenderer.java b/webrtc/api/android/java/src/org/webrtc/VideoRenderer.java index 3a6a16771b..bfa4f67d4b 100644 --- a/webrtc/api/android/java/src/org/webrtc/VideoRenderer.java +++ b/webrtc/api/android/java/src/org/webrtc/VideoRenderer.java @@ -45,8 +45,8 @@ public class VideoRenderer { /** * Construct a frame of the given dimensions with the specified planar data. */ - I420Frame(int width, int height, int rotationDegree, int[] yuvStrides, ByteBuffer[] yuvPlanes, - long nativeFramePointer) { + public I420Frame(int width, int height, int rotationDegree, int[] yuvStrides, + ByteBuffer[] yuvPlanes, long nativeFramePointer) { this.width = width; this.height = height; this.yuvStrides = yuvStrides; @@ -73,8 +73,8 @@ public class VideoRenderer { /** * Construct a texture frame of the given dimensions with data in SurfaceTexture */ - I420Frame(int width, int height, int rotationDegree, int textureId, float[] samplingMatrix, - long nativeFramePointer) { + public I420Frame(int width, int height, int rotationDegree, int textureId, + float[] samplingMatrix, long nativeFramePointer) { this.width = width; this.height = height; this.yuvStrides = null;