diff --git a/examples/autoplug/autoplug.c b/examples/autoplug/autoplug.c index 3203608163..4a3453552c 100644 --- a/examples/autoplug/autoplug.c +++ b/examples/autoplug/autoplug.c @@ -68,6 +68,8 @@ int main(int argc,char *argv[]) exit(-1); } + xmlSaveFile("xmlTest.gst", gst_xml_write(GST_ELEMENT(pipeline))); + /* start playing */ gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING); diff --git a/examples/typefind/Makefile b/examples/typefind/Makefile new file mode 100644 index 0000000000..79f1401c37 --- /dev/null +++ b/examples/typefind/Makefile @@ -0,0 +1,378 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = ../.. +prefix = /usr/local +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/gstreamer +pkglibdir = $(libdir)/gstreamer +pkgincludedir = $(includedir)/gstreamer + +top_builddir = ../.. + +ACLOCAL = aclocal +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = i686-pc-linux +build_triplet = i686-pc-linux-gnu +host_alias = i686-pc-linux +host_triplet = i686-pc-linux-gnu +target_alias = i686-pc-linux +target_triplet = i686-pc-linux-gnu +ALSA_CFLAGS = +ALSA_LIBS = +AS = @AS@ +CC = gcc +DLLTOOL = @DLLTOOL@ +ESD_CFLAGS = +ESD_CONFIG = /usr/bin/esd-config +ESD_LIBS = -L/usr/lib -lesd -laudiofile -lm +GDK_PIXBUF_CFLAGS = -I/usr/local/include -I/usr/lib/glib/include -I/usr/X11R6/include +GDK_PIXBUF_CONFIG = /usr/local/bin/gdk-pixbuf-config +GDK_PIXBUF_LIBS = -L/usr/local/lib -lgdk_pixbuf -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GHTTP_LIBS = -lghttp +GLIB_CFLAGS = -I/usr/lib/glib/include -D_REENTRANT +GLIB_CONFIG = /usr/bin/glib-config +GLIB_LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl +GNOME_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNOME_CONFIG = /usr/bin/gnome-config +GNOME_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GSTREAMER_LIBVERSION = 0:0:0 +GST_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include +GST_CONFIG_DIR = /etc/gstreamer +GST_HTTPSRC_GET_TYPE = gst_httpsrc_get_type +GST_LIBS = $(top_builddir)/gst/libgst.la +GST_WIN32_LIBDIR = /usr/lib/win32 +GTK_CFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +GTK_CONFIG = /usr/bin/gtk-config +GTK_LIBS = -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +HAVE_DB2HTML = true +HAVE_DB2PS = true +HAVE_FIG2DEV = true +HAVE_GTK_DOC = true +HAVE_PS2PDF = true +LIBGLADE_CONFIG_PATH = /usr/bin/libglade-config +LIBGLADE_GNOME_CFLAGS = -I/usr/include/gnome-xml -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +LIBGLADE_GNOME_LIBS = -L/usr/lib -lglade-gnome -lglade -L/usr/lib -lxml -lz -rdynamic -L/usr/lib -L/usr/X11R6/lib -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +LIBGST_CFLAGS = -I/usr/lib/glib/include -D_REENTRANT -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-xml -g -O6 -Wall +LIBGST_LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -L/usr/lib -lxml -lz +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +MAINT = +MAKEINFO = makeinfo +NASM_PATH = /usr/bin/nasm +OBJDUMP = @OBJDUMP@ +PACKAGE = gstreamer +PLUGINS_DIR = /usr/local/lib/gst +PLUGINS_SRCDIR = /opt/src/sourceforge/gstreamer/. +RANLIB = ranlib +STREAMER_AGE = 0 +STREAMER_CURRENT = 0 +STREAMER_MAJOR_VERSION = 0 +STREAMER_MICRO_VERSION = 0 +STREAMER_MINOR_VERSION = 1 +STREAMER_REVISION = 0 +STREAMER_VERSION = 0.1.0 +VERSION = 0.1.0 +XML_CFLAGS = -I/usr/include/gnome-xml +XML_CONFIG = /usr/bin/xml-config +XML_LIBS = -L/usr/lib -lxml -lz +X_CFLAGS = -I/usr/X11R6/include +X_EXTRA_LIBS = +X_LIBS = -L/usr/X11R6/lib +X_PRE_LIBS = -lSM -lICE + +noinst_PROGRAMS = typefind + +LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -L/usr/lib -lxml -lz $(GST_LIBS) +CFLAGS = -I/usr/lib/glib/include -D_REENTRANT -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-xml -g -O6 -Wall -I$(top_srcdir) -I$(top_srcdir)/include $(GST_CFLAGS) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) + + +DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I../.. +CPPFLAGS = +LDFLAGS = +typefind_SOURCES = typefind.c +typefind_OBJECTS = typefind.o +typefind_LDADD = $(LDADD) +typefind_DEPENDENCIES = +typefind_LDFLAGS = +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/typefind.P +SOURCES = typefind.c +OBJECTS = typefind.o + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .lo .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/typefind/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstPROGRAMS: + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +distclean-noinstPROGRAMS: + +maintainer-clean-noinstPROGRAMS: + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +.s.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.S.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + +maintainer-clean-libtool: + +typefind: $(typefind_OBJECTS) $(typefind_DEPENDENCIES) + @rm -f typefind + $(LINK) $(typefind_LDFLAGS) $(typefind_OBJECTS) $(typefind_LDADD) $(LIBS) + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = examples/typefind + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu examples/typefind/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstPROGRAMS distclean-compile \ + distclean-libtool distclean-tags distclean-depend \ + distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ + maintainer-clean-tags maintainer-clean-depend \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ +clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/typefind/typefind.c b/examples/typefind/typefind.c new file mode 100644 index 0000000000..4e19f268c6 --- /dev/null +++ b/examples/typefind/typefind.c @@ -0,0 +1,61 @@ +#include + +void +type_found (GstElement *typefind, GstCaps* caps) +{ + xmlDocPtr doc; + xmlNodePtr parent; + + doc = xmlNewDoc ("1.0"); + doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL); + + parent = xmlNewChild (doc->root, NULL, "Caps1", NULL); + gst_caps_save_thyself (caps, parent); + + xmlDocDump (stdout, doc); +} + +int +main(int argc, char *argv[]) +{ + GstElement *bin, *disksrc, *typefind; + + gst_init(&argc,&argv); + + if (argc != 2) { + g_print("usage: %s \n", argv[0]); + exit(-1); + } + + /* create a new bin to hold the elements */ + bin = gst_bin_new("bin"); + g_assert(bin != NULL); + + /* create a disk reader */ + disksrc = gst_elementfactory_make("disksrc", "disk_source"); + g_assert(disksrc != NULL); + gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL); + + typefind = gst_elementfactory_make("typefind", "typefind"); + g_assert(typefind != NULL); + + /* add objects to the main pipeline */ + gst_bin_add(GST_BIN(bin), disksrc); + gst_bin_add(GST_BIN(bin), typefind); + + gtk_signal_connect (GTK_OBJECT (typefind), "have_type", + type_found, NULL); + + gst_pad_connect(gst_element_get_pad(disksrc,"src"), + gst_element_get_pad(typefind,"sink")); + + /* start playing */ + gst_element_set_state(GST_ELEMENT(bin), GST_STATE_PLAYING); + + gst_bin_iterate(GST_BIN(bin)); + + gst_element_set_state(GST_ELEMENT(bin), GST_STATE_NULL); + + exit(0); +} + diff --git a/tests/old/examples/autoplug/autoplug.c b/tests/old/examples/autoplug/autoplug.c index 3203608163..4a3453552c 100644 --- a/tests/old/examples/autoplug/autoplug.c +++ b/tests/old/examples/autoplug/autoplug.c @@ -68,6 +68,8 @@ int main(int argc,char *argv[]) exit(-1); } + xmlSaveFile("xmlTest.gst", gst_xml_write(GST_ELEMENT(pipeline))); + /* start playing */ gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING); diff --git a/tests/old/examples/typefind/Makefile b/tests/old/examples/typefind/Makefile new file mode 100644 index 0000000000..79f1401c37 --- /dev/null +++ b/tests/old/examples/typefind/Makefile @@ -0,0 +1,378 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = ../.. +prefix = /usr/local +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/gstreamer +pkglibdir = $(libdir)/gstreamer +pkgincludedir = $(includedir)/gstreamer + +top_builddir = ../.. + +ACLOCAL = aclocal +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = i686-pc-linux +build_triplet = i686-pc-linux-gnu +host_alias = i686-pc-linux +host_triplet = i686-pc-linux-gnu +target_alias = i686-pc-linux +target_triplet = i686-pc-linux-gnu +ALSA_CFLAGS = +ALSA_LIBS = +AS = @AS@ +CC = gcc +DLLTOOL = @DLLTOOL@ +ESD_CFLAGS = +ESD_CONFIG = /usr/bin/esd-config +ESD_LIBS = -L/usr/lib -lesd -laudiofile -lm +GDK_PIXBUF_CFLAGS = -I/usr/local/include -I/usr/lib/glib/include -I/usr/X11R6/include +GDK_PIXBUF_CONFIG = /usr/local/bin/gdk-pixbuf-config +GDK_PIXBUF_LIBS = -L/usr/local/lib -lgdk_pixbuf -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +GHTTP_LIBS = -lghttp +GLIB_CFLAGS = -I/usr/lib/glib/include -D_REENTRANT +GLIB_CONFIG = /usr/bin/glib-config +GLIB_LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl +GNOME_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +GNOME_CONFIG = /usr/bin/gnome-config +GNOME_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GSTREAMER_LIBVERSION = 0:0:0 +GST_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include +GST_CONFIG_DIR = /etc/gstreamer +GST_HTTPSRC_GET_TYPE = gst_httpsrc_get_type +GST_LIBS = $(top_builddir)/gst/libgst.la +GST_WIN32_LIBDIR = /usr/lib/win32 +GTK_CFLAGS = -I/usr/lib/glib/include -I/usr/X11R6/include +GTK_CONFIG = /usr/bin/gtk-config +GTK_LIBS = -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm +HAVE_DB2HTML = true +HAVE_DB2PS = true +HAVE_FIG2DEV = true +HAVE_GTK_DOC = true +HAVE_PS2PDF = true +LIBGLADE_CONFIG_PATH = /usr/bin/libglade-config +LIBGLADE_GNOME_CFLAGS = -I/usr/include/gnome-xml -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include +LIBGLADE_GNOME_LIBS = -L/usr/lib -lglade-gnome -lglade -L/usr/lib -lxml -lz -rdynamic -L/usr/lib -L/usr/X11R6/lib -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +LIBGST_CFLAGS = -I/usr/lib/glib/include -D_REENTRANT -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-xml -g -O6 -Wall +LIBGST_LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -L/usr/lib -lxml -lz +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +MAINT = +MAKEINFO = makeinfo +NASM_PATH = /usr/bin/nasm +OBJDUMP = @OBJDUMP@ +PACKAGE = gstreamer +PLUGINS_DIR = /usr/local/lib/gst +PLUGINS_SRCDIR = /opt/src/sourceforge/gstreamer/. +RANLIB = ranlib +STREAMER_AGE = 0 +STREAMER_CURRENT = 0 +STREAMER_MAJOR_VERSION = 0 +STREAMER_MICRO_VERSION = 0 +STREAMER_MINOR_VERSION = 1 +STREAMER_REVISION = 0 +STREAMER_VERSION = 0.1.0 +VERSION = 0.1.0 +XML_CFLAGS = -I/usr/include/gnome-xml +XML_CONFIG = /usr/bin/xml-config +XML_LIBS = -L/usr/lib -lxml -lz +X_CFLAGS = -I/usr/X11R6/include +X_EXTRA_LIBS = +X_LIBS = -L/usr/X11R6/lib +X_PRE_LIBS = -lSM -lICE + +noinst_PROGRAMS = typefind + +LIBS = -L/usr/lib -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -L/usr/lib -lxml -lz $(GST_LIBS) +CFLAGS = -I/usr/lib/glib/include -D_REENTRANT -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-xml -g -O6 -Wall -I$(top_srcdir) -I$(top_srcdir)/include $(GST_CFLAGS) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) + + +DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I../.. +CPPFLAGS = +LDFLAGS = +typefind_SOURCES = typefind.c +typefind_OBJECTS = typefind.o +typefind_LDADD = $(LDADD) +typefind_DEPENDENCIES = +typefind_LDFLAGS = +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = gtar +GZIP_ENV = --best +DEP_FILES = .deps/typefind.P +SOURCES = typefind.c +OBJECTS = typefind.o + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .lo .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/typefind/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstPROGRAMS: + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +distclean-noinstPROGRAMS: + +maintainer-clean-noinstPROGRAMS: + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +.s.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +.S.lo: + $(LIBTOOL) --mode=compile $(COMPILE) -c $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + +maintainer-clean-libtool: + +typefind: $(typefind_OBJECTS) $(typefind_DEPENDENCIES) + @rm -f typefind + $(LINK) $(typefind_LDFLAGS) $(typefind_OBJECTS) $(typefind_LDADD) $(LIBS) + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = examples/typefind + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu examples/typefind/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstPROGRAMS distclean-compile \ + distclean-libtool distclean-tags distclean-depend \ + distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ + maintainer-clean-compile maintainer-clean-libtool \ + maintainer-clean-tags maintainer-clean-depend \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ +clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile mostlyclean-libtool distclean-libtool \ +clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/old/examples/typefind/typefind.c b/tests/old/examples/typefind/typefind.c new file mode 100644 index 0000000000..4e19f268c6 --- /dev/null +++ b/tests/old/examples/typefind/typefind.c @@ -0,0 +1,61 @@ +#include + +void +type_found (GstElement *typefind, GstCaps* caps) +{ + xmlDocPtr doc; + xmlNodePtr parent; + + doc = xmlNewDoc ("1.0"); + doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL); + + parent = xmlNewChild (doc->root, NULL, "Caps1", NULL); + gst_caps_save_thyself (caps, parent); + + xmlDocDump (stdout, doc); +} + +int +main(int argc, char *argv[]) +{ + GstElement *bin, *disksrc, *typefind; + + gst_init(&argc,&argv); + + if (argc != 2) { + g_print("usage: %s \n", argv[0]); + exit(-1); + } + + /* create a new bin to hold the elements */ + bin = gst_bin_new("bin"); + g_assert(bin != NULL); + + /* create a disk reader */ + disksrc = gst_elementfactory_make("disksrc", "disk_source"); + g_assert(disksrc != NULL); + gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL); + + typefind = gst_elementfactory_make("typefind", "typefind"); + g_assert(typefind != NULL); + + /* add objects to the main pipeline */ + gst_bin_add(GST_BIN(bin), disksrc); + gst_bin_add(GST_BIN(bin), typefind); + + gtk_signal_connect (GTK_OBJECT (typefind), "have_type", + type_found, NULL); + + gst_pad_connect(gst_element_get_pad(disksrc,"src"), + gst_element_get_pad(typefind,"sink")); + + /* start playing */ + gst_element_set_state(GST_ELEMENT(bin), GST_STATE_PLAYING); + + gst_bin_iterate(GST_BIN(bin)); + + gst_element_set_state(GST_ELEMENT(bin), GST_STATE_NULL); + + exit(0); +} +