AgoraVideoFrame 类定义。包含待 SDK 编码的视频数据。
◆ FORMAT_NONE
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_NONE = -1 |
|
static |
◆ FORMAT_TEXTURE_2D
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_TEXTURE_2D = 10 |
|
static |
◆ FORMAT_TEXTURE_OES
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_TEXTURE_OES = 11 |
|
static |
◆ FORMAT_I420
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_I420 = 1 |
|
static |
◆ FORMAT_BGRA
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_BGRA = 2 |
|
static |
◆ FORMAT_NV21
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_NV21 = 3 |
|
static |
◆ FORMAT_RGBA
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_RGBA = 4 |
|
static |
◆ FORMAT_IMC2
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_IMC2 = 5 |
|
static |
◆ FORMAT_ARGB
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_ARGB = 7 |
|
static |
◆ FORMAT_NV12
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_NV12 = 8 |
|
static |
◆ FORMAT_I422
final int io.agora.rtc.video.AgoraVideoFrame.FORMAT_I422 = 16 |
|
static |
◆ BUFFER_TYPE_NONE
final int io.agora.rtc.video.AgoraVideoFrame.BUFFER_TYPE_NONE = -1 |
|
static |
◆ BUFFER_TYPE_BUFFER
final int io.agora.rtc.video.AgoraVideoFrame.BUFFER_TYPE_BUFFER = 1 |
|
static |
◆ BUFFER_TYPE_ARRAY
final int io.agora.rtc.video.AgoraVideoFrame.BUFFER_TYPE_ARRAY = 2 |
|
static |
◆ BUFFER_TYPE_TEXTURE
final int io.agora.rtc.video.AgoraVideoFrame.BUFFER_TYPE_TEXTURE = 3 |
|
static |
◆ format
int io.agora.rtc.video.AgoraVideoFrame.format |
传入的视频帧的格式。
必须指定为下面的某一个值:
- 注解
- SDK 目前不支持 alpha 通道。传入的 alpha 值将被丢弃。
◆ timeStamp
long io.agora.rtc.video.AgoraVideoFrame.timeStamp |
传入的视频帧的时间戳,以毫秒为单位。不正确的时间戳会导致丢帧或者音视频不同步
◆ stride
int io.agora.rtc.video.AgoraVideoFrame.stride |
传入视频帧的行间距,单位为像素而不是字节。对于 Texture,该值指的是 Texture 的宽度
◆ height
int io.agora.rtc.video.AgoraVideoFrame.height |
◆ textureID
int io.agora.rtc.video.AgoraVideoFrame.textureID |
[Texture 相关的字段] 视频帧所使用的 Texture ID
◆ syncMode
boolean io.agora.rtc.video.AgoraVideoFrame.syncMode |
[Texture 相关的字段](可选)设置是否等待前一帧编码完成:
◆ transform
float [] io.agora.rtc.video.AgoraVideoFrame.transform |
[Texture 相关的字段] 传入一个 4x4 的变换矩阵,典型值是传入一个单位矩阵
◆ eglContext11
javax.microedition.khronos.egl.EGLContext io.agora.rtc.video.AgoraVideoFrame.eglContext11 |
[Texture 相关的字段] 当使用 Android 定义的 OpenGL 接口 (javax.microedition.khronos.egl.*)时,需要将 EGLContext 设置给这个字段
◆ eglContext14
android.opengl.EGLContext io.agora.rtc.video.AgoraVideoFrame.eglContext14 |
[Texture 相关的字段] 当使用 Android 定义的 OpenGL 接口 (android.opengl.*)时,需要将 EGLContext 设置给这个字段
◆ buf
byte [] io.agora.rtc.video.AgoraVideoFrame.buf |
◆ cropLeft
int io.agora.rtc.video.AgoraVideoFrame.cropLeft |
[原始数据相关字段] 指定左边裁剪掉的像素数量。默认为 0
◆ cropTop
int io.agora.rtc.video.AgoraVideoFrame.cropTop |
[原始数据相关字段] 指定顶边裁剪掉的像素数量。默认为 0
◆ cropRight
int io.agora.rtc.video.AgoraVideoFrame.cropRight |
[原始数据相关字段] 指定右边裁剪掉的像素数量。默认为 0
◆ cropBottom
int io.agora.rtc.video.AgoraVideoFrame.cropBottom |
[原始数据相关字段] 指定底边裁剪掉的像素数量。默认为 0
◆ rotation
int io.agora.rtc.video.AgoraVideoFrame.rotation |
[原始数据相关字段] 指定是否对传入的视频组做顺时针旋转操作,可选值为 0, 90, 180, 270。默认为 0