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.

Problem For DM8168 SWMS

Hello Very one.

 I ran into a problem When using swms。We SDK is DVRRDK_03.50.00.05。

 The Data Path is like this:  

               NullsrcLink (6 ch 1920x1080)  ->  swms  ->  display( two HD output ).

               My aim is to understand how to use SWMS。

 Problem:

I found that. NullsrcLink can not get empty buffer when after put full buffer to SWMS.

 Code fragment:

             NullSrcPrm.outQueParams.nextLink = dupId;

             NullSrcPrm.tilerEnable = FALSE;
             NullSrcPrm.timerPeriod = 16;
             NullSrcPrm.inputInfo.numCh = 6;

             for(i=0;i<NullSrcPrm.inputInfo.numCh;i++){
                     NullSrcPrm.inputInfo.chInfo[i].bufType = SYSTEM_BUF_TYPE_VIDFRAME;
                     NullSrcPrm.inputInfo.chInfo[i].memType = SYSTEM_MT_NONTILEDMEM;
                     NullSrcPrm.inputInfo.chInfo[i].codingformat = 0;
                     NullSrcPrm.inputInfo.chInfo[i].dataFormat = SYSTEM_DF_YUV420SP_UV;//SYSTEM_DF_YUV422I_YUYV;
                     NullSrcPrm.inputInfo.chInfo[i].scanFormat = 1;
                     NullSrcPrm.inputInfo.chInfo[i].width = 1920;
                     NullSrcPrm.inputInfo.chInfo[i].height = 1080;
                     NullSrcPrm.inputInfo.chInfo[i].startX = 0;
                     NullSrcPrm.inputInfo.chInfo[i].startY = 0;
                     NullSrcPrm.inputInfo.chInfo[i].pitch[0] = 1920*2;
                     NullSrcPrm.inputInfo.chInfo[i].pitch[1] = 1920*2;
              }

             dupPrm.inQueParams.prevLinkId = nullSrcId;
             dupPrm.inQueParams.prevLinkQueId = 0;
             dupPrm.numOutQue = 2;
             dupPrm.outQueParams[0].nextLink = swMsId[0];
             dupPrm.outQueParams[1].nextLink = swMsId[1];
             dupPrm.notifyNextLink = TRUE;

             for(i=0;i<2;i++){
                      swMsPrm[i].numSwMsInst = 1;
                      swMsPrm[i].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;
                      swMsPrm[i].swMsInstStartWin[0] = 0;

                      swMsPrm[i].inQueParams.prevLinkId = dupId;
                      swMsPrm[i].inQueParams.prevLinkQueId = 0;
                      swMsPrm[i].outQueParams.nextLink = displayId[i];
                      swMsPrm[i].maxInputQueLen = SYSTEM_SW_MS_DEFAULT_INPUT_QUE_LEN;
                      swMsPrm[i].maxOutRes = VSYS_STD_1080P_60;
                      swMsPrm[i].initOutRes = VSYS_STD_1080P_60;
                      swMsPrm[i].lineSkipMode = FALSE;//TRUE;
                      swMsPrm[i].enableLayoutGridDraw = FALSE;
                      swMsPrm[i].layoutPrm.outputFPS = 30;
                      swMsPrm[i].enableOuputDup = TRUE;
                      swMsPrm[i].outDataFormat = SYSTEM_DF_YUV422I_YUYV;
                      swMsPrm[i].outputBufModified = TRUE;
                      SixChannelSwMsSetLayoutPrm(&swMsPrm[i], 1);
             }

             displayPrm[0].inQueParams[0].prevLinkId = swMsId[0];

             displayPrm[0].inQueParams[0].prevLinkQueId = 0;
             displayPrm[0].displayRes = VSYS_STD_1080P_60;

             displayPrm[1].inQueParams[0].prevLinkId = swMsId[1];
             displayPrm[1].inQueParams[0].prevLinkQueId = 0;
             displayPrm[1].displayRes = VSYS_STD_1080P_60;

BTW :I can confirm NullSrcLink is config right。

So somebody can tell me, where is wrong  for SWMS? 

Thank You !

Looking forward to your reply。

  • Check if you are doing System_linkStart of both swms mosaic links. There are also some issues with your usecase .Pls fix them:

     

                   swMsPrm[i].layoutPrm.outputFPS = 30;            ---> this should be 60          

                    swMsPrm[i].enableOuputDup = TRUE;             --->This should be FALSE

     

  • Hi Badri

    We're sorry, the reasons for the weekend now reply to you.

    As your said , I had modify my code。But  like with the previous results. The NullsrcLink can not Get Empty Buffer.

    But if I just create only one swms and one display. Everything look like OK.(The NullsrcLink can Get Empty Buffer. )

    So I confuse that and did not know where has problem? How Can I create two SWMS for two Display?

    Can you help me?

    Looking forward to your reply!

    Thank You very Much!

  • Check if you are starting both displays. Share logs of Vsys_printBufferStatistics. If you are using link APIs directly refer the implementation of Vsys_printBufferStatistics and share the log by invoking the same link control cmds.

  • Hi Badri 

    Thank you for your reply! 

    Thank you very much for your help。 I have solved this problem。Because I wrote the code wrong。

    Two SWMS I had used up!


    Thanks again for your help!