1. 程式人生 > >hi3518E + ov9712除錯時,sample_venc居然取不到video data!

hi3518E + ov9712除錯時,sample_venc居然取不到video data!

測試過程:
# ./sample_venc 2
press 'q' to exit sample!
peress ENTER to capture one picture to file


[SAMPLE_COMM_VENC_SnapProcess]-747: snap time out!
SAMPLE_VENC_720P_Snap: sanp process failed!
snap over!
[SAMPLE_COMM_VENC_SnapStop]-678: HI_MPI_VENC_DestroyChn vechn[0] failed with 0xa0078009! 
0xA0078009 HI_ERR_VENC_NOT_PERM 該操作不允許,如試圖修改靜態配置引數
[SAMPLE_VENC_720P_Snap]-664: Stop snap failed!


# /mnt/nfs/sample_venc1 
Usage : /mnt/nfs/sample_venc1 <index>
index:
         0) 720p classic H264 encode.
         1) 1*720p MJPEG encode.
         2) 1*720p JPEG snap.
# /mnt/nfs/sample_venc1 2
register isp lib info ec ffffffff!
SAMPLE_COMM_ISP_Init: HI_MPI_ISP_Init failed!
SAMPLE_COMM_ISP_Run: ISP init failed!
[SAMPLE_COMM_VI_StartIsp]-1253: SAMPLE_COMM_VI_StartIsp: ISP init failed!
[SAMPLE_VENC_720P_Snap]-607: start vi failed!
Segmentation fault
# /mnt/nfs/sample_venc2 2
press 'q' to exit sample!
peress ENTER to capture one picture to file


[SAMPLE_COMM_VENC_SnapProcess]-747: snap time out!
SAMPLE_VENC_720P_Snap: sanp process failed!
snap over!
[SAMPLE_COMM_VENC_SnapStop]-678: HI_MPI_VENC_DestroyChn vechn[0] failed with 0xa0078009!
[SAMPLE_VENC_720P_Snap]-664: Stop snap failed!
program exit abnormally!



# ./rtspmain 
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
pid:593 receive signal:2, prepare to exit!
Exit from Rtspd monitor thread!
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue

# /mnt/nfs/rtmpmain  rtmp://192.168.2.10/live/demo
SRS(simple-rtmp-server) client librtmp library.
version: 3.0.3
[1970-01-01 00:59:55.23][597] simple handshake success
[1970-01-01 00:59:55.28][597] connect vhost/app success
[1970-01-01 00:59:55.37][597] publish stream success!
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue
pid:597 receive signal:2, prepare to exit!
[SAMPLE_COMM_VENC_GetVencStreamProc]-928: get venc stream time out!!continue//可以確認,不管是snapshot or stream,都是
timeout拿不到video frame!!


>>原因: ov9712需要修改幾個引數,也就是說,原本的init table並不正確!
#patch for ov9712
/home/toolkit/himm 0x200f0000 0
/home/toolkit/himm 0x20150400 1
/home/toolkit/himm 0x20150004 1
/home/toolkit/himm 0x20030030 1