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 564482 - [appsrc] semantics of push-buffer signal awkward for bindings
[appsrc] semantics of push-buffer signal awkward for bindings
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks: 564421
 
 
Reported: 2008-12-14 13:29 UTC by Tim-Philipp Müller
Modified: 2008-12-15 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2008-12-14 13:29:00 UTC
The 'push-buffer' signal takes ownership of the buffer argument when doing

  g_signal_emit_by_name (appsrc, 'push-buffer', buf);

This is unintuitive (no other g* api behaves that way afaik), and also broken for bindings, which usually don't provide API to do an explicit gst_buffer_ref() on the C buffer, which they'd need to use this signal, so (AFAICT) it's pretty much impossible to do an appsrc.signal_emit_by_name ('push', buf) in gst-python.

I think we should change the behaviour here.

Arguably, eventually libgstapp* would be in -base and bound and apps would just use that, but I still think it's worth fixing.
Comment 1 Wim Taymans 2008-12-15 12:02:33 UTC
        * examples/app/appsrc-ra.c: (feed_data):
        * examples/app/appsrc-seekable.c: (feed_data):
        * examples/app/appsrc-stream.c: (read_data):
        * examples/app/appsrc-stream2.c: (feed_data):
        Fix example to unref after emiting the push-buffer action.

        * gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
        (gst_app_src_push_buffer_full), (gst_app_src_push_buffer),
        (gst_app_src_push_buffer_action):
        Don't take the ref on the buffer in push-buffer action because it's too
        awkward for bindings. Fixes #564482.