mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
element-maker: Clean up directory
This commit is contained in:
parent
c8d9cc5770
commit
7ae4aaaee6
23 changed files with 80 additions and 54 deletions
|
@ -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 = \
|
EXTRA_DIST = \
|
||||||
element-maker \
|
gst-element-maker \
|
||||||
base.c \
|
$(templatefiles)
|
||||||
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
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstAudioFilter
|
GstAudioFilter
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstAudioSink
|
GstAudioSink
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstAudioSrc
|
GstAudioSrc
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% copyright
|
% copyright
|
||||||
/* GStreamer
|
/* GStreamer
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseAudioSink
|
GstBaseAudioSink
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseAudioSrc
|
GstBaseAudioSrc
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseRTPDepayload
|
GstBaseRTPDepayload
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseRTPPayload
|
GstBaseRTPPayload
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseSink
|
GstBaseSink
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseSrc
|
GstBaseSrc
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstBaseTransform
|
GstBaseTransform
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstCddaBaseSrc
|
GstCddaBaseSrc
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstElement
|
GstElement
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% includes
|
% includes
|
||||||
% prototypes
|
% prototypes
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstPushSrc
|
GstPushSrc
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% instance-members
|
% instance-members
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% instance-members
|
% instance-members
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% instance-members
|
% instance-members
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
|
|
||||||
% instance-members
|
% instance-members
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstTagDemux
|
GstTagDemux
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* vim: set filetype=c: */
|
||||||
% ClassName
|
% ClassName
|
||||||
GstVideoSink
|
GstVideoSink
|
||||||
% TYPE_CLASS_NAME
|
% TYPE_CLASS_NAME
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
prefix=gst
|
prefix=gst
|
||||||
|
templatedir=element-templates
|
||||||
|
|
||||||
while [ "$1" ] ; do
|
while [ "$1" ] ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -43,7 +44,7 @@ if [ "$name" = "" -o "$class" = "" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "gst$class.c" ] ; then
|
if [ ! -f "element-templates/$class" ] ; then
|
||||||
echo "Template file for $class not found."
|
echo "Template file for $class not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -69,11 +70,11 @@ if [ "$EMAIL_ADDRESS" = "" ] ; then
|
||||||
EMAIL_ADDRESS=fixme@example.com
|
EMAIL_ADDRESS=fixme@example.com
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source=gst$class.c
|
|
||||||
pkg=`grep -A 10000 '^% pkg-config' $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' $source | 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' $source | 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' $source | 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 ()
|
generate ()
|
||||||
{
|
{
|
||||||
|
@ -115,7 +116,7 @@ cat <<-EOF
|
||||||
*/
|
*/
|
||||||
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
|
cat <<EOF
|
||||||
|
|
||||||
|
@ -125,9 +126,9 @@ cat <<EOF
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
grep -A 10000 '^% includes' base.c | 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' gobject.c | 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' $source | 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
|
cat <<EOF
|
||||||
#include "gstreplace.h"
|
#include "gstreplace.h"
|
||||||
|
@ -136,12 +137,12 @@ cat <<EOF
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
grep -A 10000 '^% prototypes' base.c | 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' gobject.c | 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' $source | 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
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -157,7 +158,7 @@ EOF
|
||||||
|
|
||||||
for each in $pads
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -176,7 +177,7 @@ EOF
|
||||||
|
|
||||||
for each in $pads
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -189,15 +190,15 @@ static void
|
||||||
gst_replace_class_init (GstReplaceClass * klass)
|
gst_replace_class_init (GstReplaceClass * klass)
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
grep -A 10000 '^% declare-class' base.c | 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' gobject.c | 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' $source | 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
|
echo
|
||||||
|
|
||||||
grep -A 10000 '^% set-methods' base.c | 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' gobject.c | 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' $source | 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
|
cat <<EOF
|
||||||
|
|
||||||
|
@ -210,7 +211,7 @@ EOF
|
||||||
|
|
||||||
for each in $pads
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,12 +220,12 @@ cat <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
grep -A 10000 '^% methods' base.c | 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' gobject.c | 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' $source | 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
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,7 +268,7 @@ EOF
|
||||||
generate_header ()
|
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
|
cat <<EOF
|
||||||
#ifndef _GST_REPLACE_H_
|
#ifndef _GST_REPLACE_H_
|
||||||
|
@ -275,9 +276,9 @@ cat <<EOF
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
grep -A 10000 '^% includes' base.c | 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' gobject.c | 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' $source | 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
|
cat <<EOF
|
||||||
|
|
||||||
|
@ -305,7 +306,7 @@ EOF
|
||||||
|
|
||||||
for each in $pads
|
for each in $pads
|
||||||
do
|
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
|
done
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
Loading…
Reference in a new issue