自行设计的DM648的图像处理系统,编解码方案是TVP5150*2和SAA7121,编解码芯片的驱动程序是基于实验室原有的DM642的配套驱动修改的。程序的主体是参照DVSDK中的例程video_preview写的,经过调试大部分代码已经调通,但是在最后FVID_exchange的位置,程序卡住了。经过调试发现,FVID_exchange调用的子函数mdSubmitChan的返回值是IOM_PENDING,函数中的注释解释道“This call will wait at GIO layer, when there will be new buffer available with driver, GIO layer callback will be called”,但是我的程序就卡在这个函数的结束了。请问这是什么问题呢?谢谢
/* allocate both capture and display frame buffers in external heap */
vCapParamsChan.segId = DDR2;
vDisParamsChan.segId = DDR2;
/*
* Setting num frame buffers to zero signals the video drivers to allow
* the application to own the buffers.
*/
vCapParamsChan.numFrmBufs = 0;
vDisParamsChan.numFrmBufs = 0;
/* create video input channel */
if (status == 0) {
capChan = FVID_create("/VP0CAPTURE/A/0", /* VP0, Channel A, External Decoder 0 */
IOM_INPUT, &status, (Ptr)&vCapParamsChan, NULL);
}
/* allocate and prime frame buffers for the capture channel */
if (status == 0) {
for (i=0; i < FRAME_BUFF_CNT && status == 0; i++) {
status = FVID_allocBuffer(capChan, &frameBuffPtr);
if (status == IOM_COMPLETED) {
status = FVID_queue(capChan, &frameBuffPtr);
}
}
}
/* allocate and prime frame buffers for the display channel */
if (status == 0) {
for (i=0; i < FRAME_BUFF_CNT && status == 0; i++) {
status = FVID_allocBuffer(disChan, &frameBuffPtr);
if (status == IOM_COMPLETED) {
status = FVID_queue(disChan, &frameBuffPtr);
}
}
}
/* configure the TVP5146 video decoder */
if (status == 0) {