QNCaptureVideoCallback
/**
* 当打开采集设备时触发
* <p>可以用于根据返回的设备能力选择采集参数<p/>
*
* @param sizes 采集设备支持的分辨率列表
* @param fpsAscending 采集设备支持的帧率
* @return 选择的分辨率和帧率在 {@code sizes} 和 {@code fpsAscending} 中的下标
*/
int[] onCaptureOpened(List<Size> sizes, List<Integer> fpsAscending);
/**
* 当开始采集时触发
*/
void onCaptureStarted();
/**
* 当摄像头回调纹理数据时触发
* <p>回调数据根据配置,可能经过内置美颜、视频水印处理</p>
*
* @param texBuf 待渲染的 TextureBuffer 对象
* @param timestampNs 该帧的时间戳,单位 Ns
*/
void onRenderingFrame(VideoFrame.TextureBuffer texBuf, long timestampNs);
/**
* 当摄像头回调一帧 YUV 数据时触发
*
* @param data 视频预览 YUV 数据回调
* @param width 视频帧的宽度
* @param height 视频帧的高度
* @param rotation 视频帧的旋转角度
* @param fmt 视频帧的格式,详情可参考 {@link com.qiniu.droid.rtc.QNFourCC}(目前仅返回 NV21 类型)
* @param timestampNs 视频帧的时间戳,单位 : ns
*/
void onPreviewFrame(byte[] data, int width, int height, int rotation, int fmt, long timestampNs);
/**
* 当采集停止时触发
*/
void onCaptureStopped();