适用于API2的Android相机框架 [英] Android Camera Framework for API2

查看:99
本文介绍了适用于API2的Android相机框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些年来,Android相机框架已经发展了很多.

Android camera framework has evolved a lot over the years.

在API 1时代,相机应用程序框架(Java实现)用于通过JNI胶层与本地相机服务(C ++实现)进行交互,该JNI胶层还实现了绑定器.这种机制在更高层次上很容易理解.

During the days of API 1, the camera application framework (Java implementation) used to interact with native camera service (C++ implementation) using a JNI glue layer which also implemented binder. This mechanism was fairly straightforward to understand, on a higher level.

现在,我可以看到对于API 2,JNI层已删除,应用程序框架使用aidl接口直接与本机摄像头服务对话.

Now, I can see that for API 2, JNI layer is removed and application framework talks directly to the native camera service using aidl interfaces.

参考架构图: https://source.android.com/devices/camera/index.html

即使架构图同时显示了API 1和API 2的路径,该描述仅针对API1.我想知道这对API 2的作用.

Even though the architecture diagram shows both API 1 and API 2 path, the description is provided only for API 1. I want to know how this works for API 2.

总而言之,有人可以帮助我了解在不使用JNI的情况下aidl如何实现相同的功能吗?而且,更重要的是,改用这种新机制有什么好处?

To summarize, can someone help me understand how aidl achieves the same functionality without using JNI? Also, more importantly, what could be the benefits of switching to this new mechanism?

推荐答案

在不使用JNI的情况下,aidel如何实现相同的功能?

how aidl achieves the same functionality without using JNI?

您可以转到

切换到这种新机制有什么好处?

what could be the benefits of switching to this new mechanism?

Android Camera API2并不是什么新鲜事物,而只是设计的模仿和 已在基于诺基亚N9 Linux的智能手机中实现的体系结构,请参见 http://graphics.stanford详情请参阅.edu/projects/camera-2.0/.

Android Camera API2 is nothing new but just an imitation of the design and architecture which has been implemented in Nokia N9 Linux-based smartphone, see http://graphics.stanford.edu/projects/camera-2.0/ for details.

P.S.

马克·勒沃伊(Marc Levoy)已从斯坦福大学退休,领导着一个团队 谷歌.该项目不再有效,斯坦福大学 无法购买Frankencamera.但是,FCam 在运行Android版本的手机和平板电脑上都可以使用API "L"表示(Lollipop),作为Camera2 API(应用程序编程) 接口)和HAL v3(硬件抽象层) 这些设备上的相机.另请参阅前者的演示文稿 斯坦福大学的博士生 Eddy Talvala

Marc Levoy has retired from Stanford University to lead a team at Google. This project is no longer active, and the Stanford Frankencamera is not available for purchase. However, the FCam API is available on cell phones and tablets that run Android version "L" (Lollipop), as the Camera2 API (Application Programming Interface) and HAL v3 (Hardware Abstraction Layer) for the cameras on these devices. See also this presentation by former Stanford PhD student Eddy Talvala at Google I/O 2014, or this summary by Android Police. Apple offers a similar API in iOS.

这篇关于适用于API2的Android相机框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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