NIMSDK-AOS
9.16.0
|
继承该类,实现自定义外部视频数据输入 更多...
Public 成员函数 | |
abstract void | startCapture (int width, int height, int frameRate) |
开始预览 更多... | |
abstract void | stopCapture () throws InterruptedException |
关闭预览 更多... | |
abstract void | changeCaptureFormat (int width, int height, int frameRate) |
修改采集的参数 更多... | |
abstract void | dispose () |
销毁 更多... | |
IVideoCapturer | asVideoCapturer () |
void | onCapturerStarted (boolean success) |
外部调用,用于通知SDK外部是否已经成功开启视频数据提交 更多... | |
void | onCapturerStopped () |
外部调用,用于通知SDK外部已经停止视频数据提交 更多... | |
int | onByteBufferFrameCaptured (byte[] data, int dataLen, int width, int height, int rotation, int frameRate, int format, long timeStamp, boolean mirror) |
外部调用,用于提交每一帧视频数据 更多... | |
继承该类,实现自定义外部视频数据输入
在文件 AVChatExternalVideoCapturer.java 第 24 行定义.
IVideoCapturer com.netease.nimlib.sdk.avchat.video.AVChatExternalVideoCapturer.asVideoCapturer | ( | ) |
|
abstract |
修改采集的参数
width | 采集宽 |
height | 采集高 |
frameRate | 采集分辨率 |
|
abstract |
销毁
int com.netease.nimlib.sdk.avchat.video.AVChatExternalVideoCapturer.onByteBufferFrameCaptured | ( | byte [] | data, |
int | dataLen, | ||
int | width, | ||
int | height, | ||
int | rotation, | ||
int | frameRate, | ||
int | format, | ||
long | timeStamp, | ||
boolean | mirror | ||
) |
外部调用,用于提交每一帧视频数据
data | 视频数据 |
dataLen | 视频数据宽度 |
width | 视频数据高度 |
height | 视频数据高度 |
rotation | 视频画面旋转角度,为90度倍数,以顺时针为正方向 |
frameRate | 输入的帧率,大于0,如果帧率过大,内部会做丢帧处理 |
format | 视频数据格式 AVChatImageFormat#I420、AVChatImageFormat#NV21 |
timeStamp | 视频帧时间戳,以AVChatManager#enableRtc()创建时刻为开始的基准时间,使用SystemClock#elapsedRealtime()即可 |
mirror | 是否需要镜像,如果设置为 true |
-1-数据为空或长度不合法;
-2-长宽不合法,如超过最大分辨率1920*1080或长宽和数据长度不匹配;
-3-旋转角度不合法;
-4-帧率不合法;
-5-数据格式不合法;
-10-其他错误;
在文件 AVChatExternalVideoCapturer.java 第 107 行定义.
void com.netease.nimlib.sdk.avchat.video.AVChatExternalVideoCapturer.onCapturerStarted | ( | boolean | success | ) |
void com.netease.nimlib.sdk.avchat.video.AVChatExternalVideoCapturer.onCapturerStopped | ( | ) |
外部调用,用于通知SDK外部已经停止视频数据提交
在文件 AVChatExternalVideoCapturer.java 第 79 行定义.
|
abstract |
开始预览
width | 采集宽 |
height | 采集高 |
frameRate | 采集分辨率 |
|
abstract |
关闭预览
InterruptedException |