Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
val session: CameraCaptureSession = ... // from CameraCaptureSession.StateCallback
// We will be using the preview capture template for the combined streams, because
// it is optimized for low latency; for high-quality images use
// TEMPLATE_STILL_CAPTURE and for a steady frame rate use
val requestTemplate = CameraDevice.TEMPLATE_PREVIEW
val combinedRequest = session.device.createCaptureRequest(requestTemplate)
// Link the Surface targets with the combined request
// In our simple case the SurfaceView gets updated automatically. ImageReader
// has its own callback that we have to listen to in order to retrieve the frames
// so there is no need to set up a callback for the capture request
session.setRepeatingRequest(, null, null)

This comment has been minimized.

Copy link

commented Jan 9, 2019

Hello ,
I have one requirement

  1. Create two surface view for front and back camera on one screen.
  2. Record the one video using media recorder which has both front and back camera surface view.

Is it possible to record one video from both camera together using mediarecorder.?

Please help to share java code if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.