Compositor: Using v4l2 poolbuffer allocation

Pablo ANTON pablo.anton at vodalys-labs.com
Wed Mar 18 10:22:16 PDT 2015


Hello all,

We are working with Compositor plugin. We are trying to create a pipeline
as follow:

src0 <--->
                   compositor   <-----> v4l2h264encoder <------>
h264parse......
src1 <---->

For optimizing the use of buffers we are trying to use the v4l2h264encoder
sink pad bufferpool into the compositor src pad. For that, we had
implemented next methods to negotiate the allocation:

1. Into v4l2videoenc the propose_allocation method which basically is a
copy of v4l2transform propose_allocation.
2. Into videoaggregator we are implement three methods (do_bufferpool,
set_allocation, decide_allocation) to configure the allocation of the src
pad and perform the allocation query, depending on the sink pads caps.

Thus, everything seems to work fine, v4l2h264encoder gives us the
bufferpool, we configure it and finally we use it into
gst_videoaggregator_get_output_buffer when we want to acquire a new output
buffer.

The problem comes when v4l2h264encoder receives a buffer before it has
pushed the previous buffer. This situation only happend with the first
buffer of the stream and only if we try to use the bufferpool from the
encoder. In that case, the pushed buffer (from the v4l2h264encoder src to
h264parse sink) won't be the correct one. That cause h264parse does't parse
the NALs correctly and nothing works.

I don't know if I did well the configuration of the pool or if this is a
problem of the v4l2h264encoder (or any parent - v4l2videoenc, videoencoder).

Thanks in advance, Any help will be appreciated!

Best regards.

-- 
*Pablo Anton*

14 rue du Pâtis Tatelin
Bâtiment D
35700 - Rennes

http://www.vodalys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150318/6a215985/attachment.html>


More information about the gstreamer-devel mailing list