Пример #1
0
static Void  VdecVdis_ipcFramesInitThrObj( VdecVdis_IpcFramesCtrl *ipcFramesObj)
{
    VdecVdis_IpcFramesCtrlThrObj *thrObj;

    thrObj = &ipcFramesObj->thrObj;
    thrObj->exitFramesOutThread = FALSE;
    OSA_semCreate(&thrObj->thrStartSem,1,0);
    OSA_thrCreate(&thrObj->thrHandleFramesOut,
                   VdecVdis_ipcFramesSendFxn,
                  MCFW_IPCFRAMES_SENDFXN_TSK_PRI,
                  MCFW_IPCFRAMES_SENDFXN_TSK_STACK_SIZE,
                  ipcFramesObj);

}
Пример #2
0
static Void VdecVdis_bitsRdInitThrObj()
{
    int status;

    gVdecVdis_obj.thrExit = FALSE;
    status = OSA_semCreate(&gVdecVdis_obj.thrStartSem,1,0);
    OSA_assert(status==OSA_SOK);

    status = OSA_thrCreate(&gVdecVdis_obj.thrHandle,
            VdecVdis_bitsRdSendFxn,
            MCFW_IPCBITS_SENDFXN_TSK_PRI,
            MCFW_IPCBITS_SENDFXN_TSK_STACK_SIZE,
            &gVdecVdis_obj);

    OSA_assert(status==OSA_SOK);
}
Пример #3
0
Int32 VcapVenc_bitsWriteCreate()
{
    VENC_CALLBACK_S callback;

    Int32 status;

    gVcapVenc_ctrl.fileWriteChn = 0;

    gVcapVenc_ctrl.fileWriteEnable = Demo_getFileWriteEnable();

    if(gVcapVenc_ctrl.fileWriteEnable)
    {
        char path[256];

        Demo_getFileWritePath(path, "/dev/shm");

        gVcapVenc_ctrl.fileWriteChn = Demo_getChId("File Write", gDemo_info.maxVencChannels);

        sprintf(gVcapVenc_ctrl.fileWriteName, "%s/VID_CH%02d.h264", path, gVcapVenc_ctrl.fileWriteChn);
    }

    gVcapVenc_ctrl.exitWrThr = FALSE;
    gVcapVenc_ctrl.isWrThrStopDone = FALSE;

    callback.newDataAvailableCb = VcapVenc_bitsWriteCbFxn;

    /* Register call back with encoder */
    Venc_registerCallback(&callback,
                          (Ptr)&gVcapVenc_ctrl);

    status = OSA_semCreate(&gVcapVenc_ctrl.wrSem, 1, 0);
    OSA_assert(status==OSA_SOK);

    status = OSA_thrCreate(
                 &gVcapVenc_ctrl.wrThrHndl,
                 VcapVenc_bitsWriteMain,
                 OSA_THR_PRI_DEFAULT,
                 0,
                 &gVcapVenc_ctrl
             );

    OSA_assert(status==OSA_SOK);

    return OSA_SOK;
}
Пример #4
0
Int32 SD_Demo_bitsWriteCreate()
{

    Int32 status;

    gSD_Demo_Ipc_Ctrl.fileWriteChn = 0;

    gSD_Demo_Ipc_Ctrl.fileWriteEnable = SD_Demo_getFileWriteEnable();

    if(gSD_Demo_Ipc_Ctrl.fileWriteEnable)
    {
        char path[256];

        SD_Demo_getFileWritePath(path, "/dev/shm");

        gSD_Demo_Ipc_Ctrl.fileWriteChn = SD_Demo_getChId("File Write", gSD_Demo_ctrl.numCapChannels);

        sprintf(gSD_Demo_Ipc_Ctrl.fileWriteName, "%s/VID_CH%02d.h264", path, gSD_Demo_Ipc_Ctrl.fileWriteChn);
    }

    gSD_Demo_Ipc_Ctrl.exitWrThr = FALSE;
    gSD_Demo_Ipc_Ctrl.isWrThrStopDone = FALSE;


    status = OSA_semCreate(&gSD_Demo_Ipc_Ctrl.wrSem, 1, 0);
    OSA_assert(status==OSA_SOK);

    status = OSA_thrCreate(
                 &gSD_Demo_Ipc_Ctrl.wrThrHndl,
                 SD_Demo_bitsWriteMain,
                 OSA_THR_PRI_DEFAULT,
                 0,
                 &gSD_Demo_Ipc_Ctrl
             );

    OSA_assert(status==OSA_SOK);

    OSA_waitMsecs(100); // allow for print to complete
    return OSA_SOK;
}
static Void VcapVencVdecVdis_ipcBitsInitThrObj(VcapVencVdecVdis_IpcBitsCtrlThrObj *thrObj)
{

    OSA_semCreate(&thrObj->bitsInNotifySem,
                  MCFW_IPCBITS_MAX_PENDING_RECV_SEM_COUNT,0);
    thrObj->exitBitsInThread = FALSE;
    thrObj->exitBitsOutThread = FALSE;
    OSA_queCreate(&thrObj->bufQFreeBufs,MCFW_IPCBITS_FREE_QUE_MAX_LEN);
    OSA_queCreate(&thrObj->bufQFullBufs,MCFW_IPCBITS_FULL_QUE_MAX_LEN);
    OSA_thrCreate(&thrObj->thrHandleBitsOut,
                  VcapVencVdecVdis_ipcBitsSendFxn,
                  MCFW_IPCBITS_SENDFXN_TSK_PRI,
                  MCFW_IPCBITS_SENDFXN_TSK_STACK_SIZE,
                  thrObj);

    OSA_thrCreate(&thrObj->thrHandleBitsIn,
                  VcapVencVdecVdis_ipcBitsRecvFxn,
                  MCFW_IPCBITS_RECVFXN_TSK_PRI,
                  MCFW_IPCBITS_RECVFXN_TSK_STACK_SIZE,
                  &gVcapVencVdecVdis_ipcBitsCtrl);

}