public abstract class CameraCapturer extends java.lang.Object implements CameraVideoCapturer
CameraVideoCapturer.CameraEventsHandler, CameraVideoCapturer.CameraStatistics, CameraVideoCapturer.CameraSwitchHandler, CameraVideoCapturer.MediaRecorderHandler| Constructor and Description |
|---|
CameraCapturer(java.lang.String cameraName,
CameraVideoCapturer.CameraEventsHandler eventsHandler,
CameraEnumerator cameraEnumerator) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeCaptureFormat(int width,
int height,
int framerate) |
void |
dispose()
Perform any final cleanup here.
|
void |
initialize(SurfaceTextureHelper surfaceTextureHelper,
android.content.Context applicationContext,
CapturerObserver capturerObserver)
This function is used to initialize the camera thread, the android application context, and the
capture observer.
|
boolean |
isScreencast() |
void |
printStackTrace() |
void |
startCapture(int width,
int height,
int framerate)
Start capturing frames in a format that is as close as possible to
width x height and
framerate. |
void |
stopCapture()
Stop capturing.
|
void |
switchCamera(CameraVideoCapturer.CameraSwitchHandler switchEventsHandler)
Switch camera to the next valid camera id.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMediaRecorderToCamera, removeMediaRecorderFromCamerapublic CameraCapturer(java.lang.String cameraName,
@Nullable
CameraVideoCapturer.CameraEventsHandler eventsHandler,
CameraEnumerator cameraEnumerator)
public void initialize(@Nullable
SurfaceTextureHelper surfaceTextureHelper,
android.content.Context applicationContext,
CapturerObserver capturerObserver)
VideoCapturersurfaceTextureHelper, register itself as a listener, and forward the frames to
CapturerObserver.onFrameCaptured(). The caller still has ownership of surfaceTextureHelper and is responsible for making sure surfaceTextureHelper.dispose() is
called. This also means that the caller can reuse the SurfaceTextureHelper to initialize a new
VideoCapturer once the previous VideoCapturer has been disposed.initialize in interface VideoCapturerpublic void startCapture(int width,
int height,
int framerate)
VideoCapturerwidth x height and
framerate.startCapture in interface VideoCapturerpublic void stopCapture()
VideoCapturerstopCapture in interface VideoCapturerpublic void changeCaptureFormat(int width,
int height,
int framerate)
changeCaptureFormat in interface VideoCapturerpublic void dispose()
VideoCapturerdispose in interface VideoCapturerpublic void switchCamera(CameraVideoCapturer.CameraSwitchHandler switchEventsHandler)
CameraVideoCapturerswitchCamera in interface CameraVideoCapturerpublic boolean isScreencast()
isScreencast in interface VideoCapturerpublic void printStackTrace()