android camera2 createCaptureSession 已弃用 [英] android camera2 createCaptureSession deprecated

查看:339
本文介绍了android camera2 createCaptureSession 已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CameraDevice.createCaptureSession 大多已弃用.任何关于如何将剩余版本方法与 SessionConfiguration 参数(尤其是 executor 参数)一起使用的示例都会很好.

CameraDevice.createCaptureSession is mostly deprecated. Any example on how to use the left over version method with the SessionConfiguration argument (and there especially the executor argument), would be nice.

目前我有:

cameraDevice.createCaptureSession(surfaceList, mCameraSessionListener, mCameraHandler);

推荐答案

如果您不想使用任何执行程序功能,您可以使用 HandlerExecutor:

If you do not want to use any executor capabilites you can use a HandlerExecutor:

SessionConfiguration sessionConfiguration = new SessionConfiguration(SessionConfiguration.SESSION_REGULAR, Collections.singletonList(outputConfiguration), new HandlerExecutor(mCameraHandler.getLooper()), mCameraSessionListener);
cameraDevice.createCaptureSession(sessionConfiguration);

这篇关于android camera2 createCaptureSession 已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆