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.

OMX_AllocateBuffer/OMX_UseBuffer

Expert 1100 points

Hi,

I have a question regarding buffer's allocation. In OMX chain does it matter which component does the allocation of buffers

and which uses them? What are the differences?

I work with ezsdk 5.03 and I built the following chain:

capture->dei->vlpb->display

When vlpb allocates buffers for input port and dei uses them for output buffers, the examples work just fine. But when dei allocates buffers for output port

and vlpb uses them for input port , the example stacks.

Thanks.

  • No it does not matter which component allocate and which use. I believe that TI has adopted the convention in its example to have the producer call OMX_AllocateBufefr and the consumer call OMX_UseBuffer, but that's only a convention.

    The fact that things work when you allocate in a certain order vs. an other may have to do with a mismatch in the specified buffer count. When configuring the OMX_PARAM_PORTDEFINITIONTYPE, you specify the actual number of buffer each component port will use (nBufferCountActual). If nBufferCountActual on the vlpb input is greater than nBufferCountActual on the dei output, you could seem a problem such as you describe. The nBufferCountActual of corresponding input/output should match.

    Bernard

  • Hi Bernard,

    Sorry for a late response, I wasn't at work. 

    I checked my example and there is no mismatch in the buffer count, nBufferCountActual on the vlpb input is equal to nBufferCountActual on the dei output.

  • Does the buffer size match as well? Because that could be a another source of problem.

  • Yes, buffer size match.