Code structure for Android camera

Source: Internet
Author: User
Code structure for Android camera

The camera code for Android is mainly in the following directories:
The Java part of the camera
packages/apps/camera/. Where Camera.java is the main implementation of the file. This part of the content compiled into a target is camera.apk
Com.android.camera This package, several of the main class files are as follows:
PhotoViewer:GalleryPicker.java (all picture sets)--->imagegallery.java (a list of pictures under a folder)--->viewimage.java (see a specific picture)
VideoPlayer:GalleryPicker.java (All video sets)--->movieview.java (see a certain video)
Camera:Camera.java (Camera framing and photo shoot)
VideoCamera:VideoCamera.java (Videocamera framing and photographing)

The part of the camera framework for upper application calls

Base/core/java/android/hardware/camera.java

This part of the target is Framework.jar.

The JNI part of camera
Frameworks/base/core/jni/android_hardware_camera.cpp
This part of the content compiled into a target is libandroid_runtime.so.

Camera UI Library Section
Frameworks/base/libs/camera
This part of the content is compiled into a library libcamera_client.so.

Camera Service Section
Frameworks/base/services/camera/libcameraservic
This part of the content is compiled into a library libcameraservice.so.

Camera HAL Layer Section
Hardware/msm7k/libcamera
Or
Vendor/qcom/android-open/libcamera2
In order to achieve a specific feature of the camera, a hardware-related camera library is required at the HAL layer (for example, by calling the video-for Linux driver and the JPEG coding program, or directly using a private library implemented by each chip vendor, such as Qualcomm implementation of the libcamera.so and libqcamera.so), the implementation of the Camerahardwareinterface specified interface, to invoke the relevant library, driver-related driver, the implementation of camera hardware operations. This library will be invoked by the Camera Service library libcameraservice.so.

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.