webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Member Functions | List of all members
org.webrtc.VideoCapturerAndroid Class Reference
Inheritance diagram for org.webrtc.VideoCapturerAndroid:
org.webrtc.CameraVideoCapturer org.webrtc.SurfaceTextureHelper.OnTextureFrameAvailableListener org.webrtc.VideoCapturer

Public Member Functions

void printStackTrace ()
 
void switchCamera (final CameraSwitchHandler switchEventsHandler)
 
void changeCaptureFormat (final int width, final int height, final int framerate)
 
boolean isCapturingToTexture ()
 
 VideoCapturerAndroid (String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture)
 
void dispose ()
 
void initialize (SurfaceTextureHelper surfaceTextureHelper, Context applicationContext, CapturerObserver frameObserver)
 
void startCapture (final int width, final int height, final int framerate)
 
void stopCapture () throws InterruptedException
 
void onPreviewFrame (byte[] data, android.hardware.Camera callbackCamera)
 
void onTextureFrameAvailable (int oesTextureId, float[] transformMatrix, long timestampNs)
 
boolean isScreencast ()
 

Static Public Member Functions

static VideoCapturerAndroid create (String name, CameraEventsHandler eventsHandler)
 
static VideoCapturerAndroid create (String name, CameraEventsHandler eventsHandler, boolean captureToTexture)
 

Constructor & Destructor Documentation

◆ VideoCapturerAndroid()

org.webrtc.VideoCapturerAndroid.VideoCapturerAndroid ( String  cameraName,
CameraEventsHandler  eventsHandler,
boolean  captureToTexture 
)
inline

Member Function Documentation

◆ changeCaptureFormat()

void org.webrtc.VideoCapturerAndroid.changeCaptureFormat ( final int  width,
final int  height,
final int  framerate 
)
inline

◆ create() [1/2]

static VideoCapturerAndroid org.webrtc.VideoCapturerAndroid.create ( String  name,
CameraEventsHandler  eventsHandler 
)
inlinestatic

◆ create() [2/2]

static VideoCapturerAndroid org.webrtc.VideoCapturerAndroid.create ( String  name,
CameraEventsHandler  eventsHandler,
boolean  captureToTexture 
)
inlinestatic

◆ dispose()

void org.webrtc.VideoCapturerAndroid.dispose ( )
inline

Perform any final cleanup here. No more capturing will be done after this call.

Implements org.webrtc.VideoCapturer.

◆ initialize()

void org.webrtc.VideoCapturerAndroid.initialize ( SurfaceTextureHelper  surfaceTextureHelper,
Context  applicationContext,
CapturerObserver  capturerObserver 
)
inline

This function is used to initialize the camera thread, the android application context, and the capture observer. It will be called only once and before any startCapture() request. The camera thread is guaranteed to be valid until dispose() is called. If the VideoCapturer wants to deliver texture frames, it should do this by rendering on the SurfaceTexture in |surfaceTextureHelper|, register itself as a listener, and forward the texture frames to CapturerObserver.onTextureFrameCaptured().

Implements org.webrtc.VideoCapturer.

◆ isCapturingToTexture()

boolean org.webrtc.VideoCapturerAndroid.isCapturingToTexture ( )
inline

◆ isScreencast()

boolean org.webrtc.VideoCapturerAndroid.isScreencast ( )
inline
Returns
true if-and-only-if this is a screen capturer.

Implements org.webrtc.VideoCapturer.

◆ onPreviewFrame()

void org.webrtc.VideoCapturerAndroid.onPreviewFrame ( byte []  data,
android.hardware.Camera  callbackCamera 
)
inline

◆ onTextureFrameAvailable()

void org.webrtc.VideoCapturerAndroid.onTextureFrameAvailable ( int  oesTextureId,
float []  transformMatrix,
long  timestampNs 
)
inline

◆ printStackTrace()

void org.webrtc.VideoCapturerAndroid.printStackTrace ( )
inline

◆ startCapture()

void org.webrtc.VideoCapturerAndroid.startCapture ( final int  width,
final int  height,
final int  framerate 
)
inline

Start capturing frames in a format that is as close as possible to |width| x |height| and |framerate|.

Implements org.webrtc.VideoCapturer.

◆ stopCapture()

void org.webrtc.VideoCapturerAndroid.stopCapture ( ) throws InterruptedException
inline

Stop capturing. This function should block until capture is actually stopped.

Implements org.webrtc.VideoCapturer.

◆ switchCamera()

void org.webrtc.VideoCapturerAndroid.switchCamera ( final CameraSwitchHandler  switchEventsHandler)
inline

Switch camera to the next valid camera id. This can only be called while the camera is running. This function can be called from any thread.

Implements org.webrtc.CameraVideoCapturer.


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