Agora Java API Reference for Android
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
io.agora.rtc.video.VideoCaptureCamera Class Reference
Inheritance diagram for io.agora.rtc.video.VideoCaptureCamera:
io.agora.rtc.video.VideoCapture

Public Member Functions

int UnRegisterNativeHandle ()
 
int allocate ()
 
int setCaptureFormat (int format)
 
int setZoom (float zoomValue)
 
float getMaxZoom ()
 
int setTorchMode (boolean isTorchOn)
 
int setFocus (float x, float y, boolean inPreview)
 
int setExposure (float x, float y, boolean inPreview)
 
int setAutoFaceFocus (boolean enable)
 
int startCapture (int width, int height, int frameRate)
 
int stopCapture ()
 
boolean isTorchSupported ()
 
boolean isFocusSupported ()
 
boolean isExposureSupported ()
 
boolean isZoomSupported ()
 
boolean isAutoFaceFocusSupported ()
 
void deallocate ()
 
void onPreviewFrame (byte[] data, Camera camera)
 
void surfaceChanged (SurfaceHolder holder, int format, int width, int height)
 
void surfaceCreated (SurfaceHolder holder)
 
void surfaceDestroyed (SurfaceHolder holder)
 
Camera.Parameters getCameraParameters ()
 
int createCapabilities ()
 
- Public Member Functions inherited from io.agora.rtc.video.VideoCapture
abstract int allocate ()
 
abstract int setCaptureFormat (int format)
 
abstract int startCapture (int width, int height, int frameRate)
 
abstract int stopCapture ()
 
abstract boolean isTorchSupported ()
 
abstract boolean isFocusSupported ()
 
abstract boolean isZoomSupported ()
 
abstract boolean isAutoFaceFocusSupported ()
 
abstract int setZoom (float zoomValue)
 
abstract float getMaxZoom ()
 
abstract int setTorchMode (boolean isTorchOn)
 
abstract int setFocus (float x, float y, boolean inPreview)
 
abstract int setAutoFaceFocus (boolean enable)
 
abstract boolean isExposureSupported ()
 
abstract int setExposure (float x, float y, boolean inPreview)
 
abstract int UnRegisterNativeHandle ()
 
abstract void deallocate ()
 
native void ProvideCameraFrame (byte[] data, int length, long nativeVideoCaptureDeviceAndroid)
 
native void ProvideCameraTexture (byte[] data, int textureID, long nativeVideoCaptureDeviceAndroid)
 
native boolean isAutoFaceFocusEnabled (long nativeVideoCaptureDeviceAndroid)
 
native void NotifyCameraFocusAreaChanged (float x, float y, float width, float height, long nativeVideoCaptureDeviceAndroid)
 
native void NotifyCameraExposureAreaChanged (float x, float y, float width, float height, long nativeVideoCaptureDeviceAndroid)
 
native void onCameraError (long nativeVideoCaptureDeviceAndroid, String message)
 

Static Protected Member Functions

static Camera.CameraInfo getCameraInfo (int id)
 

Protected Attributes

Camera mCamera
 
ReentrantLock mPreviewBufferLock = new ReentrantLock()
 
- Protected Attributes inherited from io.agora.rtc.video.VideoCapture
int mCameraNativeOrientation
 
final Context mContext
 
final int mId
 
long mNativeVideoCaptureDeviceAndroid
 

Additional Inherited Members

- Static Public Member Functions inherited from io.agora.rtc.video.VideoCapture
static String fetchCapability (int id, Context appContext, String captureName)
 
static void cacheCapability (int id, Context appContext, String cap, String captureName)
 
static int translateToEngineFormat (int fmt)
 
static int translateToAndroidFormat (int fmt)
 
static boolean isEmulator ()
 

Detailed Description

Video Capture device extension of VideoCapture to provide common functionality for capture using android.hardware.Camera API (deprecated in API 21).

Member Function Documentation

◆ setZoom()

int io.agora.rtc.video.VideoCaptureCamera.setZoom ( float  zoomValue)
Parameters
zoomValue
Returns

◆ setTorchMode()

int io.agora.rtc.video.VideoCaptureCamera.setTorchMode ( boolean  isTorchOn)
Parameters
isTorchOn
Returns
-2 parameter is null -1 not supported flash mode 0 success

◆ setFocus()

int io.agora.rtc.video.VideoCaptureCamera.setFocus ( float  x,
float  y,
boolean  inPreview 
)
Parameters
xrange from 0.0f to 1.0f
yrange from 0.0f to 1.0f
inPreview
Returns