ZegoLiveRoom
Classes | Public Member Functions | List of all members
AVE::VideoCaptureDeviceBase Class Referenceabstract

#include <video_capture.h>

Inheritance diagram for AVE::VideoCaptureDeviceBase:
AVE::Camera AVE::VideoCaptureDevice

Classes

class  Client
 

Public Member Functions

virtual void AllocateAndStart (Client *client)=0
 初始化采集使用的资源,例如启动线程,保存SDK传递的回调 More...
 
virtual void StopAndDeAllocate ()=0
 停止并且释放采集占用的资源,同时调用client的Destroy方法,这里的client指的是AllocateAndStart传递的client More...
 
virtual int StartCapture ()=0
 启动采集,采集的数据通过client对象的OnIncomingCapturedData通知SDK More...
 
virtual int StopCapture ()=0
 停止采集 More...
 
virtual VideoPixelBufferType SupportBufferType ()=0
 获取采集callback的类型 More...
 
virtual void * GetInterface ()=0
 检查是否支持SupportsVideoCapture接口 More...
 

Member Function Documentation

◆ AllocateAndStart()

virtual void AVE::VideoCaptureDeviceBase::AllocateAndStart ( Client client)
pure virtual

初始化采集使用的资源,例如启动线程,保存SDK传递的回调

Parameters
clientSDK实现回调的对象,一定要保存
Note
SDK 第一次调用StartPublish或PlayStream时调用,
接口调用顺序:1、VideoCaptureFactory::Create 2、VideoCaptureDevice::AllocateAndStart
一定要实现

Implemented in AVE::VideoCaptureDevice.

◆ GetInterface()

virtual void * AVE::VideoCaptureDeviceBase::GetInterface ( )
pure virtual

检查是否支持SupportsVideoCapture接口

Note
SDK会在VideoCaptureFactory::Create后调用此方法,如果返回不会空,SDK会按照SupportsVideoCapture
透传SDK的调用
一定要实现

Implemented in AVE::VideoCaptureDevice.

◆ StartCapture()

virtual int AVE::VideoCaptureDeviceBase::StartCapture ( )
pure virtual

启动采集,采集的数据通过client对象的OnIncomingCapturedData通知SDK

Note
SDK StartPublish异步调用
SDK回调StartCapture后开始推数据才有效,否则数据会被丢弃
一定要实现,不要做丢帧逻辑,SDK内部已经包含了丢帧策略

◆ StopAndDeAllocate()

virtual void AVE::VideoCaptureDeviceBase::StopAndDeAllocate ( )
pure virtual

停止并且释放采集占用的资源,同时调用client的Destroy方法,这里的client指的是AllocateAndStart传递的client

Note
SDK LogoutChannel时调用,如果是异步实现,实现者必须保证AllocateAndStart()和StopAndDeAllocate()在同一个线程执行
接口调用顺序:1、VideoCaptureDevice::StopAndDeAllocate 2、VideoCaptureFactory::Destroy
一定要实现

◆ StopCapture()

virtual int AVE::VideoCaptureDeviceBase::StopCapture ( )
pure virtual

停止采集

Note
SDK StopPublish异步调用
SDK回调StopCapture后,不再接收任何采集数据
一定要实现

◆ SupportBufferType()

virtual VideoPixelBufferType AVE::VideoCaptureDeviceBase::SupportBufferType ( )
pure virtual

获取采集callback的类型

Note
SDK会在AllocateAndStart前先调用此接口实例化对应的client,再调用AllocateAndStart
一定要实现

Implemented in AVE::VideoCaptureDevice.


The documentation for this class was generated from the following file: