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: "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" : we see next code:
So, thanks for your attention, hope to clear this moment. -- С уважением, Слободенюк Александр Игоревич контактный телефон: +7-925-050-64-62 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le 5 janv. 2018 7:05 AM, "Слободенюк Александр Игоревич" <[hidden email]> a écrit :
Unless I'm missing something, it looks like a bug in the tutorial. Can you file a bug at bugs.gnome.org ?
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, 2018-01-05 at 15:38 -0500, Nicolas Dufresne wrote:
> [...] > > > > > > 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 ? No, this is actually correct. gst_app_src_push_buffer() the function takes ownership of the buffer, the signal doesn't and can't. Signal arguments are only borrowed by the signal handlers, ownership stays with the signal emitter. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (981 bytes) Download Attachment |
Le 5 janv. 2018 4:20 PM, "Sebastian Dröge" <[hidden email]> a écrit : On Fri, 2018-01-05 at 15:38 -0500, Nicolas Dufresne wrote: Ok, still worth filing a bug, we could add a mention in the signal handler, even if slightly redundant, it would help.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks a lot, now I see. It was tricky, because I didn't find the documentation for signal in the web. But in appsrc's code it exists: /** * GstAppSrc::push-buffer: * @appsrc: the appsrc * @buffer: a buffer to push * * Adds a buffer to the queue of buffers that the appsrc element will * push to its source pad. This function does not take ownership of the * buffer so the buffer needs to be unreffed after calling this function. * And the web-page only says: ---- The main way of handing data to the appsrc element is by calling the gst_app_src_push_buffer() method or by emitting the push-buffer action signal.---- is not a signal handler for "push-buffer", that's what's tricky. -- С уважением, Слободенюк Александр Игоревич контактный телефон: +7-925-050-64-62 06.01.2018, 05:01, "Nicolas Dufresne" <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Nicolas Dufresne-5
Created a minor bug: https://bugzilla.gnome.org/show_bug.cgi?id=792265 Once again, thanks for help. -- С уважением, Слободенюк Александр Игоревич контактный телефон: +7-925-050-64-62 06.01.2018, 05:01, "Nicolas Dufresne" <[hidden email]>:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |