diff options
author | David Schleef <ds@schleef.org> | 2010-12-15 12:45:38 -0800 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2010-12-15 12:47:02 -0800 |
commit | 7ae4aaaee6831b9c8bad3c25e99d735435a2a1e0 (patch) | |
tree | f14fa42fe2350df361e280e1ec63a69eb04f8305 | |
parent | c8d9cc5770667828bf4fd56db810851b4636bf29 (diff) |
element-maker: Clean up directory
-rw-r--r-- | tools/Makefile.am | 48 | ||||
-rw-r--r-- | tools/element-templates/audiofilter (renamed from tools/gstaudiofilter.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/audiosink (renamed from tools/gstaudiosink.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/audiosrc (renamed from tools/gstaudiosrc.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/base (renamed from tools/base.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/baseaudiosink (renamed from tools/gstbaseaudiosink.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/baseaudiosrc (renamed from tools/gstbaseaudiosrc.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/basertpdepayload (renamed from tools/gstbasertpdepayload.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/basertppayload (renamed from tools/gstbasertppayload.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/basesink (renamed from tools/gstbasesink.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/basesrc (renamed from tools/gstbasesrc.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/basetransform (renamed from tools/gstbasetransform.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/cddabasesrc (renamed from tools/gstcddabasesrc.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/element (renamed from tools/gstelement.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/gobject (renamed from tools/gobject.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/pushsrc (renamed from tools/gstpushsrc.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/sinkpad (renamed from tools/sinkpad.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/sinkpad-simple (renamed from tools/sinkpad-simple.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/srcpad (renamed from tools/srcpad.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/srcpad-simple (renamed from tools/srcpad-simple.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/tagdemux (renamed from tools/gsttagdemux.c) | 1 | ||||
-rw-r--r-- | tools/element-templates/videosink (renamed from tools/gstvideosink.c) | 1 | ||||
-rwxr-xr-x | tools/gst-element-maker (renamed from tools/element-maker) | 65 |
23 files changed, 80 insertions, 54 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index f501ef353..ceb8be87f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,24 +1,28 @@ +templatefiles=\ + element-templates/audiofilter \ + element-templates/audiosink \ + element-templates/audiosrc \ + element-templates/base \ + element-templates/baseaudiosink \ + element-templates/baseaudiosrc \ + element-templates/basertpdepayload \ + element-templates/basertppayload \ + element-templates/basesink \ + element-templates/basesrc \ + element-templates/basetransform \ + element-templates/cddabasesrc \ + element-templates/element \ + element-templates/gobject \ + element-templates/pushsrc \ + element-templates/sinkpad \ + element-templates/sinkpad-simple \ + element-templates/srcpad \ + element-templates/srcpad-simple \ + element-templates/tagdemux \ + element-templates/videosink + EXTRA_DIST = \ - element-maker \ - base.c \ - gobject.c \ - gstaudiofilter.c \ - gstaudiosink.c \ - gstaudiosrc.c \ - gstbaseaudiosink.c \ - gstbaseaudiosrc.c \ - gstbasertpdepayload.c \ - gstbasertppayload.c \ - gstbasesink.c \ - gstbasesrc.c \ - gstbasetransform.c \ - gstcddabasesrc.c \ - gstelement.c \ - gstpushsrc.c \ - gsttagdemux.c \ - gstvideosink.c \ - sinkpad.c \ - sinkpad-simple.c \ - srcpad.c \ - srcpad-simple.c + gst-element-maker \ + $(templatefiles) + diff --git a/tools/gstaudiofilter.c b/tools/element-templates/audiofilter index 698e756b4..2d0929364 100644 --- a/tools/gstaudiofilter.c +++ b/tools/element-templates/audiofilter @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstAudioFilter % TYPE_CLASS_NAME diff --git a/tools/gstaudiosink.c b/tools/element-templates/audiosink index 645993ae0..2a1b7a421 100644 --- a/tools/gstaudiosink.c +++ b/tools/element-templates/audiosink @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstAudioSink % TYPE_CLASS_NAME diff --git a/tools/gstaudiosrc.c b/tools/element-templates/audiosrc index 051211e56..fe4f6129f 100644 --- a/tools/gstaudiosrc.c +++ b/tools/element-templates/audiosrc @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstAudioSrc % TYPE_CLASS_NAME diff --git a/tools/base.c b/tools/element-templates/base index 990168a31..44d652892 100644 --- a/tools/base.c +++ b/tools/element-templates/base @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % copyright /* GStreamer diff --git a/tools/gstbaseaudiosink.c b/tools/element-templates/baseaudiosink index 695b685fb..4d6555d7d 100644 --- a/tools/gstbaseaudiosink.c +++ b/tools/element-templates/baseaudiosink @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseAudioSink % TYPE_CLASS_NAME diff --git a/tools/gstbaseaudiosrc.c b/tools/element-templates/baseaudiosrc index 6ef302b0e..8b0e4ab0e 100644 --- a/tools/gstbaseaudiosrc.c +++ b/tools/element-templates/baseaudiosrc @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseAudioSrc % TYPE_CLASS_NAME diff --git a/tools/gstbasertpdepayload.c b/tools/element-templates/basertpdepayload index 8257a3271..8b40e5265 100644 --- a/tools/gstbasertpdepayload.c +++ b/tools/element-templates/basertpdepayload @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseRTPDepayload % TYPE_CLASS_NAME diff --git a/tools/gstbasertppayload.c b/tools/element-templates/basertppayload index 65d216f64..1a5be183d 100644 --- a/tools/gstbasertppayload.c +++ b/tools/element-templates/basertppayload @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseRTPPayload % TYPE_CLASS_NAME diff --git a/tools/gstbasesink.c b/tools/element-templates/basesink index 26ad3f921..bf018283d 100644 --- a/tools/gstbasesink.c +++ b/tools/element-templates/basesink @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseSink % TYPE_CLASS_NAME diff --git a/tools/gstbasesrc.c b/tools/element-templates/basesrc index 048e274dd..0b7e56fc1 100644 --- a/tools/gstbasesrc.c +++ b/tools/element-templates/basesrc @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseSrc % TYPE_CLASS_NAME diff --git a/tools/gstbasetransform.c b/tools/element-templates/basetransform index 7dcbc8588..e5fd24cf3 100644 --- a/tools/gstbasetransform.c +++ b/tools/element-templates/basetransform @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstBaseTransform % TYPE_CLASS_NAME diff --git a/tools/gstcddabasesrc.c b/tools/element-templates/cddabasesrc index 201a843c9..d788d19c4 100644 --- a/tools/gstcddabasesrc.c +++ b/tools/element-templates/cddabasesrc @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstCddaBaseSrc % TYPE_CLASS_NAME diff --git a/tools/gstelement.c b/tools/element-templates/element index c9e05c66c..ed025ee2b 100644 --- a/tools/gstelement.c +++ b/tools/element-templates/element @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstElement % TYPE_CLASS_NAME diff --git a/tools/gobject.c b/tools/element-templates/gobject index dc5392d86..4ef34e6c2 100644 --- a/tools/gobject.c +++ b/tools/element-templates/gobject @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % includes % prototypes diff --git a/tools/gstpushsrc.c b/tools/element-templates/pushsrc index a35595085..4dfb67849 100644 --- a/tools/gstpushsrc.c +++ b/tools/element-templates/pushsrc @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstPushSrc % TYPE_CLASS_NAME diff --git a/tools/sinkpad.c b/tools/element-templates/sinkpad index 87babbc7f..6d3bad1fb 100644 --- a/tools/sinkpad.c +++ b/tools/element-templates/sinkpad @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % instance-members GstPad *sinkpad; diff --git a/tools/sinkpad-simple.c b/tools/element-templates/sinkpad-simple index 9a031fc15..e8538b6ec 100644 --- a/tools/sinkpad-simple.c +++ b/tools/element-templates/sinkpad-simple @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % instance-members GstPad *sinkpad; diff --git a/tools/srcpad.c b/tools/element-templates/srcpad index 61cbd2132..d1f799267 100644 --- a/tools/srcpad.c +++ b/tools/element-templates/srcpad @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % instance-members GstPad *srcpad; diff --git a/tools/srcpad-simple.c b/tools/element-templates/srcpad-simple index 42db8d385..0fca9157e 100644 --- a/tools/srcpad-simple.c +++ b/tools/element-templates/srcpad-simple @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % instance-members GstPad *srcpad; diff --git a/tools/gsttagdemux.c b/tools/element-templates/tagdemux index 6cdfb58d8..8517c5802 100644 --- a/tools/gsttagdemux.c +++ b/tools/element-templates/tagdemux @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstTagDemux % TYPE_CLASS_NAME diff --git a/tools/gstvideosink.c b/tools/element-templates/videosink index 72a9e8878..d26de559b 100644 --- a/tools/gstvideosink.c +++ b/tools/element-templates/videosink @@ -1,3 +1,4 @@ +/* vim: set filetype=c: */ % ClassName GstVideoSink % TYPE_CLASS_NAME diff --git a/tools/element-maker b/tools/gst-element-maker index 60dc35d3b..816385d96 100755 --- a/tools/element-maker +++ b/tools/gst-element-maker @@ -2,6 +2,7 @@ prefix=gst +templatedir=element-templates while [ "$1" ] ; do case $1 in @@ -43,7 +44,7 @@ if [ "$name" = "" -o "$class" = "" ] ; then exit 1 fi -if [ ! -f "gst$class.c" ] ; then +if [ ! -f "element-templates/$class" ] ; then echo "Template file for $class not found." exit 1 fi @@ -69,11 +70,11 @@ if [ "$EMAIL_ADDRESS" = "" ] ; then EMAIL_ADDRESS=fixme@example.com fi -source=gst$class.c -pkg=`grep -A 10000 '^% pkg-config' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` -GST_TYPE_BASE_REPLACE=`grep -A 10000 '^% TYPE_CLASS_NAME' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` -GstBaseReplace=`grep -A 10000 '^% ClassName' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` -pads=`grep -A 10000 '^% pads' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` + +pkg=`grep -A 10000 '^% pkg-config' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` +GST_TYPE_BASE_REPLACE=`grep -A 10000 '^% TYPE_CLASS_NAME' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` +GstBaseReplace=`grep -A 10000 '^% ClassName' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` +pads=`grep -A 10000 '^% pads' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1` generate () { @@ -115,7 +116,7 @@ cat <<-EOF */ EOF -#grep -A 10000 '^% copyright' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +#grep -A 10000 '^% copyright' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 cat <<EOF @@ -125,9 +126,9 @@ cat <<EOF EOF -grep -A 10000 '^% includes' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% includes' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% includes' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 cat <<EOF #include "gstreplace.h" @@ -136,12 +137,12 @@ cat <<EOF EOF -grep -A 10000 '^% prototypes' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% prototypes' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% prototypes' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% prototypes' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% prototypes' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% prototypes' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 for each in $pads do - grep -A 10000 '^% prototypes' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% prototypes' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done cat <<EOF @@ -157,7 +158,7 @@ EOF for each in $pads do - grep -A 10000 '^% pad-template' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% pad-template' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done cat <<EOF @@ -176,7 +177,7 @@ EOF for each in $pads do - grep -A 10000 '^% base-init' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% base-init' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done cat <<EOF @@ -189,15 +190,15 @@ static void gst_replace_class_init (GstReplaceClass * klass) { EOF -grep -A 10000 '^% declare-class' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% declare-class' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% declare-class' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% declare-class' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% declare-class' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% declare-class' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 echo -grep -A 10000 '^% set-methods' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% set-methods' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% set-methods' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% set-methods' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% set-methods' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% set-methods' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 cat <<EOF @@ -210,7 +211,7 @@ EOF for each in $pads do - grep -A 10000 '^% instance-init' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% instance-init' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done @@ -219,12 +220,12 @@ cat <<EOF EOF -grep -A 10000 '^% methods' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% methods' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% methods' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% methods' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% methods' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% methods' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 for each in $pads do - grep -A 10000 '^% methods' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% methods' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done @@ -267,7 +268,7 @@ EOF generate_header () { -grep -A 10000 '^% copyright' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% copyright' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 cat <<EOF #ifndef _GST_REPLACE_H_ @@ -275,9 +276,9 @@ cat <<EOF EOF -grep -A 10000 '^% includes' base.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% includes' gobject.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 -grep -A 10000 '^% includes' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/base | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/gobject | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 +grep -A 10000 '^% includes' $templatedir/$class | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 cat <<EOF @@ -305,7 +306,7 @@ EOF for each in $pads do - grep -A 10000 '^% instance-members' $each.c | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 + grep -A 10000 '^% instance-members' $templatedir/$each | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1 done cat <<EOF |