Source code view of Android camera subsystem

Source: Internet
Author: User

This article is based Android 4.2.2+linux3.6.9+sama5d3 SoC from the source code perspective Android Camera subsystem.

Application Layer

Androd Native Camera Application

/system/app/legacycamera.apk

http://androidxref.com/4.2.2_r1/xref/packages/apps/LegacyCamera/

Camera app calls the camera API provided by Android app framework

Import Android.hardware.Camera;

Import Android.hardware.Camera.Area;

Import Android.hardware.Camera.CameraInfo;

Import Android.hardware.Camera.Face;

Import Android.hardware.Camera.FaceDetectionListener;

Import Android.hardware.Camera.Parameters;

Import Android.hardware.Camera.PictureCallback;

Import android.hardware.Camera.Size;

Application Framework Layer

/system/framework/framework.jar

Http://androidxref.com/4.2.2_r1/xref/frameworks/base/core/java/android/hardware/Camera.java

Jni

/system/lib/libandroid_runtime.so

Http://androidxref.com/4.2.2_r1/xref/frameworks/base/core/jni/android_hardware_Camera.cpp

Camera Service Binder Proxy

Camera Service Binder Proxy is a Camera Client and the Camera Service Unified channel for communication between the camera Client and the camera service both call the camera service Binder Proxy .


/system/lib/libcamera_client.so

Header file Directory

http://androidxref.com/4.2.2_r1/xref/frameworks/av/include/camera/

Source Files Directory

http://androidxref.com/4.2.2_r1/xref/frameworks/av/camera/

Camera Service

Camera Service with the Camera HAL interaction, by Binder Service the way to Camera Client provide services.

/system/lib/libcameraservice.so

http://androidxref.com/4.2.2_r1/xref/frameworks/av/services/camera/libcameraservice/

HAL

Camera The hardware abstraction layer defines and implements the Camera Service call the standard interface to ensure that Camera the function of the hardware can be played properly.

/system/lib/hw/camera.sama5d3-ek.so

Header file

Http://androidxref.com/4.2.2_r1/xref/hardware/libhardware/include/hardware/camera.h

Source Files Directory

Https://github.com/Android4SAM/platform_hardware_atmel/tree/master/sama5d3/camera

Kernel D River

Camera Drivers and Camera Hardware and HAL interaction. Camera Hardware and drivers must support YV12 and NV21 image formats to support preview and recording.

The V4l2driver for Atmel Linux

Https://github.com/Android4SAM/linux-at91/blob/android4sam_v4.0/drivers/media/video/atmel-isi.c

SoC cameradriver for Omni Vision 2640 sensor

Https://github.com/Android4SAM/linux-at91/blob/android4sam_v4.0/drivers/media/video/ov2640.c

Source code view of Android camera subsystem

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.