ZegoVideoCaptureDevice Protocol Reference
Conforms to | NSObject ZegoSupportsVideoCapture |
---|---|
Declared in | zego-api-external-video-capture-oc.h |
– zego_allocateAndStart:
required method
初始化采集使用的资源(例如启动线程等)回调
- (void)zego_allocateAndStart:(nonnull id<ZegoVideoCaptureClientDelegate>)client
Parameters
client |
SDK 实现回调的对象,一定要保存 |
---|
Discussion
第一次调用开始预览/推流/拉流时调用
Declared In
zego-api-external-video-capture-oc.h
– zego_stopAndDeAllocate
required method
停止并且释放采集占用的资源
- (void)zego_stopAndDeAllocate
Discussion
在此之后,不能再调用 client 对象的接口
Declared In
zego-api-external-video-capture-oc.h
– zego_startCapture
required method
启动采集,采集的数据通过 [client -onIncomingCapturedData:withPresentationTimeStamp:] 通知 SDK
- (int)zego_startCapture
Return Value
0 表示成功,其他是错误
Discussion
一定要实现,不要做丢帧逻辑,SDK内部已经包含了丢帧策略
Declared In
zego-api-external-video-capture-oc.h
– zego_stopCapture
required method
停止采集
- (int)zego_stopCapture
Return Value
0 表示成功,其它是错误
Discussion
一定要实现
Declared In
zego-api-external-video-capture-oc.h
– zego_supportBufferType
支持的 buffer 类型
- (ZegoVideoCaptureDeviceOutputBufferType)zego_supportBufferType
Return Value
支持的 buffer 类型
Discussion
如果不实现,则为 ZegoVideoCaptureDeviceOutputBufferTypeCVPixelBuffer
Declared In
zego-api-external-video-capture-oc.h