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.

[DM8148]: Capture Encode thread problem

Hello TI agents,


In the Capture/Encode demo provided by TI, there is a thread used for writing the compressed video to a file. I am not using this functionality. Therefore I want to remove the OuputBitstream thread which is not used in my case.


Unfortunately, I can't handle this and my application is stuck in the middle of nowhere when removing this thread.

As I can see, the thread fills encode component buffer then it reads the output port buffer pipe. Then it writes the encoded video to a file and finally it fills encode component buffer once more (and I don't really know why).


Could someone explain to me how to manage this ?

Thank you very much.

Dylan

  • Hello,

    In capture_encode demo after the VFCC component is connected DEI component. DEI OMX component integrated dual output driver, hance it  is must to have two outputs. You can ignore the other output and whenever fillBufferDone call comes for that port, you can call FillThisBuffer without processing anything. This way DEI will be opertaing in dual o/p mode without Encoder.

    Best Regards,

    Margarita

  • Hello Margarita,


    I did not clearly explain my situation. I would like to keep the encode component to compress the video frames and send the frames over RTP. This is currently working. I just don't want to keep the Output_bistream thread which seems to be useless but is still required in my application (otherwise it crashes).

    My question is, can I keep Encoder component in the application but just with one thread (connIn thread) and without the writing to a file operation ?

    Thank you for your quick reply

  • Hello,

    I am still looking for a solution here. If anybody can help me, it would be great.

    Thank you


    Dylan

  • Hello,

    I am sorry for the delay. I will check it and I will let you know.

    You want to remove IL_ClientOutputBitStreamWriteTask() right?

    Best Regards,

    Margarita

  • Yes exactly. I would like to remove IL_ClientOutputBitStreamWriteTask() because I don't need to write into a file which is the main task of this thread.

    I want to use the encode component just for streaming purposes but I actually don't need to  have another thread running just for this.

    Thank you for your help.

    Dylan

  • Hello,

    Comment or remove:

        /* write data to output file */
        fwrite (pBufferOut->pBuffer,
                sizeof (char),
                pBufferOut->nFilledLen, ((IL_Client *) threadsArg)->fOut);


    in IL_ClientOutputBitStreamWriteTask() function. If you do this it still will ask you for output file but it will be empty file (0 size) so  you could remove everything with open output file and etc in the demo.

    Best Regards,

    Margarita

  • Margarita,

    Thank you for your fast reply. Unfortunately, removing the file write operations doesn't avoid a new thread creation.

    The main goal here is to reduce the number of created threads on OMX application. Currently, in IL_ClientOutputBitStreamWriteTask() I am just reading a pipe and calling OMX_FillThisBuffer() (after removing the write into file operation).

    So the question is what do I need to change to the OMX application to still get it work without creating IL_ClientOutputBitStreamWriteTask() thread ? What do I have to add/change to IL_ClientConnInConnOutTask thread or elsewhere to make this work ?

    Thanks again for your help

  • Hello,

    I am sorry for the delay. I can not set your use case at this moment but you could try:

    1) When you get cmd IL_CLIENT_PIPE_CMD_FBD for enc component in IL_ClientConnInConnOutTask(), you have to explicitly check in IL_ClientProcessPipeCmdFBD() if this is enc component then fir FILLThisBuffer or

    2) Use a different FBD for enc component which just calls FIllThisBuffer


    Best Regards,

    Margarita

  • Hello Margarita,


    I'll try this solution and I'll let you know. Thank you for your help

    Best regards,

    Dylan