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 Sending RTSP Video Stream to Main Window/Encoder

Hi All,

Currently I am using DVR RDK 00.07.00.02.

I want to receive a RTSP video stream, replacing one of the analog channel and save into hard disk drive along with others analog camera input.

So far I manage to get a video stream and feed into the existing playback openmax structure as below, I am able to see a video output at sub-window.

RTSP Video Stream -> DMUX -> VDEC -> VFPC_SC -> VFDC (Sub-window).

But I get stuck when I try to send the RTSP Video Stream into the main window flow as shown below.

Analog Camera -> VFCC -> VFPC_DEIM -> VFDC (Main-window)

                                                                 |---->VENC --> CMUX

Is the following workable? If not, please advice what would be the workable way?

RTSP Video Stream -> DMUX -> VDEC -> VFPC_DEIM -> VFDC (Main-window)

                                                                                   |-------------->VENC -> CMUX

I had tried the above but is not working, my tunnel code connecting VDEC_VFPC_DEIM is as below:

 

 

OMX_ERRORTYPE omx_ilclient_connect_VDEC_VFPCDEIM(TunnelTestCtxt* pContext, OMX_U16 numStartChannelVdec, OMX_U16 numStartChannelVfpc, OMX_U16 nChannel)
{
    int i;

    char channelName [OMX_MAX_STRINGNAME_SIZE + 1];

    OMX_CONFIG_CHANNELNAME sChannelName;

    OMX_PARAM_COMPPORT_NOTIFYTYPE sNotifyType = {NULL};

    OMX_PARAM_PORTDEFINITIONTYPE sLocalPortDef = {NULL};

    OMX_PARAM_BUFFER_MEMORYTYPE sMemTypeCfg = {NULL};
   
    OMX_ERRORTYPE eError = OMX_ErrorNone;

    int portDiff = (numStartChannelVfpc - numStartChannelVdec);

    for ( i = numStartChannelVdec; i < (numStartChannelVdec + nChannel); i++ )
    {
        memset ( channelName, 0x0, sizeof ( channelName ) );
        /*------------------------------------------------------------------------*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /* Create Channel Name                                                    */
        /*                                                                        */
        /*------------------------------------------------------------------------*/

        OMX_TEST_INIT_STRUCT ( sChannelName);
        snprintf ( channelName, OMX_MAX_STRINGNAME_SIZE, "C_FQ_DECOUT_%d", i );
        channelName[OMX_MAX_STRINGNAME_SIZE - 1] = '\0';

        /*------------------------------------------------------------------------*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /* Configure the Channel Name                                             */
        /*                                                                        */
        /*------------------------------------------------------------------------*/

        sChannelName.nPortIndex =  OMX_VIDDEC_OUTPUT_PORT;
        strncpy((char *)sChannelName.cChannelName, channelName, sizeof(sChannelName.cChannelName));
        OMX_SetConfig ( pContext->pnDecHandle[i], (OMX_INDEXTYPE)OMX_TI_IndexConfigChannelName, &sChannelName );

        OMX_TEST_INIT_STRUCT(sLocalPortDef);
        OMX_TEST_INIT_STRUCT(sMemTypeCfg);
        sLocalPortDef.nPortIndex = ( OMX_VFPC_INPUT_PORT_START_INDEX + (i + portDiff) );
        eError = OMX_GetParameter (pContext->hVFPCDE[IDX_VFPC_DEIM], OMX_IndexParamPortDefinition, &sLocalPortDef);
        sLocalPortDef.format.video.eColorFormat =  OMX_COLOR_FormatYCbYCr;
        if(sLocalPortDef.format.video.nFrameHeight < gCAPTURE_ctrl.CaptureHeight)
            sLocalPortDef.format.video.nFrameHeight = gCAPTURE_ctrl.CaptureHeight;

        eError = OMX_SetParameter (pContext->hVFPCDE[IDX_VFPC_DEIM], OMX_IndexParamPortDefinition, &sLocalPortDef);
        /* If using as bitstream sink dont use tiled memory */
        sMemTypeCfg.nPortIndex = ( OMX_VFPC_INPUT_PORT_START_INDEX + (i + portDiff) );
        sMemTypeCfg.eBufMemoryType = OMX_BUFFER_MEMORY_DEFAULT;
        eError = OMX_SetParameter (pContext->hVFPCDE[IDX_VFPC_DEIM],
                    (OMX_INDEXTYPE)OMX_TI_IndexParamBuffMemType,
                    &sMemTypeCfg);
        OMX_TEST_BAIL_IF_ERROR ( eError );

        OMX_TEST_INIT_STRUCT(sLocalPortDef);
        sLocalPortDef.nPortIndex = (OMX_VIDDEC_OUTPUT_PORT);
        eError = OMX_GetParameter (pContext->pnDecHandle[i], OMX_IndexParamPortDefinition, &sLocalPortDef);
        if( (sLocalPortDef.format.video.nFrameHeight) <= gENCODE_ctrl.EncodeStreamHeight )
            sLocalPortDef.format.video.nFrameHeight = gENCODE_ctrl.EncodeStreamHeight;

        eError = OMX_SetParameter (pContext->pnDecHandle[i], OMX_IndexParamPortDefinition, &sLocalPortDef);
        OMX_TEST_BAIL_IF_ERROR ( eError );
       
        eError = OMX_SetupTunnel (pContext->pnDecHandle[i], (OMX_VIDDEC_OUTPUT_PORT),
                                    pContext->hVFPCDE[IDX_VFPC_DEIM],
                                    ( OMX_VFPC_INPUT_PORT_START_INDEX + (i + portDiff) ) );

        eError = OMX_SendCommand ( pContext->pnDecHandle[i], OMX_CommandPortEnable,
                                    (OMX_VIDDEC_OUTPUT_PORT), NULL );
        OMX_TEST_BAIL_IF_ERROR ( eError );

        TIMM_OSAL_SemaphoreObtain ( pContext->hPortConfigEvent, TIMM_OSAL_SUSPEND );

        OMX_SendCommand ( pContext->hVFPCDE[IDX_VFPC_DEIM], OMX_CommandPortEnable,
                     ( OMX_VFPC_INPUT_PORT_START_INDEX + (i + portDiff) ),
                     NULL );
        TIMM_OSAL_SemaphoreObtain ( pContext->hPortConfigEvent, TIMM_OSAL_SUSPEND );

    }

    return eError;
}

 




  • Hi All,

    After much effort, I still unable to get above working.

    Instead, I manage to get below path working

    Analog Camera -> VFCC -> VFPC_DEIM -> VFPC_SC -> VFDC (Sub-window)

    However, when i try below path it is not working.

    RTSP Video Stream -> DMUX -> VDEC -> VENC -> CMUX

     

    Any advice/suggestion on this is very much appreciated.

     

  • Hi,

    We have moved to a new and more scalable framework called McFW. We have made many new releases for DVRRDK, the latest being 01.08.00.15. The new framework is much easier to understand and has the requested feature already implemented.

    I assume you have got DVRRDK from UDWorks. Have you note received email about the new releases from UDWorks? I would recommend you to move to DVRRDK 01.xx.xx versions so that we can help you fix the issues faster.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi,

    I do know there is a new framework-McFW on DVR RDK. But we had put in much effort studying on openMax framework and we are in the middle of our development, migrating to the new development maybe require some study/design time and thus we intend to continue on openMax framework for the time being, finish all what is remaining before we move to McFW.

    Best regards,

    Cheng

     

  • Dear tk Cheng,

    I also encoutered the same problem,  it is even more serious,

    The original data flow of RDK 00.07.00.01 is:

    DMUX->VDEC->VFPC_SC->VFDC

    VFCC-> VFPC_DEI->VENC->CMUX

    VFPC_DEI->VFDC

    VENC->VDEC,  

    But it's only diplay one video flame, then it's seem that the video display stops, I don't know why.

    You had test the below path , and it is ok:

    Analog Camera -> VFCC -> VFPC_DEIM -> VFPC_SC -> VFDC ,

     

    I have a question about it,  The data path: Analog Camera -> VFCC -> VFPC_DEIM -> VFDC , I have tested the path, It shows nothing,

    I don't know why,  What should I configure the VFPC_SC if it is used? ( analog camera is 720x480i@30fps )

     

    Thank you for any help

     

     

     

  • HI Jason,

    I have use 00.07.00.01 previously and the RDK software is working out of the box. Why would you said Analog Camera -> VFCC -> VFPC_DEIM -> VFDC. is not working?

    However, I do notice VFPC_DEIM has 2 output, which require to be 'connect' to get a output to HDMI/VGA. So you may try on VFCP_DEIM -> VENC as shown in the 00.07.00.01.

    I hope this information help.

    Best regards,

    Cheng