After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792265 - appsrc: uncertainty moment in the documentation
appsrc: uncertainty moment in the documentation
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-06 08:06 UTC by Aleksandr Slobodeniuk
Modified: 2018-11-03 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Aleksandr Slobodeniuk 2018-01-06 08:06:33 UTC
About the ownership of the buffer, when pushing it to appsrc.

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html#gst-app-src-push-buffer

Function takes ownership, but signal doesn't.

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.
----
 
But gst_app_src_push_buffer
is not a signal handler for "push-buffer", that's what's tricky.
Comment 1 Tim-Philipp Müller 2018-01-07 21:02:00 UTC
The problem is that it's in the documentation twice, once as library API in libgstapp, and once as element:

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-appsrc.html#gst-plugins-base-plugins-appsrc.signals

Without the description from the doc chunk though.
Comment 2 Tim-Philipp Müller 2018-01-15 16:40:44 UTC
I don't really know what to do about this to be honest. Do you have any suggestions?

The documentation for gst_app_src_push_buffer() is correct.

Arguments to g_signal_emit() never take ownership, that's a GObject thing.
Comment 3 GStreamer system administrator 2018-11-03 12:02:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/412.