当前位置:网站首页>Camera-CreateCaptureSession
Camera-CreateCaptureSession
2022-06-26 03:19:00 【Cmatrix204】
Camera CaptureSession is a operation to configure the camera device's internal pipelines and allocating memory buffers to sending images to the desired targets.
A configured capture session for a cameraDevice is used for capturing images from the camera or reprocessing images captured from the camera in the same session previously and providing a set of target output surfaces for reprocessable capture session, and once created, the session is active until a new session is created by the camera device, or the camera device is closed.
Part One: createCaptureSession by List<Surface>
camera createCaptureSession by List<Surface> will produce potentially risk to delaying camera startup. For example, if the preview Surface is obtained from SurfaceView, the SurfaceView will only be ready after the UI layout is done, so this opreation will take some time for waiting preview surface to be ready.
Below is the struct of the createCaptureSession by List<Surface> and releated API.
framework/base/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
Part Two: createCaptureSession by List<OutputConfiguration>
To speed up camera startup time, the users can configure the CameraCaptureSession with the eventual preview size via OutputConfiguration and defer the preview output comfiguration until the Surface is ready. After the CameraCaptureSession is created successfully with this deferred output and other normal outputs, the application can start submitting requests as long as the do not include deferred out Surfaces. Once a deferred Surface is ready, the application can add the Surface to the Surface to the deferred output configuration with the addSurface method, and then update the deferred output configuration via this method, before it can submit caoture requests with this output target.
finalizeOutputConfigurations- This function can also be called in case where multiple surfaces share the same OutputConfiguration, and one of the surfaces becomes available after the CameraCaptureSession is created. In that case, the user must first create the outputConfiguration with the available Surface before creating the CameraCaptureSession. After the CameraCaptureSession is created, and once the extra Surface becomes available, the users must then call add Surface before finalizing the configuration with this method, and attention again, if the provided OutputConfigurations are unchanged from session creation, this function call has no effect. This function must only be called once fir a particular output configuration.
Below is the structure of the createCaptureSession by List<OutputConfiguration> and releated API.
Attention: Use this method to quickly create cameraCaptureSession may be produce some errors when outputconfiguration that is different from the surface has been changed as different size and formats.
Below has some error information to check and stay cautiously.
Part Three: createCaptureSession by createCaptureSessionByOutputConfigurations
This method create a new camera capture session by providing the target output set of Surfaces and its correspending surface configuration to the camera device.
Below is the releated API and function invoke.
边栏推荐
- Classic model alexnet
- MySQL高级部分( 四: 锁机制、SQL优化 )
- Various errors in kitti2bag installation
- Analysis of the multiple evaluation system of children's programming
- [paper notes] learning to grasp with primitive shaped object policies
- Uni app Baidu cloud realizes OCR ID card recognition
- 给网站添加“开放搜索描述“以适配浏览器的“站点搜索“
- Group note data representation and operation check code
- Classic model - Nin & googlenet
- 【哈希表】改进,拉链法哈希结构——直接用两个索引查找,不用每次都hash和%一遍
猜你喜欢
The kotlin project is running normally and the R file cannot be found
Camera-memory内存泄漏分析(三)
Cultivate children's creativity under the concept of project steam Education
MySQL addition, deletion, query and modification (primary level)
栖霞消防开展在建工地消防安全培训
Cloud Computing Foundation -0
Analysis on the diversification of maker space mechanism construction
Uni app Baidu cloud realizes OCR ID card recognition
HL7Exception: Can‘t XML-encode a GenericMessage. Message must have a recognized struct
MySQL addition, deletion, query and modification (Advanced)
随机推荐
HL7Exception: Can‘t XML-encode a GenericMessage. Message must have a recognized struct
Request object, send request
Cultivate children's creativity under the concept of project steam Education
Uni app custom selection date 1 (September 16, 2021)
进程之间的通信方式
Procédures stockées MySQL
Where is it safe to open a fund account?
Digital twin intelligent water service, breaking through the development dilemma of sponge City
【LOJ#6718】九个太阳「弱」化版(循环卷积,任意模数NTT)
Double carbon bonus + great year of infrastructure construction 𞓜 deep ploughing into the field of green intelligent equipment for water conservancy and hydropower
智能制造学习记录片和书籍
类图
Android gap animation translate, scale, alpha, rotate
[appium stepping pit] io appium. uiautomator2. common. exceptions. InvalidArgumentException: ‘capabilities‘ are mand
JS to achieve the effect of text marquee
Classic model - Nin & googlenet
给网站添加“开放搜索描述“以适配浏览器的“站点搜索“
mysql存儲過程
Analysis on the diversification of maker space mechanism construction
经典模型——NiN&GoogLeNet