Hi,
In my usecase,I use the ipcFramesOutHost Link and ipcFramesInVpss link ,and I invoke Vsys_allocBuf() to allocate shard region firstly,then,pass it to ipcFramesOut_putFullFrames.
I create a thread just work in this way "IpcFramesOutLink_getEmptyVideoFrames--->IpcFramesOutLink_putFullVideoFrames" ,and I just get 30 frames per second,
I want to know what causes this phenomenon,my test code is like following:
Looking forward to your reply.
static Void *Chains_ipcFramesGetPutFxn(Void *prm)
{
Chains_IpcFramesCtrlThrObj *thrObj = (Chains_IpcFramesCtrlThrObj *) prm;
VIDFrame_BufList bufList;
VIDFrame_Buf *pFrame;
Int32 i = 0;
Int32 status;
Int32 bufSize = 1280 * 720 * 2;
///////////////////////////////////////////////////////////////////////////////////////
if (FALSE == bHasAllocSRBuf)
{
bufList.numFrames = 0;
for (i = 0; i < VIDFRAME_MAX_FRAME_BUFS;i++)
{
status = Vsys_allocBuf(FRAMEBUF_HEAP_SR_ID, bufSize, 128, &thrObj->bufInfo[i]);
if (ERROR_NONE == status)
{
bufList.numFrames++;
pFrame = &bufList.frames[i];
pFrame->channelNum = 0;
pFrame->fid = 0;
pFrame->frameHeight = 720;
pFrame->frameWidth = 1280;
pFrame->framePitch[0] = 2560;
pFrame->phyAddr[0][0] = thrObj->bufInfo[i].physAddr;
pFrame->addr[0][0] = thrObj->bufInfo[i].virtAddr;
}
}
status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
OSA_assert(0 == status);
bHasAllocSRBuf = TRUE;
printf ("ipcFrame 7777777777777777777777 put succefully...\n");
}
/////////////////////////////////////////////////////////////////////////////////////////////
while (FALSE == thrObj->exitFramesInOutThread)
{
status = IpcFramesOutLink_getEmptyVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
OSA_assert(0 == status);
printf("[%13.6f]numFrames = %d\n", ELAPSE_TIME, bufList.numFrames);
if (bufList.numFrames)
{
status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
OSA_assert(0 == status);
}
OSA_waitMsecs(4);
}
}//*/