码迷,mamicode.com
首页 > 移动开发 > 详细

Android Camera子系统之源代码View

时间:2014-04-30 22:32:38      阅读:431      评论:0      收藏:0      [点我收藏+]

标签:android   camera   源代码   

本文基于Android 4.2.2+Linux3.6.9+SAMA5D3 SoC从源代码的角度审视Android Camera子系统。

 

 

应用层

Androd原生Camera应用

/system/app/LegacyCamera.apk 

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

 

Camera应用调用Android应用框架提供的Camera API

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;

 

应用框架层

/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 ProxyCamera ClientCamera Service之间通信的统一通道。Camera ClientCamera Service都会调用Camera Service Binder Proxy


/system/lib/libcamera_client.so 

头文件目录

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

 

源文件目录

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

 

Camera Service

Camera ServiceCamera HAL交互,通过Binder Service的方式为Camera Client提供服务。

 

/system/lib/libcameraservice.so 

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

 

 

HAL

Camera硬件抽象层定义并实现供Camera Service调用的标准接口,保证Camera硬件的功能能够正常发挥。

 

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

头文件

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

 

源文件目录

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

 

Kernel Driver

Camera驱动程序与Camera硬件和HAL交互。Camera硬件和驱动程序必须支持YV12NV21图像格式以支持预览和录像。

 

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

 

 

Android Camera子系统之源代码View

标签:android   camera   源代码   

原文地址:http://blog.csdn.net/hantangsongming/article/details/24766885

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!