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.

dvr rdk custom mcfw demo

Hi,

Our Hardware is EVM DM8168 + VS CARD. We use DVRRDK_V03.00.00.00 for our usecase. Our usecase is attached. Our use case works fine as is. Below are some things we are trying to achieve. Can you please help us with the same?

 - The demo currently writes only one channel encoded output to the  file system. Is it possible to write the encoded output of all the four channels on to the filesystem simultaneously?

 - We want to customize the demo in such a way that once the encoded file size reaches a certain limit, just overwrite it. How do we know the limit?

 - Can we add time stamp to the encoded file?

 - Is there a way to send the encoded data via ethernet for viewing?

Appreciate your help on this.

Thanks,
Shilpa.

[Vie

/*******************************************************************************
 *                                                                             *
 * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com/      *
 *                        ALL RIGHTS RESERVED                                  *
 *                                                                             *
 ******************************************************************************/
/**
  \file demo_vcap_venc_custom.c
  \brief
  */


#include <demo_vcap_venc_vdis.h>
#include <demo_scd_bits_wr.h>

//VcapVencVdecVdis_res ipcbits_resArray[MCFW_IPCBITS_RESOLUTION_TYPES];

static
Void VcapVencVdecVdisSplUsecase_setVencDynamicParams(Demo_Info *demoInfo,
                                                     VENC_PARAMS_S *vencParams)
{
    UInt32 chId;
    VENC_CHN_DYNAMIC_PARAM_S params = { 0 };
    VSYS_VIDEO_STANDARD_E vidStandard;

    vidStandard = Demo_captureGetSignalStandard();
    /* Setting FPS for the Encoder Channels */
    for(chId=0; chId<vencParams->numPrimaryChn; chId++)
    {
        if(vidStandard == VSYS_STD_PAL)
        {
            memset(&params, 0, sizeof(params));

            Venc_setInputFrameRate(chId, 25);

            params.frameRate = 25;
            Venc_setDynamicParam(chId, 0, &params, VENC_FRAMERATE);
        }
        else if(vidStandard == VSYS_STD_NTSC)
        {
            memset(&params, 0, sizeof(params));
            Venc_setInputFrameRate(chId, 30);

            params.frameRate = 30;
            Venc_setDynamicParam(chId, 0, &params, VENC_FRAMERATE);

        }
        else
        {
           printf (" DEMO: No video detected at CH [%d] !!!\n",
                     chId);
        }
    }
}

Void VcapVenccustom_start()
{
    VSYS_PARAMS_S vsysParams;
    VCAP_PARAMS_S vcapParams;
    VENC_PARAMS_S vencParams;
    //Bool enableFWrite = FALSE;

    Vsys_params_init(&vsysParams);
    Vcap_params_init(&vcapParams);
    Venc_params_init(&vencParams);
    
    //ipcbits_resArray[0].width = MCFW_IPCBITS_D1_WIDTH;
    //ipcbits_resArray[0].height = MCFW_IPCBITS_D1_HEIGHT;
    
    gDemo_info.maxVcapChannels = 4;
    gDemo_info.maxVdisChannels = 0;
    gDemo_info.maxVencChannels = 4;
    gDemo_info.maxVdecChannels = 0;
    gDemo_info.VsysNumChs  = 4;

    vcapParams.numChn = gDemo_info.maxVcapChannels;
    vencParams.numPrimaryChn = gDemo_info.maxVencChannels;
    vencParams.numSecondaryChn = 0;
    vsysParams.numChs  = gDemo_info.VsysNumChs;
    
    vsysParams.systemUseCase        = VSYS_USECASE_MULTICHN_CUSTOM_VCAP_VENC;
    vsysParams.enableSecondaryOut   = FALSE;
    vsysParams.enableCapture        = TRUE;
    vsysParams.enableNsf            = TRUE;
    vsysParams.enableEncode         = TRUE;
    vsysParams.enableDecode         = FALSE;
    vsysParams.enableNullSrc        = FALSE;
    vsysParams.numDeis              = 0;   
    
    printf ("--------------- CHANNEL DETAILS-------------\n");
    printf ("Capture Channels => %d\n", vcapParams.numChn);
    printf ("Enc Channels => Primary %d, Secondary %d\n", vencParams.numPrimaryChn, vencParams.numSecondaryChn); 
    printf ("-------------------------------------------\n");

    Vsys_init(&vsysParams);
    Vcap_init(&vcapParams);
    Venc_init(&vencParams);

    //enableFWrite = Demo_getFileWriteEnable();

    //VcapVencVdecVdis_ipcBitsSetFileExtension("h264");
    //VcapVencVdecVdis_ipcBitsInit(ipcbits_resArray, enableFWrite, FALSE); 
    
    /* Init the application specific module which will handle bitstream exchange */
    VcapVenc_bitsWriteCreate();

    /* Init the application specific module which will handle video frame exchange */
    VcapVenc_ipcFramesCreate(VSYS_USECASE_MULTICHN_CUSTOM_VCAP_VENC);
    VcapVenc_ipcFramesInSetCbInfo();

    /* Create Link instances and connects compoent blocks */
    Vsys_create();
    
    /* Start components in reverse order */
    Venc_start();
    Vcap_start();
    
    VcapVencVdecVdisSplUsecase_setVencDynamicParams(&gDemo_info,&vencParams);
}

Void VcapVenccustom_stop()
{
    /* Stop components */
    Vcap_stop();
    Venc_stop();

    Vsys_delete();
    
    /* De-initialize components */
    Vcap_exit();
    Venc_exit();
    Vsys_exit();
}

w:http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/717/3733.multich_5F00_custom_5F00_vcap_5F00_venc.c]

  • Inserting attachments again.

    //TrafficWare Demo
    
    //Demo Flow : Capture (YUV422I 4CH D1 60fps) -> NSF (YUV 420) -> DEI (YUV 420)-> IPC Out VPSS M3 -> IPC In Video M3 -> Encode -> IPC Bits Out Video M3 -> IPC Bits In HOSTOS(A8)
    
    /*
                          Capture (YUV422I) 4CH D1 60fps
                              |
                              |
                             NSF (YUV420SP)
                              |
                              |
    					  IPC Out VPSS M3  
                              |
                              |
    					  IPC In Video M3 
                              |
                              |
                             ENC (H264)
                              |
                              |
    					  IPC Bits Out Video M3
                              |
                              |
    					  IPC Bits IN A8 ( FWRITE )
    */
    #define NUM_CAPTURE_DEVICES        (1)
    
    #include "multich_common.h"
    
    static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
    {
        .isPopulated = 1,
        .ivaMap[0] =
        {
            .EncNumCh  = 2,
            .EncChList = {0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
        .ivaMap[1] =
        {
            .EncNumCh  = 2,
            .EncChList = {1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
        .ivaMap[2] =
        {
            .EncNumCh  = 0,
            .EncChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
    };
    
    Void MultiCh_createCustomVcapVenc()
    {
        CaptureLink_CreateParams        capturePrm;
        NsfLink_CreateParams        nsfPrm;
    
        IpcLink_CreateParams        ipcOutVpssPrm;
        IpcLink_CreateParams        ipcInVideoPrm;
    
        EncLink_CreateParams        encPrm;
    
        IpcBitsOutLinkRTOS_CreateParams   ipcBitsOutVideoPrm;
        IpcBitsInLinkHLOS_CreateParams    ipcBitsInHostPrm;
        UInt32 ipcOutVpssId, ipcInVideoId;
    
        VCAP_VIDDEC_PARAMS_S vidDecVideoModeArgs[NUM_CAPTURE_DEVICES];
    
        CaptureLink_VipInstParams *pCaptureInstPrm;
        CaptureLink_OutParams     *pCaptureOutPrm;
        UInt32 i;
    
        MULTICH_INIT_STRUCT(IpcLink_CreateParams ,ipcOutVpssPrm);
        MULTICH_INIT_STRUCT(IpcLink_CreateParams ,ipcInVideoPrm);
        MULTICH_INIT_STRUCT(IpcBitsOutLinkRTOS_CreateParams,ipcBitsOutVideoPrm);
        MULTICH_INIT_STRUCT(IpcBitsInLinkHLOS_CreateParams,ipcBitsInHostPrm);
        MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm);
    
        MultiCh_detectBoard();
    
        System_linkControl(
            SYSTEM_LINK_ID_M3VPSS,
            SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
            NULL,
            0,
            TRUE
            );
    
        System_linkControl(
            SYSTEM_LINK_ID_M3VIDEO,
            SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
            &systemVid_encDecIvaChMapTbl,
            sizeof(SystemVideo_Ivahd2ChMap_Tbl),
            TRUE
        );
    
        gVcapModuleContext.captureId             = SYSTEM_LINK_ID_CAPTURE;
        gVcapModuleContext.nsfId[0]              = SYSTEM_LINK_ID_NSF_0;
        gVencModuleContext.encId                 = SYSTEM_LINK_ID_VENC_0;
        ipcOutVpssId                             = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0;
        ipcInVideoId                             = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0;
        gVencModuleContext.ipcBitsOutRTOSId      = SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0;
        gVencModuleContext.ipcBitsInHLOSId       = SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0;
    
        CaptureLink_CreateParams_Init(&capturePrm);
    
        capturePrm.numVipInst    = 1;
        capturePrm.outQueParams[0].nextLink = gVcapModuleContext.nsfId[0];
    
        capturePrm.tilerEnable              = FALSE;
        capturePrm.enableSdCrop             = FALSE;
        capturePrm.numBufsPerCh             = 8;
        
        pCaptureInstPrm                     = &capturePrm.vipInst[0];
        pCaptureInstPrm->vipInstId          = (SYSTEM_CAPTURE_INST_VIP0_PORTA+0)%SYSTEM_CAPTURE_INST_MAX;
        pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP5158_DRV;
        pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;
        pCaptureInstPrm->standard           = SYSTEM_STD_MUX_4CH_D1;
        pCaptureInstPrm->numOutput          = 1;
    
        pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
        pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;
        pCaptureOutPrm->scEnable            = FALSE;
        pCaptureOutPrm->scOutWidth          = 0;
        pCaptureOutPrm->scOutHeight         = 0;
        pCaptureOutPrm->outQueId            = 0;
    
        for(i = 0; i < NUM_CAPTURE_DEVICES; i++)
        {
            vidDecVideoModeArgs[i].videoIfMode        = DEVICE_CAPT_VIDEO_IF_MODE_8BIT;
            vidDecVideoModeArgs[i].videoDataFormat    = SYSTEM_DF_YUV422P;
            vidDecVideoModeArgs[i].standard           = SYSTEM_STD_MUX_4CH_D1;
            vidDecVideoModeArgs[i].videoCaptureMode   =
                        DEVICE_CAPT_VIDEO_CAPTURE_MODE_MULTI_CH_PIXEL_MUX_EMBEDDED_SYNC;
            vidDecVideoModeArgs[i].videoSystem        =
                                          DEVICE_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT;
            vidDecVideoModeArgs[i].videoCropEnable    = FALSE;
            vidDecVideoModeArgs[i].videoAutoDetectTimeout = -1;
        }
    
        Vcap_configVideoDecoder(vidDecVideoModeArgs, NUM_CAPTURE_DEVICES);
    
        // Capture to Noise Filter
        NsfLink_CreateParams_Init(&nsfPrm);
        nsfPrm.bypassNsf                 = FALSE;
        nsfPrm.tilerEnable               = FALSE;
        nsfPrm.inQueParams.prevLinkId    = gVcapModuleContext.captureId;
        nsfPrm.inQueParams.prevLinkQueId = 0;
        nsfPrm.numOutQue                 = 1;
        nsfPrm.outQueParams[0].nextLink  = ipcOutVpssId;
        nsfPrm.numBufsPerCh                     = 6;
        nsfPrm.inputFrameRate                    = 30;
        nsfPrm.outputFrameRate                  = 30;
    
        // Noise Filter to ipcVpssOut
        ipcOutVpssPrm.inQueParams.prevLinkId    = gVcapModuleContext.nsfId[0];
        ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
        ipcOutVpssPrm.numOutQue                 = 1;
        ipcOutVpssPrm.notifyNextLink            = TRUE;
        ipcOutVpssPrm.notifyPrevLink            = TRUE;
        ipcOutVpssPrm.noNotifyMode              = FALSE;
        ipcOutVpssPrm.outQueParams[0].nextLink  = ipcInVideoId ;
    
        //ipcVpssOut to ipcBitsIn Video
        ipcInVideoPrm.inQueParams.prevLinkId    = ipcOutVpssId;
        ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
        ipcInVideoPrm.numOutQue                 = 1;
        ipcInVideoPrm.notifyNextLink            = TRUE;
        ipcInVideoPrm.notifyPrevLink            = TRUE;
        ipcInVideoPrm.noNotifyMode              = FALSE;
        ipcInVideoPrm.outQueParams[0].nextLink  = gVencModuleContext.encId;
    
         {
            EncLink_ChCreateParams *pLinkChPrm;
            EncLink_ChDynamicParams *pLinkDynPrm;
            VENC_CHN_DYNAMIC_PARAM_S *pDynPrm;
            VENC_CHN_PARAMS_S *pChPrm;
    
            EncLink_CreateParams_Init(&encPrm);
    
            encPrm.numBufPerCh[0] = 6;
    
            /* Primary Stream Params - D1 */
            for (i=0; i<gVencModuleContext.vencConfig.numPrimaryChn; i++)
            {
                pLinkChPrm  = &encPrm.chCreateParams[i];
                pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;
    
                pChPrm      = &gVencModuleContext.vencConfig.encChannelParams[i];
                pDynPrm     = &pChPrm->dynamicParam;
    
                pLinkChPrm->format                  = IVIDEO_H264HP;
                pLinkChPrm->profile                 = gVencModuleContext.vencConfig.h264Profile[i];
                pLinkChPrm->dataLayout              = IVIDEO_FIELD_SEPARATED;
                pLinkChPrm->fieldMergeEncodeEnable  = FALSE;
                pLinkChPrm->enableAnalyticinfo      = pChPrm->enableAnalyticinfo;
                pLinkChPrm->enableWaterMarking      = pChPrm->enableWaterMarking;
                pLinkChPrm->maxBitRate              = pChPrm->maxBitRate;
                pLinkChPrm->encodingPreset          = pChPrm->encodingPreset;
                pLinkChPrm->rateControlPreset       = pChPrm->rcType;
                pLinkChPrm->enableSVCExtensionFlag  = pChPrm->enableSVCExtensionFlag;
                pLinkChPrm->numTemporalLayer        = pChPrm->numTemporalLayer;
    
                pLinkDynPrm->intraFrameInterval     = pDynPrm->intraFrameInterval;
                pLinkDynPrm->targetBitRate          = pDynPrm->targetBitRate;
                pLinkDynPrm->interFrameInterval     = 1;
                pLinkDynPrm->mvAccuracy             = IVIDENC2_MOTIONVECTOR_QUARTERPEL;
                pLinkDynPrm->inputFrameRate         = pDynPrm->inputFrameRate;
                pLinkDynPrm->rcAlg                  = pDynPrm->rcAlg;
                pLinkDynPrm->qpMin                  = pDynPrm->qpMin;
                pLinkDynPrm->qpMax                  = pDynPrm->qpMax;
                pLinkDynPrm->qpInit                 = pDynPrm->qpInit;
                pLinkDynPrm->vbrDuration            = pDynPrm->vbrDuration;
                pLinkDynPrm->vbrSensitivity         = pDynPrm->vbrSensitivity;
            }
            
            encPrm.inQueParams.prevLinkId   = ipcInVideoId;
            encPrm.inQueParams.prevLinkQueId= 0;
            encPrm.outQueParams.nextLink = gVencModuleContext.ipcBitsOutRTOSId;
        }
        
        // Encoder to ipcBitsOutVideo
        ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.encId;
        ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcBitsOutVideoPrm.baseCreateParams.numOutQue                 = 1;
        ipcBitsOutVideoPrm.baseCreateParams.outQueParams[0].nextLink = gVencModuleContext.ipcBitsInHLOSId;
        MultiCh_ipcBitsInitCreateParams_BitsOutRTOS(&ipcBitsOutVideoPrm, TRUE);
    
        ipcBitsInHostPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.ipcBitsOutRTOSId;
        ipcBitsInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcBitsInHostPrm.baseCreateParams.outQueParams[0].nextLink   = SYSTEM_LINK_ID_INVALID;
        MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm);
    
        System_linkCreate(gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));
        System_linkCreate(gVcapModuleContext.nsfId[0], &nsfPrm, sizeof(nsfPrm));
    
        System_linkCreate(ipcOutVpssId , &ipcOutVpssPrm , sizeof(ipcOutVpssPrm) );
        System_linkCreate(ipcInVideoId , &ipcInVideoPrm , sizeof(ipcInVideoPrm) );
    
        System_linkCreate(gVencModuleContext.encId, &encPrm, sizeof(encPrm));
        System_linkCreate(gVencModuleContext.ipcBitsOutRTOSId, &ipcBitsOutVideoPrm, sizeof(ipcBitsOutVideoPrm));
        System_linkCreate(gVencModuleContext.ipcBitsInHLOSId, &ipcBitsInHostPrm, sizeof(ipcBitsInHostPrm));
    
         MultiCh_memPrintHeapStatus();
    }
    
    Void MultiCh_deleteCustomVcapVenc()
    {
        UInt32 ipcOutVpssId, ipcInVideoId;
        
        ipcOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0;
        ipcInVideoId = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0;
    
        System_linkDelete(gVcapModuleContext.captureId);
    
        System_linkDelete(gVcapModuleContext.nsfId[0]);
    
        System_linkDelete(ipcOutVpssId );
        System_linkDelete(ipcInVideoId );
    
        System_linkDelete(gVencModuleContext.encId);
        System_linkDelete(gVencModuleContext.ipcBitsOutRTOSId);
        System_linkDelete(gVencModuleContext.ipcBitsInHLOSId);
        
        /* Print the HWI, SWI and all tasks load */
        /* Reset the accumulated timer ticks */
        MultiCh_prfLoadCalcEnable(FALSE, TRUE, FALSE);
    }
    

    /*******************************************************************************
     *                                                                             *
     * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com/      *
     *                        ALL RIGHTS RESERVED                                  *
     *                                                                             *
     ******************************************************************************/
    /**
      \file demo_vcap_venc_custom.c
      \brief
      */
    
    
    #include <demo_vcap_venc_vdis.h>
    #include <demo_scd_bits_wr.h>
    
    //VcapVencVdecVdis_res ipcbits_resArray[MCFW_IPCBITS_RESOLUTION_TYPES];
    
    static
    Void VcapVencVdecVdisSplUsecase_setVencDynamicParams(Demo_Info *demoInfo,
                                                         VENC_PARAMS_S *vencParams)
    {
        UInt32 chId;
        VENC_CHN_DYNAMIC_PARAM_S params = { 0 };
        VSYS_VIDEO_STANDARD_E vidStandard;
    
        vidStandard = Demo_captureGetSignalStandard();
        /* Setting FPS for the Encoder Channels */
        for(chId=0; chId<vencParams->numPrimaryChn; chId++)
        {
            if(vidStandard == VSYS_STD_PAL)
            {
                memset(&params, 0, sizeof(params));
    
                Venc_setInputFrameRate(chId, 25);
    
                params.frameRate = 25;
                Venc_setDynamicParam(chId, 0, &params, VENC_FRAMERATE);
            }
            else if(vidStandard == VSYS_STD_NTSC)
            {
                memset(&params, 0, sizeof(params));
                Venc_setInputFrameRate(chId, 30);
    
                params.frameRate = 30;
                Venc_setDynamicParam(chId, 0, &params, VENC_FRAMERATE);
    
            }
            else
            {
               printf (" DEMO: No video detected at CH [%d] !!!\n",
                         chId);
            }
        }
    }
    
    Void VcapVenccustom_start()
    {
        VSYS_PARAMS_S vsysParams;
        VCAP_PARAMS_S vcapParams;
        VENC_PARAMS_S vencParams;
        //Bool enableFWrite = FALSE;
    
        Vsys_params_init(&vsysParams);
        Vcap_params_init(&vcapParams);
        Venc_params_init(&vencParams);
        
        //ipcbits_resArray[0].width = MCFW_IPCBITS_D1_WIDTH;
        //ipcbits_resArray[0].height = MCFW_IPCBITS_D1_HEIGHT;
        
        gDemo_info.maxVcapChannels = 4;
        gDemo_info.maxVdisChannels = 0;
        gDemo_info.maxVencChannels = 4;
        gDemo_info.maxVdecChannels = 0;
        gDemo_info.VsysNumChs  = 4;
    
        vcapParams.numChn = gDemo_info.maxVcapChannels;
        vencParams.numPrimaryChn = gDemo_info.maxVencChannels;
        vencParams.numSecondaryChn = 0;
        vsysParams.numChs  = gDemo_info.VsysNumChs;
        
        vsysParams.systemUseCase        = VSYS_USECASE_MULTICHN_CUSTOM_VCAP_VENC;
        vsysParams.enableSecondaryOut   = FALSE;
        vsysParams.enableCapture        = TRUE;
        vsysParams.enableNsf            = TRUE;
        vsysParams.enableEncode         = TRUE;
        vsysParams.enableDecode         = FALSE;
        vsysParams.enableNullSrc        = FALSE;
        vsysParams.numDeis              = 0;   
        
        printf ("--------------- CHANNEL DETAILS-------------\n");
        printf ("Capture Channels => %d\n", vcapParams.numChn);
        printf ("Enc Channels => Primary %d, Secondary %d\n", vencParams.numPrimaryChn, vencParams.numSecondaryChn); 
        printf ("-------------------------------------------\n");
    
        Vsys_init(&vsysParams);
        Vcap_init(&vcapParams);
        Venc_init(&vencParams);
    
        //enableFWrite = Demo_getFileWriteEnable();
    
        //VcapVencVdecVdis_ipcBitsSetFileExtension("h264");
        //VcapVencVdecVdis_ipcBitsInit(ipcbits_resArray, enableFWrite, FALSE); 
        
        /* Init the application specific module which will handle bitstream exchange */
        VcapVenc_bitsWriteCreate();
    
        /* Init the application specific module which will handle video frame exchange */
        VcapVenc_ipcFramesCreate(VSYS_USECASE_MULTICHN_CUSTOM_VCAP_VENC);
        VcapVenc_ipcFramesInSetCbInfo();
    
        /* Create Link instances and connects compoent blocks */
        Vsys_create();
        
        /* Start components in reverse order */
        Venc_start();
        Vcap_start();
        
        VcapVencVdecVdisSplUsecase_setVencDynamicParams(&gDemo_info,&vencParams);
    }
    
    Void VcapVenccustom_stop()
    {
        /* Stop components */
        Vcap_stop();
        Venc_stop();
    
        Vsys_delete();
        
        /* De-initialize components */
        Vcap_exit();
        Venc_exit();
        Vsys_exit();
    }
    
    

  • 1. To do multiple ch file writes, modify VcapVenc_bitsWriteCreate() to open more than 1 file handle. Modify VcapVenc_bitsWriteMain() to not restrict to one file write and invoke file write with corresponding file handle of each channel.

    2. Refer VcapVencVdecVdis_ipcBitsGetMaxFileSizePerChannel() & VcapVencVdecVdis_ipcBitsWriteWrap() for details on calculating max allowed size / rewind of file.

    3. You can do using any linux time apis. Its not clear to me as where its really used in your use case. You can use Avsync_getWallTime() also.

    4. No support is dvr rdk as such. You will have to write your own routines.

  • Hi sivagamy,

    Thankyou for your immediate reply.

    We got the multiple channel writes and overwrite to work.

    We would like add the date and timestamp to the encoded video, so that we can view the date and time stamp while viewing the encoded video from the host. Is this possible?

    Can we use gstreamer for streaming video? If not, what options do I have? Can you please suggest?

    Thanks,
    Shilpa.

  • ShilpaByrichetty said:

    We would like add the date and timestamp to the encoded video, so that we can view the date and time stamp while viewing the encoded video from the host. Is this possible?

     

     

    DVR RDK has SWOSD functionality using which any graphics plane can be blended with the encoded video. The mcfw demo has code which generates date and time graphics plane and blends with video. Refer demo_osd.c file for reference code.

     

    ShilpaByrichetty said:

    Can we use gstreamer for streaming video? If not, what options do I have? Can you please suggest?

    We have not tried out gstreamer with DVR RDK . The UDworks reference design has code for streaming out the secondary encoded channels using live555 wisstreamer.

    www.live555.com/wis-streamer/ . You can use that as reference for your own implementation.