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