public class RCRTCSurfaceTextureHelper extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
RCRTCSurfaceTextureHelper.Sink |
| 限定符和类型 | 方法和说明 |
|---|---|
static RCRTCSurfaceTextureHelper |
create(String threadName,
EglBase.Context sharedContext)
Same as above with alignTimestamps set to false and yuvConverter set to new YuvConverter.
|
static RCRTCSurfaceTextureHelper |
create(String threadName,
EglBase.Context sharedContext,
boolean alignTimestamps)
Same as above with yuvConverter set to new YuvConverter.
|
static RCRTCSurfaceTextureHelper |
create(String threadName,
EglBase.Context sharedContext,
boolean alignTimestamps,
YuvConverter yuvConverter)
Construct a new SurfaceTextureHelper sharing OpenGL resources with |sharedContext|.
|
void |
dispose()
Call disconnect() to stop receiving frames.
|
Handler |
getHandler()
Retrieve the handler that calls onFrame().
|
SurfaceTexture |
getSurfaceTexture()
Retrieve the underlying SurfaceTexture.
|
YuvConverter |
getYuvConverter() |
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(RCRTCSurfaceTextureHelper.Sink listener)
Start to stream textures to the given |listener|.
|
void |
stopListening()
Stop listening.
|
VideoFrame.I420Buffer |
textureToYuv(TextureBuffer textureBuffer)
已过时。
Use toI420() instead.
|
public static RCRTCSurfaceTextureHelper create(String threadName, EglBase.Context sharedContext, boolean alignTimestamps, YuvConverter yuvConverter)
public static RCRTCSurfaceTextureHelper create(String threadName, EglBase.Context sharedContext)
public static RCRTCSurfaceTextureHelper create(String threadName, EglBase.Context sharedContext, boolean alignTimestamps)
public void startListening(RCRTCSurfaceTextureHelper.Sink listener)
public void stopListening()
public void setTextureSize(int textureWidth,
int textureHeight)
public void setFrameRotation(int rotation)
public SurfaceTexture getSurfaceTexture()
public Handler getHandler()
public boolean isTextureInUse()
public void dispose()
public YuvConverter getYuvConverter()
@Deprecated public VideoFrame.I420Buffer textureToYuv(TextureBuffer textureBuffer)