文档中心
互动直播 (Legacy)
API 参考
Agora Streaming Kit Java API Reference
Streaming Kit API Reference for Android
|
abstract VideoFrame | process (VideoFrame inputFrame) |
|
◆ process()
abstract VideoFrame io.agora.streaming.VideoFilter.process |
( |
VideoFrame |
inputFrame | ) |
|
|
abstract |
处理视频帧。
调用 addVideoFilter 方法向 video track 添加 video filter 后。你可以调用 process 方法并从 inputFrame
参数中得到 Streaming Kit 采集后的视频帧,然后自行对视频帧进行美颜等前处理。处理完成,你可以 通过 process 方法的返回值将视频帧传回 Streaming Kit。
- 注解
- 如果你想丢弃处理的视频帧,请在返回值中传空。
- 参数
-
[out] | inputFrame | 视频帧。详见 VideoFrame。
format : int 型。视频像素格式。默认为 I420。
buffer : ByteBuffer 型。视频数据的 buffer。
bytes : byte[] 型。视频数据的字节数 (bytes)。
stride : int 型。视频帧的行间距 (pixel)。
width : int 型。视频帧的宽度 (pixel)。
height : int 型。视频帧的高度 (pixel)。
timestamp : long 型。视频帧的 Unix 时间戳(毫秒)。
|
- 返回
- VideoFrame。