public class AgoraVideoFrame
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private long |
cptr
Native pointer to the video frame instance.
|
| Constructor and Description |
|---|
AgoraVideoFrame(long cptr)
Constructs a video frame.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the video frame.
|
(package private) void |
destroyTextureId(TextureId id)
Destroys a texture ID.
|
int |
fillTexture(int format,
int width,
int height,
int rotation,
TextureId id)
Fills texture with video frame data.
|
int |
format()
Gets the video frame format.
|
int |
height()
Gets the video frame height.
|
private void |
nativeDestroyTextureId(long cptr,
TextureId id)
Destroys a texture ID natively.
|
private int |
nativeFillTexture(long cptr,
int format,
int width,
int height,
int rotation,
TextureId id)
Fills texture with video frame data natively.
|
private int |
nativeFormat(long cptr)
Gets the video frame format natively.
|
private int |
nativeHeight(long cptr)
Gets the video frame height natively.
|
private int |
nativeResize(long cptr,
int width,
int height)
Resizes the video frame natively.
|
private int |
nativeRotation(long cptr)
Gets the video frame rotation natively.
|
private void |
nativeSetRotation(long cptr,
int rotation)
Sets the video frame rotation natively.
|
private void |
nativeSetTimestampUs(long cptr,
long timestamp_us)
Sets the video frame timestamp natively.
|
private int |
nativeSize(long cptr)
Gets the video frame size natively.
|
private TextureId |
nativeTextureId(long cptr)
Gets the texture ID natively.
|
private long |
nativeTimestampUs(long cptr)
Gets the video frame timestamp natively.
|
private int |
nativeType(long cptr)
Gets the video frame type natively.
|
private int |
nativeWidth(long cptr)
Gets the video frame width natively.
|
int |
resize(int width,
int height)
Resizes the video frame.
|
int |
rotation()
Gets the video frame rotation.
|
void |
setRotation(int rotation)
Sets the video frame rotation.
|
void |
setTimestampUs(long timestamp_us)
Sets the video frame timestamp.
|
int |
size()
Gets the video frame size in bytes.
|
TextureId |
textureId()
Gets the texture ID of the video frame.
|
long |
timestampUs()
Gets the video frame timestamp in microseconds.
|
int |
type()
Gets the video frame type.
|
int |
width()
Gets the video frame width.
|
public AgoraVideoFrame(long cptr)
cptr - Native pointer to the video frame objectpublic void destroy()
public int type()
public int format()
public int width()
public int height()
public int size()
public int rotation()
public void setRotation(int rotation)
rotation - Rotation valuepublic long timestampUs()
public void setTimestampUs(long timestamp_us)
timestamp_us - Timestamp in microsecondspublic int resize(int width,
int height)
width - New width in pixelsheight - New height in pixelspublic TextureId textureId()
void destroyTextureId(TextureId id)
id - Texture ID to destroypublic int fillTexture(int format,
int width,
int height,
int rotation,
TextureId id)
format - Video formatwidth - Frame widthheight - Frame heightrotation - Frame rotationid - Texture IDprivate int nativeType(long cptr)
cptr - Native pointer to the video frameprivate int nativeFormat(long cptr)
cptr - Native pointer to the video frameprivate int nativeWidth(long cptr)
cptr - Native pointer to the video frameprivate int nativeHeight(long cptr)
cptr - Native pointer to the video frameprivate int nativeSize(long cptr)
cptr - Native pointer to the video frameprivate int nativeRotation(long cptr)
cptr - Native pointer to the video frameprivate void nativeSetRotation(long cptr,
int rotation)
cptr - Native pointer to the video framerotation - Rotation valueprivate long nativeTimestampUs(long cptr)
cptr - Native pointer to the video frameprivate void nativeSetTimestampUs(long cptr,
long timestamp_us)
cptr - Native pointer to the video frametimestamp_us - Timestamp in microsecondsprivate int nativeResize(long cptr,
int width,
int height)
cptr - Native pointer to the video framewidth - New width in pixelsheight - New height in pixelsprivate TextureId nativeTextureId(long cptr)
cptr - Native pointer to the video frameprivate void nativeDestroyTextureId(long cptr,
TextureId id)
cptr - Native pointer to the video frameid - Texture ID to destroyprivate int nativeFillTexture(long cptr,
int format,
int width,
int height,
int rotation,
TextureId id)
cptr - Native pointer to the video frameformat - Video formatwidth - Frame widthheight - Frame heightrotation - Frame rotationid - Texture ID