gstreamer/gst-libs/gst/audio/make_filter
David Schleef 5dca8edfe9 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.
2004-01-16 00:55:29 +00:00

35 lines
858 B
Bash
Executable file

#!/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