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 690738 - gst-element-maker Generates Incorrect Code
gst-element-maker Generates Incorrect Code
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
Other Windows
: Normal normal
: 1.0.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2012-12-26 15:06 UTC by john
Modified: 2013-02-06 22:53 UTC
See Also:
GNOME target: ---
GNOME version: ---

Work in progress porting gst-element-maker to 1.0 (6.72 KB, patch)
2013-01-02 14:07 UTC, Will Manley
none Details | Review

Description john 2012-12-26 15:06:46 UTC
Using gst-element-maker with the base class set to basetransform produces code that is incorrect and also does not compile.

1) Generating an element named MyFilter generates the macro GST_PLUGIN_DEFINE() but does not put quotes around the filter name "myfilter" and the code does not compile. 

2) The struct _GstMyFilterClass in gstymfilter.h includes a GstBaseTransformClass but also includes source and sink pads. Source and sink pads are built in to the GstBaseTransformClass and are not needed explicitly. These pads should be removed, and any code that uses these pads in the C file should also be removed.
Comment 1 Will Manley 2013-01-02 14:07:22 UTC
Created attachment 232524 [details] [review]
Work in progress porting gst-element-maker to 1.0

This is a work in progress patch.  It doesn't fix all issues but at least the elements derived from GstBaseTransform created by it will compile.
Comment 2 Tim-Philipp Müller 2013-01-06 23:03:33 UTC
Will, thanks a lot for working on this.

Should we commit this for the time being, or are you planning to improve/test this some more in the near future?
Comment 3 Will Manley 2013-01-07 16:51:46 UTC
TBH I don't think it's worth committing at the moment as it's not enough better and as I have made changes to gst-element-maker itself I would worry about having caused regressions in the other element types generated.
Comment 4 Tim-Philipp Müller 2013-02-06 22:53:21 UTC
Looks like Dave has hacked on this as well, without knowing about this patch :-/

Module: gst-plugins-bad
Branch: master
Commit: f790fcbfa68e103406381a2f2eb1c2445055d08d

Author: David Schleef <>
Date:   Wed Feb  6 12:35:36 2013 -0800

element-maker: Update somewhat for 1.0

Only converted basetransform for the moment.  It's probably easier
to write templates from scratch from the documentation.


 tools/element-templates/basetransform  |  170 +++++++++++++++++++++++---------
 tools/element-templates/gobject        |    4 +-
 tools/element-templates/sinkpad-simple |    2 +-
 tools/element-templates/srcpad-simple  |    2 +-
 tools/gst-element-maker                |   40 +++-----
 5 files changed, 143 insertions(+), 75 deletions(-)


Should probably just have pushed your stuff, sorry.

I'll close this bug then. John, please re-open if it still doesn't work with git master or the next release, thanks!