[Entry 5] Introduction to the camera architecture of Android

Source: Internet
Author: User
Part 1CameraOverview
Android Of Camera Include Viewfinder ( Viewfinder . Currently Android Released version Camera ProgramAlthough the functions are relatively simple, the program architecture is divided into two parts: client and server. Android Inter-process communication Binder .

Open-source Android Example , Camera OfCodeIt is mainly in the following directory:

CameraOfJavaProgram path:
Packages/apps/camera/src/COM/Android/camera/
Among them, camera. Java is the main implementation file.

Frameworks/base/CORE/Java/Android/hardware/camera. Java
This class is the same as the class defined in JNI. Some methods call local code through JNI, and some methods are implemented by themselves.

CameraOfJavaLocal call part (JNI):
Frameworks/base/CORE/JNI/android_hardware_camera.cpp

This part of content is compiledLibandroid_runtime.so.

The main header file is in the following directory:
Frameworks/base/include/UI/

CameraThe underlying library is in the following directory:
Frameworks/base/libs/UI/
This part of content is compiled into a libraryLibui. So.

camera Service Section:
frameworks/base/camera/libcameraservice/
This part of content is compiled into a library libcameraservice. so .


To implement a specific function of camera, a hardware-related camer library is also required at the underlying level (for example, by calling the video for Linux driver and JPEG encoding program ). This library will be used by the Service library of cameraLibcameraservice. SoCall.

This article is transferred fromWww.35java.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.