<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hello all,<br><br></div>We are working with Compositor plugin. We are trying to create a pipeline as follow:<br><br></div>src0 <--->  <br>                   compositor   <-----> v4l2h264encoder <------> h264parse......<br></div>src1 <----><br><br></div>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:<br><br>1. Into v4l2videoenc the propose_allocation method which basically is a copy of v4l2transform propose_allocation.<br></div>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.<br><br></div>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.<br><br></div>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. <br><br></div>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).<br><br></div>Thanks in advance, Any help will be appreciated!<br><br></div>Best regards.<br><div><div><div><div><div><div><div><div><div><div><div><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(153,153,153)"><b>Pablo Anton</b></span><br><br><font size="1">14 rue du Pâtis Tatelin</font><br><font size="1">Bâtiment D</font><br><font size="1">35700 - Rennes</font><br><br><a href="http://www.vodalys.com" target="_blank">http://www.vodalys.com</a><br></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>