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.

[openMax] move VSNK from M3video to A8

I write a omx demo. (RTSP->VDEC->VSNK). when VSNK run in M3video, It works.

if I move the VSNK component from M3video to A8.

 

in app_cfg.h 

I motify  #define DOMX_CORE_vsnk_m3video -> #define DOMX_CORE_vsnk_a8host

in makefile

COMP_LIST_a8host = cmux dmux rtptx rtprx omxbase omxcore domx timmosal omxutils vsnk 


if  VSNK component run in A8,  the code is crash in OMX_SetupTunnel()  between VDEC and VSNK.

I don't know why?  which code do I have to modify?

By the way, If I want to take some raw data from VDEC for snapshot function in A8 UI, Do you have any suggestion?

 

  • I do some test for running VSNK component in A8.

    and I take some debug messages.

    when I send command to VSNK from loading to idle status.   

    FrameQBufMgr_open( ) is not available.

     

    But when I move VSNK componentn in M3video or M3VPSS.

    FrameQBufMgr_open( ) is OK, and my demo code is work.  

     

    I don't have any idea?  May I change any setting in syslink?

    anyone can tell me? 

     

     

  • I already checked and fixed it.

    there're some known issues in DM8168 Release Notes.

     [SDOCM00074834 ] [HDVPSS][Customer]TI OMX team: Error creating non-tiled FQBufMgr from IL Client on linux

     [SDOCM00077323 ] [HDVPSS] Tunneling ports with Tiled and non-Tiled formated ports donot throw any error but just hangs when moved to exec stat 

     

  • Hi Rouyun,

    I intended to take some raw data from VDEC for snapshot function, please advise if you manage to acheive it.

    Thank you.

     

  • Hi Rouyun,

    I intended to take some raw data from VDEC for snapshot function, please advise if you manage to acheive it.

    Thank you.

     

  • 
    
    You can add the code in your omx_prop_tunnel_test.c of openMax framework. 
    but I had already moved my code from openMax to MCFW currently.
    #if PAN_FIX
    {
    omxILEdgeInfo vdec_vsnk_edge;
    vdec_vsnk_edge.sNode1.hComp = &(pContext->pnDecHandle[0]);
    vdec_vsnk_edge.sNode1.bMultiHandleSinglePortConnect = OMX_TRUE;
    vdec_vsnk_edge.sNode1.bEnablePort = OMX_TRUE;
    vdec_vsnk_edge.sNode1.bEnableNotify = OMX_TRUE;
    vdec_vsnk_edge.sNode1.nStartPortIndex = OMX_VIDDEC_OUTPUT_PORT;
    vdec_vsnk_edge.sNode1.bUsePortIndexArrayList = OMX_FALSE;
    vdec_vsnk_edge.sNode1.nNumPorts = 1;
    vdec_vsnk_edge.sNode1.nNumHandles = 1;
    vdec_vsnk_edge.sNode1.nPortIndexIncrement = 1;
    vdec_vsnk_edge.sNode1.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
    vdec_vsnk_edge.sNode1.pPortIndexList = NULL;

    vdec_vsnk_edge.sNode2.hComp = &(pContext->hVSNK[0]);
    vdec_vsnk_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
    vdec_vsnk_edge.sNode2.bEnablePort = OMX_TRUE;
    vdec_vsnk_edge.sNode2.bEnableNotify = OMX_TRUE;
    vdec_vsnk_edge.sNode2.nStartPortIndex = OMX_VSNK_INPUT_PORT_START_INDEX;
    vdec_vsnk_edge.sNode2.bUsePortIndexArrayList = OMX_FALSE;
    vdec_vsnk_edge.sNode2.nNumPorts = 1;
    vdec_vsnk_edge.sNode2.nPortIndexIncrement = 1;
    vdec_vsnk_edge.sNode2.nNumHandles = 1;
    vdec_vsnk_edge.sNode2.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
    vdec_vsnk_edge.sNode2.pPortIndexList = NULL;


    vdec_vsnk_edge.szEdgeName = "FQ_VDECOUT";
    vdec_vsnk_edge.bCreatePortGroup = OMX_FALSE;
    vdec_vsnk_edge.bForceDisableTiler = OMX_TRUE;
    vdec_vsnk_edge.szPortGroupName = NULL;
    vdec_vsnk_edge.eCompressionFormat = OMX_VIDEO_CodingUnused;
    vdec_vsnk_edge.eColorFormat = OMX_COLOR_FormatYUV420PackedSemiPlanar;
    vdec_vsnk_edge.nFrameWidth = FRAME_WIDTH;
    vdec_vsnk_edge.nFrameHeight = FRAME_HEIGHT;

    printf("\n omx_ilclient_utl_connect_components (&vdec_vsnk_edge)\n");
    eError = omx_ilclient_utl_connect_components (&vdec_vsnk_edge);
    OMX_TEST_BAIL_IF_ERROR ( eError );
    printf("\n ########### VDEC[0]-->vsnk Tunnel setup %d \n",eError);
    }
    #endif
    
    
    B.R.
  • HI Rouyun,

    I believe the code shown in on McFW framework, is the similar can be achieve on Openmax framework? For some reason, I have to work out this on openmax framework before migrating to McFW.

    On OMX vsnk component, is the call back function(OMX_TI_VSNK_DataNotify) will get called when there is data ready? How should I call from application software to get the raw data when there is data received on vsnk component?

    Your advice do really save me from hard time. Thank you very much.

    Best regards,

    Cheng

  • This code I posed is for openMax. 

    I just suggest you move you codes to MCFW, because TI doesn't support openMax in DM8168.  

  • Hi Rouyun,

    I will move to MCFW once I am done with the snapshot thing.

    I had incorporated the tunnel from VDEC to VSNK as per your advice, but my program stuck when try to change VDEC component to IDLE_STATE(on the first component of VDEC). If I remove VDEC_VSNK tunnel code, then program can change VDEC compoenet to IDLE_STATE without any problem. Below is the section of source code

     

    OMX_ERRORTYPE omx_ilclient_connect_VDEC_VSNK(TunnelTestCtxt* pContext, OMX_U16 numStartChannelVdec, OMX_U16 numStartChannelVsnk, OMX_U16 nChannel)

    {
        omxILEdgeInfo          vdec_vsnk_edge;
        OMX_ERRORTYPE             eError = OMX_ErrorNone;
        char                                 channelName [OMX_MAX_STRINGNAME_SIZE + 1];
        int                                    i;
       
      vdec_vsnk_edge.sNode1.hComp                         = &(pContext->pnDecHandle[0]);

      vdec_vsnk_edge.sNode1.bMultiHandleSinglePortConnect = OMX_TRUE;

      vdec_vsnk_edge.sNode1.bEnablePort                   = OMX_TRUE;

      vdec_vsnk_edge.sNode1.bEnableNotify                 = OMX_TRUE;

      vdec_vsnk_edge.sNode1.nStartPortIndex               = OMX_VIDDEC_OUTPUT_PORT;

      vdec_vsnk_edge.sNode1.bUsePortIndexArrayList        = OMX_FALSE;

      vdec_vsnk_edge.sNode1.nNumPorts                     = 1;

      vdec_vsnk_edge.sNode1.nNumHandles                   = 16;//1;

      vdec_vsnk_edge.sNode1.nPortIndexIncrement           = 1;

      vdec_vsnk_edge.sNode1.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;

      vdec_vsnk_edge.sNode1.pPortIndexList                    = NULL;



      vdec_vsnk_edge.sNode2.hComp                         = &(pContext->hVSNK[0]);

    //  vdec_vsnk_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
      vdec_vsnk_edge.sNode2.bMultiHandleSinglePortConnect = OMX_TRUE;

      vdec_vsnk_edge.sNode2.bEnablePort                   = OMX_TRUE;

      vdec_vsnk_edge.sNode2.bEnableNotify                 = OMX_TRUE;

      vdec_vsnk_edge.sNode2.nStartPortIndex               = OMX_VSNK_INPUT_PORT_START_INDEX; 

      vdec_vsnk_edge.sNode2.bUsePortIndexArrayList        = OMX_FALSE;

      vdec_vsnk_edge.sNode2.nNumPorts                     = 1;

      vdec_vsnk_edge.sNode2.nPortIndexIncrement           = 1;

      vdec_vsnk_edge.sNode2.nNumHandles                   = 16;//1;

      vdec_vsnk_edge.sNode2.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;

      vdec_vsnk_edge.sNode2.pPortIndexList                = NULL;





      vdec_vsnk_edge.szEdgeName = "FQ_VDECOUT_00";

      vdec_vsnk_edge.bCreatePortGroup = OMX_FALSE;

     vdec_vsnk_edge.bForceDisableTiler = OMX_TRUE;

      vdec_vsnk_edge.szPortGroupName    = NULL;

      vdec_vsnk_edge.eCompressionFormat = OMX_VIDEO_CodingUnused;

      vdec_vsnk_edge.eColorFormat  = OMX_COLOR_FormatYUV420PackedSemiPlanar;

      vdec_vsnk_edge.nFrameWidth   = VSNK_GetFrameWidth();

      vdec_vsnk_edge.nFrameHeight  = VSNK_GetFrameHeight();

     
         eError = omx_ilclient_utl_connect_components (&vdec_vsnk_edge); 

         OMX_TEST_BAIL_IF_ERROR ( eError );

        printf("END: VDEC[0]-->vsnk  Tunnel setup %d \n",eError);

        return eError;
       
    OMX_TEST_BAIL:
        printf("\n ###########ERROR VDEC[0]-->vsnk  Tunnel setup %d \n",eError);
        return eError;


    }

        /*------------------------------------------------------------------------*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /* VDEC to the IDLE state                                           */
        /*------------------------------------------------------------------------*/
        for(i = 0; i < DECODE_CHANNEL; i++)
           {
               printf("DEC idle state: %d\n",i);
    //            (void) sendCommand(pContext->pnDecHandle[i], OMX_CommandStateSet,
    //                        OMX_StateIdle, pContext->pSem_Events_decode[i]);
                omx_ilclient_utl_comp_change_state(pContext->pnDecHandle[i],
                            OMX_StateIdle, pContext->pSem_Events_decode[i]);
            }

    Please assist me on this. Thank you very much for your advice/guidance.

     

  • Hi Rouyun,

    Thanks for guiding on this, after below changes I can only capture a video frames on VSNK component.

      vdec_vsnk_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
      vdec_vsnk_edge.sNode2.nNumPorts                     = nChannel;
      vdec_vsnk_edge.sNode2.nNumHandles                   = 1;
      vdec_vsnk_edge.nEdgeBufCnt = IL_CLIENT_EDBGEBUFCNT_DEFAULT;

    Please advise me on the following:

    1. The received buffer size is 662400 (for PAL signal, 720X576), I would expect file size to be 720X576X1.5 = 622080, is the extra bytes because of the nStride inside the image?

    2. How can I convert these raw image into a JPEG format image?

    Thank you very much.

    Best regards.