GNOME Bugzilla – Bug 339767
An example of subclassing GstBaseTransform
Last modified: 2006-04-28 17:47:43 UTC
Attached is an example of implementing GstBaseTransform-based element that finally works, although it has the "buffer refcount is still too large"-problem and requires a workaround described here: http://permalink.gmane.org/gmane.comp.video.gstreamer.devel/15212 (no bug and patch, because I'm sure that it is certainly NOT the right way to fix the problem)
Created attachment 64296 [details] The example itself
After looking deeper, and with the following commits, gst-python is now doing the proper refcounting. The problem is in fact in the C GstBaseTransform class. You just showed a case where the refcounting is too big for ::transform_ip() when you don't implement the prepare_output_buffer() virtual method. 2006-04-28 Edward Hervey <edward@fluendo.com> * gst/arg-types.py: Caps used as arguments of virtual methods should keep their initial refcount when calling the python methods. This is similar to the patch done for GstMiniObjects. * gst/gstbase.override: Adjust the gst.BaseTransform.get_unit_size() virtual method for above fix. 2006-04-28 Edward Hervey <edward@fluendo.com> * gst/arg-types.py: GstMiniObject used as virtual methods parameters should be unreffed before calling the method and the ref-ed. Added Params and Returns for const-gchar*, GType and gulong so the code generator can generate more virtual methods handlers/proxys. * gst/gst-types.defs: * gst/gst.defs: * gst/interfaces.defs: Added vtable and virtual method definition for interfaces so we can properly use virtual methods from those interfaces in python.
Filed a proper bug against GStreamer (core). #340045 Closing this bug. *** This bug has been marked as a duplicate of 340045 ***