ov3640输出8位并行YUV数据。AM3715上运行的是TI提供的Android2.2.点击android自带的照相机应用,能够进行预览继而进行拍照,但是点击按钮切换到录像模式,液晶屏幕上立即显示花屏,无法预览了。ov3640输出的为1027*468分辨率的数据。
log输出信息如下,
///////////////点击camera App////////////////////////
I/dalvikvm( 969): Jit: resizing JitTable from 4096 to 8192
I/ActivityManager( 969): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]flg=0x10200000 cmp=com.android.camera/.Camera }
I/ActivityManager( 969): Start proc com.android.camera for activity com.android.camera/.Camera: pid=1293 uid=10004 gids={1006, 1015}
D/dalvikvm( 899): GC_EXPLICIT freed 292 objects / 11056 bytes in 46ms
D/dalvikvm( 899): GC_EXPLICIT freed 52 objects / 2312 bytes in 41ms
D/dalvikvm( 899): GC_EXPLICIT freed 2 objects / 64 bytes in 34ms
D/Camera ( 1293): app passed NULL surface
__we are in XGA__
V/camera ( 1293): startPreview
__we are in XGA__
E/CameraHardware( 900): return Preview Heap
I/ActivityManager( 969): Displayed activity com.android.camera/.Camera: 581 ms (total 581 ms)
W/OrientationEventListener( 1293): Cannot detect sensors. Not enabled
D/dalvikvm( 1293): GC_EXTERNAL_ALLOC freed 1959 objects / 123712 bytes in 36ms
D/libEGL ( 1293): loaded /system/lib/egl/libGLES_android.so
D/libEGL ( 1293): loaded /system/lib/egl/libEGL_POWERVR_SGX530_125.so
D/libEGL ( 1293): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so
D/libEGL ( 1293): loaded /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
V/GLRootView( 1293): onSurfaceChanged: 367×272, gl10: com.google.android.gles_jni.GLImpl@4401b388
V/GLRootView( 1293): layout content pane 367×272
E/ImageManager( 1293): create NNNAAAAA file: /mnt/sdcard/DCIM/100ANDRO failed
////////////////////////////切换到录像操作/////////////////////////
I/ActivityManager( 969): Starting activity: Intent { act=android.media.action.VIDEO_CAMERA flg=0x6000000cmp=com.android.camera/.VideoCamera }
V/camera ( 1293): stopPreview
D/dalvikvm( 969): GC_FOR_MALLOC freed 8453 objects / 375344 bytes in 163ms
W/ActivityManager( 969): Activity pause timeout for HistoryRecord{441f1410 com.android.camera/.Camera}
W/OrientationEventListener( 1293): Cannot detect sensors. Invalid disable
V/videocamera( 1293): startPreview
__we are in XGA__
D/Camera ( 1293): app passed NULL surface
__we are in XGA__
E/CameraHardware( 900): return Preview Heap
V/GLRootView( 1293): onSurfaceChanged: 336×272, gl10: com.google.android.gles_jni.GLImpl@4404f4e0
V/GLRootView( 1293): layout content pane 336×272
I/ActivityManager( 969): Displayed activity com.android.camera/.VideoCamera: 352 ms (total 352 ms)
V/videocamera( 1293): initializeRecorder
W/MediaProfiles( 900): could not find media config xml file
E/audio_input( 900): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
E/audio_input( 900): VerifyAndSetParameter failed
E/CameraInput( 900): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput( 900): VerifiyAndSetParameter failed on parameter #0
D/AuthorDriver( 900): setParamVideoEncodingBitrate() 360000
I/MediaRecorderJNI( 1293): prepare: surface=0x24aaa8 (id=5)
E/PVOMXEncNode( 900): PVMFOMXEncNode-Video_H263::DoPrepare(): Got Component OMX.PV.h263enc handleW/CameraInput( 900): refCount 0
E/PVOMXEncNode( 900): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handleD/CameraInput( 900): Intended mFrameWidth=352, mFrameHeight=288D/CameraInput( 900): Actual mFrameWidth=352, mFrameHeight=288///////////////////////////////切回到照相/////////////////////////////////////////
I/ActivityManager( 969): Starting activity: Intent { act=android.media.action.STILL_IMAGE_CAMERA flg=0x6000000cmp=com.android.camera/.Camera }
V/videocamera( 1293): stopVideoRecording
V/videocamera( 1293): Releasing media recorder.
D/CameraInput( 900): DoReset: E
D/CameraInput( 900): DoReset: X
E/CameraInput( 900): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
E/CameraInput( 900): VerifiyAndSetParameter failed on parameter #0
D/audio_input( 900): DoReset: E
D/audio_input( 900): DoReset: X
E/audio_input( 900): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
E/audio_input( 900): VerifyAndSetParameter failed
V/videocamera( 1293): closeCamera
W/ActivityManager( 969): Activity pause timeout for HistoryRecord{4420af40 com.android.camera/.VideoCamera}
D/Camera ( 1293): app passed NULL surface
__we are in XGA__
V/camera ( 1293): startPreview
__we are in XGA__
E/CameraHardware( 900): return Preview Heap
I/ActivityManager( 969): Displayed activity com.android.camera/.Camera: 289 ms (total 289 ms)
W/OrientationEventListener( 1293): Cannot detect sensors. Not enabled
V/GLRootView( 1293): onSurfaceChanged: 367×272, gl10: com.google.android.gles_jni.GLImpl@440679f8
V/GLRootView( 1293): layout content pane 367×272
E/ImageManager( 1293): create NNNAAAAA file: /mnt/sdcard/DCIM/100ANDRO failed
Jason Yuan:
补充一下我想实现的是录制352*288分辨率的3gp视频。
Jason Yuan:
回复 Jason Yuan:
我在int CameraHardware::previewThread()这个线程里做了语句输出,发现当为record时和照相前的预览走的都是如下的if语句,可是拍照前的预览就好用,摄像前的预览就不好用。明明是是同一段代码啊。
if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME) {/*convert fuction conver the data from YUV to rgb16*/ mCamera->convert((unsigned char *) rawFramePointer, (unsigned char *) mPreviewHeap->getBase(), PREVIEW_WIDTH, PREVIEW_HEIGHT);
yuyv422_to_yuv420sp((unsigned char *)rawFramePointer, (unsigned char *)mHeap->getBase(), PREVIEW_WIDTH, PREVIEW_HEIGHT); mDataCb(CAMERA_MSG_PREVIEW_FRAME, mBuffer, mCallbackCookie); }
Feng Dong:
回复 Jason Yuan:
看楼主是android应用,建议在e2e的android论坛上也提问一下.