GNOME Bugzilla – Bug 690738
gst-element-maker Generates Incorrect Code
Last modified: 2013-02-06 22:53:21 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.
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.
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?
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.
Looks like Dave has hacked on this as well, without knowing about this patch :-/ Module: gst-plugins-bad Branch: master Commit: f790fcbfa68e103406381a2f2eb1c2445055d08d URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=f790fcbfa68e103406381a2f2eb1c2445055d08d Author: David Schleef <ds@schleef.org> 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(-) Diff: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/diff/?id=f790fcbfa68e103406381a2f2eb1c2445055d08d 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!