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.

DM8168 IpcFramesOutLink

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);
    }
}//*/

  • What is your full data flow .i.e link connections. You will get only 30 frames / sec from  IpcFramesOutLink_getEmptyVideoFrames if the frames are being consumed at 30 fps.

  • In my link connection,Iset

     ipcFramesOutHostPrm.baseCreateParams.inputFrameRate                 = 60

    ipcFramesOutHostPrm.baseCreateParams.outputFrameRate                = 60

    so,I think it should be 60 frames / sec ,Why do I only get  30 frames,It looks as if it is less by half.

  • No setting  

     ipcFramesOutHostPrm.baseCreateParams.inputFrameRate                 = 60

    ipcFramesOutHostPrm.baseCreateParams.outputFrameRate                = 60

    only means that ipcFramesOut link will not drop any frames. It does not mean it will generate 60 fps output. The rate at which buffers are consumed by the next link determines outputFPS of ipcFramesOutLink