| Index: webrtc/sdk/android/api/org/webrtc/CameraVideoCapturer.java
|
| diff --git a/webrtc/sdk/android/api/org/webrtc/CameraVideoCapturer.java b/webrtc/sdk/android/api/org/webrtc/CameraVideoCapturer.java
|
| index 283d5d1f2bd55609f461dea4ac124fa4449bfb77..be9d669fc4dfcae3cfd83634a26358c9f746b143 100644
|
| --- a/webrtc/sdk/android/api/org/webrtc/CameraVideoCapturer.java
|
| +++ b/webrtc/sdk/android/api/org/webrtc/CameraVideoCapturer.java
|
| @@ -9,6 +9,8 @@
|
| */
|
|
|
| package org.webrtc;
|
| +
|
| +import android.media.MediaRecorder;
|
|
|
| /**
|
| * Base interface for camera1 and camera2 implementations. Extends VideoCapturer with a
|
| @@ -58,6 +60,32 @@
|
| * This function can be called from any thread.
|
| */
|
| void switchCamera(CameraSwitchHandler switchEventsHandler);
|
| +
|
| + /**
|
| + * MediaRecorder add/remove handler - one of these functions are invoked with the result of
|
| + * addMediaRecorderToCamera() or removeMediaRecorderFromCamera calls.
|
| + * The callback may be called on an arbitrary thread.
|
| + */
|
| + public interface MediaRecorderHandler {
|
| + // Invoked on success.
|
| + void onMediaRecorderSuccess();
|
| +
|
| + // Invoked on failure, e.g. camera is stopped or any exception happens.
|
| + void onMediaRecorderError(String errorDescription);
|
| + }
|
| +
|
| + /**
|
| + * Add MediaRecorder to camera pipeline. This can only be called while the camera is running.
|
| + * Once MediaRecorder is added to camera pipeline camera switch is not allowed.
|
| + * This function can be called from any thread.
|
| + */
|
| + void addMediaRecorderToCamera(MediaRecorder mediaRecorder, MediaRecorderHandler resultHandler);
|
| +
|
| + /**
|
| + * Remove MediaRecorder from camera pipeline. This can only be called while the camera is running.
|
| + * This function can be called from any thread.
|
| + */
|
| + void removeMediaRecorderFromCamera(MediaRecorderHandler resultHandler);
|
|
|
| /**
|
| * Helper class to log framerate and detect if the camera freezes. It will run periodic callbacks
|
|
|