| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
TextureHolder.OnNewFrameCallback |
Interface definition for being notified that a new stream frame is available.
|
| 构造器 | 说明 |
|---|---|
TextureHolder(int texName) |
Default constructor used to create a
TextureHolder instance by using the default attribute set
and style. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
abandon() |
Releases all buffers managed by this
TextureHolder. |
void |
bindToGPUContext(int texName) |
Binds this
TextureHolder to the GPU context, that is, the openGL context. |
void |
freeTextureImage() |
Releases the texture image of the
TextureHolder. |
long |
getLastRefreshTextureImageTime() |
Obtains the timestamp when
TextureHolder#refreshTextureImage() was last called, in nanoseconds. |
boolean |
getMatrixForTransform(float[] matrix) |
Obtains the 4x4 matrix for texture image transformation.
|
boolean |
isAbandoned() |
Checks whether buffers managed by
TextHolder have all been released. |
void |
refreshTextureImage() |
Updates the texture image to the latest image streams.
|
void |
setBufferDimension(int width,
int height) |
Sets the size of the image buffer.
|
void |
setOnNewFrameCallback(TextureHolder.OnNewFrameCallback callback) |
Sets a callback to listen for whether new image frames are available.
|
void |
unbindFromGPUContext() |
Unbinds this
TextureHolder from the GPU context. |
public TextureHolder(int texName)
TextureHolder instance by using the default attribute set
and style.public void bindToGPUContext(int texName)
TextureHolder to the GPU context, that is, the openGL context.texName - Indicates the texture name defined by the openGL API.public void unbindFromGPUContext()
TextureHolder from the GPU context.public void freeTextureImage()
TextureHolder.public void refreshTextureImage()
public void setBufferDimension(int width,
int height)
width - Indicates the buffer width.height - Indicates the buffer height.public boolean getMatrixForTransform(float[] matrix)
matrix - Indicates the array storing the 4x4 matrix.true if get the Matrix for Transform; returns false otherwise.public void setOnNewFrameCallback(TextureHolder.OnNewFrameCallback callback)
callback - Indicates the callback to set. If this parameter is null, the callback that has been set by this
method will be deleted.public void abandon()
TextureHolder.public boolean isAbandoned()
TextHolder have all been released.true if all buffers are released; returns false otherwise.public long getLastRefreshTextureImageTime()
TextureHolder#refreshTextureImage() was last called, in nanoseconds.TextureHolder#refreshTextureImage() was last called.