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.

How to feed raw data from file to encode?



Hi,

How to feed data read from file to encode? The ipcFramesSendFxn function I wrote is list below, but getEmptyVideoFrames = 0. What's wrong?

 

static Void *Venc_ipcFramesSendFxn(Void *prm)
{
    Venc_IpcFramesCtrl *ipcFramesObj = (Venc_IpcFramesCtrl *) prm;
    Venc_IpcFramesCtrlThrObj *thrObj = &ipcFramesObj->thrObj;

    static Int printStatsInterval = 0;
    VIDFrame_BufList bufList;
    Int status;
 Int count;


 VIDEO_CHANNEL_LIST_INFO_S chInfoList;
 Int i;

 

    OSA_printf("CHAINS_IPCFRAMES:%s:Entered...",__func__);
    OSA_semWait(&thrObj->framesOutNotifySem,OSA_TIMEOUT_FOREVER);
    OSA_printf("@_@ CHAINS_IPCFRAMES:Received first frame notify...");


    while (FALSE == thrObj->exitFramesOutThread)
    {
        OSA_waitMsecs(VENC_IPCFRAMES_SENDFXN_PERIOD_MS);


  /* We need to initialize the frameObj only at start time and
   * not at create time. This is because the SharedRegion is
   * initialized only after Vsys_create().
   * Also the number of channels to be displayed can be queries
   * from VDIS module only after Vdis_create()
   */
  status = Venc_getChannelInfo(&chInfoList);

  OSA_assert(status == ERROR_NONE);
  Venc_ipcFramesInitFrameObj(gVenc_ctrl.ipcFrames.frameObj,
            VENC_IPCFRAMES_MAX_NUM_ALLOC_FRAMES,
            &chInfoList);


        Venc_ipcFramesFillBufInfo(&bufList,
                              ipcFramesObj->frameObj,
                              OSA_ARRAYSIZE(ipcFramesObj->frameObj));

  if (bufList.numFrames)
  {
   status = Venc_putFullVideoFrames(&bufList);
   OSA_assert(0 == status);
  }
  status =  Venc_getEmptyVideoFrames(&bufList,0);
  OSA_assert(0 == status);

        if (bufList.numFrames)
        {
            Venc_ipcFramesPrintFullFrameListInfo(&bufList,"EmptyFrameList");
            Venc_ipcFramesFreeFrameBuf(&bufList,
                                           ipcFramesObj->frameObj,
                                           OSA_ARRAYSIZE(ipcFramesObj->frameObj));
        }


        if ((printStatsInterval % VENC_IPCFRAMES_INFO_PRINT_INTERVAL) == 0)
        {
            OSA_printf("VENC_IPCFRAMES:%s:INFO: periodic print..",__func__);
        }

        printStatsInterval++;
    }
    OSA_printf("VENC_IPCFRAMES:%s:Leaving...",__func__);
    return NULL;
}