Agora RTC Objective-C API Reference  Refactor
Data Structures | Public Types | Public Member Functions
ICameraCapturer Class Referenceabstract

Inherits RefCountInterface.

Data Structures

class  IDeviceInfo
 

Public Types

enum  CAMERA_SOURCE { CAMERA_BACK, CAMERA_FRONT }
 
enum  CAMERA_STATE { CAMERA_STARTED, CAMERA_STOPPED }
 

Public Member Functions

virtual void setDeviceOrientation (VIDEO_ORIENTATION orientation)=0
 
virtual void setCaptureFormat (const VideoFormat &capture_format)=0
 
virtual VideoFormat getCaptureFormat ()=0
 
virtual int registerCameraObserver (ICameraCaptureObserver *observer)=0
 
virtual int unregisterCameraObserver (ICameraCaptureObserver *observer)=0
 

Detailed Description

The ICameraCapturer class, which provides access to a camera capturer.

Member Enumeration Documentation

◆ CAMERA_SOURCE

The camera source.

Enumerator
CAMERA_BACK 

The camera source is the rear camera.

CAMERA_FRONT 

The camera source is the front camera.

◆ CAMERA_STATE

The camera state.

Enumerator
CAMERA_STARTED 

The camera source is started.

CAMERA_STOPPED 

The camera source is stopped.

Constructor & Destructor Documentation

◆ ~ICameraCapturer()

~ICameraCapturer ( )
inlineprotected

Member Function Documentation

◆ setDeviceOrientation()

virtual void setDeviceOrientation ( VIDEO_ORIENTATION  orientation)
pure virtual

Set the device orientation of the capture device

Parameters
VIDEO_ORIENTATIONorientaion of the device 0(by default), 90, 180, 270

◆ setCaptureFormat()

virtual void setCaptureFormat ( const VideoFormat capture_format)
pure virtual

Sets the format of the video captured by the camera.

If you do not set the video capturing format, the SDK automatically chooses a proper format according to the video encoder configuration of the video track.

Parameters
capture_formatThe reference to the video format: VideoFormat.

◆ getCaptureFormat()

virtual VideoFormat getCaptureFormat ( )
pure virtual

Gets the format of the video captured by the camera.

Returns
VideoFormat.

◆ registerCameraObserver()

virtual int registerCameraObserver ( ICameraCaptureObserver observer)
pure virtual

Register a camera observer.

Parameters
observerInstance of the capture observer.

◆ unregisterCameraObserver()

virtual int unregisterCameraObserver ( ICameraCaptureObserver observer)
pure virtual

Unregisters the camera observer.

Parameters
observerInstance of the capture observer.

◆ AddRef()

virtual void AddRef ( ) const
pure virtualinherited

◆ Release()

virtual RefCountReleaseStatus Release ( ) const
pure virtualinherited

◆ HasOneRef()

virtual bool HasOneRef ( ) const
pure virtualinherited