summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/mixer
diff options
context:
space:
mode:
authorDavid I. Lehn <dlehn@users.sourceforge.net>2004-02-03 08:56:06 +0000
committerDavid I. Lehn <dlehn@users.sourceforge.net>2004-02-03 08:56:06 +0000
commit85e7b51cf2138f272a0fb5c8083bc044c50327b9 (patch)
tree1f558d97fac5d44e2691590cdac26dc0c549b7ac /gst-libs/gst/mixer
parent0724b6808fdb8a5d9296b476aef3e1a6b1026b9b (diff)
downloadgst-plugins-bad-85e7b51cf2138f272a0fb5c8083bc044c50327b9.tar.gz
gst-plugins-bad-85e7b51cf2138f272a0fb5c8083bc044c50327b9.tar.bz2
gst-plugins-bad-85e7b51cf2138f272a0fb5c8083bc044c50327b9.zip
gst-libs/gst/: Generate enum type code with glib-mkenums.
Original commit message from CVS: * gst-libs/gst/colorbalance/Makefile.am: * gst-libs/gst/colorbalance/colorbalance.h: * gst-libs/gst/mixer/Makefile.am: * gst-libs/gst/mixer/mixer.h: * gst-libs/gst/play/Makefile.am: * gst-libs/gst/play/play.h: * gst-libs/gst/tuner/Makefile.am: * gst-libs/gst/tuner/tuner.h: Generate enum type code with glib-mkenums. * gst-libs/gst/colorbalance/.cvsignore: * gst-libs/gst/mixer/.cvsignore: * gst-libs/gst/play/.cvsignore: * gst-libs/gst/tuner/.cvsignore: Ignore generated files.
Diffstat (limited to 'gst-libs/gst/mixer')
-rw-r--r--gst-libs/gst/mixer/.gitignore2
-rw-r--r--gst-libs/gst/mixer/Makefile.am36
-rw-r--r--gst-libs/gst/mixer/mixer.h1
3 files changed, 33 insertions, 6 deletions
diff --git a/gst-libs/gst/mixer/.gitignore b/gst-libs/gst/mixer/.gitignore
new file mode 100644
index 00000000..968ea36b
--- /dev/null
+++ b/gst-libs/gst/mixer/.gitignore
@@ -0,0 +1,2 @@
+mixerenumtypes.[ch]
+mixermarshal.[ch]
diff --git a/gst-libs/gst/mixer/Makefile.am b/gst-libs/gst/mixer/Makefile.am
index ca153dd0..7871a24d 100644
--- a/gst-libs/gst/mixer/Makefile.am
+++ b/gst-libs/gst/mixer/Makefile.am
@@ -1,23 +1,30 @@
-libgstinterfacesincludedir = \
+libgstmixerincludedir = \
$(includedir)/gstreamer-@GST_MAJORMINOR@/gst/mixer
-libgstinterfacesinclude_HEADERS = \
+mixer_headers = \
mixer.h \
mixertrack.h
+built_headers = \
+ mixermarshal.h \
+ mixerenumtypes.h
+
+libgstmixerinclude_HEADERS = $(mixer_headers) $(built_headers)
+
noinst_LTLIBRARIES = libgstmixer.la
libgstmixer_la_SOURCES = \
mixer.c \
mixertrack.c \
- mixermarshal.c
+ mixermarshal.c \
+ mixerenumtypes.c
libgstmixer_la_CFLAGS = $(GST_CFLAGS)
BUILT_SOURCES = \
mixermarshal.c \
- mixermarshal.h
-built_headers = \
- mixermarshal.h
+ mixermarshal.h \
+ mixerenumtypes.c \
+ mixerenumtypes.h
EXTRA_DIST = mixermarshal.list
@@ -31,3 +38,20 @@ mixermarshal.c: mixermarshal.list
echo "#include \"mixermarshal.h\"" >> mixermarshal.c.tmp
glib-genmarshal --body --prefix=gst_mixer_marshal $^ >> mixermarshal.c.tmp
mv mixermarshal.c.tmp mixermarshal.c
+
+mixerenumtypes.h: $(mixer_headers)
+ glib-mkenums \
+ --fhead "#ifndef __GST_MIXER_ENUM_TYPES_H__\n#define __GST_MIXER_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __GST_MIXER_ENUM_TYPES_H__ */" \
+ $^ > $@
+
+mixerenumtypes.c: $(mixer_headers)
+ glib-mkenums \
+ --fhead "#include <mixer.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $^ > $@
diff --git a/gst-libs/gst/mixer/mixer.h b/gst-libs/gst/mixer/mixer.h
index 3af55ab7..bbfe1c75 100644
--- a/gst-libs/gst/mixer/mixer.h
+++ b/gst-libs/gst/mixer/mixer.h
@@ -24,6 +24,7 @@
#include <gst/gst.h>
#include <gst/mixer/mixertrack.h>
+#include <gst/mixer/mixerenumtypes.h>
G_BEGIN_DECLS