文档中心
视频通话 (Legacy)
API 参考
Agora Unity API Reference for All Platforms
Agora Unity SDK API Reference
|
enum class | VIDEO_BUFFER_TYPE { VIDEO_BUFFER_RAW_DATA = 1
, VIDEO_BUFFER_RAW_DATA = 1
} |
|
enum class | VIDEO_PIXEL_FORMAT {
VIDEO_PIXEL_UNKNOWN = 0
, VIDEO_PIXEL_I420 = 1
, VIDEO_PIXEL_BGRA = 2
, VIDEO_PIXEL_NV21 = 3
,
VIDEO_PIXEL_RGBA = 4
, VIDEO_PIXEL_IMC2 = 5
, VIDEO_PIXEL_ARGB = 7
, VIDEO_PIXEL_NV12 = 8
,
VIDEO_PIXEL_I422 = 16
, VIDEO_PIXEL_UNKNOWN = 0
, VIDEO_PIXEL_I420 = 1
, VIDEO_PIXEL_BGRA = 2
,
VIDEO_PIXEL_NV21 = 3
, VIDEO_PIXEL_RGBA = 4
, VIDEO_PIXEL_IMC2 = 5
, VIDEO_PIXEL_ARGB = 7
,
VIDEO_PIXEL_NV12 = 8
, VIDEO_PIXEL_I422 = 16
} |
|
enum class | VIDEO_BUFFER_TYPE { VIDEO_BUFFER_RAW_DATA = 1
, VIDEO_BUFFER_RAW_DATA = 1
} |
|
enum class | VIDEO_PIXEL_FORMAT {
VIDEO_PIXEL_UNKNOWN = 0
, VIDEO_PIXEL_I420 = 1
, VIDEO_PIXEL_BGRA = 2
, VIDEO_PIXEL_NV21 = 3
,
VIDEO_PIXEL_RGBA = 4
, VIDEO_PIXEL_IMC2 = 5
, VIDEO_PIXEL_ARGB = 7
, VIDEO_PIXEL_NV12 = 8
,
VIDEO_PIXEL_I422 = 16
, VIDEO_PIXEL_UNKNOWN = 0
, VIDEO_PIXEL_I420 = 1
, VIDEO_PIXEL_BGRA = 2
,
VIDEO_PIXEL_NV21 = 3
, VIDEO_PIXEL_RGBA = 4
, VIDEO_PIXEL_IMC2 = 5
, VIDEO_PIXEL_ARGB = 7
,
VIDEO_PIXEL_NV12 = 8
, VIDEO_PIXEL_I422 = 16
} |
|
◆ VIDEO_BUFFER_TYPE [1/2]
视频 buffer 类型。
枚举值 |
---|
VIDEO_BUFFER_RAW_DATA | 1: 视频 Buffer 格式是原始数据。
|
VIDEO_BUFFER_RAW_DATA | 1: 视频 Buffer 格式是原始数据。
|
◆ VIDEO_PIXEL_FORMAT [1/2]
视频像素格式。
- 注解
- SDK 目前不支持 alpha 通道。传入的 alpha 值将被丢弃。
枚举值 |
---|
VIDEO_PIXEL_UNKNOWN | 0: 视频像素格式未知。
|
VIDEO_PIXEL_I420 | 1: 视频像素格式是 I420。
|
VIDEO_PIXEL_BGRA | 2: 视频像素格式是 BGRA。
|
VIDEO_PIXEL_NV21 | 3: 视频像素格式是 NV21。
|
VIDEO_PIXEL_RGBA | 4: 视频像素格式是 RGBA。
|
VIDEO_PIXEL_IMC2 | 5: 视频像素格式是 IMC2。
|
VIDEO_PIXEL_ARGB | 7: 视频像素格式是 ARGB。
|
VIDEO_PIXEL_NV12 | 8: 视频像素格式是 NV12。
|
VIDEO_PIXEL_I422 | 16: 视频像素格式是 I422。
|
VIDEO_PIXEL_UNKNOWN | 0: 视频像素格式未知。
|
VIDEO_PIXEL_I420 | 1: 视频像素格式是 I420。
|
VIDEO_PIXEL_BGRA | 2: 视频像素格式是 BGRA。
|
VIDEO_PIXEL_NV21 | 3: 视频像素格式是 NV21。
|
VIDEO_PIXEL_RGBA | 4: 视频像素格式是 RGBA。
|
VIDEO_PIXEL_IMC2 | 5: 视频像素格式是 IMC2。
|
VIDEO_PIXEL_ARGB | 7: 视频像素格式是 ARGB。
|
VIDEO_PIXEL_NV12 | 8: 视频像素格式是 NV12。
|
VIDEO_PIXEL_I422 | 16: 视频像素格式是 I422。
|
◆ VIDEO_BUFFER_TYPE [2/2]
视频 buffer 类型。
枚举值 |
---|
VIDEO_BUFFER_RAW_DATA | 1: 视频 Buffer 格式是原始数据。
|
VIDEO_BUFFER_RAW_DATA | 1: 视频 Buffer 格式是原始数据。
|
◆ VIDEO_PIXEL_FORMAT [2/2]
视频像素格式。
- 注解
- SDK 目前不支持 alpha 通道。传入的 alpha 值将被丢弃。
枚举值 |
---|
VIDEO_PIXEL_UNKNOWN | 0: 视频像素格式未知。
|
VIDEO_PIXEL_I420 | 1: 视频像素格式是 I420。
|
VIDEO_PIXEL_BGRA | 2: 视频像素格式是 BGRA。
|
VIDEO_PIXEL_NV21 | 3: 视频像素格式是 NV21。
|
VIDEO_PIXEL_RGBA | 4: 视频像素格式是 RGBA。
|
VIDEO_PIXEL_IMC2 | 5: 视频像素格式是 IMC2。
|
VIDEO_PIXEL_ARGB | 7: 视频像素格式是 ARGB。
|
VIDEO_PIXEL_NV12 | 8: 视频像素格式是 NV12。
|
VIDEO_PIXEL_I422 | 16: 视频像素格式是 I422。
|
VIDEO_PIXEL_UNKNOWN | 0: 视频像素格式未知。
|
VIDEO_PIXEL_I420 | 1: 视频像素格式是 I420。
|
VIDEO_PIXEL_BGRA | 2: 视频像素格式是 BGRA。
|
VIDEO_PIXEL_NV21 | 3: 视频像素格式是 NV21。
|
VIDEO_PIXEL_RGBA | 4: 视频像素格式是 RGBA。
|
VIDEO_PIXEL_IMC2 | 5: 视频像素格式是 IMC2。
|
VIDEO_PIXEL_ARGB | 7: 视频像素格式是 ARGB。
|
VIDEO_PIXEL_NV12 | 8: 视频像素格式是 NV12。
|
VIDEO_PIXEL_I422 | 16: 视频像素格式是 I422。
|
◆ type
◆ format
◆ buffer
byte [] agora_gaming_rtc.ExternalVideoFrame.buffer |
◆ stride
int agora_gaming_rtc.ExternalVideoFrame.stride |
传入视频帧的行间距,单位为像素而不是字节。对于 Texture,该值指的是 Texture 的宽度。
◆ height
int agora_gaming_rtc.ExternalVideoFrame.height |
◆ cropLeft
int agora_gaming_rtc.ExternalVideoFrame.cropLeft |
[原始数据相关字段] 指定左边裁剪掉的像素数量。默认为 0。
◆ cropTop
int agora_gaming_rtc.ExternalVideoFrame.cropTop |
[原始数据相关字段] 指定顶边裁剪掉的像素数量。默认为 0。
◆ cropRight
int agora_gaming_rtc.ExternalVideoFrame.cropRight |
[原始数据相关字段] 指定右边裁剪掉的像素数量。默认为 0。
◆ cropBottom
int agora_gaming_rtc.ExternalVideoFrame.cropBottom |
[原始数据相关字段] 指定底边裁剪掉的像素数量。默认为 0。
◆ rotation
int agora_gaming_rtc.ExternalVideoFrame.rotation |
[原始数据相关字段] 指定是否对传入的视频组做顺时针旋转操作,可选值为 0, 90, 180, 270。默认为 0。
◆ timestamp
long agora_gaming_rtc.ExternalVideoFrame.timestamp |
传入的视频帧的时间戳,以毫秒为单位。不正确的时间戳会导致丢帧或者音视频不同步。