Agora Java API Reference for Android
Classes | Public Types | Public Member Functions | List of all members
agora::rtc::ICameraCapturer Class Referenceabstract

#include <NGIAgoraCameraCapturer.h>

Inheritance diagram for agora::rtc::ICameraCapturer:
agora::RefCountInterface

Classes

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
 
- Public Member Functions inherited from agora::RefCountInterface
virtual void AddRef () const =0
 
virtual RefCountReleaseStatus Release () const =0
 
virtual bool HasOneRef () const =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.

Member Function Documentation

◆ setDeviceOrientation()

virtual void agora::rtc::ICameraCapturer::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 agora::rtc::ICameraCapturer::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 agora::rtc::ICameraCapturer::getCaptureFormat ( )
pure virtual

Gets the format of the video captured by the camera.

Returns
VideoFormat.

◆ registerCameraObserver()

virtual int agora::rtc::ICameraCapturer::registerCameraObserver ( ICameraCaptureObserver observer)
pure virtual

Register a camera observer.

Parameters
observerInstance of the capture observer.

◆ unregisterCameraObserver()

virtual int agora::rtc::ICameraCapturer::unregisterCameraObserver ( ICameraCaptureObserver observer)
pure virtual

Unregisters the camera observer.

Parameters
observerInstance of the capture observer.