summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/audio/make_filter
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/audio/make_filter')
-rwxr-xr-xgst-libs/gst/audio/make_filter35
1 files changed, 35 insertions, 0 deletions
diff --git a/gst-libs/gst/audio/make_filter b/gst-libs/gst/audio/make_filter
new file mode 100755
index 00000000..6a8efcad
--- /dev/null
+++ b/gst-libs/gst/audio/make_filter
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+Template=$1;
+srcfile=$2;
+
+if test x"$1" = x ; then
+ echo "$0 Objectname [srcfile]\n";
+ echo " creates gstobjectname.{c,h} implementing GstObjectname,\n";
+ echo " subclassing GstAudiofilter.\n";
+ exit 1;
+fi
+
+if test x"$2" = x ; then
+ srcfile="gstaudiofiltertemplate.c"
+fi
+
+id=$(echo '$Id$' | sed \
+ -e 's/\$I[d]: \([^$]*\)\$/\1/g' \
+ )
+echo $id
+
+TEMPLATE=$(echo $Template | tr a-z A-Z)
+template=$(echo $Template | tr A-Z a-z)
+
+# remember to break up the Id: in the line below
+sed \
+ -e 's/gstaudiofiltertemplate\.c/SOURCEFILE/g' \
+ -e "s/AudiofilterTemplate/$Template/g" \
+ -e "s/audiofiltertemplate/$template/g" \
+ -e "s/VIDEOFILTERTEMPLATE/$TEMPLATE/g" \
+ -e 's/\$I[d]: \([^$]*\)\$/\1/g' \
+ -e 's/SOURCEFILE/gstaudiofiltertemplate\.c/g' \
+ -e "s%MAKEFILTERVERSION%$id%g" \
+ $srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c
+