Created
October 11, 2018 18:30
-
-
Save owahltinez/f615e13bfc3497a0bd5d1427eae6c54f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
// TEMPLATE_RECORD | |
val requestTemplate = CameraDevice.TEMPLATE_PREVIEW | |
val combinedRequest = session.device.createCaptureRequest(requestTemplate) | |
// Link the Surface targets with the combined request | |
combinedRequest.addTarget(previewSurface) | |
combinedRequest.addTarget(imReaderSurface) | |
// 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(combinedRequest.build(), null, null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello ,
I have one requirement
Is it possible to record one video from both camera together using mediarecorder.?
Please help to share java code if possible