GNOME Bugzilla – Bug 564482
[appsrc] semantics of push-buffer signal awkward for bindings
Last modified: 2008-12-15 12:02:33 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.
* 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.