This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm385 代码相关问题



你好:

我想把AV视频流保存下来,但是打印出来总是出现:Could not GetVideoInfo() 

跟踪代码,不再理解这段意思,为什么GetCurrentFrame总是返回-1

代码如下:

FrameInfo_t GetCurrentFrame(FrameFormat_t fmt)
{
MSG_BUF msgbuf;

memset(&msgbuf,0,sizeof(msgbuf));
msgbuf.Des = MSG_TYPE_MSG1;
msgbuf.Src = PROC_MSG_ID;
msgbuf.cmd = MSG_CMD_GET_CUR_FRAME;
msgbuf.frame_info.format = fmt;
SemWait(hndlApproDrvSem);
MSGSND( qid,&msgbuf,sizeof(msgbuf)-sizeof(long),0);/*send msg1*/
MSGRCV( qid, &msgbuf,sizeof(msgbuf)-sizeof(long), PROC_MSG_ID, 0);
SemRelease(hndlApproDrvSem);
if(msgbuf.ret != 0)
msgbuf.frame_info.serial_no = -1;
return msgbuf.frame_info;
}

其中有问题的,应该在:

SemWait(hndlApproDrvSem);
MSGSND( qid,&msgbuf,sizeof(msgbuf)-sizeof(long),0);/*send msg1*/
MSGRCV( qid, &msgbuf,sizeof(msgbuf)-sizeof(long), PROC_MSG_ID, 0);
SemRelease(hndlApproDrvSem);

这段是什么作用,暗示着我哪边有问题?

谢谢