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

#include <video_capture.h>

Inheritance diagram for AVE::VideoCaptureDevice:
AVE::VideoCaptureDeviceBase AVE::SupportsVideoCapture

Classes

class  Client
 

Public Member Functions

virtual void AllocateAndStart (Client *client)=0
 
virtual void AllocateAndStart (VideoCaptureDeviceBase::Client *client) override
 初始化采集使用的资源,例如启动线程,保存SDK传递的回调 More...
 
virtual VideoPixelBufferType SupportBufferType () override
 获取采集callback的类型 More...
 
virtual void * GetInterface () override
 检查是否支持SupportsVideoCapture接口 More...
 
- Public Member Functions inherited from AVE::VideoCaptureDeviceBase
virtual void StopAndDeAllocate ()=0
 停止并且释放采集占用的资源,同时调用client的Destroy方法,这里的client指的是AllocateAndStart传递的client More...
 
virtual int StartCapture ()=0
 启动采集,采集的数据通过client对象的OnIncomingCapturedData通知SDK More...
 
virtual int StopCapture ()=0
 停止采集 More...
 
- Public Member Functions inherited from AVE::SupportsVideoCapture
virtual int SetFrameRate (int framerate)=0
 设置采集帧率 More...
 
virtual int SetResolution (int width, int height)=0
 设置采集分辨率,采集的分辨率最大不能超过1920*1080 More...
 
virtual int SetFrontCam (int bFront)=0
 切换前后摄像头,移动端专用,PC端不需要实现 More...
 
virtual int SetView (void *view)=0
 设置采集使用载体 More...
 
virtual int SetViewMode (int nMode)=0
 设置采集预览模式 More...
 
virtual int SetViewRotation (int nRotation)=0
 设置采集预览的逆时针旋转角度 More...
 
virtual int SetCaptureRotation (int nRotation)=0
 设置采集buffer的顺时针旋转角度 More...
 
virtual int StartPreview ()=0
 启动预览 More...
 
virtual int StopPreview ()=0
 停止预览 More...
 
virtual int EnableTorch (bool bEnable)=0
 打开闪光灯 More...
 
virtual int TakeSnapshot ()=0
 对采集预览进行截图,完成后通过client的OnTakeSnapshot方法通知SDK More...
 
virtual int SetPowerlineFreq (unsigned int nFreq)
 设置采集刷新率 More...
 

Member Function Documentation

◆ AllocateAndStart() [1/2]

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

◆ AllocateAndStart() [2/2]

virtual void AVE::VideoCaptureDevice::AllocateAndStart ( VideoCaptureDeviceBase::Client client)
inlineoverridevirtual

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

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

Implements AVE::VideoCaptureDeviceBase.

◆ GetInterface()

virtual void * AVE::VideoCaptureDevice::GetInterface ( )
inlineoverridevirtual

检查是否支持SupportsVideoCapture接口

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

Implements AVE::VideoCaptureDeviceBase.

◆ SupportBufferType()

virtual VideoPixelBufferType AVE::VideoCaptureDevice::SupportBufferType ( )
inlineoverridevirtual

获取采集callback的类型

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

Implements AVE::VideoCaptureDeviceBase.


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