PDA

View Full Version : Port definition: nBufferCountMin



pedwo
09-02-2008, 02:49 AM
In the OMX_PARAM_PORTDEFINITIONTYPE struct, there are two fields related to the number of buffers required on a port. From the spec, the nBufferCountActual field is used to gate a port being enabled/populated & this can be modified by the IL Client. The nBufferCountMin field is specified by the component & the Client can't change it.

So, at initialisation, does a component set both fields to the minimum number of buffers that the port needs? Then should the client modify the nBufferCountActual before it calls AllocateBuffer/UseBuffer on the port?

I guess that this is used so that the client (or OMX Core when tunnelling) determines the highest value of nBufferCountMin on the transmitting and receiving ports so that ports don't get enabled until both ports have the same number of buffers. Is this correct?

Thanks
Phil

bsmets
09-09-2008, 05:17 AM
So, at initialisation, does a component set both fields to the minimum number of buffers that the port needs?

>> typically a component puts nBufferCountActual = nBufferCountMin at initialisation.

Then should the client modify the nBufferCountActual before it calls AllocateBuffer/UseBuffer on the port?

>> yes if not tunneling. This value is used to determine when a port is populated.

BR, Bruno