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.

New alg Link creation.

Hi all,

I have created a new Link for My algorithm(referring to swosdLink/dupLink).

During LinkCreate()  I have created a queue using below function call.  status = Utils_bufCreate(&pObj->outFrameQue,FALSE,FALSE);

Now, during init  I have initialized LinkObj as below.
linkObj.linkGetFullFrames = MyAlgLink_getFullFrames;
linkObj.linkPutEmptyFrames = MyalgLink_putEmptyFrames;

This is calling the MyAlgLink_getFullFrames() & MyalgLink_putEmptyFrames() functions everytime.

In MyAlgLink_getFullFrames() fun, i am getting the buffer from the queue what i have created during Create() call.

Calling below function to get new frame previos Link. System_getLinksFullFrames(pCreateArgs->inQueParams.prevLinkId,pCreateArgs->inQueParams.prevLinkQueId,&pObj->inFrameList);

After processing the frames I am putting buffs to next Link using below code.

   status = Utils_bufPutFullFrame(&pObj->outFrameQue, pFullFrame);
            UTILS_assert(status == FVID2_SOK);
             /* send SYSTEM_CMD_NEW_DATA to next link */
        System_sendLinkCmd(pObj->createArgs.outQueParams.nextLink,
                           SYSTEM_CMD_NEW_DATA);

  

Problem:

             After doing all this, i expect my next Link should pickup proper data. But instead it is picking wrong info. (width=0 height=0 size-0 and so on.) basically all info is zero.

My next Link is ipcFramesOutVpssToHost.

Not able to understand what is the problem!!


Please help!!

  • ravikiran hv said:
    Now, during init  I have initialized LinkObj as below.
    linkObj.linkGetFullFrames = MyAlgLink_getFullFrames;
    linkObj.linkPutEmptyFrames = MyalgLink_putEmptyFrames;

    These functions are called by the next link to your link to acquire and release the buffers.

    The onus of filling the right information in the buffer is on the link before it notifies the next link to consume the new data.

    Hope this explanation helps in your debug of your code.

  • Hi venugopala,

    Thanks for the support and suggestions.

    I am able to Crate and run the Link in expected way !!

    Thanks a lot :)