Package tvi.webrtc

Class Camera2Session

    • Method Detail

      • stop

        public void stop()
        Description copied from interface: CameraSession
        Stops the capture. Waits until no more calls to capture observer will be made. If waitCameraStop is true, also waits for the camera to stop.
        Specified by:
        stop in interface CameraSession
      • setSessionRepeatingRequest

        public boolean setSessionRepeatingRequest​(@Nullable
                                                  android.hardware.camera2.CaptureRequest.Builder captureRequestBuilder)
        Set the current capture session repeating request. This method enables use cases that require an update to the default CaptureRequest.Builder used to start the initial capture session. For example, a developer may need to turn the flash on.
        Parameters:
        captureRequestBuilder - the capture request builder that will be applied to the current capture session.
        Returns:
        true if the call to setRepeatingRequest succeeded with the provided capture request builder or false if the captureRequestBuilder is null or a CameraAccessException occurred.
      • configureCaptureRequestBuilder

        @Nullable
        public android.hardware.camera2.CaptureRequest.Builder configureCaptureRequestBuilder()
        Configures a CaptureRequest.Builder with optimal settings for capturing video frames. The viable options for video capture requests are: TEMPLATE_PREVIEW: High frame rate is given priority over the highest-quality post-processing. TEMPLATE_RECORD: Stable frame rate is used, and post-processing is set for recording quality.
        Returns:
        CaptureRequest.Builder or null if a CameraAccessException occurrs.