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