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 339767 - An example of subclassing GstBaseTransform
An example of subclassing GstBaseTransform
Status: RESOLVED DUPLICATE of bug 340045
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal enhancement
: 0.10.5
Assigned To: GStreamer Maintainers
Johan (not receiving bugmail) Dahlin
Depends on: 340045
Blocks:
 
 
Reported: 2006-04-26 01:10 UTC by Артём Попов
Modified: 2006-04-28 17:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
The example itself (5.75 KB, text/x-python)
2006-04-26 01:11 UTC, Артём Попов
Details

Description Артём Попов 2006-04-26 01:10:36 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)
Comment 1 Артём Попов 2006-04-26 01:11:32 UTC
Created attachment 64296 [details]
The example itself
Comment 2 Edward Hervey 2006-04-28 17:38:06 UTC
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.

Comment 3 Edward Hervey 2006-04-28 17:47:43 UTC
Filed a proper bug against GStreamer (core). #340045
Closing this bug.

*** This bug has been marked as a duplicate of 340045 ***