2

Android camera framework has evolved a lot over the years.

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.

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.

Refer architecture diagram: https://source.android.com/devices/camera/index.html

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.

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?

1 Answer 1

1

how aidl achieves the same functionality without using JNI?

You can head to https://android.googlesource.com/platform/system/tools/aidl/+/brillo-m10-dev/docs/aidl-cpp.md for details

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

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 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.