summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/audio/make_filter
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2004-01-16 00:55:29 +0000
committerDavid Schleef <ds@schleef.org>2004-01-16 00:55:29 +0000
commit7d64f26d2546be8ff1bcc4bb851108cb50384c58 (patch)
tree8ec2bfc3fdd7244c33946a34e685a124fffbc985 /gst-libs/gst/audio/make_filter
parent5404ac52f9ea35330439cce0cce266fab8649e14 (diff)
downloadgst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.tar.gz
gst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.tar.bz2
gst-plugins-bad-7d64f26d2546be8ff1bcc4bb851108cb50384c58.zip
gst-libs/gst/audio/Makefile.am: Add gstaudiofiltertemplate.c and building of gstaudiofilterexample.c from the template.
Original commit message from CVS: * gst-libs/gst/audio/Makefile.am: Add gstaudiofiltertemplate.c and building of gstaudiofilterexample.c from the template. * gst-libs/gst/audio/gstaudiofilter.c: * gst-libs/gst/audio/gstaudiofilter.h: Add bytes_per_sample and size and n_samples calculation. * gst-libs/gst/audio/gstaudiofilterexample.c: Remove, now autogenerated. * gst-libs/gst/audio/gstaudiofiltertemplate.c: Moved from gstaudiofilterexample, object name changed, code added so that it actually works. * gst-libs/gst/audio/make_filter: Script to build an audiofilter subclass from the template. * gst/colorspace/Makefile.am: * gst/colorspace/yuv2yuv.c: Remove file, since it's GPL, and we don't use it.
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
+