How to programmatically take Photos while recording Video using Camera2 API in Android

前端 未结 6 1778
北恋
北恋 2020-12-24 09:41

I want to capture image while recording video using camera2 API.

Two separate demos are available. 1. To capture image and 2. To record video

I tried to com

6条回答
  •  悲&欢浪女
    2020-12-24 09:58

    To extend Eddy Talvala's answer (which I agree witch):

    If you want to capture a single photo WHILE recording a video, you simply issue a single CaptureRequest only targeting the surface of an ImageReader.The repeating request of the video recording won't be stopped. With that you can take snapshots from a video being recorded.

    I hope this helps, if you need some code samples I will post them when im home.

提交回复
热议问题