public class SurfaceTextureHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SurfaceTextureHelper.FrameRefMonitor
Interface for monitoring texture buffers created from this SurfaceTexture.
|
Modifier and Type | Method and Description |
---|---|
static SurfaceTextureHelper |
create(java.lang.String threadName,
EglBase.Context sharedContext)
Same as above with alignTimestamps set to false and yuvConverter set to new YuvConverter.
|
static SurfaceTextureHelper |
create(java.lang.String threadName,
EglBase.Context sharedContext,
boolean alignTimestamps)
Same as above with yuvConverter set to new YuvConverter.
|
static SurfaceTextureHelper |
create(java.lang.String threadName,
EglBase.Context sharedContext,
boolean alignTimestamps,
YuvConverter yuvConverter)
Create a SurfaceTextureHelper without frame ref monitor.
|
static SurfaceTextureHelper |
create(java.lang.String threadName,
EglBase.Context sharedContext,
boolean alignTimestamps,
YuvConverter yuvConverter,
SurfaceTextureHelper.FrameRefMonitor frameRefMonitor)
Construct a new SurfaceTextureHelper sharing OpenGL resources with |sharedContext|.
|
void |
dispose()
Call disconnect() to stop receiving frames.
|
android.os.Handler |
getHandler()
Retrieve the handler that calls onFrame().
|
android.graphics.SurfaceTexture |
getSurfaceTexture()
Retrieve the underlying SurfaceTexture.
|
boolean |
isTextureInUse() |
void |
setFrameRotation(int rotation)
Set the rotation of the delivered frames.
|
void |
setTextureSize(int textureWidth,
int textureHeight)
Use this function to set the texture size.
|
void |
startListening(VideoSink listener)
Start to stream textures to the given |listener|.
|
void |
stopListening()
Stop listening.
|
VideoFrame.I420Buffer |
textureToYuv(VideoFrame.TextureBuffer textureBuffer)
Deprecated.
Use toI420() instead.
|
public static SurfaceTextureHelper create(java.lang.String threadName, EglBase.Context sharedContext, boolean alignTimestamps, YuvConverter yuvConverter, SurfaceTextureHelper.FrameRefMonitor frameRefMonitor)
public static SurfaceTextureHelper create(java.lang.String threadName, EglBase.Context sharedContext)
public static SurfaceTextureHelper create(java.lang.String threadName, EglBase.Context sharedContext, boolean alignTimestamps)
public static SurfaceTextureHelper create(java.lang.String threadName, EglBase.Context sharedContext, boolean alignTimestamps, YuvConverter yuvConverter)
public void startListening(VideoSink listener)
public void stopListening()
public void setTextureSize(int textureWidth, int textureHeight)
public void setFrameRotation(int rotation)
public android.graphics.SurfaceTexture getSurfaceTexture()
public android.os.Handler getHandler()
public boolean isTextureInUse()
public void dispose()
@Deprecated public VideoFrame.I420Buffer textureToYuv(VideoFrame.TextureBuffer textureBuffer)
6.0.0