buffer ownership when pushing to appsrc
Nicolas Dufresne
nicolas at ndufresne.ca
Fri Jan 5 20:38:48 UTC 2018
Le 5 janv. 2018 7:05 AM, "Слободенюк Александр Игоревич" <alenuke at yandex.ru>
a écrit :
Hi everybody! Happy new year!!
I guess I've found a little mismatch in the documentation, and can't
understand, where's the truth.
It's about appsrc's push-buffer signal :
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/
gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.
html#gst-app-src-push-buffer
The documentation says:
"This function takes ownership of the buffer." .
It looks the same comparing to gst_pad_push function:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/
gstreamer/html/GstPad.html#gst-pad-push
"In all cases, success or failure, the caller loses its reference to
*buffer* after calling this function."
And what I can also see, is that gst-plugins-good's plugins don't unref the
output buffer after pushing it downstream.
But when we take a look at tutorial 8 "Short-cutting the pipeline" :
https://gstreamer.freedesktop.org/documentation/tutorials/
basic/short-cutting-the-pipeline.html
we see next code:
/* Push the buffer into the appsrc */
g_signal_emit_by_name (data->app_source, "push-buffer", buffer, &ret);
/* Free the buffer now that we are done with it */
gst_buffer_unref (buffer);
So, thanks for your attention, hope to clear this moment.
Unless I'm missing something, it looks like a bug in the tutorial. Can you
file a bug at bugs.gnome.org ?
--
С уважением,
Слободенюк Александр Игоревич
контактный телефон: +7-925-050-64-62 <+7%20925%20050-64-62>
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180105/66abc5f4/attachment.html>
More information about the gstreamer-devel
mailing list