赞
踩
USB video class(又称为USB video device class or UVC)就是USB device class视频产品在不需要安装任何的驱动程序下即插即用,包括摄像头、数字摄影机、模拟视频转换器、电视卡及静态视频相机。
SoC : RK3288
Platform : Android 5.1
RK平台有自己的测试方法:在计算器中输入"83991906=",进入测试工程模式,选择CameraTest可以进行相
机的<open/close test>,,
1
2
此脚本测试流程:打开-拍照-退出,并将结果存入本地。shell如下:
#!/system/bin/sh
MONITOR_DIR=/mnt/sdcard/DCIM/Camera # 照片存放目录
ACTIVITY_DIR=/mnt/sdcard/CameraActivity.txt # 启动相机的log
PHOTO_NUMBER=/mnt/sdcard/photonumber.txt # 拍照次数的log
DEVICE_ERR=/mnt/sdcard/CameraError.txt # 没有识别到设备/dev/video0的log
open_success=0
open_failed=0
open_error=0
device_err=0;
takephoto_success=0
takephoto_failed=0
PICTURE_PIRV=0
PICTURE_NEXT=0
if [ -f “CameraTestOK.txt” ];then
rm /mnt/sdcard/.txt
rm /mnt/sdcard/DCIM/Camera/.jpg
fi
takephoto_function()
{
PICTURE_PIRV=ls -l $MONITOR_DIR/*.jpg |grep "^-"| busybox wc -l
am start -n com.android.camera2/com.android.camera.CameraActivity
if ps | grep com.android.camera2 ;then
let “open_success++”
echo “start Camera activity success number: o p e n s u c c e s s " e c h o " [ open_success" echo "[ opensuccess"echo"[(date +%T)] start Camera activity success number:$open_success” >> $ACTIVITY_DIR
sleep 3
input tap 1910 500
PICTURE_NEXT=ls -l $MONITOR_DIR/*.jpg |grep "^-"| busybox wc -l
if [ $PICTURE_NEXT -gt P I C T U R E P I R V ] ; t h e n l e t " t a k e p h o t o s u c c e s s + + " e c h o " T a k e p h o t o s u c c e s s : PICTURE_PIRV ];then let "takephoto_success++" echo "Take photo success: PICTUREPIRV];thenl
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。