<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Le 5 janv. 2018 7:05 AM, "Слободенюк Александр Игоревич" <<a href="mailto:alenuke@yandex.ru">alenuke@yandex.ru</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi everybody! Happy new year!!</div><div> </div><div>I guess I've found a little mismatch in the documentation, and can't understand, where's the truth.</div><div>It's about appsrc's push-buffer signal :</div><div> </div><div><a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html#gst-app-src-push-buffer" target="_blank">https://gstreamer.freedesktop.<wbr>org/data/doc/gstreamer/head/<wbr>gst-plugins-base-libs/html/<wbr>gst-plugins-base-libs-appsrc.<wbr>html#gst-app-src-push-buffer</a></div><div> </div><div>The documentation says:</div><div>"This function takes ownership of the buffer." .</div><div> </div><div>It looks the same comparing to gst_pad_push function:</div><div><a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-push" target="_blank">https://gstreamer.freedesktop.<wbr>org/data/doc/gstreamer/head/<wbr>gstreamer/html/GstPad.html#<wbr>gst-pad-push</a></div><div>"In all cases, success or failure, the caller loses its reference to <em><code>buffer</code></em> after calling this function."</div><div> </div><div>And what I can also see, is that gst-plugins-good's plugins don't unref the output buffer after pushing it downstream.</div><div><div> </div><div> </div><div>But when we take a look at tutorial 8 "Short-cutting the pipeline" :</div><div><a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html" target="_blank">https://gstreamer.freedesktop.<wbr>org/documentation/tutorials/<wbr>basic/short-cutting-the-<wbr>pipeline.html</a></div><div> </div><div>we see next code:</div><div> </div><pre><code>  <span>/* Push the buffer into the appsrc */</span>
  g_signal_emit_by_name <span>(</span>data<span>-></span>app_source<span>,</span> <span>"push-buffer"</span><span>,</span> buffer<span>,</span> <span>&</span>ret<span>)</span><span>;</span>

  <span>/* Free the buffer now that we are done with it */</span>
  gst_buffer_unref <span>(</span>buffer<span>)</span><span>;</span></code></pre></div><div> </div><div> </div><div>So, thanks for your attention, hope to clear this moment.</div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Unless I'm missing something, it looks like a bug in the tutorial. Can you file a bug at <a href="http://bugs.gnome.org">bugs.gnome.org</a> ?</div><div dir="auto"></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888"><div> </div><div> </div><div>-- </div><div>С уважением,</div><div>Слободенюк Александр Игоревич</div><div> </div><div>контактный телефон: <a href="tel:+7%20925%20050-64-62" value="+79250506462" target="_blank">+7-925-050-64-62</a></div><div> </div></font><br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div></div></div>