gst_plugins_base/gst-libs/gst/audio/make_filter
branchRCL_3
changeset 30 7e817e7e631c
parent 0 0e761a78d257
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_base/gst-libs/gst/audio/make_filter	Wed Sep 01 12:16:41 2010 +0100
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+LANG=C
+LC_COLLATE=C
+export LANG
+export LC_COLLATE
+
+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: make_filter,v 1.3 2004-04-19 22:51:56 ds Exp $' | sed \
+	-e 's/\$I[d]: \([^$]*\)\$/\1/g'`
+echo $id
+
+TEMPLATE=`echo $Template | tr [:lower:] [:upper:]`
+template=`echo $Template | tr [:upper:] [:lower:]`
+
+echo TEMPLATE $TEMPLATE
+echo template $template
+
+# 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
+