Android: Annotate and generate JNI code for SurfaceTextureHelper.java
Bug: webrtc:8278 Change-Id: I96966e3e7f589a1dde8d4c8079d3fdd1e32bc023 Reviewed-on: https://webrtc-review.googlesource.com/22721 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20673}
This commit is contained in:
committed by
Commit Bot
parent
6cb76506fe
commit
6199a3731d
@ -23,6 +23,7 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.webrtc.EglBase;
|
||||
import org.webrtc.VideoFrame.I420Buffer;
|
||||
import org.webrtc.VideoFrame.TextureBuffer;
|
||||
|
||||
@ -53,6 +54,7 @@ public class SurfaceTextureHelper {
|
||||
* thread and handler is created for handling the SurfaceTexture. May return null if EGL fails to
|
||||
* initialize a pixel buffer surface and make it current.
|
||||
*/
|
||||
@CalledByNative
|
||||
public static SurfaceTextureHelper create(
|
||||
final String threadName, final EglBase.Context sharedContext) {
|
||||
final HandlerThread thread = new HandlerThread(threadName);
|
||||
@ -195,6 +197,7 @@ public class SurfaceTextureHelper {
|
||||
* onTextureFrameAvailable(). Only one texture frame can be in flight at once, so you must call
|
||||
* this function in order to receive a new frame.
|
||||
*/
|
||||
@CalledByNative
|
||||
public void returnTextureFrame() {
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
@ -218,6 +221,7 @@ public class SurfaceTextureHelper {
|
||||
* stopped when the texture frame has been returned by a call to returnTextureFrame(). You are
|
||||
* guaranteed to not receive any more onTextureFrameAvailable() after this function returns.
|
||||
*/
|
||||
@CalledByNative
|
||||
public void dispose() {
|
||||
Logging.d(TAG, "dispose()");
|
||||
ThreadUtils.invokeAtFrontUninterruptibly(handler, new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user