Package tvi.webrtc

Interface CameraVideoCapturer

  • All Superinterfaces:
    VideoCapturer
    All Known Implementing Classes:
    Camera1Capturer, Camera2Capturer

    public interface CameraVideoCapturer
    extends VideoCapturer
    Base interface for camera1 and camera2 implementations. Extends VideoCapturer with a switchCamera() function. Also provides subinterfaces for handling camera events, and a helper class for detecting camera freezes.
    • Method Detail

      • switchCamera

        void switchCamera​(CameraVideoCapturer.CameraSwitchHandler switchEventsHandler)
        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.
      • switchCamera

        void switchCamera​(CameraVideoCapturer.CameraSwitchHandler switchEventsHandler,
                          java.lang.String cameraName)
        Switch camera to the specified camera id. This can only be called while the camera is running. This function can be called from any thread.
      • addMediaRecorderToCamera

        @Deprecated
        default void addMediaRecorderToCamera​(android.media.MediaRecorder mediaRecorder,
                                              CameraVideoCapturer.MediaRecorderHandler resultHandler)
        Deprecated.
        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.
      • removeMediaRecorderFromCamera

        @Deprecated
        default void removeMediaRecorderFromCamera​(CameraVideoCapturer.MediaRecorderHandler resultHandler)
        Deprecated.
        Remove MediaRecorder from camera pipeline. This can only be called while the camera is running. This function can be called from any thread.