Android camera2 API video app - Part 16 setting up for still camera capture
У вашего броузера проблема в совместимости с HTML5
Part 16 describes the setup for capturing a still image while in the preview capture session.
Check the accompanying website tutorial here https://www.nigeapptuts.com/?p=904
Github details
You can get it from here
https://github.com/mobapptuts/android_camera2_api_video_app.git Tag camera2-video-still-setup
or you can run this command
git clone https://github.com/mobapptuts/android_camera2_api_video_app.git --branch camera2-video-still-setup
In this tutorial we will cover:
- Setting up the image size
- Setting up the ImageReader & its listener
- Creating a member for the preview capture session
- Adding states to support preview & still image capture modes in the preview capture session
- Adding the ImageReader surface to the preview capture session
- Adding a lockFocus method for sending a auto focus start trigger to the preview capture session
- Implementing the state wait lock for once the auto focus has been triggered
- Setting up the still image capture button on click listener to call the lockFocus method
API's covered:
- ImageReader
- ImageReader.OnImageAvailableListener
- ImageReader. onImageAvailable
- ImageReader.newInstance
- ImageReader.setOnImageAvailableListener
- CameraCaptureSession
- CameraCaptureSession.CaptureCallback
- CameraCaptureSession. onCaptureCompleted
- CaptureRequest.CONTROL_AF_TRIGGER
- CaptureRequest.CONTROL_AF_TRIGGER_START
- CameraCaptureSession.capture
- CaptureResult.get
- CaptureResult.CONTROL_AF_STATE
- CaptureRequest.CONTROL_AF_STATE_FOCUSED_LOCKED
- CaptureRequest.CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Link to website series: https://www.nigeapptuts.com/category/camera2-api-video/
Youtube playlist:
https://www.youtube.com/playlist?list=PL9jCwTXYWjDIHNEGtsRdCTk79I9-95TbJ
For much more information checkout
Website - https://www.nigeapptuts.com
Twitter - https://twitter.com/MobAppTuts
Facebook - https://www.facebook.com/nigeapptuts
Google+ - https://plus.google.com/b/115884642086760882044
Pinterest - https://www.pinterest.com/mobapptuts/
The previous tutorials were aimed at beginners to android but over time have been getting more complex as the original camera_intent app has developed.
This tutorial series is more aimed towards the intermediate developers thought for those who have been following the previous tutorial series, feel free to watch this android performance series.
Android studio (1.5) is the editor of choice (IDE) for this tutorial series.
This tutorial series is the start of what I expect to be many so I encourage comments and feedback to improve the quality and viewing experience.