[Bug 791211] omxvideodec/enc: update nBufferCountActual before allocating

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 17 13:35:15 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=791211

--- Comment #10 from Guillaume Desmottes <gdesmott at gnome.org> ---
Created attachment 372150
  --> https://bugzilla.gnome.org/attachment.cgi?id=372150&action=edit
omxvideodec/enc: add hack updating nBufferCountActual before allocating

The OMX specs states that the nBufferCountActual of a port has to default
to its nBufferCountMin. If we don't change nBufferCountActual we purely rely
on this default. But in some cases, OMX may change nBufferCountMin before we
allocate buffers. Like for example when configuring the input ports with the
actual format, it may decrease the number of minimal buffers required.
This method checks this and update nBufferCountActual if needed so we'll use
less buffers than the worst case in such scenarios.

SetParameter() needs to be called when the port is either disabled or
the component in the Loaded state.

Don't do this for the decoder output as
gst_omx_video_dec_allocate_output_buffers() already check
nBufferCountMin when computing the number of output buffers.

On some platform, like rpi, the default nBufferCountActual is much
higher than nBufferCountMin so only enable this using a specific gst-omx
hack.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list