代码如下,在RK_MPI_AI_GetFrame中返回值为0xA00A800D,查阅手册发现是RK_ERR_AI_NOBUF,这是什么情况
void*sendDataThread(void*ptr) {
TEST_AI_CTX_S*params= reinterpret_cast<TEST_AI_CTX_S*>(ptr);
RK_S32result=0;
RK_S32s32MilliSec=10;
AUDIO_FRAME_Sframe;
if (params->dstFilePath) {
AUDIO_SAVE_FILE_INFO_Ssave;
save.bCfg=RK_TRUE;
save.u32FileSize=1024;
snprintf(save.aFilePath, sizeof(save.aFilePath), "%s", params->dstFilePath);
snprintf(save.aFileName, sizeof(save.aFileName), "%s", "cap_out.pcm");
RK_MPI_AI_SaveFile(params->s32DevId, params->s32ChnIndex, &save);
//printf("save_file\r\n");
}
while (!gAiExit) {
result=RK_MPI_AI_GetFrame(params->s32DevId, params->s32ChnIndex, &frame, RK_NULL, s32MilliSec);
printf("result=%x\r\n",result);
if (result==0) {
void*data=RK_MPI_MB_Handle2VirAddr(frame.pMbBlk);
RK_U32len=RK_MPI_MB_GetSize(frame.pMbBlk);
RK_LOGV("data = %p, len = %d", data, len);
RK_MPI_AI_ReleaseFrame(params->s32DevId, params->s32ChnIndex, &frame, RK_NULL);
}
}
returnRK_NULL;
}