summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am22
-rw-r--r--tests/Makefile.in813
-rw-r--r--tests/check/Makefile.am309
-rw-r--r--tests/check/Makefile.in3014
-rw-r--r--tests/check/elements/aacparse.c240
-rw-r--r--tests/check/elements/ac3parse.c163
-rw-r--r--tests/check/elements/alphacolor.c292
-rw-r--r--tests/check/elements/amrparse.c327
-rw-r--r--tests/check/elements/apev2mux.c433
-rw-r--r--tests/check/elements/aspectratiocrop.c201
-rw-r--r--tests/check/elements/audioamplify.c469
-rw-r--r--tests/check/elements/audiochebband.c1538
-rw-r--r--tests/check/elements/audiocheblimit.c1002
-rw-r--r--tests/check/elements/audiodynamic.c459
-rw-r--r--tests/check/elements/audioecho.c229
-rw-r--r--tests/check/elements/audiofirfilter.c169
-rw-r--r--tests/check/elements/audioiirfilter.c179
-rw-r--r--tests/check/elements/audioinvert.c286
-rw-r--r--tests/check/elements/audiopanorama.c707
-rw-r--r--tests/check/elements/audiowsincband.c1010
-rw-r--r--tests/check/elements/audiowsinclimit.c704
-rw-r--r--tests/check/elements/autodetect.c163
-rw-r--r--tests/check/elements/avimux.c276
-rw-r--r--tests/check/elements/avisubtitle.c264
-rw-r--r--tests/check/elements/capssetter.c228
-rw-r--r--tests/check/elements/cmmldec.c600
-rw-r--r--tests/check/elements/cmmlenc.c491
-rw-r--r--tests/check/elements/deinterlace.c445
-rw-r--r--tests/check/elements/deinterleave.c559
-rw-r--r--tests/check/elements/equalizer.c327
-rw-r--r--tests/check/elements/flacparse.c319
-rw-r--r--tests/check/elements/flvdemux.c184
-rw-r--r--tests/check/elements/flvmux.c161
-rw-r--r--tests/check/elements/gdkpixbufsink.c291
-rw-r--r--tests/check/elements/icydemux.c272
-rw-r--r--tests/check/elements/id3demux.c290
-rw-r--r--tests/check/elements/id3v2mux.c538
-rw-r--r--tests/check/elements/imagefreeze.c640
-rw-r--r--tests/check/elements/interleave.c733
-rw-r--r--tests/check/elements/jpegenc.c247
-rw-r--r--tests/check/elements/level.c326
-rw-r--r--tests/check/elements/matroskamux.c470
-rw-r--r--tests/check/elements/matroskaparse.c118
-rw-r--r--tests/check/elements/mpegaudioparse.c170
-rw-r--r--tests/check/elements/multifile.c283
-rw-r--r--tests/check/elements/parser.c436
-rw-r--r--tests/check/elements/parser.h95
-rw-r--r--tests/check/elements/qtmux.c899
-rw-r--r--tests/check/elements/rganalysis.c1878
-rw-r--r--tests/check/elements/rglimiter.c269
-rw-r--r--tests/check/elements/rgvolume.c617
-rw-r--r--tests/check/elements/rtp-payloading.c828
-rw-r--r--tests/check/elements/rtpbin.c447
-rw-r--r--tests/check/elements/rtpbin_buffer_list.c331
-rw-r--r--tests/check/elements/rtpjitterbuffer.c341
-rw-r--r--tests/check/elements/shapewipe.c307
-rw-r--r--tests/check/elements/souphttpsrc.c639
-rw-r--r--tests/check/elements/spectrum.c570
-rw-r--r--tests/check/elements/sunaudio.c95
-rw-r--r--tests/check/elements/udpsink.c207
-rw-r--r--tests/check/elements/videocrop.c816
-rw-r--r--tests/check/elements/videofilter.c237
-rw-r--r--tests/check/elements/wavpackdec.c257
-rw-r--r--tests/check/elements/wavpackenc.c192
-rw-r--r--tests/check/elements/wavpackparse.c293
-rw-r--r--tests/check/elements/y4menc.c179
-rw-r--r--tests/check/generic/index.c140
-rw-r--r--tests/check/generic/states.c222
-rw-r--r--tests/check/gst-plugins-good.supp127
-rw-r--r--tests/check/pipelines/effectv.c146
-rw-r--r--tests/check/pipelines/flacdec.c247
-rw-r--r--tests/check/pipelines/simple-launch-lines.c284
-rw-r--r--tests/check/pipelines/tagschecking.c354
-rw-r--r--tests/check/pipelines/wavenc.c201
-rw-r--r--tests/check/pipelines/wavpack.c217
-rw-r--r--tests/examples/Makefile.am19
-rw-r--r--tests/examples/Makefile.in831
-rw-r--r--tests/examples/audiofx/Makefile.am7
-rw-r--r--tests/examples/audiofx/Makefile.in783
-rw-r--r--tests/examples/audiofx/firfilter-example.c161
-rw-r--r--tests/examples/audiofx/iirfilter-example.c137
-rw-r--r--tests/examples/cairo/Makefile.am7
-rw-r--r--tests/examples/cairo/Makefile.in752
-rw-r--r--tests/examples/cairo/cairo_overlay.c172
-rw-r--r--tests/examples/equalizer/Makefile.am8
-rw-r--r--tests/examples/equalizer/Makefile.in752
-rw-r--r--tests/examples/equalizer/demo.c254
-rw-r--r--tests/examples/jack/Makefile.am12
-rw-r--r--tests/examples/jack/Makefile.in753
-rw-r--r--tests/examples/jack/jack_client.c79
-rw-r--r--tests/examples/level/Makefile.am4
-rw-r--r--tests/examples/level/Makefile.in751
-rw-r--r--tests/examples/level/level-example.c129
-rw-r--r--tests/examples/pulse/Makefile.am5
-rw-r--r--tests/examples/pulse/Makefile.in751
-rw-r--r--tests/examples/pulse/pulse.c70
-rw-r--r--tests/examples/rtp/Makefile.am22
-rw-r--r--tests/examples/rtp/Makefile.in796
-rwxr-xr-xtests/examples/rtp/client-H263p-AMR.sh23
-rw-r--r--tests/examples/rtp/client-H263p-PCMA.sdp12
-rwxr-xr-xtests/examples/rtp/client-H263p-PCMA.sh28
-rw-r--r--tests/examples/rtp/client-H264-PCMA.sdp12
-rwxr-xr-xtests/examples/rtp/client-H264-PCMA.sh64
-rw-r--r--tests/examples/rtp/client-PCMA.c237
-rwxr-xr-xtests/examples/rtp/client-PCMA.sh39
-rwxr-xr-xtests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh16
-rw-r--r--tests/examples/rtp/server-alsasrc-PCMA.c221
-rwxr-xr-xtests/examples/rtp/server-alsasrc-PCMA.sh35
-rwxr-xr-xtests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh25
-rwxr-xr-xtests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh78
-rw-r--r--tests/examples/shapewipe/Makefile.am8
-rw-r--r--tests/examples/shapewipe/Makefile.in758
-rw-r--r--tests/examples/shapewipe/shapewipe-example.c147
-rw-r--r--tests/examples/spectrum/Makefile.am16
-rw-r--r--tests/examples/spectrum/Makefile.in815
-rw-r--r--tests/examples/spectrum/demo-audiotest.c233
-rw-r--r--tests/examples/spectrum/demo-osssrc.c208
-rw-r--r--tests/examples/spectrum/spectrum-example.c124
-rw-r--r--tests/examples/v4l2/Makefile.am10
-rw-r--r--tests/examples/v4l2/Makefile.in780
-rw-r--r--tests/examples/v4l2/camctrl.c213
-rw-r--r--tests/examples/v4l2/probe.c85
-rw-r--r--tests/files/Makefile.am13
-rw-r--r--tests/files/Makefile.in616
-rw-r--r--tests/files/audiotestsrc.flacbin0 -> 4708 bytes
-rw-r--r--tests/files/id3-407349-1.tagbin0 -> 304 bytes
-rw-r--r--tests/files/id3-407349-2.tagbin0 -> 304 bytes
-rw-r--r--tests/files/id3-447000-wcop.tagbin0 -> 360 bytes
-rw-r--r--tests/files/id3-577468-unsynced-tag.tagbin0 -> 11264 bytes
-rw-r--r--tests/files/id3-588148-unsynced-v24.tagbin0 -> 39000 bytes
-rw-r--r--tests/files/pcm16sine.flvbin0 -> 4459 bytes
-rw-r--r--tests/files/pinknoise-vorbis.mkvbin0 -> 5486 bytes
-rw-r--r--tests/files/test-cert.pem22
-rw-r--r--tests/files/test-key.pem15
-rw-r--r--tests/icles/Makefile.am59
-rw-r--r--tests/icles/Makefile.in978
-rw-r--r--tests/icles/equalizer-test.c291
-rw-r--r--tests/icles/gdkpixbufsink-test.c360
-rw-r--r--tests/icles/test-oss4.c255
-rw-r--r--tests/icles/v4l2src-test.c517
-rw-r--r--tests/icles/videobox-test.c141
-rw-r--r--tests/icles/videocrop-test.c357
-rw-r--r--tests/icles/videocrop2-test.c141
-rw-r--r--tests/icles/ximagesrc-test.c70
144 files changed, 48109 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..5f10e8f
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,22 @@
+if HAVE_GST_CHECK
+SUBDIRS_CHECK = check files
+else
+SUBDIRS_CHECK =
+endif
+
+if USE_X
+SUBDIRS_ICLES = icles
+else
+SUBDIRS_ICLES =
+endif
+
+if BUILD_EXAMPLES
+SUBDIR_EXAMPLES = examples
+else
+SUBDIR_EXAMPLES =
+endif
+
+SUBDIRS = $(SUBDIRS_CHECK) $(SUBDIRS_ICLES) $(SUBDIR_EXAMPLES)
+
+DIST_SUBDIRS = check icles examples files
+
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..f25bc7c
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,813 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@HAVE_GST_CHECK_FALSE@SUBDIRS_CHECK =
+@HAVE_GST_CHECK_TRUE@SUBDIRS_CHECK = check files
+@USE_X_FALSE@SUBDIRS_ICLES =
+@USE_X_TRUE@SUBDIRS_ICLES = icles
+@BUILD_EXAMPLES_FALSE@SUBDIR_EXAMPLES =
+@BUILD_EXAMPLES_TRUE@SUBDIR_EXAMPLES = examples
+SUBDIRS = $(SUBDIRS_CHECK) $(SUBDIRS_ICLES) $(SUBDIR_EXAMPLES)
+DIST_SUBDIRS = check icles examples files
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+# 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/check/Makefile.am b/tests/check/Makefile.am
new file mode 100644
index 0000000..27dde40
--- /dev/null
+++ b/tests/check/Makefile.am
@@ -0,0 +1,309 @@
+include $(top_srcdir)/common/check.mak
+
+CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.reg
+TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
+
+REGISTRY_ENVIRONMENT = \
+ GST_REGISTRY=$(CHECK_REGISTRY)
+
+TESTS_ENVIRONMENT = \
+ $(REGISTRY_ENVIRONMENT) \
+ GST_PLUGIN_SYSTEM_PATH= \
+ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \
+ GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good@$(top_builddir)" \
+ GST_STATE_IGNORE_ELEMENTS="aasink autoaudiosrc autoaudiosink autovideosrc autovideosink \
+ cacasink cairotextoverlay gconfaudiosrc gconfvideosrc gconfaudiosink gconfvideosink \
+ halaudiosrc halaudiosink jackaudiosrc jackaudiosink \
+ osssrc osssink osxaudiosink osxaudiosrc osxvideosrc osxvideosink \
+ pulsesink pulsesrc pulsemixer v4l2src"
+
+# fake device drivers: we could run hardware element tests against dummy drivers
+# v4l2: vivo (part of normal kernel)
+# modprobe vivo;
+# gst-launch v4l2src device="/dev/video1" ! xvimagesink;
+# rmmod vivo
+#
+# alsa: snd-dummy (part of normal alsa, not removable)
+# modprobe snd-dummy;
+# gst-launch alsasrc device="hw:2" ! fakesink
+# gst-launch fakesrc ! alsasink device="hw:2"
+#
+# need a way to figure out value for the device property
+
+# the core dumps of some machines have PIDs appended
+CLEANFILES = core.* test-registry.*
+
+clean-local: clean-local-check clean-local-orc
+
+if USE_ANNODEX
+check_annodex = \
+ elements/cmmldec \
+ elements/cmmlenc
+else
+check_annodex =
+endif
+
+if USE_FLAC
+check_flac = pipelines/flacdec
+else
+check_flac =
+endif
+
+if USE_GDK_PIXBUF
+check_gdkpixbuf = elements/gdkpixbufsink
+else
+check_gdkpixbuf =
+endif
+
+if USE_JPEG
+check_jpeg = elements/jpegenc
+else
+check_jpeg =
+endif
+
+if USE_SOUP
+check_soup = elements/souphttpsrc
+else
+check_soup =
+endif
+
+if USE_SUNAUDIO
+check_sunaudio = elements/sunaudio
+else
+check_sunaudio =
+endif
+
+if USE_TAGLIB
+check_taglib = \
+ elements/id3v2mux \
+ elements/apev2mux
+else
+check_taglib =
+endif
+
+if USE_WAVPACK
+check_wavpack = \
+ elements/wavpackparse \
+ elements/wavpackdec \
+ elements/wavpackenc \
+ pipelines/wavpack
+else
+check_wavpack =
+endif
+
+if HAVE_ORC
+check_orc = orc/deinterlace orc/videomixer orc/videobox
+else
+check_orc =
+endif
+
+
+check_PROGRAMS = \
+ generic/index \
+ generic/states \
+ elements/aacparse \
+ elements/ac3parse \
+ elements/amrparse \
+ $(check_annodex) \
+ elements/alphacolor \
+ elements/aspectratiocrop \
+ elements/audioamplify \
+ elements/audiochebband \
+ elements/audiocheblimit \
+ elements/audiodynamic \
+ elements/audioecho \
+ elements/audiofirfilter \
+ elements/audioiirfilter \
+ elements/audioinvert \
+ elements/audiopanorama \
+ elements/audiowsincband \
+ elements/audiowsinclimit \
+ elements/avimux \
+ elements/avisubtitle \
+ elements/capssetter \
+ elements/deinterlace \
+ elements/deinterleave \
+ elements/equalizer \
+ elements/flacparse \
+ elements/flvdemux \
+ elements/flvmux \
+ elements/icydemux \
+ elements/id3demux \
+ elements/imagefreeze \
+ elements/interleave \
+ elements/level \
+ elements/matroskamux \
+ elements/matroskaparse \
+ elements/mpegaudioparse \
+ elements/multifile \
+ elements/qtmux \
+ elements/rganalysis \
+ elements/rglimiter \
+ elements/rgvolume \
+ elements/rtp-payloading \
+ elements/rtpbin \
+ elements/rtpbin_buffer_list \
+ elements/rtpjitterbuffer \
+ elements/shapewipe \
+ elements/spectrum \
+ elements/udpsink \
+ elements/videocrop \
+ elements/videofilter \
+ elements/y4menc \
+ pipelines/simple-launch-lines \
+ pipelines/effectv \
+ pipelines/tagschecking \
+ pipelines/wavenc \
+ $(check_flac) \
+ $(check_gdkpixbuf) \
+ $(check_jpeg) \
+ $(check_soup) \
+ $(check_sunaudio) \
+ $(check_taglib) \
+ $(check_wavpack) \
+ $(check_orc)
+
+VALGRIND_TO_FIX = \
+ elements/rtp-payloading
+
+TESTS = $(check_PROGRAMS)
+
+# these tests don't even pass
+# autodetect: temporarily disabled because of broken videosinks in -bad
+noinst_PROGRAMS = \
+ elements/autodetect
+
+AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
+ $(GST_OPTION_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+ -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
+LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
+
+# valgrind testing
+# videocrop disabled since it takes way too long in valgrind
+VALGRIND_TESTS_DISABLE = \
+ elements/videocrop \
+ $(VALGRIND_TO_FIX)
+
+SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-good.supp
+
+# parser unit test convenience lib
+noinst_LTLIBRARIES = libparser.la
+libparser_la_SOURCES = elements/parser.c elements/parser.h
+libparser_la_CFLAGS = \
+ -I$(top_srcdir)/tests/check \
+ $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS)
+
+elements_aacparse_LDADD = libparser.la $(LDADD)
+
+elements_ac3parse_LDADD = libparser.la $(LDADD)
+
+elements_amrparse_LDADD = libparser.la $(LDADD)
+
+elements_flacparse_LDADD = libparser.la $(LDADD)
+
+elements_mpegaudioparse_LDADD = libparser.la $(LDADD)
+
+elements_aspectratiocrop_LDADD = $(LDADD)
+elements_aspectratiocrop_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_audiopanorama_LDADD = \
+ $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) \
+ $(LDADD)
+
+elements_audiopanorama_CFLAGS = \
+ $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
+ $(CFLAGS) $(AM_CFLAGS)
+
+elements_cmmldec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_cmmlenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
+
+elements_deinterleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_deinterleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+elements_interleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_interleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+
+elements_imagefreeze_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_imagefreeze_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(LDADD)
+
+elements_jpegenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_jpegenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-0.10 $(GST_BASE_LIBS) $(LDADD)
+
+elements_level_LDADD = $(LDADD) $(LIBM)
+
+elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM)
+
+elements_multifile_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+elements_multifile_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_LIBS) $(LDADD) $(LIBM)
+
+elements_qtmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+elements_qtmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-@GST_MAJORMINOR@ \
+ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
+
+elements_rtpbin_buffer_list_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+ $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(GST_CHECK_CFLAGS) $(AM_CFLAGS)
+elements_rtpbin_buffer_list_LDADD = $(GST_PLUGINS_BASE_LIBS) \
+ -lgstnetbuffer-@GST_MAJORMINOR@ -lgstrtp-@GST_MAJORMINOR@ \
+ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
+elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c
+
+elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS)
+elements_souphttpsrc_LDADD = $(SOUP_LIBS) $(LDADD)
+
+elements_sunaudio_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) \
+ $(AM_CFLAGS)
+elements_sunaudio_LDADD = \
+ $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ \
+ $(LDADD)
+
+elements_videocrop_LDADD = $(GST_BASE_LIBS) $(LDADD)
+elements_videocrop_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+elements_videofilter_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_videofilter_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
+
+# FIXME: configure should check for gdk-pixbuf not gtk
+# only need video.h header, not the lib
+elements_gdkpixbufsink_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS)
+elements_gdkpixbufsink_LDADD = \
+ $(LDADD) $(GDK_PIXBUF_LIBS)
+
+
+pipelines_wavenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+pipelines_wavenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+
+pipelines_wavpack_LDADD = $(LDADD) $(GST_BASE_LIBS)
+pipelines_wavpack_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+orc_deinterlace_CFLAGS = $(ORC_CFLAGS)
+orc_deinterlace_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_deinterlace_SOURCES = orc/deinterlace.c
+orc_videomixer_CFLAGS = $(ORC_CFLAGS)
+orc_videomixer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_videomixer_SOURCES = orc/videomixer.c
+orc_videobox_CFLAGS = $(ORC_CFLAGS)
+orc_videobox_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_videobox_SOURCES = orc/videobox.c
+
+orc/deinterlace.c: $(top_srcdir)/gst/deinterlace/tvtime.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+orc/videomixer.c: $(top_srcdir)/gst/videomixer/blendorc.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+orc/videobox.c: $(top_srcdir)/gst/videobox/gstvideoboxorc.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+clean-local-orc:
+ rm -rf orc
+
+EXTRA_DIST = gst-plugins-good.supp
diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in
new file mode 100644
index 0000000..66e9b6e
--- /dev/null
+++ b/tests/check/Makefile.in
@@ -0,0 +1,3014 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/common/check.mak
+check_PROGRAMS = generic/index$(EXEEXT) generic/states$(EXEEXT) \
+ elements/aacparse$(EXEEXT) elements/ac3parse$(EXEEXT) \
+ elements/amrparse$(EXEEXT) $(am__EXEEXT_1) \
+ elements/alphacolor$(EXEEXT) elements/aspectratiocrop$(EXEEXT) \
+ elements/audioamplify$(EXEEXT) elements/audiochebband$(EXEEXT) \
+ elements/audiocheblimit$(EXEEXT) \
+ elements/audiodynamic$(EXEEXT) elements/audioecho$(EXEEXT) \
+ elements/audiofirfilter$(EXEEXT) \
+ elements/audioiirfilter$(EXEEXT) elements/audioinvert$(EXEEXT) \
+ elements/audiopanorama$(EXEEXT) \
+ elements/audiowsincband$(EXEEXT) \
+ elements/audiowsinclimit$(EXEEXT) elements/avimux$(EXEEXT) \
+ elements/avisubtitle$(EXEEXT) elements/capssetter$(EXEEXT) \
+ elements/deinterlace$(EXEEXT) elements/deinterleave$(EXEEXT) \
+ elements/equalizer$(EXEEXT) elements/flacparse$(EXEEXT) \
+ elements/flvdemux$(EXEEXT) elements/flvmux$(EXEEXT) \
+ elements/icydemux$(EXEEXT) elements/id3demux$(EXEEXT) \
+ elements/imagefreeze$(EXEEXT) elements/interleave$(EXEEXT) \
+ elements/level$(EXEEXT) elements/matroskamux$(EXEEXT) \
+ elements/matroskaparse$(EXEEXT) \
+ elements/mpegaudioparse$(EXEEXT) elements/multifile$(EXEEXT) \
+ elements/qtmux$(EXEEXT) elements/rganalysis$(EXEEXT) \
+ elements/rglimiter$(EXEEXT) elements/rgvolume$(EXEEXT) \
+ elements/rtp-payloading$(EXEEXT) elements/rtpbin$(EXEEXT) \
+ elements/rtpbin_buffer_list$(EXEEXT) \
+ elements/rtpjitterbuffer$(EXEEXT) elements/shapewipe$(EXEEXT) \
+ elements/spectrum$(EXEEXT) elements/udpsink$(EXEEXT) \
+ elements/videocrop$(EXEEXT) elements/videofilter$(EXEEXT) \
+ elements/y4menc$(EXEEXT) \
+ pipelines/simple-launch-lines$(EXEEXT) \
+ pipelines/effectv$(EXEEXT) pipelines/tagschecking$(EXEEXT) \
+ pipelines/wavenc$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+ $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
+ $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_9)
+noinst_PROGRAMS = elements/autodetect$(EXEEXT)
+subdir = tests/check
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libparser_la_LIBADD =
+am_libparser_la_OBJECTS = libparser_la-parser.lo
+libparser_la_OBJECTS = $(am_libparser_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libparser_la_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+@USE_ANNODEX_TRUE@am__EXEEXT_1 = elements/cmmldec$(EXEEXT) \
+@USE_ANNODEX_TRUE@ elements/cmmlenc$(EXEEXT)
+@USE_FLAC_TRUE@am__EXEEXT_2 = pipelines/flacdec$(EXEEXT)
+@USE_GDK_PIXBUF_TRUE@am__EXEEXT_3 = elements/gdkpixbufsink$(EXEEXT)
+@USE_JPEG_TRUE@am__EXEEXT_4 = elements/jpegenc$(EXEEXT)
+@USE_SOUP_TRUE@am__EXEEXT_5 = elements/souphttpsrc$(EXEEXT)
+@USE_SUNAUDIO_TRUE@am__EXEEXT_6 = elements/sunaudio$(EXEEXT)
+@USE_TAGLIB_TRUE@am__EXEEXT_7 = elements/id3v2mux$(EXEEXT) \
+@USE_TAGLIB_TRUE@ elements/apev2mux$(EXEEXT)
+@USE_WAVPACK_TRUE@am__EXEEXT_8 = elements/wavpackparse$(EXEEXT) \
+@USE_WAVPACK_TRUE@ elements/wavpackdec$(EXEEXT) \
+@USE_WAVPACK_TRUE@ elements/wavpackenc$(EXEEXT) \
+@USE_WAVPACK_TRUE@ pipelines/wavpack$(EXEEXT)
+@HAVE_ORC_TRUE@am__EXEEXT_9 = orc/deinterlace$(EXEEXT) \
+@HAVE_ORC_TRUE@ orc/videomixer$(EXEEXT) orc/videobox$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+elements_aacparse_SOURCES = elements/aacparse.c
+elements_aacparse_OBJECTS = aacparse.$(OBJEXT)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+elements_aacparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+am__dirstamp = $(am__leading_dot)dirstamp
+elements_ac3parse_SOURCES = elements/ac3parse.c
+elements_ac3parse_OBJECTS = ac3parse.$(OBJEXT)
+elements_ac3parse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+elements_alphacolor_SOURCES = elements/alphacolor.c
+elements_alphacolor_OBJECTS = \
+ elements_alphacolor-alphacolor.$(OBJEXT)
+elements_alphacolor_LDADD = $(LDADD)
+elements_alphacolor_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_alphacolor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_alphacolor_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_amrparse_SOURCES = elements/amrparse.c
+elements_amrparse_OBJECTS = amrparse.$(OBJEXT)
+elements_amrparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+elements_apev2mux_SOURCES = elements/apev2mux.c
+elements_apev2mux_OBJECTS = apev2mux.$(OBJEXT)
+elements_apev2mux_LDADD = $(LDADD)
+elements_apev2mux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_aspectratiocrop_SOURCES = elements/aspectratiocrop.c
+elements_aspectratiocrop_OBJECTS = \
+ elements_aspectratiocrop-aspectratiocrop.$(OBJEXT)
+elements_aspectratiocrop_DEPENDENCIES = $(am__DEPENDENCIES_2)
+elements_aspectratiocrop_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_aspectratiocrop_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_audioamplify_SOURCES = elements/audioamplify.c
+elements_audioamplify_OBJECTS = audioamplify.$(OBJEXT)
+elements_audioamplify_LDADD = $(LDADD)
+elements_audioamplify_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiochebband_SOURCES = elements/audiochebband.c
+elements_audiochebband_OBJECTS = audiochebband.$(OBJEXT)
+elements_audiochebband_LDADD = $(LDADD)
+elements_audiochebband_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiocheblimit_SOURCES = elements/audiocheblimit.c
+elements_audiocheblimit_OBJECTS = audiocheblimit.$(OBJEXT)
+elements_audiocheblimit_LDADD = $(LDADD)
+elements_audiocheblimit_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiodynamic_SOURCES = elements/audiodynamic.c
+elements_audiodynamic_OBJECTS = audiodynamic.$(OBJEXT)
+elements_audiodynamic_LDADD = $(LDADD)
+elements_audiodynamic_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audioecho_SOURCES = elements/audioecho.c
+elements_audioecho_OBJECTS = audioecho.$(OBJEXT)
+elements_audioecho_LDADD = $(LDADD)
+elements_audioecho_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiofirfilter_SOURCES = elements/audiofirfilter.c
+elements_audiofirfilter_OBJECTS = audiofirfilter.$(OBJEXT)
+elements_audiofirfilter_LDADD = $(LDADD)
+elements_audiofirfilter_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audioiirfilter_SOURCES = elements/audioiirfilter.c
+elements_audioiirfilter_OBJECTS = audioiirfilter.$(OBJEXT)
+elements_audioiirfilter_LDADD = $(LDADD)
+elements_audioiirfilter_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audioinvert_SOURCES = elements/audioinvert.c
+elements_audioinvert_OBJECTS = audioinvert.$(OBJEXT)
+elements_audioinvert_LDADD = $(LDADD)
+elements_audioinvert_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiopanorama_SOURCES = elements/audiopanorama.c
+elements_audiopanorama_OBJECTS = \
+ elements_audiopanorama-audiopanorama.$(OBJEXT)
+elements_audiopanorama_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+elements_audiopanorama_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_audiopanorama_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_audiowsincband_SOURCES = elements/audiowsincband.c
+elements_audiowsincband_OBJECTS = audiowsincband.$(OBJEXT)
+elements_audiowsincband_LDADD = $(LDADD)
+elements_audiowsincband_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_audiowsinclimit_SOURCES = elements/audiowsinclimit.c
+elements_audiowsinclimit_OBJECTS = audiowsinclimit.$(OBJEXT)
+elements_audiowsinclimit_LDADD = $(LDADD)
+elements_audiowsinclimit_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_autodetect_SOURCES = elements/autodetect.c
+elements_autodetect_OBJECTS = autodetect.$(OBJEXT)
+elements_autodetect_LDADD = $(LDADD)
+elements_autodetect_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_avimux_SOURCES = elements/avimux.c
+elements_avimux_OBJECTS = avimux.$(OBJEXT)
+elements_avimux_LDADD = $(LDADD)
+elements_avimux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_avisubtitle_SOURCES = elements/avisubtitle.c
+elements_avisubtitle_OBJECTS = avisubtitle.$(OBJEXT)
+elements_avisubtitle_LDADD = $(LDADD)
+elements_avisubtitle_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_capssetter_SOURCES = elements/capssetter.c
+elements_capssetter_OBJECTS = capssetter.$(OBJEXT)
+elements_capssetter_LDADD = $(LDADD)
+elements_capssetter_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_cmmldec_SOURCES = elements/cmmldec.c
+elements_cmmldec_OBJECTS = elements_cmmldec-cmmldec.$(OBJEXT)
+elements_cmmldec_LDADD = $(LDADD)
+elements_cmmldec_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_cmmldec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_cmmldec_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+elements_cmmlenc_SOURCES = elements/cmmlenc.c
+elements_cmmlenc_OBJECTS = elements_cmmlenc-cmmlenc.$(OBJEXT)
+elements_cmmlenc_LDADD = $(LDADD)
+elements_cmmlenc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_cmmlenc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_cmmlenc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+elements_deinterlace_SOURCES = elements/deinterlace.c
+elements_deinterlace_OBJECTS = \
+ elements_deinterlace-deinterlace.$(OBJEXT)
+elements_deinterlace_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_deinterlace_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_deinterlace_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_deinterleave_SOURCES = elements/deinterleave.c
+elements_deinterleave_OBJECTS = \
+ elements_deinterleave-deinterleave.$(OBJEXT)
+elements_deinterleave_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_deinterleave_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_deinterleave_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_equalizer_SOURCES = elements/equalizer.c
+elements_equalizer_OBJECTS = equalizer.$(OBJEXT)
+elements_equalizer_LDADD = $(LDADD)
+elements_equalizer_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_flacparse_SOURCES = elements/flacparse.c
+elements_flacparse_OBJECTS = flacparse.$(OBJEXT)
+elements_flacparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2)
+elements_flvdemux_SOURCES = elements/flvdemux.c
+elements_flvdemux_OBJECTS = flvdemux.$(OBJEXT)
+elements_flvdemux_LDADD = $(LDADD)
+elements_flvdemux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_flvmux_SOURCES = elements/flvmux.c
+elements_flvmux_OBJECTS = flvmux.$(OBJEXT)
+elements_flvmux_LDADD = $(LDADD)
+elements_flvmux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_gdkpixbufsink_SOURCES = elements/gdkpixbufsink.c
+elements_gdkpixbufsink_OBJECTS = \
+ elements_gdkpixbufsink-gdkpixbufsink.$(OBJEXT)
+elements_gdkpixbufsink_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+elements_gdkpixbufsink_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_icydemux_SOURCES = elements/icydemux.c
+elements_icydemux_OBJECTS = icydemux.$(OBJEXT)
+elements_icydemux_LDADD = $(LDADD)
+elements_icydemux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_id3demux_SOURCES = elements/id3demux.c
+elements_id3demux_OBJECTS = id3demux.$(OBJEXT)
+elements_id3demux_LDADD = $(LDADD)
+elements_id3demux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_id3v2mux_SOURCES = elements/id3v2mux.c
+elements_id3v2mux_OBJECTS = id3v2mux.$(OBJEXT)
+elements_id3v2mux_LDADD = $(LDADD)
+elements_id3v2mux_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_imagefreeze_SOURCES = elements/imagefreeze.c
+elements_imagefreeze_OBJECTS = \
+ elements_imagefreeze-imagefreeze.$(OBJEXT)
+elements_imagefreeze_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+elements_imagefreeze_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_imagefreeze_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_interleave_SOURCES = elements/interleave.c
+elements_interleave_OBJECTS = \
+ elements_interleave-interleave.$(OBJEXT)
+elements_interleave_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_interleave_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_interleave_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_jpegenc_SOURCES = elements/jpegenc.c
+elements_jpegenc_OBJECTS = elements_jpegenc-jpegenc.$(OBJEXT)
+elements_jpegenc_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+elements_jpegenc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_jpegenc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+elements_level_SOURCES = elements/level.c
+elements_level_OBJECTS = level.$(OBJEXT)
+elements_level_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+elements_matroskamux_SOURCES = elements/matroskamux.c
+elements_matroskamux_OBJECTS = matroskamux.$(OBJEXT)
+elements_matroskamux_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+elements_matroskaparse_SOURCES = elements/matroskaparse.c
+elements_matroskaparse_OBJECTS = matroskaparse.$(OBJEXT)
+elements_matroskaparse_LDADD = $(LDADD)
+elements_matroskaparse_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_mpegaudioparse_SOURCES = elements/mpegaudioparse.c
+elements_mpegaudioparse_OBJECTS = mpegaudioparse.$(OBJEXT)
+elements_mpegaudioparse_DEPENDENCIES = libparser.la \
+ $(am__DEPENDENCIES_2)
+elements_multifile_SOURCES = elements/multifile.c
+elements_multifile_OBJECTS = elements_multifile-multifile.$(OBJEXT)
+elements_multifile_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+elements_multifile_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_multifile_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_qtmux_SOURCES = elements/qtmux.c
+elements_qtmux_OBJECTS = elements_qtmux-qtmux.$(OBJEXT)
+elements_qtmux_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+elements_qtmux_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_qtmux_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+elements_rganalysis_SOURCES = elements/rganalysis.c
+elements_rganalysis_OBJECTS = rganalysis.$(OBJEXT)
+elements_rganalysis_LDADD = $(LDADD)
+elements_rganalysis_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_rglimiter_SOURCES = elements/rglimiter.c
+elements_rglimiter_OBJECTS = rglimiter.$(OBJEXT)
+elements_rglimiter_LDADD = $(LDADD)
+elements_rglimiter_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_rgvolume_SOURCES = elements/rgvolume.c
+elements_rgvolume_OBJECTS = rgvolume.$(OBJEXT)
+elements_rgvolume_LDADD = $(LDADD)
+elements_rgvolume_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_rtp_payloading_SOURCES = elements/rtp-payloading.c
+elements_rtp_payloading_OBJECTS = rtp-payloading.$(OBJEXT)
+elements_rtp_payloading_LDADD = $(LDADD)
+elements_rtp_payloading_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_rtpbin_SOURCES = elements/rtpbin.c
+elements_rtpbin_OBJECTS = rtpbin.$(OBJEXT)
+elements_rtpbin_LDADD = $(LDADD)
+elements_rtpbin_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_elements_rtpbin_buffer_list_OBJECTS = \
+ elements_rtpbin_buffer_list-rtpbin_buffer_list.$(OBJEXT)
+elements_rtpbin_buffer_list_OBJECTS = \
+ $(am_elements_rtpbin_buffer_list_OBJECTS)
+elements_rtpbin_buffer_list_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+elements_rtpbin_buffer_list_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_rtpbin_buffer_list_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_rtpjitterbuffer_SOURCES = elements/rtpjitterbuffer.c
+elements_rtpjitterbuffer_OBJECTS = rtpjitterbuffer.$(OBJEXT)
+elements_rtpjitterbuffer_LDADD = $(LDADD)
+elements_rtpjitterbuffer_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_shapewipe_SOURCES = elements/shapewipe.c
+elements_shapewipe_OBJECTS = shapewipe.$(OBJEXT)
+elements_shapewipe_LDADD = $(LDADD)
+elements_shapewipe_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_souphttpsrc_SOURCES = elements/souphttpsrc.c
+elements_souphttpsrc_OBJECTS = \
+ elements_souphttpsrc-souphttpsrc.$(OBJEXT)
+elements_souphttpsrc_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_souphttpsrc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_souphttpsrc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_spectrum_SOURCES = elements/spectrum.c
+elements_spectrum_OBJECTS = spectrum.$(OBJEXT)
+elements_spectrum_LDADD = $(LDADD)
+elements_spectrum_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_sunaudio_SOURCES = elements/sunaudio.c
+elements_sunaudio_OBJECTS = elements_sunaudio-sunaudio.$(OBJEXT)
+elements_sunaudio_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_sunaudio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_sunaudio_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+elements_udpsink_SOURCES = elements/udpsink.c
+elements_udpsink_OBJECTS = udpsink.$(OBJEXT)
+elements_udpsink_LDADD = $(LDADD)
+elements_udpsink_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_videocrop_SOURCES = elements/videocrop.c
+elements_videocrop_OBJECTS = elements_videocrop-videocrop.$(OBJEXT)
+elements_videocrop_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_videocrop_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_videocrop_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_videofilter_SOURCES = elements/videofilter.c
+elements_videofilter_OBJECTS = \
+ elements_videofilter-videofilter.$(OBJEXT)
+elements_videofilter_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+elements_videofilter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(elements_videofilter_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+elements_wavpackdec_SOURCES = elements/wavpackdec.c
+elements_wavpackdec_OBJECTS = wavpackdec.$(OBJEXT)
+elements_wavpackdec_LDADD = $(LDADD)
+elements_wavpackdec_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_wavpackenc_SOURCES = elements/wavpackenc.c
+elements_wavpackenc_OBJECTS = wavpackenc.$(OBJEXT)
+elements_wavpackenc_LDADD = $(LDADD)
+elements_wavpackenc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_wavpackparse_SOURCES = elements/wavpackparse.c
+elements_wavpackparse_OBJECTS = wavpackparse.$(OBJEXT)
+elements_wavpackparse_LDADD = $(LDADD)
+elements_wavpackparse_DEPENDENCIES = $(am__DEPENDENCIES_1)
+elements_y4menc_SOURCES = elements/y4menc.c
+elements_y4menc_OBJECTS = y4menc.$(OBJEXT)
+elements_y4menc_LDADD = $(LDADD)
+elements_y4menc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+generic_index_SOURCES = generic/index.c
+generic_index_OBJECTS = index.$(OBJEXT)
+generic_index_LDADD = $(LDADD)
+generic_index_DEPENDENCIES = $(am__DEPENDENCIES_1)
+generic_states_SOURCES = generic/states.c
+generic_states_OBJECTS = states.$(OBJEXT)
+generic_states_LDADD = $(LDADD)
+generic_states_DEPENDENCIES = $(am__DEPENDENCIES_1)
+nodist_orc_deinterlace_OBJECTS = \
+ orc_deinterlace-deinterlace.$(OBJEXT)
+orc_deinterlace_OBJECTS = $(nodist_orc_deinterlace_OBJECTS)
+orc_deinterlace_DEPENDENCIES = $(am__DEPENDENCIES_1)
+orc_deinterlace_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(orc_deinterlace_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+nodist_orc_videobox_OBJECTS = orc_videobox-videobox.$(OBJEXT)
+orc_videobox_OBJECTS = $(nodist_orc_videobox_OBJECTS)
+orc_videobox_DEPENDENCIES = $(am__DEPENDENCIES_1)
+orc_videobox_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(orc_videobox_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+nodist_orc_videomixer_OBJECTS = orc_videomixer-videomixer.$(OBJEXT)
+orc_videomixer_OBJECTS = $(nodist_orc_videomixer_OBJECTS)
+orc_videomixer_DEPENDENCIES = $(am__DEPENDENCIES_1)
+orc_videomixer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(orc_videomixer_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+pipelines_effectv_SOURCES = pipelines/effectv.c
+pipelines_effectv_OBJECTS = effectv.$(OBJEXT)
+pipelines_effectv_LDADD = $(LDADD)
+pipelines_effectv_DEPENDENCIES = $(am__DEPENDENCIES_1)
+pipelines_flacdec_SOURCES = pipelines/flacdec.c
+pipelines_flacdec_OBJECTS = flacdec.$(OBJEXT)
+pipelines_flacdec_LDADD = $(LDADD)
+pipelines_flacdec_DEPENDENCIES = $(am__DEPENDENCIES_1)
+pipelines_simple_launch_lines_SOURCES = \
+ pipelines/simple-launch-lines.c
+pipelines_simple_launch_lines_OBJECTS = simple-launch-lines.$(OBJEXT)
+pipelines_simple_launch_lines_LDADD = $(LDADD)
+pipelines_simple_launch_lines_DEPENDENCIES = $(am__DEPENDENCIES_1)
+pipelines_tagschecking_SOURCES = pipelines/tagschecking.c
+pipelines_tagschecking_OBJECTS = tagschecking.$(OBJEXT)
+pipelines_tagschecking_LDADD = $(LDADD)
+pipelines_tagschecking_DEPENDENCIES = $(am__DEPENDENCIES_1)
+pipelines_wavenc_SOURCES = pipelines/wavenc.c
+pipelines_wavenc_OBJECTS = pipelines_wavenc-wavenc.$(OBJEXT)
+pipelines_wavenc_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2)
+pipelines_wavenc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(pipelines_wavenc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+pipelines_wavpack_SOURCES = pipelines/wavpack.c
+pipelines_wavpack_OBJECTS = pipelines_wavpack-wavpack.$(OBJEXT)
+pipelines_wavpack_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+pipelines_wavpack_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(pipelines_wavpack_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \
+ elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \
+ elements/apev2mux.c elements/aspectratiocrop.c \
+ elements/audioamplify.c elements/audiochebband.c \
+ elements/audiocheblimit.c elements/audiodynamic.c \
+ elements/audioecho.c elements/audiofirfilter.c \
+ elements/audioiirfilter.c elements/audioinvert.c \
+ elements/audiopanorama.c elements/audiowsincband.c \
+ elements/audiowsinclimit.c elements/autodetect.c \
+ elements/avimux.c elements/avisubtitle.c elements/capssetter.c \
+ elements/cmmldec.c elements/cmmlenc.c elements/deinterlace.c \
+ elements/deinterleave.c elements/equalizer.c \
+ elements/flacparse.c elements/flvdemux.c elements/flvmux.c \
+ elements/gdkpixbufsink.c elements/icydemux.c \
+ elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \
+ elements/interleave.c elements/jpegenc.c elements/level.c \
+ elements/matroskamux.c elements/matroskaparse.c \
+ elements/mpegaudioparse.c elements/multifile.c \
+ elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \
+ elements/rgvolume.c elements/rtp-payloading.c \
+ elements/rtpbin.c $(elements_rtpbin_buffer_list_SOURCES) \
+ elements/rtpjitterbuffer.c elements/shapewipe.c \
+ elements/souphttpsrc.c elements/spectrum.c elements/sunaudio.c \
+ elements/udpsink.c elements/videocrop.c elements/videofilter.c \
+ elements/wavpackdec.c elements/wavpackenc.c \
+ elements/wavpackparse.c elements/y4menc.c generic/index.c \
+ generic/states.c $(nodist_orc_deinterlace_SOURCES) \
+ $(nodist_orc_videobox_SOURCES) \
+ $(nodist_orc_videomixer_SOURCES) pipelines/effectv.c \
+ pipelines/flacdec.c pipelines/simple-launch-lines.c \
+ pipelines/tagschecking.c pipelines/wavenc.c \
+ pipelines/wavpack.c
+DIST_SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \
+ elements/ac3parse.c elements/alphacolor.c elements/amrparse.c \
+ elements/apev2mux.c elements/aspectratiocrop.c \
+ elements/audioamplify.c elements/audiochebband.c \
+ elements/audiocheblimit.c elements/audiodynamic.c \
+ elements/audioecho.c elements/audiofirfilter.c \
+ elements/audioiirfilter.c elements/audioinvert.c \
+ elements/audiopanorama.c elements/audiowsincband.c \
+ elements/audiowsinclimit.c elements/autodetect.c \
+ elements/avimux.c elements/avisubtitle.c elements/capssetter.c \
+ elements/cmmldec.c elements/cmmlenc.c elements/deinterlace.c \
+ elements/deinterleave.c elements/equalizer.c \
+ elements/flacparse.c elements/flvdemux.c elements/flvmux.c \
+ elements/gdkpixbufsink.c elements/icydemux.c \
+ elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \
+ elements/interleave.c elements/jpegenc.c elements/level.c \
+ elements/matroskamux.c elements/matroskaparse.c \
+ elements/mpegaudioparse.c elements/multifile.c \
+ elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \
+ elements/rgvolume.c elements/rtp-payloading.c \
+ elements/rtpbin.c $(elements_rtpbin_buffer_list_SOURCES) \
+ elements/rtpjitterbuffer.c elements/shapewipe.c \
+ elements/souphttpsrc.c elements/spectrum.c elements/sunaudio.c \
+ elements/udpsink.c elements/videocrop.c elements/videofilter.c \
+ elements/wavpackdec.c elements/wavpackenc.c \
+ elements/wavpackparse.c elements/y4menc.c generic/index.c \
+ generic/states.c pipelines/effectv.c pipelines/flacdec.c \
+ pipelines/simple-launch-lines.c pipelines/tagschecking.c \
+ pipelines/wavenc.c pipelines/wavpack.c
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+LOOPS = 10
+
+# inspect every plugin feature
+GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_MAJORMINOR)
+CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.reg
+TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
+REGISTRY_ENVIRONMENT = \
+ GST_REGISTRY=$(CHECK_REGISTRY)
+
+TESTS_ENVIRONMENT = \
+ $(REGISTRY_ENVIRONMENT) \
+ GST_PLUGIN_SYSTEM_PATH= \
+ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR) \
+ GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good@$(top_builddir)" \
+ GST_STATE_IGNORE_ELEMENTS="aasink autoaudiosrc autoaudiosink autovideosrc autovideosink \
+ cacasink cairotextoverlay gconfaudiosrc gconfvideosrc gconfaudiosink gconfvideosink \
+ halaudiosrc halaudiosink jackaudiosrc jackaudiosink \
+ osssrc osssink osxaudiosink osxaudiosrc osxvideosrc osxvideosink \
+ pulsesink pulsesrc pulsemixer v4l2src"
+
+
+# fake device drivers: we could run hardware element tests against dummy drivers
+# v4l2: vivo (part of normal kernel)
+# modprobe vivo;
+# gst-launch v4l2src device="/dev/video1" ! xvimagesink;
+# rmmod vivo
+#
+# alsa: snd-dummy (part of normal alsa, not removable)
+# modprobe snd-dummy;
+# gst-launch alsasrc device="hw:2" ! fakesink
+# gst-launch fakesrc ! alsasink device="hw:2"
+#
+# need a way to figure out value for the device property
+
+# the core dumps of some machines have PIDs appended
+CLEANFILES = core.* test-registry.*
+@USE_ANNODEX_FALSE@check_annodex =
+@USE_ANNODEX_TRUE@check_annodex = \
+@USE_ANNODEX_TRUE@ elements/cmmldec \
+@USE_ANNODEX_TRUE@ elements/cmmlenc
+
+@USE_FLAC_FALSE@check_flac =
+@USE_FLAC_TRUE@check_flac = pipelines/flacdec
+@USE_GDK_PIXBUF_FALSE@check_gdkpixbuf =
+@USE_GDK_PIXBUF_TRUE@check_gdkpixbuf = elements/gdkpixbufsink
+@USE_JPEG_FALSE@check_jpeg =
+@USE_JPEG_TRUE@check_jpeg = elements/jpegenc
+@USE_SOUP_FALSE@check_soup =
+@USE_SOUP_TRUE@check_soup = elements/souphttpsrc
+@USE_SUNAUDIO_FALSE@check_sunaudio =
+@USE_SUNAUDIO_TRUE@check_sunaudio = elements/sunaudio
+@USE_TAGLIB_FALSE@check_taglib =
+@USE_TAGLIB_TRUE@check_taglib = \
+@USE_TAGLIB_TRUE@ elements/id3v2mux \
+@USE_TAGLIB_TRUE@ elements/apev2mux
+
+@USE_WAVPACK_FALSE@check_wavpack =
+@USE_WAVPACK_TRUE@check_wavpack = \
+@USE_WAVPACK_TRUE@ elements/wavpackparse \
+@USE_WAVPACK_TRUE@ elements/wavpackdec \
+@USE_WAVPACK_TRUE@ elements/wavpackenc \
+@USE_WAVPACK_TRUE@ pipelines/wavpack
+
+@HAVE_ORC_FALSE@check_orc =
+@HAVE_ORC_TRUE@check_orc = orc/deinterlace orc/videomixer orc/videobox
+VALGRIND_TO_FIX = \
+ elements/rtp-payloading
+
+TESTS = $(check_PROGRAMS)
+AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
+ $(GST_OPTION_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+ -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
+
+LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
+
+# valgrind testing
+# videocrop disabled since it takes way too long in valgrind
+VALGRIND_TESTS_DISABLE = \
+ elements/videocrop \
+ $(VALGRIND_TO_FIX)
+
+SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-good.supp
+
+# parser unit test convenience lib
+noinst_LTLIBRARIES = libparser.la
+libparser_la_SOURCES = elements/parser.c elements/parser.h
+libparser_la_CFLAGS = \
+ -I$(top_srcdir)/tests/check \
+ $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS)
+
+elements_aacparse_LDADD = libparser.la $(LDADD)
+elements_ac3parse_LDADD = libparser.la $(LDADD)
+elements_amrparse_LDADD = libparser.la $(LDADD)
+elements_flacparse_LDADD = libparser.la $(LDADD)
+elements_mpegaudioparse_LDADD = libparser.la $(LDADD)
+elements_aspectratiocrop_LDADD = $(LDADD)
+elements_aspectratiocrop_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_audiopanorama_LDADD = \
+ $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) \
+ $(LDADD)
+
+elements_audiopanorama_CFLAGS = \
+ $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
+ $(CFLAGS) $(AM_CFLAGS)
+
+elements_cmmldec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_cmmlenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
+elements_deinterleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_deinterleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+elements_interleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_interleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+elements_imagefreeze_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_imagefreeze_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(LDADD)
+elements_jpegenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
+elements_jpegenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-0.10 $(GST_BASE_LIBS) $(LDADD)
+elements_level_LDADD = $(LDADD) $(LIBM)
+elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM)
+elements_multifile_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+elements_multifile_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_LIBS) $(LDADD) $(LIBM)
+elements_qtmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+elements_qtmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-@GST_MAJORMINOR@ \
+ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
+
+elements_rtpbin_buffer_list_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+ $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(GST_CHECK_CFLAGS) $(AM_CFLAGS)
+
+elements_rtpbin_buffer_list_LDADD = $(GST_PLUGINS_BASE_LIBS) \
+ -lgstnetbuffer-@GST_MAJORMINOR@ -lgstrtp-@GST_MAJORMINOR@ \
+ $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
+
+elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c
+elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS)
+elements_souphttpsrc_LDADD = $(SOUP_LIBS) $(LDADD)
+elements_sunaudio_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) \
+ $(AM_CFLAGS)
+
+elements_sunaudio_LDADD = \
+ $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ \
+ $(LDADD)
+
+elements_videocrop_LDADD = $(GST_BASE_LIBS) $(LDADD)
+elements_videocrop_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_videofilter_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+elements_videofilter_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
+
+# FIXME: configure should check for gdk-pixbuf not gtk
+# only need video.h header, not the lib
+elements_gdkpixbufsink_CFLAGS = \
+ $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS)
+
+elements_gdkpixbufsink_LDADD = \
+ $(LDADD) $(GDK_PIXBUF_LIBS)
+
+pipelines_wavenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+pipelines_wavenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
+pipelines_wavpack_LDADD = $(LDADD) $(GST_BASE_LIBS)
+pipelines_wavpack_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+orc_deinterlace_CFLAGS = $(ORC_CFLAGS)
+orc_deinterlace_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_deinterlace_SOURCES = orc/deinterlace.c
+orc_videomixer_CFLAGS = $(ORC_CFLAGS)
+orc_videomixer_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_videomixer_SOURCES = orc/videomixer.c
+orc_videobox_CFLAGS = $(ORC_CFLAGS)
+orc_videobox_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_videobox_SOURCES = orc/videobox.c
+EXTRA_DIST = gst-plugins-good.supp
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/check.mak $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/check/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/check/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/common/check.mak:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libparser.la: $(libparser_la_OBJECTS) $(libparser_la_DEPENDENCIES) $(EXTRA_libparser_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libparser_la_LINK) $(libparser_la_OBJECTS) $(libparser_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+elements/$(am__dirstamp):
+ @$(MKDIR_P) elements
+ @: > elements/$(am__dirstamp)
+elements/aacparse$(EXEEXT): $(elements_aacparse_OBJECTS) $(elements_aacparse_DEPENDENCIES) $(EXTRA_elements_aacparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/aacparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_aacparse_OBJECTS) $(elements_aacparse_LDADD) $(LIBS)
+elements/ac3parse$(EXEEXT): $(elements_ac3parse_OBJECTS) $(elements_ac3parse_DEPENDENCIES) $(EXTRA_elements_ac3parse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/ac3parse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_ac3parse_OBJECTS) $(elements_ac3parse_LDADD) $(LIBS)
+elements/alphacolor$(EXEEXT): $(elements_alphacolor_OBJECTS) $(elements_alphacolor_DEPENDENCIES) $(EXTRA_elements_alphacolor_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/alphacolor$(EXEEXT)
+ $(AM_V_CCLD)$(elements_alphacolor_LINK) $(elements_alphacolor_OBJECTS) $(elements_alphacolor_LDADD) $(LIBS)
+elements/amrparse$(EXEEXT): $(elements_amrparse_OBJECTS) $(elements_amrparse_DEPENDENCIES) $(EXTRA_elements_amrparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/amrparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_amrparse_OBJECTS) $(elements_amrparse_LDADD) $(LIBS)
+elements/apev2mux$(EXEEXT): $(elements_apev2mux_OBJECTS) $(elements_apev2mux_DEPENDENCIES) $(EXTRA_elements_apev2mux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/apev2mux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_apev2mux_OBJECTS) $(elements_apev2mux_LDADD) $(LIBS)
+elements/aspectratiocrop$(EXEEXT): $(elements_aspectratiocrop_OBJECTS) $(elements_aspectratiocrop_DEPENDENCIES) $(EXTRA_elements_aspectratiocrop_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/aspectratiocrop$(EXEEXT)
+ $(AM_V_CCLD)$(elements_aspectratiocrop_LINK) $(elements_aspectratiocrop_OBJECTS) $(elements_aspectratiocrop_LDADD) $(LIBS)
+elements/audioamplify$(EXEEXT): $(elements_audioamplify_OBJECTS) $(elements_audioamplify_DEPENDENCIES) $(EXTRA_elements_audioamplify_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audioamplify$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audioamplify_OBJECTS) $(elements_audioamplify_LDADD) $(LIBS)
+elements/audiochebband$(EXEEXT): $(elements_audiochebband_OBJECTS) $(elements_audiochebband_DEPENDENCIES) $(EXTRA_elements_audiochebband_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiochebband$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiochebband_OBJECTS) $(elements_audiochebband_LDADD) $(LIBS)
+elements/audiocheblimit$(EXEEXT): $(elements_audiocheblimit_OBJECTS) $(elements_audiocheblimit_DEPENDENCIES) $(EXTRA_elements_audiocheblimit_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiocheblimit$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiocheblimit_OBJECTS) $(elements_audiocheblimit_LDADD) $(LIBS)
+elements/audiodynamic$(EXEEXT): $(elements_audiodynamic_OBJECTS) $(elements_audiodynamic_DEPENDENCIES) $(EXTRA_elements_audiodynamic_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiodynamic$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiodynamic_OBJECTS) $(elements_audiodynamic_LDADD) $(LIBS)
+elements/audioecho$(EXEEXT): $(elements_audioecho_OBJECTS) $(elements_audioecho_DEPENDENCIES) $(EXTRA_elements_audioecho_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audioecho$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audioecho_OBJECTS) $(elements_audioecho_LDADD) $(LIBS)
+elements/audiofirfilter$(EXEEXT): $(elements_audiofirfilter_OBJECTS) $(elements_audiofirfilter_DEPENDENCIES) $(EXTRA_elements_audiofirfilter_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiofirfilter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiofirfilter_OBJECTS) $(elements_audiofirfilter_LDADD) $(LIBS)
+elements/audioiirfilter$(EXEEXT): $(elements_audioiirfilter_OBJECTS) $(elements_audioiirfilter_DEPENDENCIES) $(EXTRA_elements_audioiirfilter_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audioiirfilter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audioiirfilter_OBJECTS) $(elements_audioiirfilter_LDADD) $(LIBS)
+elements/audioinvert$(EXEEXT): $(elements_audioinvert_OBJECTS) $(elements_audioinvert_DEPENDENCIES) $(EXTRA_elements_audioinvert_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audioinvert$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audioinvert_OBJECTS) $(elements_audioinvert_LDADD) $(LIBS)
+elements/audiopanorama$(EXEEXT): $(elements_audiopanorama_OBJECTS) $(elements_audiopanorama_DEPENDENCIES) $(EXTRA_elements_audiopanorama_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiopanorama$(EXEEXT)
+ $(AM_V_CCLD)$(elements_audiopanorama_LINK) $(elements_audiopanorama_OBJECTS) $(elements_audiopanorama_LDADD) $(LIBS)
+elements/audiowsincband$(EXEEXT): $(elements_audiowsincband_OBJECTS) $(elements_audiowsincband_DEPENDENCIES) $(EXTRA_elements_audiowsincband_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiowsincband$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiowsincband_OBJECTS) $(elements_audiowsincband_LDADD) $(LIBS)
+elements/audiowsinclimit$(EXEEXT): $(elements_audiowsinclimit_OBJECTS) $(elements_audiowsinclimit_DEPENDENCIES) $(EXTRA_elements_audiowsinclimit_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/audiowsinclimit$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_audiowsinclimit_OBJECTS) $(elements_audiowsinclimit_LDADD) $(LIBS)
+elements/autodetect$(EXEEXT): $(elements_autodetect_OBJECTS) $(elements_autodetect_DEPENDENCIES) $(EXTRA_elements_autodetect_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/autodetect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_autodetect_OBJECTS) $(elements_autodetect_LDADD) $(LIBS)
+elements/avimux$(EXEEXT): $(elements_avimux_OBJECTS) $(elements_avimux_DEPENDENCIES) $(EXTRA_elements_avimux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/avimux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_avimux_OBJECTS) $(elements_avimux_LDADD) $(LIBS)
+elements/avisubtitle$(EXEEXT): $(elements_avisubtitle_OBJECTS) $(elements_avisubtitle_DEPENDENCIES) $(EXTRA_elements_avisubtitle_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/avisubtitle$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_avisubtitle_OBJECTS) $(elements_avisubtitle_LDADD) $(LIBS)
+elements/capssetter$(EXEEXT): $(elements_capssetter_OBJECTS) $(elements_capssetter_DEPENDENCIES) $(EXTRA_elements_capssetter_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/capssetter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_capssetter_OBJECTS) $(elements_capssetter_LDADD) $(LIBS)
+elements/cmmldec$(EXEEXT): $(elements_cmmldec_OBJECTS) $(elements_cmmldec_DEPENDENCIES) $(EXTRA_elements_cmmldec_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/cmmldec$(EXEEXT)
+ $(AM_V_CCLD)$(elements_cmmldec_LINK) $(elements_cmmldec_OBJECTS) $(elements_cmmldec_LDADD) $(LIBS)
+elements/cmmlenc$(EXEEXT): $(elements_cmmlenc_OBJECTS) $(elements_cmmlenc_DEPENDENCIES) $(EXTRA_elements_cmmlenc_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/cmmlenc$(EXEEXT)
+ $(AM_V_CCLD)$(elements_cmmlenc_LINK) $(elements_cmmlenc_OBJECTS) $(elements_cmmlenc_LDADD) $(LIBS)
+elements/deinterlace$(EXEEXT): $(elements_deinterlace_OBJECTS) $(elements_deinterlace_DEPENDENCIES) $(EXTRA_elements_deinterlace_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/deinterlace$(EXEEXT)
+ $(AM_V_CCLD)$(elements_deinterlace_LINK) $(elements_deinterlace_OBJECTS) $(elements_deinterlace_LDADD) $(LIBS)
+elements/deinterleave$(EXEEXT): $(elements_deinterleave_OBJECTS) $(elements_deinterleave_DEPENDENCIES) $(EXTRA_elements_deinterleave_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/deinterleave$(EXEEXT)
+ $(AM_V_CCLD)$(elements_deinterleave_LINK) $(elements_deinterleave_OBJECTS) $(elements_deinterleave_LDADD) $(LIBS)
+elements/equalizer$(EXEEXT): $(elements_equalizer_OBJECTS) $(elements_equalizer_DEPENDENCIES) $(EXTRA_elements_equalizer_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/equalizer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_equalizer_OBJECTS) $(elements_equalizer_LDADD) $(LIBS)
+elements/flacparse$(EXEEXT): $(elements_flacparse_OBJECTS) $(elements_flacparse_DEPENDENCIES) $(EXTRA_elements_flacparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/flacparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_flacparse_OBJECTS) $(elements_flacparse_LDADD) $(LIBS)
+elements/flvdemux$(EXEEXT): $(elements_flvdemux_OBJECTS) $(elements_flvdemux_DEPENDENCIES) $(EXTRA_elements_flvdemux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/flvdemux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_flvdemux_OBJECTS) $(elements_flvdemux_LDADD) $(LIBS)
+elements/flvmux$(EXEEXT): $(elements_flvmux_OBJECTS) $(elements_flvmux_DEPENDENCIES) $(EXTRA_elements_flvmux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/flvmux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_flvmux_OBJECTS) $(elements_flvmux_LDADD) $(LIBS)
+elements/gdkpixbufsink$(EXEEXT): $(elements_gdkpixbufsink_OBJECTS) $(elements_gdkpixbufsink_DEPENDENCIES) $(EXTRA_elements_gdkpixbufsink_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/gdkpixbufsink$(EXEEXT)
+ $(AM_V_CCLD)$(elements_gdkpixbufsink_LINK) $(elements_gdkpixbufsink_OBJECTS) $(elements_gdkpixbufsink_LDADD) $(LIBS)
+elements/icydemux$(EXEEXT): $(elements_icydemux_OBJECTS) $(elements_icydemux_DEPENDENCIES) $(EXTRA_elements_icydemux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/icydemux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_icydemux_OBJECTS) $(elements_icydemux_LDADD) $(LIBS)
+elements/id3demux$(EXEEXT): $(elements_id3demux_OBJECTS) $(elements_id3demux_DEPENDENCIES) $(EXTRA_elements_id3demux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/id3demux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_id3demux_OBJECTS) $(elements_id3demux_LDADD) $(LIBS)
+elements/id3v2mux$(EXEEXT): $(elements_id3v2mux_OBJECTS) $(elements_id3v2mux_DEPENDENCIES) $(EXTRA_elements_id3v2mux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/id3v2mux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_id3v2mux_OBJECTS) $(elements_id3v2mux_LDADD) $(LIBS)
+elements/imagefreeze$(EXEEXT): $(elements_imagefreeze_OBJECTS) $(elements_imagefreeze_DEPENDENCIES) $(EXTRA_elements_imagefreeze_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/imagefreeze$(EXEEXT)
+ $(AM_V_CCLD)$(elements_imagefreeze_LINK) $(elements_imagefreeze_OBJECTS) $(elements_imagefreeze_LDADD) $(LIBS)
+elements/interleave$(EXEEXT): $(elements_interleave_OBJECTS) $(elements_interleave_DEPENDENCIES) $(EXTRA_elements_interleave_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/interleave$(EXEEXT)
+ $(AM_V_CCLD)$(elements_interleave_LINK) $(elements_interleave_OBJECTS) $(elements_interleave_LDADD) $(LIBS)
+elements/jpegenc$(EXEEXT): $(elements_jpegenc_OBJECTS) $(elements_jpegenc_DEPENDENCIES) $(EXTRA_elements_jpegenc_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/jpegenc$(EXEEXT)
+ $(AM_V_CCLD)$(elements_jpegenc_LINK) $(elements_jpegenc_OBJECTS) $(elements_jpegenc_LDADD) $(LIBS)
+elements/level$(EXEEXT): $(elements_level_OBJECTS) $(elements_level_DEPENDENCIES) $(EXTRA_elements_level_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/level$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_level_OBJECTS) $(elements_level_LDADD) $(LIBS)
+elements/matroskamux$(EXEEXT): $(elements_matroskamux_OBJECTS) $(elements_matroskamux_DEPENDENCIES) $(EXTRA_elements_matroskamux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/matroskamux$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_matroskamux_OBJECTS) $(elements_matroskamux_LDADD) $(LIBS)
+elements/matroskaparse$(EXEEXT): $(elements_matroskaparse_OBJECTS) $(elements_matroskaparse_DEPENDENCIES) $(EXTRA_elements_matroskaparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/matroskaparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_matroskaparse_OBJECTS) $(elements_matroskaparse_LDADD) $(LIBS)
+elements/mpegaudioparse$(EXEEXT): $(elements_mpegaudioparse_OBJECTS) $(elements_mpegaudioparse_DEPENDENCIES) $(EXTRA_elements_mpegaudioparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/mpegaudioparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_mpegaudioparse_OBJECTS) $(elements_mpegaudioparse_LDADD) $(LIBS)
+elements/multifile$(EXEEXT): $(elements_multifile_OBJECTS) $(elements_multifile_DEPENDENCIES) $(EXTRA_elements_multifile_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/multifile$(EXEEXT)
+ $(AM_V_CCLD)$(elements_multifile_LINK) $(elements_multifile_OBJECTS) $(elements_multifile_LDADD) $(LIBS)
+elements/qtmux$(EXEEXT): $(elements_qtmux_OBJECTS) $(elements_qtmux_DEPENDENCIES) $(EXTRA_elements_qtmux_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/qtmux$(EXEEXT)
+ $(AM_V_CCLD)$(elements_qtmux_LINK) $(elements_qtmux_OBJECTS) $(elements_qtmux_LDADD) $(LIBS)
+elements/rganalysis$(EXEEXT): $(elements_rganalysis_OBJECTS) $(elements_rganalysis_DEPENDENCIES) $(EXTRA_elements_rganalysis_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rganalysis$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rganalysis_OBJECTS) $(elements_rganalysis_LDADD) $(LIBS)
+elements/rglimiter$(EXEEXT): $(elements_rglimiter_OBJECTS) $(elements_rglimiter_DEPENDENCIES) $(EXTRA_elements_rglimiter_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rglimiter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rglimiter_OBJECTS) $(elements_rglimiter_LDADD) $(LIBS)
+elements/rgvolume$(EXEEXT): $(elements_rgvolume_OBJECTS) $(elements_rgvolume_DEPENDENCIES) $(EXTRA_elements_rgvolume_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rgvolume$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rgvolume_OBJECTS) $(elements_rgvolume_LDADD) $(LIBS)
+elements/rtp-payloading$(EXEEXT): $(elements_rtp_payloading_OBJECTS) $(elements_rtp_payloading_DEPENDENCIES) $(EXTRA_elements_rtp_payloading_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rtp-payloading$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rtp_payloading_OBJECTS) $(elements_rtp_payloading_LDADD) $(LIBS)
+elements/rtpbin$(EXEEXT): $(elements_rtpbin_OBJECTS) $(elements_rtpbin_DEPENDENCIES) $(EXTRA_elements_rtpbin_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rtpbin$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rtpbin_OBJECTS) $(elements_rtpbin_LDADD) $(LIBS)
+elements/rtpbin_buffer_list$(EXEEXT): $(elements_rtpbin_buffer_list_OBJECTS) $(elements_rtpbin_buffer_list_DEPENDENCIES) $(EXTRA_elements_rtpbin_buffer_list_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rtpbin_buffer_list$(EXEEXT)
+ $(AM_V_CCLD)$(elements_rtpbin_buffer_list_LINK) $(elements_rtpbin_buffer_list_OBJECTS) $(elements_rtpbin_buffer_list_LDADD) $(LIBS)
+elements/rtpjitterbuffer$(EXEEXT): $(elements_rtpjitterbuffer_OBJECTS) $(elements_rtpjitterbuffer_DEPENDENCIES) $(EXTRA_elements_rtpjitterbuffer_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/rtpjitterbuffer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_rtpjitterbuffer_OBJECTS) $(elements_rtpjitterbuffer_LDADD) $(LIBS)
+elements/shapewipe$(EXEEXT): $(elements_shapewipe_OBJECTS) $(elements_shapewipe_DEPENDENCIES) $(EXTRA_elements_shapewipe_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/shapewipe$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_shapewipe_OBJECTS) $(elements_shapewipe_LDADD) $(LIBS)
+elements/souphttpsrc$(EXEEXT): $(elements_souphttpsrc_OBJECTS) $(elements_souphttpsrc_DEPENDENCIES) $(EXTRA_elements_souphttpsrc_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/souphttpsrc$(EXEEXT)
+ $(AM_V_CCLD)$(elements_souphttpsrc_LINK) $(elements_souphttpsrc_OBJECTS) $(elements_souphttpsrc_LDADD) $(LIBS)
+elements/spectrum$(EXEEXT): $(elements_spectrum_OBJECTS) $(elements_spectrum_DEPENDENCIES) $(EXTRA_elements_spectrum_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/spectrum$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_spectrum_OBJECTS) $(elements_spectrum_LDADD) $(LIBS)
+elements/sunaudio$(EXEEXT): $(elements_sunaudio_OBJECTS) $(elements_sunaudio_DEPENDENCIES) $(EXTRA_elements_sunaudio_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/sunaudio$(EXEEXT)
+ $(AM_V_CCLD)$(elements_sunaudio_LINK) $(elements_sunaudio_OBJECTS) $(elements_sunaudio_LDADD) $(LIBS)
+elements/udpsink$(EXEEXT): $(elements_udpsink_OBJECTS) $(elements_udpsink_DEPENDENCIES) $(EXTRA_elements_udpsink_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/udpsink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_udpsink_OBJECTS) $(elements_udpsink_LDADD) $(LIBS)
+elements/videocrop$(EXEEXT): $(elements_videocrop_OBJECTS) $(elements_videocrop_DEPENDENCIES) $(EXTRA_elements_videocrop_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/videocrop$(EXEEXT)
+ $(AM_V_CCLD)$(elements_videocrop_LINK) $(elements_videocrop_OBJECTS) $(elements_videocrop_LDADD) $(LIBS)
+elements/videofilter$(EXEEXT): $(elements_videofilter_OBJECTS) $(elements_videofilter_DEPENDENCIES) $(EXTRA_elements_videofilter_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/videofilter$(EXEEXT)
+ $(AM_V_CCLD)$(elements_videofilter_LINK) $(elements_videofilter_OBJECTS) $(elements_videofilter_LDADD) $(LIBS)
+elements/wavpackdec$(EXEEXT): $(elements_wavpackdec_OBJECTS) $(elements_wavpackdec_DEPENDENCIES) $(EXTRA_elements_wavpackdec_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/wavpackdec$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_wavpackdec_OBJECTS) $(elements_wavpackdec_LDADD) $(LIBS)
+elements/wavpackenc$(EXEEXT): $(elements_wavpackenc_OBJECTS) $(elements_wavpackenc_DEPENDENCIES) $(EXTRA_elements_wavpackenc_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/wavpackenc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_wavpackenc_OBJECTS) $(elements_wavpackenc_LDADD) $(LIBS)
+elements/wavpackparse$(EXEEXT): $(elements_wavpackparse_OBJECTS) $(elements_wavpackparse_DEPENDENCIES) $(EXTRA_elements_wavpackparse_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/wavpackparse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_wavpackparse_OBJECTS) $(elements_wavpackparse_LDADD) $(LIBS)
+elements/y4menc$(EXEEXT): $(elements_y4menc_OBJECTS) $(elements_y4menc_DEPENDENCIES) $(EXTRA_elements_y4menc_DEPENDENCIES) elements/$(am__dirstamp)
+ @rm -f elements/y4menc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(elements_y4menc_OBJECTS) $(elements_y4menc_LDADD) $(LIBS)
+generic/$(am__dirstamp):
+ @$(MKDIR_P) generic
+ @: > generic/$(am__dirstamp)
+generic/index$(EXEEXT): $(generic_index_OBJECTS) $(generic_index_DEPENDENCIES) $(EXTRA_generic_index_DEPENDENCIES) generic/$(am__dirstamp)
+ @rm -f generic/index$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(generic_index_OBJECTS) $(generic_index_LDADD) $(LIBS)
+generic/states$(EXEEXT): $(generic_states_OBJECTS) $(generic_states_DEPENDENCIES) $(EXTRA_generic_states_DEPENDENCIES) generic/$(am__dirstamp)
+ @rm -f generic/states$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(generic_states_OBJECTS) $(generic_states_LDADD) $(LIBS)
+orc/$(am__dirstamp):
+ @$(MKDIR_P) orc
+ @: > orc/$(am__dirstamp)
+orc/deinterlace$(EXEEXT): $(orc_deinterlace_OBJECTS) $(orc_deinterlace_DEPENDENCIES) $(EXTRA_orc_deinterlace_DEPENDENCIES) orc/$(am__dirstamp)
+ @rm -f orc/deinterlace$(EXEEXT)
+ $(AM_V_CCLD)$(orc_deinterlace_LINK) $(orc_deinterlace_OBJECTS) $(orc_deinterlace_LDADD) $(LIBS)
+orc/videobox$(EXEEXT): $(orc_videobox_OBJECTS) $(orc_videobox_DEPENDENCIES) $(EXTRA_orc_videobox_DEPENDENCIES) orc/$(am__dirstamp)
+ @rm -f orc/videobox$(EXEEXT)
+ $(AM_V_CCLD)$(orc_videobox_LINK) $(orc_videobox_OBJECTS) $(orc_videobox_LDADD) $(LIBS)
+orc/videomixer$(EXEEXT): $(orc_videomixer_OBJECTS) $(orc_videomixer_DEPENDENCIES) $(EXTRA_orc_videomixer_DEPENDENCIES) orc/$(am__dirstamp)
+ @rm -f orc/videomixer$(EXEEXT)
+ $(AM_V_CCLD)$(orc_videomixer_LINK) $(orc_videomixer_OBJECTS) $(orc_videomixer_LDADD) $(LIBS)
+pipelines/$(am__dirstamp):
+ @$(MKDIR_P) pipelines
+ @: > pipelines/$(am__dirstamp)
+pipelines/effectv$(EXEEXT): $(pipelines_effectv_OBJECTS) $(pipelines_effectv_DEPENDENCIES) $(EXTRA_pipelines_effectv_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/effectv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pipelines_effectv_OBJECTS) $(pipelines_effectv_LDADD) $(LIBS)
+pipelines/flacdec$(EXEEXT): $(pipelines_flacdec_OBJECTS) $(pipelines_flacdec_DEPENDENCIES) $(EXTRA_pipelines_flacdec_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/flacdec$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pipelines_flacdec_OBJECTS) $(pipelines_flacdec_LDADD) $(LIBS)
+pipelines/simple-launch-lines$(EXEEXT): $(pipelines_simple_launch_lines_OBJECTS) $(pipelines_simple_launch_lines_DEPENDENCIES) $(EXTRA_pipelines_simple_launch_lines_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/simple-launch-lines$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pipelines_simple_launch_lines_OBJECTS) $(pipelines_simple_launch_lines_LDADD) $(LIBS)
+pipelines/tagschecking$(EXEEXT): $(pipelines_tagschecking_OBJECTS) $(pipelines_tagschecking_DEPENDENCIES) $(EXTRA_pipelines_tagschecking_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/tagschecking$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pipelines_tagschecking_OBJECTS) $(pipelines_tagschecking_LDADD) $(LIBS)
+pipelines/wavenc$(EXEEXT): $(pipelines_wavenc_OBJECTS) $(pipelines_wavenc_DEPENDENCIES) $(EXTRA_pipelines_wavenc_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/wavenc$(EXEEXT)
+ $(AM_V_CCLD)$(pipelines_wavenc_LINK) $(pipelines_wavenc_OBJECTS) $(pipelines_wavenc_LDADD) $(LIBS)
+pipelines/wavpack$(EXEEXT): $(pipelines_wavpack_OBJECTS) $(pipelines_wavpack_DEPENDENCIES) $(EXTRA_pipelines_wavpack_DEPENDENCIES) pipelines/$(am__dirstamp)
+ @rm -f pipelines/wavpack$(EXEEXT)
+ $(AM_V_CCLD)$(pipelines_wavpack_LINK) $(pipelines_wavpack_OBJECTS) $(pipelines_wavpack_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aacparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ac3parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amrparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apev2mux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audioamplify.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiochebband.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiocheblimit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiodynamic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audioecho.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiofirfilter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audioiirfilter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audioinvert.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiowsincband.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audiowsinclimit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autodetect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avimux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avisubtitle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capssetter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/effectv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_alphacolor-alphacolor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_audiopanorama-audiopanorama.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_cmmldec-cmmldec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_cmmlenc-cmmlenc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_deinterlace-deinterlace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_deinterleave-deinterleave.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_imagefreeze-imagefreeze.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_interleave-interleave.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_jpegenc-jpegenc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_multifile-multifile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_qtmux-qtmux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_souphttpsrc-souphttpsrc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_sunaudio-sunaudio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_videocrop-videocrop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elements_videofilter-videofilter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flacdec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flacparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flvdemux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flvmux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icydemux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3demux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3v2mux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libparser_la-parser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matroskamux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matroskaparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpegaudioparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orc_deinterlace-deinterlace.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orc_videobox-videobox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orc_videomixer-videomixer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipelines_wavenc-wavenc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipelines_wavpack-wavpack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rganalysis.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rglimiter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgvolume.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtp-payloading.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpbin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtpjitterbuffer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapewipe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple-launch-lines.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/states.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tagschecking.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udpsink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavpackdec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavpackenc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavpackparse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/y4menc.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libparser_la-parser.lo: elements/parser.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparser_la_CFLAGS) $(CFLAGS) -MT libparser_la-parser.lo -MD -MP -MF $(DEPDIR)/libparser_la-parser.Tpo -c -o libparser_la-parser.lo `test -f 'elements/parser.c' || echo '$(srcdir)/'`elements/parser.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libparser_la-parser.Tpo $(DEPDIR)/libparser_la-parser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/parser.c' object='libparser_la-parser.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libparser_la_CFLAGS) $(CFLAGS) -c -o libparser_la-parser.lo `test -f 'elements/parser.c' || echo '$(srcdir)/'`elements/parser.c
+
+aacparse.o: elements/aacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aacparse.o -MD -MP -MF $(DEPDIR)/aacparse.Tpo -c -o aacparse.o `test -f 'elements/aacparse.c' || echo '$(srcdir)/'`elements/aacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/aacparse.Tpo $(DEPDIR)/aacparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/aacparse.c' object='aacparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aacparse.o `test -f 'elements/aacparse.c' || echo '$(srcdir)/'`elements/aacparse.c
+
+aacparse.obj: elements/aacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT aacparse.obj -MD -MP -MF $(DEPDIR)/aacparse.Tpo -c -o aacparse.obj `if test -f 'elements/aacparse.c'; then $(CYGPATH_W) 'elements/aacparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/aacparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/aacparse.Tpo $(DEPDIR)/aacparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/aacparse.c' object='aacparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o aacparse.obj `if test -f 'elements/aacparse.c'; then $(CYGPATH_W) 'elements/aacparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/aacparse.c'; fi`
+
+ac3parse.o: elements/ac3parse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ac3parse.o -MD -MP -MF $(DEPDIR)/ac3parse.Tpo -c -o ac3parse.o `test -f 'elements/ac3parse.c' || echo '$(srcdir)/'`elements/ac3parse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ac3parse.Tpo $(DEPDIR)/ac3parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/ac3parse.c' object='ac3parse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ac3parse.o `test -f 'elements/ac3parse.c' || echo '$(srcdir)/'`elements/ac3parse.c
+
+ac3parse.obj: elements/ac3parse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ac3parse.obj -MD -MP -MF $(DEPDIR)/ac3parse.Tpo -c -o ac3parse.obj `if test -f 'elements/ac3parse.c'; then $(CYGPATH_W) 'elements/ac3parse.c'; else $(CYGPATH_W) '$(srcdir)/elements/ac3parse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ac3parse.Tpo $(DEPDIR)/ac3parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/ac3parse.c' object='ac3parse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ac3parse.obj `if test -f 'elements/ac3parse.c'; then $(CYGPATH_W) 'elements/ac3parse.c'; else $(CYGPATH_W) '$(srcdir)/elements/ac3parse.c'; fi`
+
+elements_alphacolor-alphacolor.o: elements/alphacolor.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -MT elements_alphacolor-alphacolor.o -MD -MP -MF $(DEPDIR)/elements_alphacolor-alphacolor.Tpo -c -o elements_alphacolor-alphacolor.o `test -f 'elements/alphacolor.c' || echo '$(srcdir)/'`elements/alphacolor.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_alphacolor-alphacolor.Tpo $(DEPDIR)/elements_alphacolor-alphacolor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/alphacolor.c' object='elements_alphacolor-alphacolor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -c -o elements_alphacolor-alphacolor.o `test -f 'elements/alphacolor.c' || echo '$(srcdir)/'`elements/alphacolor.c
+
+elements_alphacolor-alphacolor.obj: elements/alphacolor.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -MT elements_alphacolor-alphacolor.obj -MD -MP -MF $(DEPDIR)/elements_alphacolor-alphacolor.Tpo -c -o elements_alphacolor-alphacolor.obj `if test -f 'elements/alphacolor.c'; then $(CYGPATH_W) 'elements/alphacolor.c'; else $(CYGPATH_W) '$(srcdir)/elements/alphacolor.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_alphacolor-alphacolor.Tpo $(DEPDIR)/elements_alphacolor-alphacolor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/alphacolor.c' object='elements_alphacolor-alphacolor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_alphacolor_CFLAGS) $(CFLAGS) -c -o elements_alphacolor-alphacolor.obj `if test -f 'elements/alphacolor.c'; then $(CYGPATH_W) 'elements/alphacolor.c'; else $(CYGPATH_W) '$(srcdir)/elements/alphacolor.c'; fi`
+
+amrparse.o: elements/amrparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT amrparse.o -MD -MP -MF $(DEPDIR)/amrparse.Tpo -c -o amrparse.o `test -f 'elements/amrparse.c' || echo '$(srcdir)/'`elements/amrparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/amrparse.Tpo $(DEPDIR)/amrparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/amrparse.c' object='amrparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o amrparse.o `test -f 'elements/amrparse.c' || echo '$(srcdir)/'`elements/amrparse.c
+
+amrparse.obj: elements/amrparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT amrparse.obj -MD -MP -MF $(DEPDIR)/amrparse.Tpo -c -o amrparse.obj `if test -f 'elements/amrparse.c'; then $(CYGPATH_W) 'elements/amrparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/amrparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/amrparse.Tpo $(DEPDIR)/amrparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/amrparse.c' object='amrparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o amrparse.obj `if test -f 'elements/amrparse.c'; then $(CYGPATH_W) 'elements/amrparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/amrparse.c'; fi`
+
+apev2mux.o: elements/apev2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT apev2mux.o -MD -MP -MF $(DEPDIR)/apev2mux.Tpo -c -o apev2mux.o `test -f 'elements/apev2mux.c' || echo '$(srcdir)/'`elements/apev2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apev2mux.Tpo $(DEPDIR)/apev2mux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/apev2mux.c' object='apev2mux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o apev2mux.o `test -f 'elements/apev2mux.c' || echo '$(srcdir)/'`elements/apev2mux.c
+
+apev2mux.obj: elements/apev2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT apev2mux.obj -MD -MP -MF $(DEPDIR)/apev2mux.Tpo -c -o apev2mux.obj `if test -f 'elements/apev2mux.c'; then $(CYGPATH_W) 'elements/apev2mux.c'; else $(CYGPATH_W) '$(srcdir)/elements/apev2mux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/apev2mux.Tpo $(DEPDIR)/apev2mux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/apev2mux.c' object='apev2mux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o apev2mux.obj `if test -f 'elements/apev2mux.c'; then $(CYGPATH_W) 'elements/apev2mux.c'; else $(CYGPATH_W) '$(srcdir)/elements/apev2mux.c'; fi`
+
+elements_aspectratiocrop-aspectratiocrop.o: elements/aspectratiocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_aspectratiocrop_CFLAGS) $(CFLAGS) -MT elements_aspectratiocrop-aspectratiocrop.o -MD -MP -MF $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Tpo -c -o elements_aspectratiocrop-aspectratiocrop.o `test -f 'elements/aspectratiocrop.c' || echo '$(srcdir)/'`elements/aspectratiocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Tpo $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/aspectratiocrop.c' object='elements_aspectratiocrop-aspectratiocrop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_aspectratiocrop_CFLAGS) $(CFLAGS) -c -o elements_aspectratiocrop-aspectratiocrop.o `test -f 'elements/aspectratiocrop.c' || echo '$(srcdir)/'`elements/aspectratiocrop.c
+
+elements_aspectratiocrop-aspectratiocrop.obj: elements/aspectratiocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_aspectratiocrop_CFLAGS) $(CFLAGS) -MT elements_aspectratiocrop-aspectratiocrop.obj -MD -MP -MF $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Tpo -c -o elements_aspectratiocrop-aspectratiocrop.obj `if test -f 'elements/aspectratiocrop.c'; then $(CYGPATH_W) 'elements/aspectratiocrop.c'; else $(CYGPATH_W) '$(srcdir)/elements/aspectratiocrop.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Tpo $(DEPDIR)/elements_aspectratiocrop-aspectratiocrop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/aspectratiocrop.c' object='elements_aspectratiocrop-aspectratiocrop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_aspectratiocrop_CFLAGS) $(CFLAGS) -c -o elements_aspectratiocrop-aspectratiocrop.obj `if test -f 'elements/aspectratiocrop.c'; then $(CYGPATH_W) 'elements/aspectratiocrop.c'; else $(CYGPATH_W) '$(srcdir)/elements/aspectratiocrop.c'; fi`
+
+audioamplify.o: elements/audioamplify.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioamplify.o -MD -MP -MF $(DEPDIR)/audioamplify.Tpo -c -o audioamplify.o `test -f 'elements/audioamplify.c' || echo '$(srcdir)/'`elements/audioamplify.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioamplify.Tpo $(DEPDIR)/audioamplify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioamplify.c' object='audioamplify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioamplify.o `test -f 'elements/audioamplify.c' || echo '$(srcdir)/'`elements/audioamplify.c
+
+audioamplify.obj: elements/audioamplify.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioamplify.obj -MD -MP -MF $(DEPDIR)/audioamplify.Tpo -c -o audioamplify.obj `if test -f 'elements/audioamplify.c'; then $(CYGPATH_W) 'elements/audioamplify.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioamplify.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioamplify.Tpo $(DEPDIR)/audioamplify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioamplify.c' object='audioamplify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioamplify.obj `if test -f 'elements/audioamplify.c'; then $(CYGPATH_W) 'elements/audioamplify.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioamplify.c'; fi`
+
+audiochebband.o: elements/audiochebband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiochebband.o -MD -MP -MF $(DEPDIR)/audiochebband.Tpo -c -o audiochebband.o `test -f 'elements/audiochebband.c' || echo '$(srcdir)/'`elements/audiochebband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiochebband.Tpo $(DEPDIR)/audiochebband.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiochebband.c' object='audiochebband.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiochebband.o `test -f 'elements/audiochebband.c' || echo '$(srcdir)/'`elements/audiochebband.c
+
+audiochebband.obj: elements/audiochebband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiochebband.obj -MD -MP -MF $(DEPDIR)/audiochebband.Tpo -c -o audiochebband.obj `if test -f 'elements/audiochebband.c'; then $(CYGPATH_W) 'elements/audiochebband.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiochebband.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiochebband.Tpo $(DEPDIR)/audiochebband.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiochebband.c' object='audiochebband.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiochebband.obj `if test -f 'elements/audiochebband.c'; then $(CYGPATH_W) 'elements/audiochebband.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiochebband.c'; fi`
+
+audiocheblimit.o: elements/audiocheblimit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiocheblimit.o -MD -MP -MF $(DEPDIR)/audiocheblimit.Tpo -c -o audiocheblimit.o `test -f 'elements/audiocheblimit.c' || echo '$(srcdir)/'`elements/audiocheblimit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiocheblimit.Tpo $(DEPDIR)/audiocheblimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiocheblimit.c' object='audiocheblimit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiocheblimit.o `test -f 'elements/audiocheblimit.c' || echo '$(srcdir)/'`elements/audiocheblimit.c
+
+audiocheblimit.obj: elements/audiocheblimit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiocheblimit.obj -MD -MP -MF $(DEPDIR)/audiocheblimit.Tpo -c -o audiocheblimit.obj `if test -f 'elements/audiocheblimit.c'; then $(CYGPATH_W) 'elements/audiocheblimit.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiocheblimit.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiocheblimit.Tpo $(DEPDIR)/audiocheblimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiocheblimit.c' object='audiocheblimit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiocheblimit.obj `if test -f 'elements/audiocheblimit.c'; then $(CYGPATH_W) 'elements/audiocheblimit.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiocheblimit.c'; fi`
+
+audiodynamic.o: elements/audiodynamic.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiodynamic.o -MD -MP -MF $(DEPDIR)/audiodynamic.Tpo -c -o audiodynamic.o `test -f 'elements/audiodynamic.c' || echo '$(srcdir)/'`elements/audiodynamic.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiodynamic.Tpo $(DEPDIR)/audiodynamic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiodynamic.c' object='audiodynamic.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiodynamic.o `test -f 'elements/audiodynamic.c' || echo '$(srcdir)/'`elements/audiodynamic.c
+
+audiodynamic.obj: elements/audiodynamic.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiodynamic.obj -MD -MP -MF $(DEPDIR)/audiodynamic.Tpo -c -o audiodynamic.obj `if test -f 'elements/audiodynamic.c'; then $(CYGPATH_W) 'elements/audiodynamic.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiodynamic.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiodynamic.Tpo $(DEPDIR)/audiodynamic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiodynamic.c' object='audiodynamic.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiodynamic.obj `if test -f 'elements/audiodynamic.c'; then $(CYGPATH_W) 'elements/audiodynamic.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiodynamic.c'; fi`
+
+audioecho.o: elements/audioecho.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioecho.o -MD -MP -MF $(DEPDIR)/audioecho.Tpo -c -o audioecho.o `test -f 'elements/audioecho.c' || echo '$(srcdir)/'`elements/audioecho.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioecho.Tpo $(DEPDIR)/audioecho.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioecho.c' object='audioecho.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioecho.o `test -f 'elements/audioecho.c' || echo '$(srcdir)/'`elements/audioecho.c
+
+audioecho.obj: elements/audioecho.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioecho.obj -MD -MP -MF $(DEPDIR)/audioecho.Tpo -c -o audioecho.obj `if test -f 'elements/audioecho.c'; then $(CYGPATH_W) 'elements/audioecho.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioecho.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioecho.Tpo $(DEPDIR)/audioecho.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioecho.c' object='audioecho.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioecho.obj `if test -f 'elements/audioecho.c'; then $(CYGPATH_W) 'elements/audioecho.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioecho.c'; fi`
+
+audiofirfilter.o: elements/audiofirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiofirfilter.o -MD -MP -MF $(DEPDIR)/audiofirfilter.Tpo -c -o audiofirfilter.o `test -f 'elements/audiofirfilter.c' || echo '$(srcdir)/'`elements/audiofirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiofirfilter.Tpo $(DEPDIR)/audiofirfilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiofirfilter.c' object='audiofirfilter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiofirfilter.o `test -f 'elements/audiofirfilter.c' || echo '$(srcdir)/'`elements/audiofirfilter.c
+
+audiofirfilter.obj: elements/audiofirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiofirfilter.obj -MD -MP -MF $(DEPDIR)/audiofirfilter.Tpo -c -o audiofirfilter.obj `if test -f 'elements/audiofirfilter.c'; then $(CYGPATH_W) 'elements/audiofirfilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiofirfilter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiofirfilter.Tpo $(DEPDIR)/audiofirfilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiofirfilter.c' object='audiofirfilter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiofirfilter.obj `if test -f 'elements/audiofirfilter.c'; then $(CYGPATH_W) 'elements/audiofirfilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiofirfilter.c'; fi`
+
+audioiirfilter.o: elements/audioiirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioiirfilter.o -MD -MP -MF $(DEPDIR)/audioiirfilter.Tpo -c -o audioiirfilter.o `test -f 'elements/audioiirfilter.c' || echo '$(srcdir)/'`elements/audioiirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioiirfilter.Tpo $(DEPDIR)/audioiirfilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioiirfilter.c' object='audioiirfilter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioiirfilter.o `test -f 'elements/audioiirfilter.c' || echo '$(srcdir)/'`elements/audioiirfilter.c
+
+audioiirfilter.obj: elements/audioiirfilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioiirfilter.obj -MD -MP -MF $(DEPDIR)/audioiirfilter.Tpo -c -o audioiirfilter.obj `if test -f 'elements/audioiirfilter.c'; then $(CYGPATH_W) 'elements/audioiirfilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioiirfilter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioiirfilter.Tpo $(DEPDIR)/audioiirfilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioiirfilter.c' object='audioiirfilter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioiirfilter.obj `if test -f 'elements/audioiirfilter.c'; then $(CYGPATH_W) 'elements/audioiirfilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioiirfilter.c'; fi`
+
+audioinvert.o: elements/audioinvert.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioinvert.o -MD -MP -MF $(DEPDIR)/audioinvert.Tpo -c -o audioinvert.o `test -f 'elements/audioinvert.c' || echo '$(srcdir)/'`elements/audioinvert.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioinvert.Tpo $(DEPDIR)/audioinvert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioinvert.c' object='audioinvert.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioinvert.o `test -f 'elements/audioinvert.c' || echo '$(srcdir)/'`elements/audioinvert.c
+
+audioinvert.obj: elements/audioinvert.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audioinvert.obj -MD -MP -MF $(DEPDIR)/audioinvert.Tpo -c -o audioinvert.obj `if test -f 'elements/audioinvert.c'; then $(CYGPATH_W) 'elements/audioinvert.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioinvert.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audioinvert.Tpo $(DEPDIR)/audioinvert.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audioinvert.c' object='audioinvert.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audioinvert.obj `if test -f 'elements/audioinvert.c'; then $(CYGPATH_W) 'elements/audioinvert.c'; else $(CYGPATH_W) '$(srcdir)/elements/audioinvert.c'; fi`
+
+elements_audiopanorama-audiopanorama.o: elements/audiopanorama.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiopanorama_CFLAGS) $(CFLAGS) -MT elements_audiopanorama-audiopanorama.o -MD -MP -MF $(DEPDIR)/elements_audiopanorama-audiopanorama.Tpo -c -o elements_audiopanorama-audiopanorama.o `test -f 'elements/audiopanorama.c' || echo '$(srcdir)/'`elements/audiopanorama.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_audiopanorama-audiopanorama.Tpo $(DEPDIR)/elements_audiopanorama-audiopanorama.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiopanorama.c' object='elements_audiopanorama-audiopanorama.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiopanorama_CFLAGS) $(CFLAGS) -c -o elements_audiopanorama-audiopanorama.o `test -f 'elements/audiopanorama.c' || echo '$(srcdir)/'`elements/audiopanorama.c
+
+elements_audiopanorama-audiopanorama.obj: elements/audiopanorama.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiopanorama_CFLAGS) $(CFLAGS) -MT elements_audiopanorama-audiopanorama.obj -MD -MP -MF $(DEPDIR)/elements_audiopanorama-audiopanorama.Tpo -c -o elements_audiopanorama-audiopanorama.obj `if test -f 'elements/audiopanorama.c'; then $(CYGPATH_W) 'elements/audiopanorama.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiopanorama.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_audiopanorama-audiopanorama.Tpo $(DEPDIR)/elements_audiopanorama-audiopanorama.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiopanorama.c' object='elements_audiopanorama-audiopanorama.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_audiopanorama_CFLAGS) $(CFLAGS) -c -o elements_audiopanorama-audiopanorama.obj `if test -f 'elements/audiopanorama.c'; then $(CYGPATH_W) 'elements/audiopanorama.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiopanorama.c'; fi`
+
+audiowsincband.o: elements/audiowsincband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiowsincband.o -MD -MP -MF $(DEPDIR)/audiowsincband.Tpo -c -o audiowsincband.o `test -f 'elements/audiowsincband.c' || echo '$(srcdir)/'`elements/audiowsincband.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiowsincband.Tpo $(DEPDIR)/audiowsincband.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiowsincband.c' object='audiowsincband.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiowsincband.o `test -f 'elements/audiowsincband.c' || echo '$(srcdir)/'`elements/audiowsincband.c
+
+audiowsincband.obj: elements/audiowsincband.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiowsincband.obj -MD -MP -MF $(DEPDIR)/audiowsincband.Tpo -c -o audiowsincband.obj `if test -f 'elements/audiowsincband.c'; then $(CYGPATH_W) 'elements/audiowsincband.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiowsincband.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiowsincband.Tpo $(DEPDIR)/audiowsincband.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiowsincband.c' object='audiowsincband.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiowsincband.obj `if test -f 'elements/audiowsincband.c'; then $(CYGPATH_W) 'elements/audiowsincband.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiowsincband.c'; fi`
+
+audiowsinclimit.o: elements/audiowsinclimit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiowsinclimit.o -MD -MP -MF $(DEPDIR)/audiowsinclimit.Tpo -c -o audiowsinclimit.o `test -f 'elements/audiowsinclimit.c' || echo '$(srcdir)/'`elements/audiowsinclimit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiowsinclimit.Tpo $(DEPDIR)/audiowsinclimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiowsinclimit.c' object='audiowsinclimit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiowsinclimit.o `test -f 'elements/audiowsinclimit.c' || echo '$(srcdir)/'`elements/audiowsinclimit.c
+
+audiowsinclimit.obj: elements/audiowsinclimit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT audiowsinclimit.obj -MD -MP -MF $(DEPDIR)/audiowsinclimit.Tpo -c -o audiowsinclimit.obj `if test -f 'elements/audiowsinclimit.c'; then $(CYGPATH_W) 'elements/audiowsinclimit.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiowsinclimit.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audiowsinclimit.Tpo $(DEPDIR)/audiowsinclimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/audiowsinclimit.c' object='audiowsinclimit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o audiowsinclimit.obj `if test -f 'elements/audiowsinclimit.c'; then $(CYGPATH_W) 'elements/audiowsinclimit.c'; else $(CYGPATH_W) '$(srcdir)/elements/audiowsinclimit.c'; fi`
+
+autodetect.o: elements/autodetect.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT autodetect.o -MD -MP -MF $(DEPDIR)/autodetect.Tpo -c -o autodetect.o `test -f 'elements/autodetect.c' || echo '$(srcdir)/'`elements/autodetect.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/autodetect.Tpo $(DEPDIR)/autodetect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/autodetect.c' object='autodetect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o autodetect.o `test -f 'elements/autodetect.c' || echo '$(srcdir)/'`elements/autodetect.c
+
+autodetect.obj: elements/autodetect.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT autodetect.obj -MD -MP -MF $(DEPDIR)/autodetect.Tpo -c -o autodetect.obj `if test -f 'elements/autodetect.c'; then $(CYGPATH_W) 'elements/autodetect.c'; else $(CYGPATH_W) '$(srcdir)/elements/autodetect.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/autodetect.Tpo $(DEPDIR)/autodetect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/autodetect.c' object='autodetect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o autodetect.obj `if test -f 'elements/autodetect.c'; then $(CYGPATH_W) 'elements/autodetect.c'; else $(CYGPATH_W) '$(srcdir)/elements/autodetect.c'; fi`
+
+avimux.o: elements/avimux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avimux.o -MD -MP -MF $(DEPDIR)/avimux.Tpo -c -o avimux.o `test -f 'elements/avimux.c' || echo '$(srcdir)/'`elements/avimux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/avimux.Tpo $(DEPDIR)/avimux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/avimux.c' object='avimux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avimux.o `test -f 'elements/avimux.c' || echo '$(srcdir)/'`elements/avimux.c
+
+avimux.obj: elements/avimux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avimux.obj -MD -MP -MF $(DEPDIR)/avimux.Tpo -c -o avimux.obj `if test -f 'elements/avimux.c'; then $(CYGPATH_W) 'elements/avimux.c'; else $(CYGPATH_W) '$(srcdir)/elements/avimux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/avimux.Tpo $(DEPDIR)/avimux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/avimux.c' object='avimux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avimux.obj `if test -f 'elements/avimux.c'; then $(CYGPATH_W) 'elements/avimux.c'; else $(CYGPATH_W) '$(srcdir)/elements/avimux.c'; fi`
+
+avisubtitle.o: elements/avisubtitle.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avisubtitle.o -MD -MP -MF $(DEPDIR)/avisubtitle.Tpo -c -o avisubtitle.o `test -f 'elements/avisubtitle.c' || echo '$(srcdir)/'`elements/avisubtitle.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/avisubtitle.Tpo $(DEPDIR)/avisubtitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/avisubtitle.c' object='avisubtitle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avisubtitle.o `test -f 'elements/avisubtitle.c' || echo '$(srcdir)/'`elements/avisubtitle.c
+
+avisubtitle.obj: elements/avisubtitle.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT avisubtitle.obj -MD -MP -MF $(DEPDIR)/avisubtitle.Tpo -c -o avisubtitle.obj `if test -f 'elements/avisubtitle.c'; then $(CYGPATH_W) 'elements/avisubtitle.c'; else $(CYGPATH_W) '$(srcdir)/elements/avisubtitle.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/avisubtitle.Tpo $(DEPDIR)/avisubtitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/avisubtitle.c' object='avisubtitle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o avisubtitle.obj `if test -f 'elements/avisubtitle.c'; then $(CYGPATH_W) 'elements/avisubtitle.c'; else $(CYGPATH_W) '$(srcdir)/elements/avisubtitle.c'; fi`
+
+capssetter.o: elements/capssetter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT capssetter.o -MD -MP -MF $(DEPDIR)/capssetter.Tpo -c -o capssetter.o `test -f 'elements/capssetter.c' || echo '$(srcdir)/'`elements/capssetter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/capssetter.Tpo $(DEPDIR)/capssetter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/capssetter.c' object='capssetter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o capssetter.o `test -f 'elements/capssetter.c' || echo '$(srcdir)/'`elements/capssetter.c
+
+capssetter.obj: elements/capssetter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT capssetter.obj -MD -MP -MF $(DEPDIR)/capssetter.Tpo -c -o capssetter.obj `if test -f 'elements/capssetter.c'; then $(CYGPATH_W) 'elements/capssetter.c'; else $(CYGPATH_W) '$(srcdir)/elements/capssetter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/capssetter.Tpo $(DEPDIR)/capssetter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/capssetter.c' object='capssetter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o capssetter.obj `if test -f 'elements/capssetter.c'; then $(CYGPATH_W) 'elements/capssetter.c'; else $(CYGPATH_W) '$(srcdir)/elements/capssetter.c'; fi`
+
+elements_cmmldec-cmmldec.o: elements/cmmldec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmldec_CFLAGS) $(CFLAGS) -MT elements_cmmldec-cmmldec.o -MD -MP -MF $(DEPDIR)/elements_cmmldec-cmmldec.Tpo -c -o elements_cmmldec-cmmldec.o `test -f 'elements/cmmldec.c' || echo '$(srcdir)/'`elements/cmmldec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_cmmldec-cmmldec.Tpo $(DEPDIR)/elements_cmmldec-cmmldec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/cmmldec.c' object='elements_cmmldec-cmmldec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmldec_CFLAGS) $(CFLAGS) -c -o elements_cmmldec-cmmldec.o `test -f 'elements/cmmldec.c' || echo '$(srcdir)/'`elements/cmmldec.c
+
+elements_cmmldec-cmmldec.obj: elements/cmmldec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmldec_CFLAGS) $(CFLAGS) -MT elements_cmmldec-cmmldec.obj -MD -MP -MF $(DEPDIR)/elements_cmmldec-cmmldec.Tpo -c -o elements_cmmldec-cmmldec.obj `if test -f 'elements/cmmldec.c'; then $(CYGPATH_W) 'elements/cmmldec.c'; else $(CYGPATH_W) '$(srcdir)/elements/cmmldec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_cmmldec-cmmldec.Tpo $(DEPDIR)/elements_cmmldec-cmmldec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/cmmldec.c' object='elements_cmmldec-cmmldec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmldec_CFLAGS) $(CFLAGS) -c -o elements_cmmldec-cmmldec.obj `if test -f 'elements/cmmldec.c'; then $(CYGPATH_W) 'elements/cmmldec.c'; else $(CYGPATH_W) '$(srcdir)/elements/cmmldec.c'; fi`
+
+elements_cmmlenc-cmmlenc.o: elements/cmmlenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmlenc_CFLAGS) $(CFLAGS) -MT elements_cmmlenc-cmmlenc.o -MD -MP -MF $(DEPDIR)/elements_cmmlenc-cmmlenc.Tpo -c -o elements_cmmlenc-cmmlenc.o `test -f 'elements/cmmlenc.c' || echo '$(srcdir)/'`elements/cmmlenc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_cmmlenc-cmmlenc.Tpo $(DEPDIR)/elements_cmmlenc-cmmlenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/cmmlenc.c' object='elements_cmmlenc-cmmlenc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmlenc_CFLAGS) $(CFLAGS) -c -o elements_cmmlenc-cmmlenc.o `test -f 'elements/cmmlenc.c' || echo '$(srcdir)/'`elements/cmmlenc.c
+
+elements_cmmlenc-cmmlenc.obj: elements/cmmlenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmlenc_CFLAGS) $(CFLAGS) -MT elements_cmmlenc-cmmlenc.obj -MD -MP -MF $(DEPDIR)/elements_cmmlenc-cmmlenc.Tpo -c -o elements_cmmlenc-cmmlenc.obj `if test -f 'elements/cmmlenc.c'; then $(CYGPATH_W) 'elements/cmmlenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/cmmlenc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_cmmlenc-cmmlenc.Tpo $(DEPDIR)/elements_cmmlenc-cmmlenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/cmmlenc.c' object='elements_cmmlenc-cmmlenc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_cmmlenc_CFLAGS) $(CFLAGS) -c -o elements_cmmlenc-cmmlenc.obj `if test -f 'elements/cmmlenc.c'; then $(CYGPATH_W) 'elements/cmmlenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/cmmlenc.c'; fi`
+
+elements_deinterlace-deinterlace.o: elements/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterlace_CFLAGS) $(CFLAGS) -MT elements_deinterlace-deinterlace.o -MD -MP -MF $(DEPDIR)/elements_deinterlace-deinterlace.Tpo -c -o elements_deinterlace-deinterlace.o `test -f 'elements/deinterlace.c' || echo '$(srcdir)/'`elements/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_deinterlace-deinterlace.Tpo $(DEPDIR)/elements_deinterlace-deinterlace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/deinterlace.c' object='elements_deinterlace-deinterlace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterlace_CFLAGS) $(CFLAGS) -c -o elements_deinterlace-deinterlace.o `test -f 'elements/deinterlace.c' || echo '$(srcdir)/'`elements/deinterlace.c
+
+elements_deinterlace-deinterlace.obj: elements/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterlace_CFLAGS) $(CFLAGS) -MT elements_deinterlace-deinterlace.obj -MD -MP -MF $(DEPDIR)/elements_deinterlace-deinterlace.Tpo -c -o elements_deinterlace-deinterlace.obj `if test -f 'elements/deinterlace.c'; then $(CYGPATH_W) 'elements/deinterlace.c'; else $(CYGPATH_W) '$(srcdir)/elements/deinterlace.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_deinterlace-deinterlace.Tpo $(DEPDIR)/elements_deinterlace-deinterlace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/deinterlace.c' object='elements_deinterlace-deinterlace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterlace_CFLAGS) $(CFLAGS) -c -o elements_deinterlace-deinterlace.obj `if test -f 'elements/deinterlace.c'; then $(CYGPATH_W) 'elements/deinterlace.c'; else $(CYGPATH_W) '$(srcdir)/elements/deinterlace.c'; fi`
+
+elements_deinterleave-deinterleave.o: elements/deinterleave.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterleave_CFLAGS) $(CFLAGS) -MT elements_deinterleave-deinterleave.o -MD -MP -MF $(DEPDIR)/elements_deinterleave-deinterleave.Tpo -c -o elements_deinterleave-deinterleave.o `test -f 'elements/deinterleave.c' || echo '$(srcdir)/'`elements/deinterleave.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_deinterleave-deinterleave.Tpo $(DEPDIR)/elements_deinterleave-deinterleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/deinterleave.c' object='elements_deinterleave-deinterleave.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterleave_CFLAGS) $(CFLAGS) -c -o elements_deinterleave-deinterleave.o `test -f 'elements/deinterleave.c' || echo '$(srcdir)/'`elements/deinterleave.c
+
+elements_deinterleave-deinterleave.obj: elements/deinterleave.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterleave_CFLAGS) $(CFLAGS) -MT elements_deinterleave-deinterleave.obj -MD -MP -MF $(DEPDIR)/elements_deinterleave-deinterleave.Tpo -c -o elements_deinterleave-deinterleave.obj `if test -f 'elements/deinterleave.c'; then $(CYGPATH_W) 'elements/deinterleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/deinterleave.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_deinterleave-deinterleave.Tpo $(DEPDIR)/elements_deinterleave-deinterleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/deinterleave.c' object='elements_deinterleave-deinterleave.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_deinterleave_CFLAGS) $(CFLAGS) -c -o elements_deinterleave-deinterleave.obj `if test -f 'elements/deinterleave.c'; then $(CYGPATH_W) 'elements/deinterleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/deinterleave.c'; fi`
+
+equalizer.o: elements/equalizer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT equalizer.o -MD -MP -MF $(DEPDIR)/equalizer.Tpo -c -o equalizer.o `test -f 'elements/equalizer.c' || echo '$(srcdir)/'`elements/equalizer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/equalizer.Tpo $(DEPDIR)/equalizer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/equalizer.c' object='equalizer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o equalizer.o `test -f 'elements/equalizer.c' || echo '$(srcdir)/'`elements/equalizer.c
+
+equalizer.obj: elements/equalizer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT equalizer.obj -MD -MP -MF $(DEPDIR)/equalizer.Tpo -c -o equalizer.obj `if test -f 'elements/equalizer.c'; then $(CYGPATH_W) 'elements/equalizer.c'; else $(CYGPATH_W) '$(srcdir)/elements/equalizer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/equalizer.Tpo $(DEPDIR)/equalizer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/equalizer.c' object='equalizer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o equalizer.obj `if test -f 'elements/equalizer.c'; then $(CYGPATH_W) 'elements/equalizer.c'; else $(CYGPATH_W) '$(srcdir)/elements/equalizer.c'; fi`
+
+flacparse.o: elements/flacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flacparse.o -MD -MP -MF $(DEPDIR)/flacparse.Tpo -c -o flacparse.o `test -f 'elements/flacparse.c' || echo '$(srcdir)/'`elements/flacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flacparse.Tpo $(DEPDIR)/flacparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flacparse.c' object='flacparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flacparse.o `test -f 'elements/flacparse.c' || echo '$(srcdir)/'`elements/flacparse.c
+
+flacparse.obj: elements/flacparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flacparse.obj -MD -MP -MF $(DEPDIR)/flacparse.Tpo -c -o flacparse.obj `if test -f 'elements/flacparse.c'; then $(CYGPATH_W) 'elements/flacparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/flacparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flacparse.Tpo $(DEPDIR)/flacparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flacparse.c' object='flacparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flacparse.obj `if test -f 'elements/flacparse.c'; then $(CYGPATH_W) 'elements/flacparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/flacparse.c'; fi`
+
+flvdemux.o: elements/flvdemux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flvdemux.o -MD -MP -MF $(DEPDIR)/flvdemux.Tpo -c -o flvdemux.o `test -f 'elements/flvdemux.c' || echo '$(srcdir)/'`elements/flvdemux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flvdemux.Tpo $(DEPDIR)/flvdemux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvdemux.c' object='flvdemux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flvdemux.o `test -f 'elements/flvdemux.c' || echo '$(srcdir)/'`elements/flvdemux.c
+
+flvdemux.obj: elements/flvdemux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flvdemux.obj -MD -MP -MF $(DEPDIR)/flvdemux.Tpo -c -o flvdemux.obj `if test -f 'elements/flvdemux.c'; then $(CYGPATH_W) 'elements/flvdemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvdemux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flvdemux.Tpo $(DEPDIR)/flvdemux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvdemux.c' object='flvdemux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flvdemux.obj `if test -f 'elements/flvdemux.c'; then $(CYGPATH_W) 'elements/flvdemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvdemux.c'; fi`
+
+flvmux.o: elements/flvmux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flvmux.o -MD -MP -MF $(DEPDIR)/flvmux.Tpo -c -o flvmux.o `test -f 'elements/flvmux.c' || echo '$(srcdir)/'`elements/flvmux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flvmux.Tpo $(DEPDIR)/flvmux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvmux.c' object='flvmux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flvmux.o `test -f 'elements/flvmux.c' || echo '$(srcdir)/'`elements/flvmux.c
+
+flvmux.obj: elements/flvmux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flvmux.obj -MD -MP -MF $(DEPDIR)/flvmux.Tpo -c -o flvmux.obj `if test -f 'elements/flvmux.c'; then $(CYGPATH_W) 'elements/flvmux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvmux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flvmux.Tpo $(DEPDIR)/flvmux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvmux.c' object='flvmux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flvmux.obj `if test -f 'elements/flvmux.c'; then $(CYGPATH_W) 'elements/flvmux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvmux.c'; fi`
+
+elements_gdkpixbufsink-gdkpixbufsink.o: elements/gdkpixbufsink.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) -MT elements_gdkpixbufsink-gdkpixbufsink.o -MD -MP -MF $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo -c -o elements_gdkpixbufsink-gdkpixbufsink.o `test -f 'elements/gdkpixbufsink.c' || echo '$(srcdir)/'`elements/gdkpixbufsink.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/gdkpixbufsink.c' object='elements_gdkpixbufsink-gdkpixbufsink.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) -c -o elements_gdkpixbufsink-gdkpixbufsink.o `test -f 'elements/gdkpixbufsink.c' || echo '$(srcdir)/'`elements/gdkpixbufsink.c
+
+elements_gdkpixbufsink-gdkpixbufsink.obj: elements/gdkpixbufsink.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) -MT elements_gdkpixbufsink-gdkpixbufsink.obj -MD -MP -MF $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo -c -o elements_gdkpixbufsink-gdkpixbufsink.obj `if test -f 'elements/gdkpixbufsink.c'; then $(CYGPATH_W) 'elements/gdkpixbufsink.c'; else $(CYGPATH_W) '$(srcdir)/elements/gdkpixbufsink.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo $(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/gdkpixbufsink.c' object='elements_gdkpixbufsink-gdkpixbufsink.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) -c -o elements_gdkpixbufsink-gdkpixbufsink.obj `if test -f 'elements/gdkpixbufsink.c'; then $(CYGPATH_W) 'elements/gdkpixbufsink.c'; else $(CYGPATH_W) '$(srcdir)/elements/gdkpixbufsink.c'; fi`
+
+icydemux.o: elements/icydemux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT icydemux.o -MD -MP -MF $(DEPDIR)/icydemux.Tpo -c -o icydemux.o `test -f 'elements/icydemux.c' || echo '$(srcdir)/'`elements/icydemux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/icydemux.Tpo $(DEPDIR)/icydemux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/icydemux.c' object='icydemux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o icydemux.o `test -f 'elements/icydemux.c' || echo '$(srcdir)/'`elements/icydemux.c
+
+icydemux.obj: elements/icydemux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT icydemux.obj -MD -MP -MF $(DEPDIR)/icydemux.Tpo -c -o icydemux.obj `if test -f 'elements/icydemux.c'; then $(CYGPATH_W) 'elements/icydemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/icydemux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/icydemux.Tpo $(DEPDIR)/icydemux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/icydemux.c' object='icydemux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o icydemux.obj `if test -f 'elements/icydemux.c'; then $(CYGPATH_W) 'elements/icydemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/icydemux.c'; fi`
+
+id3demux.o: elements/id3demux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT id3demux.o -MD -MP -MF $(DEPDIR)/id3demux.Tpo -c -o id3demux.o `test -f 'elements/id3demux.c' || echo '$(srcdir)/'`elements/id3demux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/id3demux.Tpo $(DEPDIR)/id3demux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/id3demux.c' object='id3demux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o id3demux.o `test -f 'elements/id3demux.c' || echo '$(srcdir)/'`elements/id3demux.c
+
+id3demux.obj: elements/id3demux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT id3demux.obj -MD -MP -MF $(DEPDIR)/id3demux.Tpo -c -o id3demux.obj `if test -f 'elements/id3demux.c'; then $(CYGPATH_W) 'elements/id3demux.c'; else $(CYGPATH_W) '$(srcdir)/elements/id3demux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/id3demux.Tpo $(DEPDIR)/id3demux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/id3demux.c' object='id3demux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o id3demux.obj `if test -f 'elements/id3demux.c'; then $(CYGPATH_W) 'elements/id3demux.c'; else $(CYGPATH_W) '$(srcdir)/elements/id3demux.c'; fi`
+
+id3v2mux.o: elements/id3v2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT id3v2mux.o -MD -MP -MF $(DEPDIR)/id3v2mux.Tpo -c -o id3v2mux.o `test -f 'elements/id3v2mux.c' || echo '$(srcdir)/'`elements/id3v2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/id3v2mux.Tpo $(DEPDIR)/id3v2mux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/id3v2mux.c' object='id3v2mux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o id3v2mux.o `test -f 'elements/id3v2mux.c' || echo '$(srcdir)/'`elements/id3v2mux.c
+
+id3v2mux.obj: elements/id3v2mux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT id3v2mux.obj -MD -MP -MF $(DEPDIR)/id3v2mux.Tpo -c -o id3v2mux.obj `if test -f 'elements/id3v2mux.c'; then $(CYGPATH_W) 'elements/id3v2mux.c'; else $(CYGPATH_W) '$(srcdir)/elements/id3v2mux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/id3v2mux.Tpo $(DEPDIR)/id3v2mux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/id3v2mux.c' object='id3v2mux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o id3v2mux.obj `if test -f 'elements/id3v2mux.c'; then $(CYGPATH_W) 'elements/id3v2mux.c'; else $(CYGPATH_W) '$(srcdir)/elements/id3v2mux.c'; fi`
+
+elements_imagefreeze-imagefreeze.o: elements/imagefreeze.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_imagefreeze_CFLAGS) $(CFLAGS) -MT elements_imagefreeze-imagefreeze.o -MD -MP -MF $(DEPDIR)/elements_imagefreeze-imagefreeze.Tpo -c -o elements_imagefreeze-imagefreeze.o `test -f 'elements/imagefreeze.c' || echo '$(srcdir)/'`elements/imagefreeze.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_imagefreeze-imagefreeze.Tpo $(DEPDIR)/elements_imagefreeze-imagefreeze.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/imagefreeze.c' object='elements_imagefreeze-imagefreeze.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_imagefreeze_CFLAGS) $(CFLAGS) -c -o elements_imagefreeze-imagefreeze.o `test -f 'elements/imagefreeze.c' || echo '$(srcdir)/'`elements/imagefreeze.c
+
+elements_imagefreeze-imagefreeze.obj: elements/imagefreeze.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_imagefreeze_CFLAGS) $(CFLAGS) -MT elements_imagefreeze-imagefreeze.obj -MD -MP -MF $(DEPDIR)/elements_imagefreeze-imagefreeze.Tpo -c -o elements_imagefreeze-imagefreeze.obj `if test -f 'elements/imagefreeze.c'; then $(CYGPATH_W) 'elements/imagefreeze.c'; else $(CYGPATH_W) '$(srcdir)/elements/imagefreeze.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_imagefreeze-imagefreeze.Tpo $(DEPDIR)/elements_imagefreeze-imagefreeze.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/imagefreeze.c' object='elements_imagefreeze-imagefreeze.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_imagefreeze_CFLAGS) $(CFLAGS) -c -o elements_imagefreeze-imagefreeze.obj `if test -f 'elements/imagefreeze.c'; then $(CYGPATH_W) 'elements/imagefreeze.c'; else $(CYGPATH_W) '$(srcdir)/elements/imagefreeze.c'; fi`
+
+elements_interleave-interleave.o: elements/interleave.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_interleave_CFLAGS) $(CFLAGS) -MT elements_interleave-interleave.o -MD -MP -MF $(DEPDIR)/elements_interleave-interleave.Tpo -c -o elements_interleave-interleave.o `test -f 'elements/interleave.c' || echo '$(srcdir)/'`elements/interleave.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_interleave-interleave.Tpo $(DEPDIR)/elements_interleave-interleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/interleave.c' object='elements_interleave-interleave.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_interleave_CFLAGS) $(CFLAGS) -c -o elements_interleave-interleave.o `test -f 'elements/interleave.c' || echo '$(srcdir)/'`elements/interleave.c
+
+elements_interleave-interleave.obj: elements/interleave.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_interleave_CFLAGS) $(CFLAGS) -MT elements_interleave-interleave.obj -MD -MP -MF $(DEPDIR)/elements_interleave-interleave.Tpo -c -o elements_interleave-interleave.obj `if test -f 'elements/interleave.c'; then $(CYGPATH_W) 'elements/interleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/interleave.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_interleave-interleave.Tpo $(DEPDIR)/elements_interleave-interleave.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/interleave.c' object='elements_interleave-interleave.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_interleave_CFLAGS) $(CFLAGS) -c -o elements_interleave-interleave.obj `if test -f 'elements/interleave.c'; then $(CYGPATH_W) 'elements/interleave.c'; else $(CYGPATH_W) '$(srcdir)/elements/interleave.c'; fi`
+
+elements_jpegenc-jpegenc.o: elements/jpegenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_jpegenc_CFLAGS) $(CFLAGS) -MT elements_jpegenc-jpegenc.o -MD -MP -MF $(DEPDIR)/elements_jpegenc-jpegenc.Tpo -c -o elements_jpegenc-jpegenc.o `test -f 'elements/jpegenc.c' || echo '$(srcdir)/'`elements/jpegenc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_jpegenc-jpegenc.Tpo $(DEPDIR)/elements_jpegenc-jpegenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/jpegenc.c' object='elements_jpegenc-jpegenc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_jpegenc_CFLAGS) $(CFLAGS) -c -o elements_jpegenc-jpegenc.o `test -f 'elements/jpegenc.c' || echo '$(srcdir)/'`elements/jpegenc.c
+
+elements_jpegenc-jpegenc.obj: elements/jpegenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_jpegenc_CFLAGS) $(CFLAGS) -MT elements_jpegenc-jpegenc.obj -MD -MP -MF $(DEPDIR)/elements_jpegenc-jpegenc.Tpo -c -o elements_jpegenc-jpegenc.obj `if test -f 'elements/jpegenc.c'; then $(CYGPATH_W) 'elements/jpegenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/jpegenc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_jpegenc-jpegenc.Tpo $(DEPDIR)/elements_jpegenc-jpegenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/jpegenc.c' object='elements_jpegenc-jpegenc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_jpegenc_CFLAGS) $(CFLAGS) -c -o elements_jpegenc-jpegenc.obj `if test -f 'elements/jpegenc.c'; then $(CYGPATH_W) 'elements/jpegenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/jpegenc.c'; fi`
+
+level.o: elements/level.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.o -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.o `test -f 'elements/level.c' || echo '$(srcdir)/'`elements/level.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/level.Tpo $(DEPDIR)/level.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/level.c' object='level.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.o `test -f 'elements/level.c' || echo '$(srcdir)/'`elements/level.c
+
+level.obj: elements/level.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT level.obj -MD -MP -MF $(DEPDIR)/level.Tpo -c -o level.obj `if test -f 'elements/level.c'; then $(CYGPATH_W) 'elements/level.c'; else $(CYGPATH_W) '$(srcdir)/elements/level.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/level.Tpo $(DEPDIR)/level.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/level.c' object='level.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o level.obj `if test -f 'elements/level.c'; then $(CYGPATH_W) 'elements/level.c'; else $(CYGPATH_W) '$(srcdir)/elements/level.c'; fi`
+
+matroskamux.o: elements/matroskamux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matroskamux.o -MD -MP -MF $(DEPDIR)/matroskamux.Tpo -c -o matroskamux.o `test -f 'elements/matroskamux.c' || echo '$(srcdir)/'`elements/matroskamux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matroskamux.Tpo $(DEPDIR)/matroskamux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/matroskamux.c' object='matroskamux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matroskamux.o `test -f 'elements/matroskamux.c' || echo '$(srcdir)/'`elements/matroskamux.c
+
+matroskamux.obj: elements/matroskamux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matroskamux.obj -MD -MP -MF $(DEPDIR)/matroskamux.Tpo -c -o matroskamux.obj `if test -f 'elements/matroskamux.c'; then $(CYGPATH_W) 'elements/matroskamux.c'; else $(CYGPATH_W) '$(srcdir)/elements/matroskamux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matroskamux.Tpo $(DEPDIR)/matroskamux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/matroskamux.c' object='matroskamux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matroskamux.obj `if test -f 'elements/matroskamux.c'; then $(CYGPATH_W) 'elements/matroskamux.c'; else $(CYGPATH_W) '$(srcdir)/elements/matroskamux.c'; fi`
+
+matroskaparse.o: elements/matroskaparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matroskaparse.o -MD -MP -MF $(DEPDIR)/matroskaparse.Tpo -c -o matroskaparse.o `test -f 'elements/matroskaparse.c' || echo '$(srcdir)/'`elements/matroskaparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matroskaparse.Tpo $(DEPDIR)/matroskaparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/matroskaparse.c' object='matroskaparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matroskaparse.o `test -f 'elements/matroskaparse.c' || echo '$(srcdir)/'`elements/matroskaparse.c
+
+matroskaparse.obj: elements/matroskaparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT matroskaparse.obj -MD -MP -MF $(DEPDIR)/matroskaparse.Tpo -c -o matroskaparse.obj `if test -f 'elements/matroskaparse.c'; then $(CYGPATH_W) 'elements/matroskaparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/matroskaparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/matroskaparse.Tpo $(DEPDIR)/matroskaparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/matroskaparse.c' object='matroskaparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o matroskaparse.obj `if test -f 'elements/matroskaparse.c'; then $(CYGPATH_W) 'elements/matroskaparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/matroskaparse.c'; fi`
+
+mpegaudioparse.o: elements/mpegaudioparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mpegaudioparse.o -MD -MP -MF $(DEPDIR)/mpegaudioparse.Tpo -c -o mpegaudioparse.o `test -f 'elements/mpegaudioparse.c' || echo '$(srcdir)/'`elements/mpegaudioparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mpegaudioparse.Tpo $(DEPDIR)/mpegaudioparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mpegaudioparse.c' object='mpegaudioparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mpegaudioparse.o `test -f 'elements/mpegaudioparse.c' || echo '$(srcdir)/'`elements/mpegaudioparse.c
+
+mpegaudioparse.obj: elements/mpegaudioparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mpegaudioparse.obj -MD -MP -MF $(DEPDIR)/mpegaudioparse.Tpo -c -o mpegaudioparse.obj `if test -f 'elements/mpegaudioparse.c'; then $(CYGPATH_W) 'elements/mpegaudioparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/mpegaudioparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mpegaudioparse.Tpo $(DEPDIR)/mpegaudioparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/mpegaudioparse.c' object='mpegaudioparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mpegaudioparse.obj `if test -f 'elements/mpegaudioparse.c'; then $(CYGPATH_W) 'elements/mpegaudioparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/mpegaudioparse.c'; fi`
+
+elements_multifile-multifile.o: elements/multifile.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_multifile_CFLAGS) $(CFLAGS) -MT elements_multifile-multifile.o -MD -MP -MF $(DEPDIR)/elements_multifile-multifile.Tpo -c -o elements_multifile-multifile.o `test -f 'elements/multifile.c' || echo '$(srcdir)/'`elements/multifile.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_multifile-multifile.Tpo $(DEPDIR)/elements_multifile-multifile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/multifile.c' object='elements_multifile-multifile.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_multifile_CFLAGS) $(CFLAGS) -c -o elements_multifile-multifile.o `test -f 'elements/multifile.c' || echo '$(srcdir)/'`elements/multifile.c
+
+elements_multifile-multifile.obj: elements/multifile.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_multifile_CFLAGS) $(CFLAGS) -MT elements_multifile-multifile.obj -MD -MP -MF $(DEPDIR)/elements_multifile-multifile.Tpo -c -o elements_multifile-multifile.obj `if test -f 'elements/multifile.c'; then $(CYGPATH_W) 'elements/multifile.c'; else $(CYGPATH_W) '$(srcdir)/elements/multifile.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_multifile-multifile.Tpo $(DEPDIR)/elements_multifile-multifile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/multifile.c' object='elements_multifile-multifile.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_multifile_CFLAGS) $(CFLAGS) -c -o elements_multifile-multifile.obj `if test -f 'elements/multifile.c'; then $(CYGPATH_W) 'elements/multifile.c'; else $(CYGPATH_W) '$(srcdir)/elements/multifile.c'; fi`
+
+elements_qtmux-qtmux.o: elements/qtmux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_qtmux_CFLAGS) $(CFLAGS) -MT elements_qtmux-qtmux.o -MD -MP -MF $(DEPDIR)/elements_qtmux-qtmux.Tpo -c -o elements_qtmux-qtmux.o `test -f 'elements/qtmux.c' || echo '$(srcdir)/'`elements/qtmux.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_qtmux-qtmux.Tpo $(DEPDIR)/elements_qtmux-qtmux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/qtmux.c' object='elements_qtmux-qtmux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_qtmux_CFLAGS) $(CFLAGS) -c -o elements_qtmux-qtmux.o `test -f 'elements/qtmux.c' || echo '$(srcdir)/'`elements/qtmux.c
+
+elements_qtmux-qtmux.obj: elements/qtmux.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_qtmux_CFLAGS) $(CFLAGS) -MT elements_qtmux-qtmux.obj -MD -MP -MF $(DEPDIR)/elements_qtmux-qtmux.Tpo -c -o elements_qtmux-qtmux.obj `if test -f 'elements/qtmux.c'; then $(CYGPATH_W) 'elements/qtmux.c'; else $(CYGPATH_W) '$(srcdir)/elements/qtmux.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_qtmux-qtmux.Tpo $(DEPDIR)/elements_qtmux-qtmux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/qtmux.c' object='elements_qtmux-qtmux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_qtmux_CFLAGS) $(CFLAGS) -c -o elements_qtmux-qtmux.obj `if test -f 'elements/qtmux.c'; then $(CYGPATH_W) 'elements/qtmux.c'; else $(CYGPATH_W) '$(srcdir)/elements/qtmux.c'; fi`
+
+rganalysis.o: elements/rganalysis.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rganalysis.o -MD -MP -MF $(DEPDIR)/rganalysis.Tpo -c -o rganalysis.o `test -f 'elements/rganalysis.c' || echo '$(srcdir)/'`elements/rganalysis.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rganalysis.Tpo $(DEPDIR)/rganalysis.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rganalysis.c' object='rganalysis.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rganalysis.o `test -f 'elements/rganalysis.c' || echo '$(srcdir)/'`elements/rganalysis.c
+
+rganalysis.obj: elements/rganalysis.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rganalysis.obj -MD -MP -MF $(DEPDIR)/rganalysis.Tpo -c -o rganalysis.obj `if test -f 'elements/rganalysis.c'; then $(CYGPATH_W) 'elements/rganalysis.c'; else $(CYGPATH_W) '$(srcdir)/elements/rganalysis.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rganalysis.Tpo $(DEPDIR)/rganalysis.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rganalysis.c' object='rganalysis.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rganalysis.obj `if test -f 'elements/rganalysis.c'; then $(CYGPATH_W) 'elements/rganalysis.c'; else $(CYGPATH_W) '$(srcdir)/elements/rganalysis.c'; fi`
+
+rglimiter.o: elements/rglimiter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rglimiter.o -MD -MP -MF $(DEPDIR)/rglimiter.Tpo -c -o rglimiter.o `test -f 'elements/rglimiter.c' || echo '$(srcdir)/'`elements/rglimiter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rglimiter.Tpo $(DEPDIR)/rglimiter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rglimiter.c' object='rglimiter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rglimiter.o `test -f 'elements/rglimiter.c' || echo '$(srcdir)/'`elements/rglimiter.c
+
+rglimiter.obj: elements/rglimiter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rglimiter.obj -MD -MP -MF $(DEPDIR)/rglimiter.Tpo -c -o rglimiter.obj `if test -f 'elements/rglimiter.c'; then $(CYGPATH_W) 'elements/rglimiter.c'; else $(CYGPATH_W) '$(srcdir)/elements/rglimiter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rglimiter.Tpo $(DEPDIR)/rglimiter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rglimiter.c' object='rglimiter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rglimiter.obj `if test -f 'elements/rglimiter.c'; then $(CYGPATH_W) 'elements/rglimiter.c'; else $(CYGPATH_W) '$(srcdir)/elements/rglimiter.c'; fi`
+
+rgvolume.o: elements/rgvolume.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rgvolume.o -MD -MP -MF $(DEPDIR)/rgvolume.Tpo -c -o rgvolume.o `test -f 'elements/rgvolume.c' || echo '$(srcdir)/'`elements/rgvolume.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rgvolume.Tpo $(DEPDIR)/rgvolume.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rgvolume.c' object='rgvolume.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rgvolume.o `test -f 'elements/rgvolume.c' || echo '$(srcdir)/'`elements/rgvolume.c
+
+rgvolume.obj: elements/rgvolume.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rgvolume.obj -MD -MP -MF $(DEPDIR)/rgvolume.Tpo -c -o rgvolume.obj `if test -f 'elements/rgvolume.c'; then $(CYGPATH_W) 'elements/rgvolume.c'; else $(CYGPATH_W) '$(srcdir)/elements/rgvolume.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rgvolume.Tpo $(DEPDIR)/rgvolume.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rgvolume.c' object='rgvolume.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rgvolume.obj `if test -f 'elements/rgvolume.c'; then $(CYGPATH_W) 'elements/rgvolume.c'; else $(CYGPATH_W) '$(srcdir)/elements/rgvolume.c'; fi`
+
+rtp-payloading.o: elements/rtp-payloading.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtp-payloading.o -MD -MP -MF $(DEPDIR)/rtp-payloading.Tpo -c -o rtp-payloading.o `test -f 'elements/rtp-payloading.c' || echo '$(srcdir)/'`elements/rtp-payloading.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtp-payloading.Tpo $(DEPDIR)/rtp-payloading.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtp-payloading.c' object='rtp-payloading.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtp-payloading.o `test -f 'elements/rtp-payloading.c' || echo '$(srcdir)/'`elements/rtp-payloading.c
+
+rtp-payloading.obj: elements/rtp-payloading.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtp-payloading.obj -MD -MP -MF $(DEPDIR)/rtp-payloading.Tpo -c -o rtp-payloading.obj `if test -f 'elements/rtp-payloading.c'; then $(CYGPATH_W) 'elements/rtp-payloading.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtp-payloading.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtp-payloading.Tpo $(DEPDIR)/rtp-payloading.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtp-payloading.c' object='rtp-payloading.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtp-payloading.obj `if test -f 'elements/rtp-payloading.c'; then $(CYGPATH_W) 'elements/rtp-payloading.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtp-payloading.c'; fi`
+
+rtpbin.o: elements/rtpbin.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtpbin.o -MD -MP -MF $(DEPDIR)/rtpbin.Tpo -c -o rtpbin.o `test -f 'elements/rtpbin.c' || echo '$(srcdir)/'`elements/rtpbin.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpbin.Tpo $(DEPDIR)/rtpbin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpbin.c' object='rtpbin.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtpbin.o `test -f 'elements/rtpbin.c' || echo '$(srcdir)/'`elements/rtpbin.c
+
+rtpbin.obj: elements/rtpbin.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtpbin.obj -MD -MP -MF $(DEPDIR)/rtpbin.Tpo -c -o rtpbin.obj `if test -f 'elements/rtpbin.c'; then $(CYGPATH_W) 'elements/rtpbin.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpbin.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpbin.Tpo $(DEPDIR)/rtpbin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpbin.c' object='rtpbin.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtpbin.obj `if test -f 'elements/rtpbin.c'; then $(CYGPATH_W) 'elements/rtpbin.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpbin.c'; fi`
+
+elements_rtpbin_buffer_list-rtpbin_buffer_list.o: elements/rtpbin_buffer_list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtpbin_buffer_list_CFLAGS) $(CFLAGS) -MT elements_rtpbin_buffer_list-rtpbin_buffer_list.o -MD -MP -MF $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Tpo -c -o elements_rtpbin_buffer_list-rtpbin_buffer_list.o `test -f 'elements/rtpbin_buffer_list.c' || echo '$(srcdir)/'`elements/rtpbin_buffer_list.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Tpo $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpbin_buffer_list.c' object='elements_rtpbin_buffer_list-rtpbin_buffer_list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtpbin_buffer_list_CFLAGS) $(CFLAGS) -c -o elements_rtpbin_buffer_list-rtpbin_buffer_list.o `test -f 'elements/rtpbin_buffer_list.c' || echo '$(srcdir)/'`elements/rtpbin_buffer_list.c
+
+elements_rtpbin_buffer_list-rtpbin_buffer_list.obj: elements/rtpbin_buffer_list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtpbin_buffer_list_CFLAGS) $(CFLAGS) -MT elements_rtpbin_buffer_list-rtpbin_buffer_list.obj -MD -MP -MF $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Tpo -c -o elements_rtpbin_buffer_list-rtpbin_buffer_list.obj `if test -f 'elements/rtpbin_buffer_list.c'; then $(CYGPATH_W) 'elements/rtpbin_buffer_list.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpbin_buffer_list.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Tpo $(DEPDIR)/elements_rtpbin_buffer_list-rtpbin_buffer_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpbin_buffer_list.c' object='elements_rtpbin_buffer_list-rtpbin_buffer_list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_rtpbin_buffer_list_CFLAGS) $(CFLAGS) -c -o elements_rtpbin_buffer_list-rtpbin_buffer_list.obj `if test -f 'elements/rtpbin_buffer_list.c'; then $(CYGPATH_W) 'elements/rtpbin_buffer_list.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpbin_buffer_list.c'; fi`
+
+rtpjitterbuffer.o: elements/rtpjitterbuffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtpjitterbuffer.o -MD -MP -MF $(DEPDIR)/rtpjitterbuffer.Tpo -c -o rtpjitterbuffer.o `test -f 'elements/rtpjitterbuffer.c' || echo '$(srcdir)/'`elements/rtpjitterbuffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpjitterbuffer.Tpo $(DEPDIR)/rtpjitterbuffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpjitterbuffer.c' object='rtpjitterbuffer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtpjitterbuffer.o `test -f 'elements/rtpjitterbuffer.c' || echo '$(srcdir)/'`elements/rtpjitterbuffer.c
+
+rtpjitterbuffer.obj: elements/rtpjitterbuffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rtpjitterbuffer.obj -MD -MP -MF $(DEPDIR)/rtpjitterbuffer.Tpo -c -o rtpjitterbuffer.obj `if test -f 'elements/rtpjitterbuffer.c'; then $(CYGPATH_W) 'elements/rtpjitterbuffer.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpjitterbuffer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rtpjitterbuffer.Tpo $(DEPDIR)/rtpjitterbuffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/rtpjitterbuffer.c' object='rtpjitterbuffer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rtpjitterbuffer.obj `if test -f 'elements/rtpjitterbuffer.c'; then $(CYGPATH_W) 'elements/rtpjitterbuffer.c'; else $(CYGPATH_W) '$(srcdir)/elements/rtpjitterbuffer.c'; fi`
+
+shapewipe.o: elements/shapewipe.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shapewipe.o -MD -MP -MF $(DEPDIR)/shapewipe.Tpo -c -o shapewipe.o `test -f 'elements/shapewipe.c' || echo '$(srcdir)/'`elements/shapewipe.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shapewipe.Tpo $(DEPDIR)/shapewipe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/shapewipe.c' object='shapewipe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shapewipe.o `test -f 'elements/shapewipe.c' || echo '$(srcdir)/'`elements/shapewipe.c
+
+shapewipe.obj: elements/shapewipe.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shapewipe.obj -MD -MP -MF $(DEPDIR)/shapewipe.Tpo -c -o shapewipe.obj `if test -f 'elements/shapewipe.c'; then $(CYGPATH_W) 'elements/shapewipe.c'; else $(CYGPATH_W) '$(srcdir)/elements/shapewipe.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shapewipe.Tpo $(DEPDIR)/shapewipe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/shapewipe.c' object='shapewipe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shapewipe.obj `if test -f 'elements/shapewipe.c'; then $(CYGPATH_W) 'elements/shapewipe.c'; else $(CYGPATH_W) '$(srcdir)/elements/shapewipe.c'; fi`
+
+elements_souphttpsrc-souphttpsrc.o: elements/souphttpsrc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_souphttpsrc_CFLAGS) $(CFLAGS) -MT elements_souphttpsrc-souphttpsrc.o -MD -MP -MF $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Tpo -c -o elements_souphttpsrc-souphttpsrc.o `test -f 'elements/souphttpsrc.c' || echo '$(srcdir)/'`elements/souphttpsrc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Tpo $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/souphttpsrc.c' object='elements_souphttpsrc-souphttpsrc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_souphttpsrc_CFLAGS) $(CFLAGS) -c -o elements_souphttpsrc-souphttpsrc.o `test -f 'elements/souphttpsrc.c' || echo '$(srcdir)/'`elements/souphttpsrc.c
+
+elements_souphttpsrc-souphttpsrc.obj: elements/souphttpsrc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_souphttpsrc_CFLAGS) $(CFLAGS) -MT elements_souphttpsrc-souphttpsrc.obj -MD -MP -MF $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Tpo -c -o elements_souphttpsrc-souphttpsrc.obj `if test -f 'elements/souphttpsrc.c'; then $(CYGPATH_W) 'elements/souphttpsrc.c'; else $(CYGPATH_W) '$(srcdir)/elements/souphttpsrc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Tpo $(DEPDIR)/elements_souphttpsrc-souphttpsrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/souphttpsrc.c' object='elements_souphttpsrc-souphttpsrc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_souphttpsrc_CFLAGS) $(CFLAGS) -c -o elements_souphttpsrc-souphttpsrc.obj `if test -f 'elements/souphttpsrc.c'; then $(CYGPATH_W) 'elements/souphttpsrc.c'; else $(CYGPATH_W) '$(srcdir)/elements/souphttpsrc.c'; fi`
+
+spectrum.o: elements/spectrum.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spectrum.o -MD -MP -MF $(DEPDIR)/spectrum.Tpo -c -o spectrum.o `test -f 'elements/spectrum.c' || echo '$(srcdir)/'`elements/spectrum.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spectrum.Tpo $(DEPDIR)/spectrum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/spectrum.c' object='spectrum.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spectrum.o `test -f 'elements/spectrum.c' || echo '$(srcdir)/'`elements/spectrum.c
+
+spectrum.obj: elements/spectrum.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spectrum.obj -MD -MP -MF $(DEPDIR)/spectrum.Tpo -c -o spectrum.obj `if test -f 'elements/spectrum.c'; then $(CYGPATH_W) 'elements/spectrum.c'; else $(CYGPATH_W) '$(srcdir)/elements/spectrum.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spectrum.Tpo $(DEPDIR)/spectrum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/spectrum.c' object='spectrum.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spectrum.obj `if test -f 'elements/spectrum.c'; then $(CYGPATH_W) 'elements/spectrum.c'; else $(CYGPATH_W) '$(srcdir)/elements/spectrum.c'; fi`
+
+elements_sunaudio-sunaudio.o: elements/sunaudio.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_sunaudio_CFLAGS) $(CFLAGS) -MT elements_sunaudio-sunaudio.o -MD -MP -MF $(DEPDIR)/elements_sunaudio-sunaudio.Tpo -c -o elements_sunaudio-sunaudio.o `test -f 'elements/sunaudio.c' || echo '$(srcdir)/'`elements/sunaudio.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_sunaudio-sunaudio.Tpo $(DEPDIR)/elements_sunaudio-sunaudio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/sunaudio.c' object='elements_sunaudio-sunaudio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_sunaudio_CFLAGS) $(CFLAGS) -c -o elements_sunaudio-sunaudio.o `test -f 'elements/sunaudio.c' || echo '$(srcdir)/'`elements/sunaudio.c
+
+elements_sunaudio-sunaudio.obj: elements/sunaudio.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_sunaudio_CFLAGS) $(CFLAGS) -MT elements_sunaudio-sunaudio.obj -MD -MP -MF $(DEPDIR)/elements_sunaudio-sunaudio.Tpo -c -o elements_sunaudio-sunaudio.obj `if test -f 'elements/sunaudio.c'; then $(CYGPATH_W) 'elements/sunaudio.c'; else $(CYGPATH_W) '$(srcdir)/elements/sunaudio.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_sunaudio-sunaudio.Tpo $(DEPDIR)/elements_sunaudio-sunaudio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/sunaudio.c' object='elements_sunaudio-sunaudio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_sunaudio_CFLAGS) $(CFLAGS) -c -o elements_sunaudio-sunaudio.obj `if test -f 'elements/sunaudio.c'; then $(CYGPATH_W) 'elements/sunaudio.c'; else $(CYGPATH_W) '$(srcdir)/elements/sunaudio.c'; fi`
+
+udpsink.o: elements/udpsink.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udpsink.o -MD -MP -MF $(DEPDIR)/udpsink.Tpo -c -o udpsink.o `test -f 'elements/udpsink.c' || echo '$(srcdir)/'`elements/udpsink.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/udpsink.Tpo $(DEPDIR)/udpsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/udpsink.c' object='udpsink.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udpsink.o `test -f 'elements/udpsink.c' || echo '$(srcdir)/'`elements/udpsink.c
+
+udpsink.obj: elements/udpsink.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udpsink.obj -MD -MP -MF $(DEPDIR)/udpsink.Tpo -c -o udpsink.obj `if test -f 'elements/udpsink.c'; then $(CYGPATH_W) 'elements/udpsink.c'; else $(CYGPATH_W) '$(srcdir)/elements/udpsink.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/udpsink.Tpo $(DEPDIR)/udpsink.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/udpsink.c' object='udpsink.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udpsink.obj `if test -f 'elements/udpsink.c'; then $(CYGPATH_W) 'elements/udpsink.c'; else $(CYGPATH_W) '$(srcdir)/elements/udpsink.c'; fi`
+
+elements_videocrop-videocrop.o: elements/videocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videocrop_CFLAGS) $(CFLAGS) -MT elements_videocrop-videocrop.o -MD -MP -MF $(DEPDIR)/elements_videocrop-videocrop.Tpo -c -o elements_videocrop-videocrop.o `test -f 'elements/videocrop.c' || echo '$(srcdir)/'`elements/videocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_videocrop-videocrop.Tpo $(DEPDIR)/elements_videocrop-videocrop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/videocrop.c' object='elements_videocrop-videocrop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videocrop_CFLAGS) $(CFLAGS) -c -o elements_videocrop-videocrop.o `test -f 'elements/videocrop.c' || echo '$(srcdir)/'`elements/videocrop.c
+
+elements_videocrop-videocrop.obj: elements/videocrop.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videocrop_CFLAGS) $(CFLAGS) -MT elements_videocrop-videocrop.obj -MD -MP -MF $(DEPDIR)/elements_videocrop-videocrop.Tpo -c -o elements_videocrop-videocrop.obj `if test -f 'elements/videocrop.c'; then $(CYGPATH_W) 'elements/videocrop.c'; else $(CYGPATH_W) '$(srcdir)/elements/videocrop.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_videocrop-videocrop.Tpo $(DEPDIR)/elements_videocrop-videocrop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/videocrop.c' object='elements_videocrop-videocrop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videocrop_CFLAGS) $(CFLAGS) -c -o elements_videocrop-videocrop.obj `if test -f 'elements/videocrop.c'; then $(CYGPATH_W) 'elements/videocrop.c'; else $(CYGPATH_W) '$(srcdir)/elements/videocrop.c'; fi`
+
+elements_videofilter-videofilter.o: elements/videofilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videofilter_CFLAGS) $(CFLAGS) -MT elements_videofilter-videofilter.o -MD -MP -MF $(DEPDIR)/elements_videofilter-videofilter.Tpo -c -o elements_videofilter-videofilter.o `test -f 'elements/videofilter.c' || echo '$(srcdir)/'`elements/videofilter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_videofilter-videofilter.Tpo $(DEPDIR)/elements_videofilter-videofilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/videofilter.c' object='elements_videofilter-videofilter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videofilter_CFLAGS) $(CFLAGS) -c -o elements_videofilter-videofilter.o `test -f 'elements/videofilter.c' || echo '$(srcdir)/'`elements/videofilter.c
+
+elements_videofilter-videofilter.obj: elements/videofilter.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videofilter_CFLAGS) $(CFLAGS) -MT elements_videofilter-videofilter.obj -MD -MP -MF $(DEPDIR)/elements_videofilter-videofilter.Tpo -c -o elements_videofilter-videofilter.obj `if test -f 'elements/videofilter.c'; then $(CYGPATH_W) 'elements/videofilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/videofilter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/elements_videofilter-videofilter.Tpo $(DEPDIR)/elements_videofilter-videofilter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/videofilter.c' object='elements_videofilter-videofilter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_videofilter_CFLAGS) $(CFLAGS) -c -o elements_videofilter-videofilter.obj `if test -f 'elements/videofilter.c'; then $(CYGPATH_W) 'elements/videofilter.c'; else $(CYGPATH_W) '$(srcdir)/elements/videofilter.c'; fi`
+
+wavpackdec.o: elements/wavpackdec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackdec.o -MD -MP -MF $(DEPDIR)/wavpackdec.Tpo -c -o wavpackdec.o `test -f 'elements/wavpackdec.c' || echo '$(srcdir)/'`elements/wavpackdec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackdec.Tpo $(DEPDIR)/wavpackdec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackdec.c' object='wavpackdec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackdec.o `test -f 'elements/wavpackdec.c' || echo '$(srcdir)/'`elements/wavpackdec.c
+
+wavpackdec.obj: elements/wavpackdec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackdec.obj -MD -MP -MF $(DEPDIR)/wavpackdec.Tpo -c -o wavpackdec.obj `if test -f 'elements/wavpackdec.c'; then $(CYGPATH_W) 'elements/wavpackdec.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackdec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackdec.Tpo $(DEPDIR)/wavpackdec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackdec.c' object='wavpackdec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackdec.obj `if test -f 'elements/wavpackdec.c'; then $(CYGPATH_W) 'elements/wavpackdec.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackdec.c'; fi`
+
+wavpackenc.o: elements/wavpackenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackenc.o -MD -MP -MF $(DEPDIR)/wavpackenc.Tpo -c -o wavpackenc.o `test -f 'elements/wavpackenc.c' || echo '$(srcdir)/'`elements/wavpackenc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackenc.Tpo $(DEPDIR)/wavpackenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackenc.c' object='wavpackenc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackenc.o `test -f 'elements/wavpackenc.c' || echo '$(srcdir)/'`elements/wavpackenc.c
+
+wavpackenc.obj: elements/wavpackenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackenc.obj -MD -MP -MF $(DEPDIR)/wavpackenc.Tpo -c -o wavpackenc.obj `if test -f 'elements/wavpackenc.c'; then $(CYGPATH_W) 'elements/wavpackenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackenc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackenc.Tpo $(DEPDIR)/wavpackenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackenc.c' object='wavpackenc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackenc.obj `if test -f 'elements/wavpackenc.c'; then $(CYGPATH_W) 'elements/wavpackenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackenc.c'; fi`
+
+wavpackparse.o: elements/wavpackparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackparse.o -MD -MP -MF $(DEPDIR)/wavpackparse.Tpo -c -o wavpackparse.o `test -f 'elements/wavpackparse.c' || echo '$(srcdir)/'`elements/wavpackparse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackparse.Tpo $(DEPDIR)/wavpackparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackparse.c' object='wavpackparse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackparse.o `test -f 'elements/wavpackparse.c' || echo '$(srcdir)/'`elements/wavpackparse.c
+
+wavpackparse.obj: elements/wavpackparse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wavpackparse.obj -MD -MP -MF $(DEPDIR)/wavpackparse.Tpo -c -o wavpackparse.obj `if test -f 'elements/wavpackparse.c'; then $(CYGPATH_W) 'elements/wavpackparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackparse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wavpackparse.Tpo $(DEPDIR)/wavpackparse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/wavpackparse.c' object='wavpackparse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wavpackparse.obj `if test -f 'elements/wavpackparse.c'; then $(CYGPATH_W) 'elements/wavpackparse.c'; else $(CYGPATH_W) '$(srcdir)/elements/wavpackparse.c'; fi`
+
+y4menc.o: elements/y4menc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT y4menc.o -MD -MP -MF $(DEPDIR)/y4menc.Tpo -c -o y4menc.o `test -f 'elements/y4menc.c' || echo '$(srcdir)/'`elements/y4menc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/y4menc.Tpo $(DEPDIR)/y4menc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/y4menc.c' object='y4menc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o y4menc.o `test -f 'elements/y4menc.c' || echo '$(srcdir)/'`elements/y4menc.c
+
+y4menc.obj: elements/y4menc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT y4menc.obj -MD -MP -MF $(DEPDIR)/y4menc.Tpo -c -o y4menc.obj `if test -f 'elements/y4menc.c'; then $(CYGPATH_W) 'elements/y4menc.c'; else $(CYGPATH_W) '$(srcdir)/elements/y4menc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/y4menc.Tpo $(DEPDIR)/y4menc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/y4menc.c' object='y4menc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o y4menc.obj `if test -f 'elements/y4menc.c'; then $(CYGPATH_W) 'elements/y4menc.c'; else $(CYGPATH_W) '$(srcdir)/elements/y4menc.c'; fi`
+
+index.o: generic/index.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT index.o -MD -MP -MF $(DEPDIR)/index.Tpo -c -o index.o `test -f 'generic/index.c' || echo '$(srcdir)/'`generic/index.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/index.Tpo $(DEPDIR)/index.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generic/index.c' object='index.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o index.o `test -f 'generic/index.c' || echo '$(srcdir)/'`generic/index.c
+
+index.obj: generic/index.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT index.obj -MD -MP -MF $(DEPDIR)/index.Tpo -c -o index.obj `if test -f 'generic/index.c'; then $(CYGPATH_W) 'generic/index.c'; else $(CYGPATH_W) '$(srcdir)/generic/index.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/index.Tpo $(DEPDIR)/index.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generic/index.c' object='index.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o index.obj `if test -f 'generic/index.c'; then $(CYGPATH_W) 'generic/index.c'; else $(CYGPATH_W) '$(srcdir)/generic/index.c'; fi`
+
+states.o: generic/states.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT states.o -MD -MP -MF $(DEPDIR)/states.Tpo -c -o states.o `test -f 'generic/states.c' || echo '$(srcdir)/'`generic/states.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/states.Tpo $(DEPDIR)/states.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generic/states.c' object='states.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o states.o `test -f 'generic/states.c' || echo '$(srcdir)/'`generic/states.c
+
+states.obj: generic/states.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT states.obj -MD -MP -MF $(DEPDIR)/states.Tpo -c -o states.obj `if test -f 'generic/states.c'; then $(CYGPATH_W) 'generic/states.c'; else $(CYGPATH_W) '$(srcdir)/generic/states.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/states.Tpo $(DEPDIR)/states.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generic/states.c' object='states.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o states.obj `if test -f 'generic/states.c'; then $(CYGPATH_W) 'generic/states.c'; else $(CYGPATH_W) '$(srcdir)/generic/states.c'; fi`
+
+orc_deinterlace-deinterlace.o: orc/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_deinterlace_CFLAGS) $(CFLAGS) -MT orc_deinterlace-deinterlace.o -MD -MP -MF $(DEPDIR)/orc_deinterlace-deinterlace.Tpo -c -o orc_deinterlace-deinterlace.o `test -f 'orc/deinterlace.c' || echo '$(srcdir)/'`orc/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_deinterlace-deinterlace.Tpo $(DEPDIR)/orc_deinterlace-deinterlace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/deinterlace.c' object='orc_deinterlace-deinterlace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_deinterlace_CFLAGS) $(CFLAGS) -c -o orc_deinterlace-deinterlace.o `test -f 'orc/deinterlace.c' || echo '$(srcdir)/'`orc/deinterlace.c
+
+orc_deinterlace-deinterlace.obj: orc/deinterlace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_deinterlace_CFLAGS) $(CFLAGS) -MT orc_deinterlace-deinterlace.obj -MD -MP -MF $(DEPDIR)/orc_deinterlace-deinterlace.Tpo -c -o orc_deinterlace-deinterlace.obj `if test -f 'orc/deinterlace.c'; then $(CYGPATH_W) 'orc/deinterlace.c'; else $(CYGPATH_W) '$(srcdir)/orc/deinterlace.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_deinterlace-deinterlace.Tpo $(DEPDIR)/orc_deinterlace-deinterlace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/deinterlace.c' object='orc_deinterlace-deinterlace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_deinterlace_CFLAGS) $(CFLAGS) -c -o orc_deinterlace-deinterlace.obj `if test -f 'orc/deinterlace.c'; then $(CYGPATH_W) 'orc/deinterlace.c'; else $(CYGPATH_W) '$(srcdir)/orc/deinterlace.c'; fi`
+
+orc_videobox-videobox.o: orc/videobox.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videobox_CFLAGS) $(CFLAGS) -MT orc_videobox-videobox.o -MD -MP -MF $(DEPDIR)/orc_videobox-videobox.Tpo -c -o orc_videobox-videobox.o `test -f 'orc/videobox.c' || echo '$(srcdir)/'`orc/videobox.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_videobox-videobox.Tpo $(DEPDIR)/orc_videobox-videobox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/videobox.c' object='orc_videobox-videobox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videobox_CFLAGS) $(CFLAGS) -c -o orc_videobox-videobox.o `test -f 'orc/videobox.c' || echo '$(srcdir)/'`orc/videobox.c
+
+orc_videobox-videobox.obj: orc/videobox.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videobox_CFLAGS) $(CFLAGS) -MT orc_videobox-videobox.obj -MD -MP -MF $(DEPDIR)/orc_videobox-videobox.Tpo -c -o orc_videobox-videobox.obj `if test -f 'orc/videobox.c'; then $(CYGPATH_W) 'orc/videobox.c'; else $(CYGPATH_W) '$(srcdir)/orc/videobox.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_videobox-videobox.Tpo $(DEPDIR)/orc_videobox-videobox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/videobox.c' object='orc_videobox-videobox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videobox_CFLAGS) $(CFLAGS) -c -o orc_videobox-videobox.obj `if test -f 'orc/videobox.c'; then $(CYGPATH_W) 'orc/videobox.c'; else $(CYGPATH_W) '$(srcdir)/orc/videobox.c'; fi`
+
+orc_videomixer-videomixer.o: orc/videomixer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videomixer_CFLAGS) $(CFLAGS) -MT orc_videomixer-videomixer.o -MD -MP -MF $(DEPDIR)/orc_videomixer-videomixer.Tpo -c -o orc_videomixer-videomixer.o `test -f 'orc/videomixer.c' || echo '$(srcdir)/'`orc/videomixer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_videomixer-videomixer.Tpo $(DEPDIR)/orc_videomixer-videomixer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/videomixer.c' object='orc_videomixer-videomixer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videomixer_CFLAGS) $(CFLAGS) -c -o orc_videomixer-videomixer.o `test -f 'orc/videomixer.c' || echo '$(srcdir)/'`orc/videomixer.c
+
+orc_videomixer-videomixer.obj: orc/videomixer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videomixer_CFLAGS) $(CFLAGS) -MT orc_videomixer-videomixer.obj -MD -MP -MF $(DEPDIR)/orc_videomixer-videomixer.Tpo -c -o orc_videomixer-videomixer.obj `if test -f 'orc/videomixer.c'; then $(CYGPATH_W) 'orc/videomixer.c'; else $(CYGPATH_W) '$(srcdir)/orc/videomixer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/orc_videomixer-videomixer.Tpo $(DEPDIR)/orc_videomixer-videomixer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orc/videomixer.c' object='orc_videomixer-videomixer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_videomixer_CFLAGS) $(CFLAGS) -c -o orc_videomixer-videomixer.obj `if test -f 'orc/videomixer.c'; then $(CYGPATH_W) 'orc/videomixer.c'; else $(CYGPATH_W) '$(srcdir)/orc/videomixer.c'; fi`
+
+effectv.o: pipelines/effectv.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT effectv.o -MD -MP -MF $(DEPDIR)/effectv.Tpo -c -o effectv.o `test -f 'pipelines/effectv.c' || echo '$(srcdir)/'`pipelines/effectv.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/effectv.Tpo $(DEPDIR)/effectv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/effectv.c' object='effectv.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o effectv.o `test -f 'pipelines/effectv.c' || echo '$(srcdir)/'`pipelines/effectv.c
+
+effectv.obj: pipelines/effectv.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT effectv.obj -MD -MP -MF $(DEPDIR)/effectv.Tpo -c -o effectv.obj `if test -f 'pipelines/effectv.c'; then $(CYGPATH_W) 'pipelines/effectv.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/effectv.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/effectv.Tpo $(DEPDIR)/effectv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/effectv.c' object='effectv.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o effectv.obj `if test -f 'pipelines/effectv.c'; then $(CYGPATH_W) 'pipelines/effectv.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/effectv.c'; fi`
+
+flacdec.o: pipelines/flacdec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flacdec.o -MD -MP -MF $(DEPDIR)/flacdec.Tpo -c -o flacdec.o `test -f 'pipelines/flacdec.c' || echo '$(srcdir)/'`pipelines/flacdec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flacdec.Tpo $(DEPDIR)/flacdec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/flacdec.c' object='flacdec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flacdec.o `test -f 'pipelines/flacdec.c' || echo '$(srcdir)/'`pipelines/flacdec.c
+
+flacdec.obj: pipelines/flacdec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT flacdec.obj -MD -MP -MF $(DEPDIR)/flacdec.Tpo -c -o flacdec.obj `if test -f 'pipelines/flacdec.c'; then $(CYGPATH_W) 'pipelines/flacdec.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/flacdec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flacdec.Tpo $(DEPDIR)/flacdec.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/flacdec.c' object='flacdec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o flacdec.obj `if test -f 'pipelines/flacdec.c'; then $(CYGPATH_W) 'pipelines/flacdec.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/flacdec.c'; fi`
+
+simple-launch-lines.o: pipelines/simple-launch-lines.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT simple-launch-lines.o -MD -MP -MF $(DEPDIR)/simple-launch-lines.Tpo -c -o simple-launch-lines.o `test -f 'pipelines/simple-launch-lines.c' || echo '$(srcdir)/'`pipelines/simple-launch-lines.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple-launch-lines.Tpo $(DEPDIR)/simple-launch-lines.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/simple-launch-lines.c' object='simple-launch-lines.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o simple-launch-lines.o `test -f 'pipelines/simple-launch-lines.c' || echo '$(srcdir)/'`pipelines/simple-launch-lines.c
+
+simple-launch-lines.obj: pipelines/simple-launch-lines.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT simple-launch-lines.obj -MD -MP -MF $(DEPDIR)/simple-launch-lines.Tpo -c -o simple-launch-lines.obj `if test -f 'pipelines/simple-launch-lines.c'; then $(CYGPATH_W) 'pipelines/simple-launch-lines.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/simple-launch-lines.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple-launch-lines.Tpo $(DEPDIR)/simple-launch-lines.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/simple-launch-lines.c' object='simple-launch-lines.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o simple-launch-lines.obj `if test -f 'pipelines/simple-launch-lines.c'; then $(CYGPATH_W) 'pipelines/simple-launch-lines.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/simple-launch-lines.c'; fi`
+
+tagschecking.o: pipelines/tagschecking.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tagschecking.o -MD -MP -MF $(DEPDIR)/tagschecking.Tpo -c -o tagschecking.o `test -f 'pipelines/tagschecking.c' || echo '$(srcdir)/'`pipelines/tagschecking.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tagschecking.Tpo $(DEPDIR)/tagschecking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/tagschecking.c' object='tagschecking.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tagschecking.o `test -f 'pipelines/tagschecking.c' || echo '$(srcdir)/'`pipelines/tagschecking.c
+
+tagschecking.obj: pipelines/tagschecking.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tagschecking.obj -MD -MP -MF $(DEPDIR)/tagschecking.Tpo -c -o tagschecking.obj `if test -f 'pipelines/tagschecking.c'; then $(CYGPATH_W) 'pipelines/tagschecking.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/tagschecking.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tagschecking.Tpo $(DEPDIR)/tagschecking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/tagschecking.c' object='tagschecking.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tagschecking.obj `if test -f 'pipelines/tagschecking.c'; then $(CYGPATH_W) 'pipelines/tagschecking.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/tagschecking.c'; fi`
+
+pipelines_wavenc-wavenc.o: pipelines/wavenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavenc_CFLAGS) $(CFLAGS) -MT pipelines_wavenc-wavenc.o -MD -MP -MF $(DEPDIR)/pipelines_wavenc-wavenc.Tpo -c -o pipelines_wavenc-wavenc.o `test -f 'pipelines/wavenc.c' || echo '$(srcdir)/'`pipelines/wavenc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pipelines_wavenc-wavenc.Tpo $(DEPDIR)/pipelines_wavenc-wavenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/wavenc.c' object='pipelines_wavenc-wavenc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavenc_CFLAGS) $(CFLAGS) -c -o pipelines_wavenc-wavenc.o `test -f 'pipelines/wavenc.c' || echo '$(srcdir)/'`pipelines/wavenc.c
+
+pipelines_wavenc-wavenc.obj: pipelines/wavenc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavenc_CFLAGS) $(CFLAGS) -MT pipelines_wavenc-wavenc.obj -MD -MP -MF $(DEPDIR)/pipelines_wavenc-wavenc.Tpo -c -o pipelines_wavenc-wavenc.obj `if test -f 'pipelines/wavenc.c'; then $(CYGPATH_W) 'pipelines/wavenc.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/wavenc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pipelines_wavenc-wavenc.Tpo $(DEPDIR)/pipelines_wavenc-wavenc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/wavenc.c' object='pipelines_wavenc-wavenc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavenc_CFLAGS) $(CFLAGS) -c -o pipelines_wavenc-wavenc.obj `if test -f 'pipelines/wavenc.c'; then $(CYGPATH_W) 'pipelines/wavenc.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/wavenc.c'; fi`
+
+pipelines_wavpack-wavpack.o: pipelines/wavpack.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavpack_CFLAGS) $(CFLAGS) -MT pipelines_wavpack-wavpack.o -MD -MP -MF $(DEPDIR)/pipelines_wavpack-wavpack.Tpo -c -o pipelines_wavpack-wavpack.o `test -f 'pipelines/wavpack.c' || echo '$(srcdir)/'`pipelines/wavpack.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pipelines_wavpack-wavpack.Tpo $(DEPDIR)/pipelines_wavpack-wavpack.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/wavpack.c' object='pipelines_wavpack-wavpack.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavpack_CFLAGS) $(CFLAGS) -c -o pipelines_wavpack-wavpack.o `test -f 'pipelines/wavpack.c' || echo '$(srcdir)/'`pipelines/wavpack.c
+
+pipelines_wavpack-wavpack.obj: pipelines/wavpack.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavpack_CFLAGS) $(CFLAGS) -MT pipelines_wavpack-wavpack.obj -MD -MP -MF $(DEPDIR)/pipelines_wavpack-wavpack.Tpo -c -o pipelines_wavpack-wavpack.obj `if test -f 'pipelines/wavpack.c'; then $(CYGPATH_W) 'pipelines/wavpack.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/wavpack.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pipelines_wavpack-wavpack.Tpo $(DEPDIR)/pipelines_wavpack-wavpack.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipelines/wavpack.c' object='pipelines_wavpack-wavpack.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_wavpack_CFLAGS) $(CFLAGS) -c -o pipelines_wavpack-wavpack.obj `if test -f 'pipelines/wavpack.c'; then $(CYGPATH_W) 'pipelines/wavpack.c'; else $(CYGPATH_W) '$(srcdir)/pipelines/wavpack.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf elements/.libs elements/_libs
+ -rm -rf generic/.libs generic/_libs
+ -rm -rf orc/.libs orc/_libs
+ -rm -rf pipelines/.libs pipelines/_libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ fi; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f elements/$(am__dirstamp)
+ -rm -f generic/$(am__dirstamp)
+ -rm -f orc/$(am__dirstamp)
+ -rm -f pipelines/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# keep target around, since it's referenced in the modules' Makefiles
+clean-local-check:
+ @echo
+
+# hangs spectacularly on some machines, so let's not do this by default yet
+@HAVE_VALGRIND_TRUE@check-valgrind:
+@HAVE_VALGRIND_TRUE@ $(MAKE) valgrind
+@HAVE_VALGRIND_FALSE@check-valgrind:
+@HAVE_VALGRIND_FALSE@ @true
+
+# run any given test by running make test.check
+# if the test fails, run it again at at least debug level 2
+%.check: %
+ @$(TESTS_ENVIRONMENT) \
+ CK_DEFAULT_TIMEOUT=20 \
+ $* || \
+ $(TESTS_ENVIRONMENT) \
+ GST_DEBUG=$$GST_DEBUG,*:2 \
+ CK_DEFAULT_TIMEOUT=20 \
+ $*
+
+# run any given test in a loop
+%.torture: %
+ @for i in `seq 1 $(LOOPS)`; do \
+ $(TESTS_ENVIRONMENT) \
+ CK_DEFAULT_TIMEOUT=20 \
+ $*; done
+
+# run any given test in an infinite loop
+%.forever: %
+ @while true; do \
+ $(TESTS_ENVIRONMENT) \
+ CK_DEFAULT_TIMEOUT=20 \
+ $* || break; done
+
+# valgrind any given test by running make test.valgrind
+%.valgrind: %
+ @$(TESTS_ENVIRONMENT) \
+ CK_DEFAULT_TIMEOUT=360 \
+ G_SLICE=always-malloc \
+ $(LIBTOOL) --mode=execute \
+ $(VALGRIND_PATH) -q \
+ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \
+ --tool=memcheck --leak-check=full --trace-children=yes \
+ --leak-resolution=high --num-callers=20 \
+ ./$* 2>&1 | tee valgrind.log
+ @if grep "==" valgrind.log > /dev/null 2>&1; then \
+ rm valgrind.log; \
+ exit 1; \
+ fi
+ @rm valgrind.log
+
+# valgrind any given test and generate suppressions for it
+%.valgrind.gen-suppressions: %
+ @$(TESTS_ENVIRONMENT) \
+ CK_DEFAULT_TIMEOUT=360 \
+ G_SLICE=always-malloc \
+ $(LIBTOOL) --mode=execute \
+ $(VALGRIND_PATH) -q \
+ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \
+ --tool=memcheck --leak-check=full --trace-children=yes \
+ --leak-resolution=high --num-callers=20 \
+ --gen-suppressions=all \
+ ./$* 2>&1 | tee suppressions.log
+
+# valgrind any given test until failure by running make test.valgrind-forever
+%.valgrind-forever: %
+ @while $(MAKE) $*.valgrind; do \
+ true; done
+
+# gdb any given test by running make test.gdb
+%.gdb: %
+ @$(TESTS_ENVIRONMENT) \
+ CK_FORK=no \
+ $(LIBTOOL) --mode=execute \
+ gdb $*
+
+# torture tests
+torture: $(TESTS)
+ -rm test-registry.xml
+ @echo "Torturing tests ..."
+ @for i in `seq 1 $(LOOPS)`; do \
+ $(MAKE) check || \
+ (echo "Failure after $$i runs"; exit 1) || \
+ exit 1; \
+ done
+ @banner="All $(LOOPS) loops passed"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo $$dashes; echo $$banner; echo $$dashes
+
+# forever tests
+forever: $(TESTS)
+ -rm test-registry.xml
+ @echo "Forever tests ..."
+ @while true; do \
+ $(MAKE) check || \
+ (echo "Failure"; exit 1) || \
+ exit 1; \
+ done
+
+# valgrind all tests
+valgrind: $(TESTS)
+ @echo "Valgrinding tests ..."
+ @failed=0; \
+ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
+ $(MAKE) $$t.valgrind; \
+ if test "$$?" -ne 0; then \
+ echo "Valgrind error for test $$t"; \
+ failed=`expr $$failed + 1`; \
+ whicht="$$whicht $$t"; \
+ fi; \
+ done; \
+ if test "$$failed" -ne 0; then \
+ echo "$$failed tests had leaks or errors under valgrind:"; \
+ echo "$$whicht"; \
+ false; \
+ fi
+
+# valgrind all tests and generate suppressions
+valgrind.gen-suppressions: $(TESTS)
+ @echo "Valgrinding tests ..."
+ @failed=0; \
+ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
+ $(MAKE) $$t.valgrind.gen-suppressions; \
+ if test "$$?" -ne 0; then \
+ echo "Valgrind error for test $$t"; \
+ failed=`expr $$failed + 1`; \
+ whicht="$$whicht $$t"; \
+ fi; \
+ done; \
+ if test "$$failed" -ne 0; then \
+ echo "$$failed tests had leaks or errors under valgrind:"; \
+ echo "$$whicht"; \
+ false; \
+ fi
+inspect:
+ @echo "Inspecting features ..."
+ @for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \
+ | cut -d: -f2`; \
+ do echo Inspecting $$e; \
+ $(GST_INSPECT) $$e > /dev/null 2>&1; done
+
+help:
+ @echo
+ @echo "make check -- run all checks"
+ @echo "make torture -- run all checks $(LOOPS) times"
+ @echo "make (dir)/(test).check -- run the given check once"
+ @echo "make (dir)/(test).forever -- run the given check forever"
+ @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times"
+ @echo
+ @echo "make (dir)/(test).gdb -- start up gdb for the given test"
+ @echo
+ @echo "make valgrind -- valgrind all tests"
+ @echo "make valgrind.gen-suppressions -- generate suppressions for all tests"
+ @echo " and save to suppressions.log"
+ @echo "make (dir)/(test).valgrind -- valgrind the given test"
+ @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever"
+ @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions"
+ @echo " and save to suppressions.log"
+ @echo "make inspect -- inspect all plugin features"
+ @echo
+ @echo
+ @echo "Additionally, you can use the GST_CHECKS environment variable to"
+ @echo "specify which test(s) should be run. This is useful if you are"
+ @echo "debugging a failure in one particular test, or want to reproduce"
+ @echo "a race condition in a single test."
+ @echo
+ @echo "Examples:"
+ @echo
+ @echo " GST_CHECKS=test_this,test_that make element/foobar.check"
+ @echo " GST_CHECKS=test_many_threads make element/foobar.forever"
+ @echo
+
+clean-local: clean-local-check clean-local-orc
+
+orc/deinterlace.c: $(top_srcdir)/gst/deinterlace/tvtime.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+orc/videomixer.c: $(top_srcdir)/gst/videomixer/blendorc.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+orc/videobox.c: $(top_srcdir)/gst/videobox/gstvideoboxorc.orc
+ $(MKDIR_P) orc/
+ $(ORCC) --test -o $@ $<
+
+clean-local-orc:
+ rm -rf orc
+
+# 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/check/elements/aacparse.c b/tests/check/elements/aacparse.c
new file mode 100644
index 0000000..af10a27
--- /dev/null
+++ b/tests/check/elements/aacparse.c
@@ -0,0 +1,240 @@
+/*
+ * GStreamer
+ *
+ * unit test for aacparse
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "parser.h"
+
+#define SRC_CAPS_CDATA "audio/mpeg, framed=(boolean)false, codec_data=(buffer)1190"
+#define SRC_CAPS_TMPL "audio/mpeg, framed=(boolean)false, mpegversion=(int){2,4}"
+
+#define SINK_CAPS \
+ "audio/mpeg, framed=(boolean)true"
+#define SINK_CAPS_MPEG2 \
+ "audio/mpeg, framed=(boolean)true, mpegversion=2, rate=48000, channels=2"
+#define SINK_CAPS_MPEG4 \
+ "audio/mpeg, framed=(boolean)true, mpegversion=4, rate=96000, channels=2"
+#define SINK_CAPS_TMPL "audio/mpeg, framed=(boolean)true, mpegversion=(int){2,4}"
+
+GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_TMPL)
+ );
+
+GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_TMPL)
+ );
+
+/* some data */
+static guint8 adif_header[] = {
+ 'A', 'D', 'I', 'F'
+};
+
+static guint8 adts_frame_mpeg2[] = {
+ 0xff, 0xf9, 0x4c, 0x80, 0x01, 0xff, 0xfc, 0x21, 0x10, 0xd3, 0x20, 0x0c,
+ 0x32, 0x00, 0xc7
+};
+
+static guint8 adts_frame_mpeg4[] = {
+ 0xff, 0xf1, 0x4c, 0x80, 0x01, 0xff, 0xfc, 0x21, 0x10, 0xd3, 0x20, 0x0c,
+ 0x32, 0x00, 0xc7
+};
+
+static guint8 garbage_frame[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+/*
+ * Test if the parser pushes data with ADIF header properly and detects the
+ * stream to MPEG4 properly.
+ */
+GST_START_TEST (test_parse_adif_normal)
+{
+ GstParserTest ptest;
+
+ /* ADIF header */
+ gst_parser_test_init (&ptest, adif_header, sizeof (adif_header), 1);
+ /* well, no garbage, followed by random data */
+ ptest.series[2].size = 100;
+ ptest.series[2].num = 3;
+ /* and we do not really expect output frames */
+ ptest.framed = FALSE;
+ /* Check that the negotiated caps are as expected */
+ /* For ADIF parser assumes that data is always version 4 */
+ ptest.sink_caps =
+ gst_caps_from_string (SINK_CAPS_MPEG4 ", stream-format=(string)adif");
+
+ gst_parser_test_run (&ptest, NULL);
+
+ gst_caps_unref (ptest.sink_caps);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_adts_normal)
+{
+ gst_parser_test_normal (adts_frame_mpeg4, sizeof (adts_frame_mpeg4));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_adts_drain_single)
+{
+ gst_parser_test_drain_single (adts_frame_mpeg4, sizeof (adts_frame_mpeg4));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_adts_drain_garbage)
+{
+ gst_parser_test_drain_garbage (adts_frame_mpeg4, sizeof (adts_frame_mpeg4),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_adts_split)
+{
+ gst_parser_test_split (adts_frame_mpeg4, sizeof (adts_frame_mpeg4));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_adts_skip_garbage)
+{
+ gst_parser_test_skip_garbage (adts_frame_mpeg4, sizeof (adts_frame_mpeg4),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+/*
+ * Test if the src caps are set according to stream format (MPEG version).
+ */
+GST_START_TEST (test_parse_adts_detect_mpeg_version)
+{
+ gst_parser_test_output_caps (adts_frame_mpeg2, sizeof (adts_frame_mpeg2),
+ NULL, SINK_CAPS_MPEG2 ", stream-format=(string)adts");
+}
+
+GST_END_TEST;
+
+#define structure_get_int(s,f) \
+ (g_value_get_int(gst_structure_get_value(s,f)))
+#define fail_unless_structure_field_int_equals(s,field,num) \
+ fail_unless_equals_int (structure_get_int(s,field), num)
+/*
+ * Test if the parser handles raw stream and codec_data info properly.
+ */
+GST_START_TEST (test_parse_handle_codec_data)
+{
+ GstCaps *caps;
+ GstStructure *s;
+ const gchar *stream_format;
+
+ /* Push random data. It should get through since the parser should be
+ * initialized because it got codec_data in the caps */
+ caps = gst_parser_test_get_output_caps (NULL, 100, SRC_CAPS_CDATA);
+ fail_unless (caps != NULL);
+
+ /* Check that the negotiated caps are as expected */
+ /* When codec_data is present, parser assumes that data is version 4 */
+ GST_LOG ("aac output caps: %" GST_PTR_FORMAT, caps);
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (gst_structure_has_name (s, "audio/mpeg"));
+ fail_unless_structure_field_int_equals (s, "mpegversion", 4);
+ fail_unless_structure_field_int_equals (s, "channels", 2);
+ fail_unless_structure_field_int_equals (s, "rate", 48000);
+ fail_unless (gst_structure_has_field (s, "codec_data"));
+ fail_unless (gst_structure_has_field (s, "stream-format"));
+ stream_format = gst_structure_get_string (s, "stream-format");
+ fail_unless (strcmp (stream_format, "raw") == 0);
+
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+aacparse_suite (void)
+{
+ Suite *s = suite_create ("aacparse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ /* ADIF tests */
+ tcase_add_test (tc_chain, test_parse_adif_normal);
+
+ /* ADTS tests */
+ tcase_add_test (tc_chain, test_parse_adts_normal);
+ tcase_add_test (tc_chain, test_parse_adts_drain_single);
+ tcase_add_test (tc_chain, test_parse_adts_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_adts_split);
+ tcase_add_test (tc_chain, test_parse_adts_skip_garbage);
+ tcase_add_test (tc_chain, test_parse_adts_detect_mpeg_version);
+
+ /* Other tests */
+ tcase_add_test (tc_chain, test_parse_handle_codec_data);
+
+ return s;
+}
+
+
+/*
+ * TODO:
+ * - Both push- and pull-modes need to be tested
+ * * Pull-mode & EOS
+ */
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = aacparse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ /* init test context */
+ ctx_factory = "aacparse";
+ ctx_sink_template = &sinktemplate;
+ ctx_src_template = &srctemplate;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/ac3parse.c b/tests/check/elements/ac3parse.c
new file mode 100644
index 0000000..eb25004
--- /dev/null
+++ b/tests/check/elements/ac3parse.c
@@ -0,0 +1,163 @@
+/*
+ * GStreamer
+ *
+ * unit test for ac3parse
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "parser.h"
+
+#define SRC_CAPS_TMPL "audio/x-ac3, framed=(boolean)false"
+#define SINK_CAPS_TMPL "audio/x-ac3, framed=(boolean)true"
+
+GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_TMPL)
+ );
+
+GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_TMPL)
+ );
+
+/* some data */
+
+static guint8 ac3_frame[512] = {
+ 0x0b, 0x77, 0xb6, 0xa8, 0x10, 0x40, 0x2f, 0x84,
+ 0x29, 0xcb, 0xfe, 0x75, 0x7c, 0xf9, 0xf3, 0xe7,
+ 0xcf, 0x9f, 0x3e, 0x7c, 0xf9, 0xf3, 0xe7, 0xcf,
+ 0x9f, 0x3e, 0x7c, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f,
+ 0x3e, 0x7c, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0x3e,
+ 0x7c, 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0x3e, 0x7c,
+ 0xf9, 0xf3, 0xe7, 0xcf, 0x9f, 0x3e, 0x7c, 0xf9,
+ 0xf3, 0xe7, 0xcf, 0x9f, 0x3e, 0x7c, 0xf9, 0xf3,
+ 0xe7, 0xcf, 0x9f, 0x3e, 0x7c, 0xf9, 0xf3, 0xe7,
+ 0xcf, 0x9f, 0x3e, 0x32, 0xd3, 0xff, 0xc0, 0x06,
+ 0xe9, 0x40, 0x00, 0x6e, 0x94, 0x00, 0x06, 0xe9,
+ 0x40, 0x00, 0x6e, 0x94, 0x00, 0x06, 0xe9, 0x40,
+ 0x00, 0x6e, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static guint8 garbage_frame[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+
+GST_START_TEST (test_parse_normal)
+{
+ gst_parser_test_normal (ac3_frame, sizeof (ac3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_drain_single)
+{
+ gst_parser_test_drain_single (ac3_frame, sizeof (ac3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_drain_garbage)
+{
+ gst_parser_test_drain_garbage (ac3_frame, sizeof (ac3_frame),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_split)
+{
+ gst_parser_test_split (ac3_frame, sizeof (ac3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_skip_garbage)
+{
+ gst_parser_test_skip_garbage (ac3_frame, sizeof (ac3_frame),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_detect_stream)
+{
+ gst_parser_test_output_caps (ac3_frame, sizeof (ac3_frame),
+ NULL, SINK_CAPS_TMPL ",channels=1,rate=48000,alignment=frame");
+}
+
+GST_END_TEST;
+
+
+static Suite *
+ac3parse_suite (void)
+{
+ Suite *s = suite_create ("ac3parse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_parse_normal);
+ tcase_add_test (tc_chain, test_parse_drain_single);
+ tcase_add_test (tc_chain, test_parse_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_split);
+ tcase_add_test (tc_chain, test_parse_skip_garbage);
+ tcase_add_test (tc_chain, test_parse_detect_stream);
+
+ return s;
+}
+
+
+/*
+ * TODO:
+ * - Both push- and pull-modes need to be tested
+ * * Pull-mode & EOS
+ */
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = ac3parse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ /* init test context */
+ ctx_factory = "ac3parse";
+ ctx_sink_template = &sinktemplate;
+ ctx_src_template = &srctemplate;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/alphacolor.c b/tests/check/elements/alphacolor.c
new file mode 100644
index 0000000..abe182d
--- /dev/null
+++ b/tests/check/elements/alphacolor.c
@@ -0,0 +1,292 @@
+/* GStreamer unit test for the alphacolor element
+ *
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV"))
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_RGB)
+ );
+
+static GstElement *
+setup_alphacolor (void)
+{
+ GstElement *alphacolor;
+
+ alphacolor = gst_check_setup_element ("alphacolor");
+ mysrcpad = gst_check_setup_src_pad (alphacolor, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (alphacolor, &sinktemplate, NULL);
+
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return alphacolor;
+}
+
+static void
+cleanup_alphacolor (GstElement * alphacolor)
+{
+ GST_DEBUG ("cleaning up");
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (alphacolor);
+ gst_check_teardown_sink_pad (alphacolor);
+ gst_check_teardown_element (alphacolor);
+}
+
+#define WIDTH 3
+#define HEIGHT 4
+
+static GstCaps *
+create_caps_rgb24 (void)
+{
+ GstCaps *caps;
+
+ caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 3,
+ "height", G_TYPE_INT, 4,
+ "bpp", G_TYPE_INT, 24,
+ "depth", G_TYPE_INT, 24,
+ "framerate", GST_TYPE_FRACTION, 0, 1,
+ "endianness", G_TYPE_INT, G_BIG_ENDIAN,
+ "red_mask", G_TYPE_INT, 0x00ff0000,
+ "green_mask", G_TYPE_INT, 0x0000ff00,
+ "blue_mask", G_TYPE_INT, 0x000000ff, NULL);
+
+ return caps;
+}
+
+static GstCaps *
+create_caps_rgba32 (void)
+{
+ GstCaps *caps;
+
+ caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 3,
+ "height", G_TYPE_INT, 4,
+ "bpp", G_TYPE_INT, 32,
+ "depth", G_TYPE_INT, 32,
+ "framerate", GST_TYPE_FRACTION, 0, 1,
+ "endianness", G_TYPE_INT, G_BIG_ENDIAN,
+ "red_mask", G_TYPE_INT, 0xff000000,
+ "green_mask", G_TYPE_INT, 0x00ff0000,
+ "blue_mask", G_TYPE_INT, 0x0000ff00,
+ "alpha_mask", G_TYPE_INT, 0x000000ff, NULL);
+
+ return caps;
+}
+
+static GstBuffer *
+create_buffer_rgb24_3x4 (void)
+{
+ /* stride is rounded up to multiple of 4, so 3 bytes padding for each row */
+ const guint8 rgb24_3x4_img[HEIGHT * GST_ROUND_UP_4 (WIDTH * 3)] = {
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00
+ };
+ guint rowstride = GST_ROUND_UP_4 (WIDTH * 3);
+ GstBuffer *buf;
+ GstCaps *caps;
+
+ buf = gst_buffer_new_and_alloc (HEIGHT * rowstride);
+ fail_unless_equals_int (GST_BUFFER_SIZE (buf), sizeof (rgb24_3x4_img));
+ memcpy (GST_BUFFER_DATA (buf), rgb24_3x4_img, sizeof (rgb24_3x4_img));
+
+ caps = create_caps_rgb24 ();
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ return buf;
+}
+
+static GstBuffer *
+create_buffer_rgba32_3x4 (void)
+{
+ /* stride is rounded up to multiple of 4, so 3 bytes padding for each row */
+ /* should be: RED BLUE WHITE where 'nothing' is fully transparent
+ * GREEN RED BLUE and all other colours are fully
+ * NOTHING GREEN RED opaque.
+ * BLACK NOTHING GREEN
+ */
+ const guint8 rgba32_3x4_img[HEIGHT * WIDTH * 4] = {
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff
+ };
+ guint rowstride = WIDTH * 4;
+ GstBuffer *buf;
+ GstCaps *caps;
+
+ buf = gst_buffer_new_and_alloc (HEIGHT * rowstride);
+ fail_unless_equals_int (GST_BUFFER_SIZE (buf), sizeof (rgba32_3x4_img));
+ memcpy (GST_BUFFER_DATA (buf), rgba32_3x4_img, sizeof (rgba32_3x4_img));
+
+ caps = create_caps_rgba32 ();
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ return buf;
+}
+
+GST_START_TEST (test_rgb24)
+{
+ GstElement *alphacolor;
+ GstBuffer *inbuffer;
+ GstCaps *incaps;
+
+ incaps = create_caps_rgb24 ();
+ alphacolor = setup_alphacolor ();
+
+ fail_unless_equals_int (gst_element_set_state (alphacolor, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ inbuffer = create_buffer_rgb24_3x4 ();
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away reference; this should error out with a not-negotiated
+ * error, alphacolor should only accept RGBA caps, not but plain RGB24 caps */
+ GST_DEBUG ("push it");
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer),
+ GST_FLOW_NOT_NEGOTIATED);
+ GST_DEBUG ("pushed it");
+
+ fail_unless (g_list_length (buffers) == 0);
+
+ fail_unless_equals_int (gst_element_set_state (alphacolor, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* cleanup */
+ GST_DEBUG ("cleanup alphacolor");
+ cleanup_alphacolor (alphacolor);
+ GST_DEBUG ("cleanup, unref incaps");
+ ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1);
+ gst_caps_unref (incaps);
+}
+
+GST_END_TEST;
+
+/* these macros assume WIDTH and HEIGHT is fixed to what's defined above */
+#define fail_unless_ayuv_pixel_has_alpha(ayuv,x,y,a) \
+ { \
+ guint8 *pixel; \
+ pixel = ((guint8*)(ayuv) + ((WIDTH * 4) * (y)) + ((x) * 4)); \
+ fail_unless_equals_int (pixel[0], a); \
+ }
+
+GST_START_TEST (test_rgba32)
+{
+ GstElement *alphacolor;
+ GstBuffer *inbuffer;
+ GstBuffer *outbuffer;
+ GstCaps *incaps;
+ guint8 *ayuv;
+ guint outlength;
+
+ incaps = create_caps_rgba32 ();
+ alphacolor = setup_alphacolor ();
+
+ fail_unless_equals_int (gst_element_set_state (alphacolor, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ inbuffer = create_buffer_rgba32_3x4 ();
+ GST_DEBUG ("Created buffer of %d bytes", GST_BUFFER_SIZE (inbuffer));
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away reference */
+ GST_DEBUG ("push it");
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ GST_DEBUG ("pushed it");
+
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) == 1);
+ outbuffer = (GstBuffer *) buffers->data;
+ fail_if (outbuffer == NULL);
+ fail_unless (GST_IS_BUFFER (outbuffer));
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ outlength = WIDTH * HEIGHT * 4; /* output is AYUV */
+ fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), outlength);
+
+ ayuv = GST_BUFFER_DATA (outbuffer);
+
+ /* check alpha values (0x00 = totally transparent, 0xff = totally opaque) */
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 0, 0, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 1, 0, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 2, 0, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 0, 1, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 1, 1, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 2, 1, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 0, 2, 0x00);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 1, 2, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 2, 2, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 0, 3, 0xff);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 1, 3, 0x00);
+ fail_unless_ayuv_pixel_has_alpha (ayuv, 2, 3, 0xff);
+
+ /* we don't check the YUV data, because apparently results differ slightly
+ * depending on whether we run in valgrind or not */
+
+ buffers = g_list_remove (buffers, outbuffer);
+ gst_buffer_unref (outbuffer);
+
+ fail_unless_equals_int (gst_element_set_state (alphacolor, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* cleanup */
+ GST_DEBUG ("cleanup alphacolor");
+ cleanup_alphacolor (alphacolor);
+ GST_DEBUG ("cleanup, unref incaps");
+ ASSERT_CAPS_REFCOUNT (incaps, "incaps", 1);
+ gst_caps_unref (incaps);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+alphacolor_suite (void)
+{
+ Suite *s = suite_create ("alphacolor");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_rgb24);
+ tcase_add_test (tc_chain, test_rgba32);
+
+ return s;
+}
+
+GST_CHECK_MAIN (alphacolor);
diff --git a/tests/check/elements/amrparse.c b/tests/check/elements/amrparse.c
new file mode 100644
index 0000000..e5d64ca
--- /dev/null
+++ b/tests/check/elements/amrparse.c
@@ -0,0 +1,327 @@
+/*
+ * GStreamer
+ *
+ * unit test for amrparse
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "parser.h"
+
+#define SRC_CAPS_NB "audio/x-amr-nb-sh"
+#define SRC_CAPS_WB "audio/x-amr-wb-sh"
+#define SRC_CAPS_ANY "ANY"
+
+#define SINK_CAPS_NB "audio/AMR, rate=8000 , channels=1"
+#define SINK_CAPS_WB "audio/AMR-WB, rate=16000 , channels=1"
+#define SINK_CAPS_ANY "ANY"
+
+#define AMR_FRAME_DURATION (GST_SECOND/50)
+
+static GstStaticPadTemplate sinktemplate_nb = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_NB)
+ );
+
+static GstStaticPadTemplate sinktemplate_wb = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_WB)
+ );
+
+static GstStaticPadTemplate srctemplate_nb = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_NB)
+ );
+
+static GstStaticPadTemplate srctemplate_wb = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_WB)
+ );
+
+
+/* some data */
+
+static guint8 frame_data_nb[] = {
+ 0x0c, 0x56, 0x3c, 0x52, 0xe0, 0x61, 0xbc, 0x45,
+ 0x0f, 0x98, 0x2e, 0x01, 0x42, 0x02
+};
+
+static guint8 frame_data_wb[] = {
+ 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
+ 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+ 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16
+};
+
+static guint8 frame_hdr_nb[] = {
+ '#', '!', 'A', 'M', 'R', '\n'
+};
+
+static guint8 frame_hdr_wb[] = {
+ '#', '!', 'A', 'M', 'R', '-', 'W', 'B', '\n'
+};
+
+static guint8 garbage_frame[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+
+GST_START_TEST (test_parse_nb_normal)
+{
+ gst_parser_test_normal (frame_data_nb, sizeof (frame_data_nb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_nb_drain_single)
+{
+ gst_parser_test_drain_single (frame_data_nb, sizeof (frame_data_nb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_nb_drain_garbage)
+{
+ gst_parser_test_drain_garbage (frame_data_nb, sizeof (frame_data_nb),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_nb_split)
+{
+ gst_parser_test_split (frame_data_nb, sizeof (frame_data_nb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_nb_skip_garbage)
+{
+ gst_parser_test_skip_garbage (frame_data_nb, sizeof (frame_data_nb),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_nb_detect_stream)
+{
+ GstParserTest ptest;
+ GstCaps *old_ctx_caps;
+
+ /* no input caps, override ctx */
+ old_ctx_caps = ctx_input_caps;
+ ctx_input_caps = NULL;
+
+ /* AMR-NB header */
+ gst_parser_test_init (&ptest, frame_hdr_nb, sizeof (frame_hdr_nb), 1);
+ /* well, no garbage, followed by real data */
+ ptest.series[2].data = frame_data_nb;
+ ptest.series[2].size = sizeof (frame_data_nb);
+ ptest.series[2].num = 10;
+ /* header gets dropped, so ... */
+ /* buffer count will not match */
+ ptest.framed = FALSE;
+ /* total size a bit less */
+ ptest.dropped = sizeof (frame_hdr_nb);
+
+ /* Check that the negotiated caps are as expected */
+ ptest.sink_caps = gst_caps_from_string (SINK_CAPS_NB);
+
+ gst_parser_test_run (&ptest, NULL);
+
+ gst_caps_unref (ptest.sink_caps);
+
+ ctx_input_caps = old_ctx_caps;
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_normal)
+{
+ gst_parser_test_normal (frame_data_wb, sizeof (frame_data_wb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_drain_single)
+{
+ gst_parser_test_drain_single (frame_data_wb, sizeof (frame_data_wb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_drain_garbage)
+{
+ gst_parser_test_drain_garbage (frame_data_wb, sizeof (frame_data_wb),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_split)
+{
+ gst_parser_test_split (frame_data_wb, sizeof (frame_data_wb));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_skip_garbage)
+{
+ gst_parser_test_skip_garbage (frame_data_wb, sizeof (frame_data_wb),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_wb_detect_stream)
+{
+ GstParserTest ptest;
+ GstCaps *old_ctx_caps;
+
+ /* no input caps, override ctx */
+ old_ctx_caps = ctx_input_caps;
+ ctx_input_caps = NULL;
+
+ /* AMR-WB header */
+ gst_parser_test_init (&ptest, frame_hdr_wb, sizeof (frame_hdr_wb), 1);
+ /* well, no garbage, followed by real data */
+ ptest.series[2].data = frame_data_wb;
+ ptest.series[2].size = sizeof (frame_data_wb);
+ ptest.series[2].num = 10;
+ /* header gets dropped, so ... */
+ /* buffer count will not match */
+ ptest.framed = FALSE;
+ /* total size a bit less */
+ ptest.dropped = sizeof (frame_hdr_wb);
+
+ /* Check that the negotiated caps are as expected */
+ ptest.sink_caps = gst_caps_from_string (SINK_CAPS_WB);
+
+ gst_parser_test_run (&ptest, NULL);
+
+ gst_caps_unref (ptest.sink_caps);
+
+ ctx_input_caps = old_ctx_caps;
+}
+
+GST_END_TEST;
+
+
+
+/*
+ * Create test suite.
+ */
+static Suite *
+amrnb_parse_suite (void)
+{
+ Suite *s = suite_create ("amrwb_parse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ /* AMR-NB tests */
+ tcase_add_test (tc_chain, test_parse_nb_normal);
+ tcase_add_test (tc_chain, test_parse_nb_drain_single);
+ tcase_add_test (tc_chain, test_parse_nb_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_nb_split);
+ tcase_add_test (tc_chain, test_parse_nb_detect_stream);
+ tcase_add_test (tc_chain, test_parse_nb_skip_garbage);
+
+ return s;
+}
+
+static Suite *
+amrwb_parse_suite (void)
+{
+ Suite *s = suite_create ("amrnb_parse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ /* AMR-WB tests */
+ tcase_add_test (tc_chain, test_parse_wb_normal);
+ tcase_add_test (tc_chain, test_parse_wb_drain_single);
+ tcase_add_test (tc_chain, test_parse_wb_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_wb_split);
+ tcase_add_test (tc_chain, test_parse_wb_detect_stream);
+ tcase_add_test (tc_chain, test_parse_wb_skip_garbage);
+
+ return s;
+}
+
+/*
+ * TODO:
+ * - Both push- and pull-modes need to be tested
+ * * Pull-mode & EOS
+ */
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+ GstCaps *caps;
+
+ Suite *s = amrnb_parse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ /* init test context */
+ ctx_factory = "amrparse";
+ ctx_sink_template = &sinktemplate_nb;
+ ctx_src_template = &srctemplate_nb;
+ caps = gst_caps_from_string (SRC_CAPS_NB);
+ g_assert (caps);
+ ctx_input_caps = caps;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+ gst_caps_unref (caps);
+
+ s = amrwb_parse_suite ();
+ sr = srunner_create (s);
+
+ ctx_sink_template = &sinktemplate_wb;
+ ctx_src_template = &srctemplate_wb;
+ caps = gst_caps_from_string (SRC_CAPS_WB);
+ g_assert (caps);
+ ctx_input_caps = caps;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf += srunner_ntests_failed (sr);
+ srunner_free (sr);
+ gst_caps_unref (caps);
+
+ return nf;
+}
diff --git a/tests/check/elements/apev2mux.c b/tests/check/elements/apev2mux.c
new file mode 100644
index 0000000..fbbfb0d
--- /dev/null
+++ b/tests/check/elements/apev2mux.c
@@ -0,0 +1,433 @@
+/* GStreamer
+ *
+ * unit test for the taglib-based apev2mux element
+ *
+ * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
+ * Copyright (C) 2006 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+#include <string.h>
+
+#define TEST_ARTIST "Ar T\303\255st"
+#define TEST_TITLE "M\303\274llermilch!"
+#define TEST_ALBUM "Boom"
+#define TEST_DATE g_date_new_dmy(1,1,2006)
+#define TEST_TRACK_NUMBER 7
+#define TEST_TRACK_COUNT 19
+#define TEST_TRACK_GAIN 1.45
+#define TEST_ALBUM_GAIN 0.78
+
+/* for dummy mp3 frame sized MP3_FRAME_SIZE bytes,
+ * start: ff fb b0 44 00 00 08 00 00 4b 00 00 00 00 00 00 */
+static const guint8 mp3_dummyhdr[] = { 0xff, 0xfb, 0xb0, 0x44, 0x00, 0x00,
+ 0x08, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00
+};
+
+#define MP3_FRAME_SIZE 626
+
+static GstTagList *
+test_taglib_apev2mux_create_tags (guint32 mask)
+{
+ GstTagList *tags;
+
+ tags = gst_tag_list_new ();
+
+ if (mask & (1 << 0)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ARTIST, TEST_ARTIST, NULL);
+ }
+ if (mask & (1 << 1)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TITLE, TEST_TITLE, NULL);
+ }
+ if (mask & (1 << 2)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM, TEST_ALBUM, NULL);
+ }
+ if (mask & (1 << 3)) {
+ GDate *date;
+
+ date = TEST_DATE;
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP, GST_TAG_DATE, date, NULL);
+ g_date_free (date);
+ }
+ if (mask & (1 << 4)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_NUMBER, TEST_TRACK_NUMBER, NULL);
+ }
+ if (mask & (1 << 5)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_COUNT, TEST_TRACK_COUNT, NULL);
+ }
+ if (mask & (1 << 6)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_GAIN, TEST_TRACK_GAIN, NULL);
+ }
+ if (mask & (1 << 7)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM_GAIN, TEST_ALBUM_GAIN, NULL);
+ }
+ if (mask & (1 << 8)) {
+ }
+ if (mask & (1 << 9)) {
+ }
+ if (mask & (1 << 10)) {
+ }
+ if (mask & (1 << 11)) {
+ }
+ if (mask & (1 << 12)) {
+ }
+ if (mask & (1 << 13)) {
+ }
+ return tags;
+}
+
+static void
+test_taglib_apev2mux_check_tags (GstTagList * tags, guint32 mask)
+{
+ if (mask & (1 << 0)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &s));
+ fail_unless (g_str_equal (s, TEST_ARTIST));
+ g_free (s);
+ }
+ if (mask & (1 << 1)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_TITLE, &s));
+ fail_unless (g_str_equal (s, TEST_TITLE));
+ g_free (s);
+ }
+ if (mask & (1 << 2)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &s));
+ fail_unless (g_str_equal (s, TEST_ALBUM));
+ g_free (s);
+ }
+ if (mask & (1 << 3)) {
+ GDate *shouldbe, *date = NULL;
+
+ shouldbe = TEST_DATE;
+ fail_unless (gst_tag_list_get_date (tags, GST_TAG_DATE, &date));
+ fail_unless (g_date_compare (shouldbe, date) == 0);
+ g_date_free (shouldbe);
+ g_date_free (date);
+ }
+ if (mask & (1 << 4)) {
+ guint num;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_TRACK_NUMBER, &num));
+ fail_unless (num == TEST_TRACK_NUMBER);
+ }
+ if (mask & (1 << 5)) {
+ guint count;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_TRACK_COUNT, &count));
+ fail_unless (count == TEST_TRACK_COUNT);
+ }
+ if (mask & (1 << 6)) {
+ gdouble gain;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_TRACK_GAIN, &gain));
+ fail_unless (gain == TEST_TRACK_GAIN);
+ }
+ if (mask & (1 << 7)) {
+ gdouble gain;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_ALBUM_GAIN, &gain));
+ fail_unless (gain == TEST_ALBUM_GAIN);
+ }
+ if (mask & (1 << 8)) {
+ }
+ if (mask & (1 << 9)) {
+ }
+ if (mask & (1 << 10)) {
+ }
+ if (mask & (1 << 11)) {
+ }
+ if (mask & (1 << 12)) {
+ }
+ if (mask & (1 << 13)) {
+ }
+}
+
+static void
+fill_mp3_buffer (GstElement * fakesrc, GstBuffer * buf, GstPad * pad,
+ guint64 * p_offset)
+{
+ fail_unless (GST_BUFFER_SIZE (buf) == MP3_FRAME_SIZE);
+
+ GST_LOG ("filling buffer with fake mp3 data, offset = %" G_GUINT64_FORMAT,
+ *p_offset);
+
+ memcpy (GST_BUFFER_DATA (buf), mp3_dummyhdr, sizeof (mp3_dummyhdr));
+
+ /* can't use gst_buffer_set_caps() here because the metadata isn't writable
+ * because of the extra refcounts taken by the signal emission mechanism;
+ * we know it's fine to use GST_BUFFER_CAPS() here though */
+ GST_BUFFER_CAPS (buf) = gst_caps_new_simple ("audio/mpeg", "mpegversion",
+ G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
+
+ GST_BUFFER_OFFSET (buf) = *p_offset;
+ *p_offset += GST_BUFFER_SIZE (buf);
+}
+
+static void
+got_buffer (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
+ GstBuffer ** p_buf)
+{
+ gint64 off;
+ guint size;
+
+ off = GST_BUFFER_OFFSET (buf);
+ size = GST_BUFFER_SIZE (buf);
+
+ GST_LOG ("got buffer, size=%u, offset=%" G_GINT64_FORMAT, size, off);
+
+ fail_unless (GST_BUFFER_OFFSET_IS_VALID (buf));
+
+ if (*p_buf == NULL || (off + size) > GST_BUFFER_SIZE (*p_buf)) {
+ GstBuffer *newbuf;
+
+ /* not very elegant, but who cares */
+ newbuf = gst_buffer_new_and_alloc (off + size);
+ if (*p_buf) {
+ memcpy (GST_BUFFER_DATA (newbuf), GST_BUFFER_DATA (*p_buf),
+ GST_BUFFER_SIZE (*p_buf));
+ }
+ memcpy (GST_BUFFER_DATA (newbuf) + off, GST_BUFFER_DATA (buf), size);
+ if (*p_buf)
+ gst_buffer_unref (*p_buf);
+ *p_buf = newbuf;
+ } else {
+ memcpy (GST_BUFFER_DATA (*p_buf) + off, GST_BUFFER_DATA (buf), size);
+ }
+}
+
+static void
+demux_pad_added (GstElement * apedemux, GstPad * srcpad, GstBuffer ** p_outbuf)
+{
+ GstElement *fakesink, *pipeline;
+
+ GST_LOG ("apedemux added source pad with caps %" GST_PTR_FORMAT,
+ GST_PAD_CAPS (srcpad));
+
+ pipeline = apedemux;
+ while (GST_OBJECT_PARENT (pipeline) != NULL)
+ pipeline = (GstElement *) GST_OBJECT_PARENT (pipeline);
+
+ fakesink = gst_element_factory_make ("fakesink", "fakesink");
+ g_assert (fakesink != NULL);
+
+ /* set up sink */
+ g_object_set (fakesink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (fakesink, "handoff", G_CALLBACK (got_buffer), p_outbuf);
+
+ gst_bin_add (GST_BIN (pipeline), fakesink);
+ gst_element_set_state (fakesink, GST_STATE_PLAYING);
+
+ fail_unless (gst_element_link (apedemux, fakesink));
+}
+
+static void
+test_taglib_apev2mux_check_output_buffer (GstBuffer * buf)
+{
+ guint8 *data = GST_BUFFER_DATA (buf);
+ guint size = GST_BUFFER_SIZE (buf);
+ guint off;
+
+ g_assert (size % MP3_FRAME_SIZE == 0);
+
+ for (off = 0; off < size; off += MP3_FRAME_SIZE) {
+ fail_unless (memcmp (data + off, mp3_dummyhdr, sizeof (mp3_dummyhdr)) == 0);
+ }
+}
+
+static void
+test_taglib_apev2mux_with_tags (GstTagList * tags, guint32 mask)
+{
+ GstMessage *msg;
+ GstTagList *tags_read = NULL;
+ GstElement *pipeline, *apev2mux, *apedemux, *fakesrc;
+ GstBus *bus;
+ guint64 offset;
+ GstBuffer *outbuf = NULL;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ g_assert (pipeline != NULL);
+
+ fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
+ g_assert (fakesrc != NULL);
+
+ apev2mux = gst_element_factory_make ("apev2mux", "apev2mux");
+ g_assert (apev2mux != NULL);
+
+ apedemux = gst_element_factory_make ("apedemux", "apedemux");
+ g_assert (apedemux != NULL);
+
+ outbuf = NULL;
+ g_signal_connect (apedemux, "pad-added",
+ G_CALLBACK (demux_pad_added), &outbuf);
+
+ gst_bin_add (GST_BIN (pipeline), fakesrc);
+ gst_bin_add (GST_BIN (pipeline), apev2mux);
+ gst_bin_add (GST_BIN (pipeline), apedemux);
+
+ gst_tag_setter_merge_tags (GST_TAG_SETTER (apev2mux), tags,
+ GST_TAG_MERGE_APPEND);
+
+ gst_element_link_many (fakesrc, apev2mux, apedemux, NULL);
+
+ /* set up source */
+ g_object_set (fakesrc, "signal-handoffs", TRUE, "can-activate-pull", FALSE,
+ "filltype", 2, "sizetype", 2, "sizemax", MP3_FRAME_SIZE,
+ "num-buffers", 16, NULL);
+
+ offset = 0;
+ g_signal_connect (fakesrc, "handoff", G_CALLBACK (fill_mp3_buffer), &offset);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ fail_unless (gst_element_get_state (pipeline, NULL, NULL,
+ -1) == GST_STATE_CHANGE_SUCCESS);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+
+ GST_LOG ("Waiting for tag ...");
+ msg =
+ gst_bus_poll (bus, GST_MESSAGE_TAG | GST_MESSAGE_EOS | GST_MESSAGE_ERROR,
+ -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err;
+ gchar *dbg;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_printerr ("ERROR from element %s: %s\n%s\n",
+ GST_OBJECT_NAME (msg->src), err->message, GST_STR_NULL (dbg));
+ g_error_free (err);
+ g_free (dbg);
+ } else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
+ g_printerr ("EOS message, but were waiting for TAGS!\n");
+ }
+ fail_unless (msg->type == GST_MESSAGE_TAG);
+
+ gst_message_parse_tag (msg, &tags_read);
+ gst_message_unref (msg);
+
+ GST_LOG ("Got tags: %" GST_PTR_FORMAT, tags_read);
+ test_taglib_apev2mux_check_tags (tags_read, mask);
+ gst_tag_list_free (tags_read);
+
+ GST_LOG ("Waiting for EOS ...");
+ msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err;
+ gchar *dbg;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_printerr ("ERROR from element %s: %s\n%s\n",
+ GST_OBJECT_NAME (msg->src), err->message, GST_STR_NULL (dbg));
+ g_error_free (err);
+ g_free (dbg);
+ }
+ fail_unless (msg->type == GST_MESSAGE_EOS);
+ gst_message_unref (msg);
+
+ gst_object_unref (bus);
+
+ GST_LOG ("Got EOS, shutting down ...");
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+
+ test_taglib_apev2mux_check_output_buffer (outbuf);
+ gst_buffer_unref (outbuf);
+
+ GST_LOG ("Done");
+}
+
+GST_START_TEST (test_apev2mux)
+{
+ GstTagList *tags;
+ gint i;
+
+ g_random_set_seed (247166295);
+
+ /* internal consistency check */
+ tags = test_taglib_apev2mux_create_tags (0xFFFFFFFF);
+ test_taglib_apev2mux_check_tags (tags, 0xFFFFFFFF);
+ gst_tag_list_free (tags);
+
+ /* now the real tests */
+ for (i = 0; i < 50; ++i) {
+ guint32 mask;
+
+ mask = g_random_int ();
+ GST_LOG ("tag mask = %08x (i=%d)", mask, i);
+
+ if (mask == 0)
+ continue;
+
+ /* create tags */
+ tags = test_taglib_apev2mux_create_tags (mask);
+ GST_LOG ("tags for mask %08x = %" GST_PTR_FORMAT, mask, tags);
+
+ /* double-check for internal consistency */
+ test_taglib_apev2mux_check_tags (tags, mask);
+
+ /* test with pipeline */
+ test_taglib_apev2mux_with_tags (tags, mask);
+
+ /* free tags */
+ gst_tag_list_free (tags);
+ }
+}
+
+GST_END_TEST;
+
+static Suite *
+apev2mux_suite (void)
+{
+ Suite *s = suite_create ("apev2mux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_apev2mux);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = apev2mux_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/aspectratiocrop.c b/tests/check/elements/aspectratiocrop.c
new file mode 100644
index 0000000..5d42bfb
--- /dev/null
+++ b/tests/check/elements/aspectratiocrop.c
@@ -0,0 +1,201 @@
+/* GStreamer unit test for the aspectratiocrop element
+ * Copyright (C) 2009 Thijs Vermeir <thijsvermeir@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/check/gstcheck.h>
+
+#define ASPECT_RATIO_CROP_CAPS \
+ GST_VIDEO_CAPS_RGBx ";" \
+ GST_VIDEO_CAPS_xRGB ";" \
+ GST_VIDEO_CAPS_BGRx ";" \
+ GST_VIDEO_CAPS_xBGR ";" \
+ GST_VIDEO_CAPS_RGBA ";" \
+ GST_VIDEO_CAPS_ARGB ";" \
+ GST_VIDEO_CAPS_BGRA ";" \
+ GST_VIDEO_CAPS_ABGR ";" \
+ GST_VIDEO_CAPS_RGB ";" \
+ GST_VIDEO_CAPS_BGR ";" \
+ GST_VIDEO_CAPS_YUV ("AYUV") ";" \
+ GST_VIDEO_CAPS_YUV ("YUY2") ";" \
+ GST_VIDEO_CAPS_YUV ("YVYU") ";" \
+ GST_VIDEO_CAPS_YUV ("UYVY") ";" \
+ GST_VIDEO_CAPS_YUV ("Y800") ";" \
+ GST_VIDEO_CAPS_YUV ("I420") ";" \
+ GST_VIDEO_CAPS_YUV ("YV12") ";" \
+ GST_VIDEO_CAPS_RGB_16 ";" \
+ GST_VIDEO_CAPS_RGB_15
+
+static GstBuffer *
+make_buffer_with_caps (const gchar * caps_string, int buffer_size)
+{
+ GstCaps *caps;
+ GstBuffer *temp;
+
+ caps = gst_caps_from_string (caps_string);
+ temp = gst_buffer_new_and_alloc (buffer_size);
+ fail_if (caps == NULL);
+ fail_if (temp == NULL);
+ gst_buffer_set_caps (temp, caps);
+ gst_caps_unref (caps);
+
+ return temp;
+}
+
+static void
+check_aspectratiocrop (const gchar * in_string, const gchar * out_string,
+ gint in_size, gint out_size, gint ar_n, gint ar_d)
+{
+ GstElement *element;
+ GstPad *pad_peer;
+ GstPad *sink_pad = NULL;
+ GstPad *src_pad;
+ GstBuffer *new;
+ GstBuffer *buffer;
+ GstBuffer *buffer_out;
+ GstCaps *sink_caps;
+
+ buffer = make_buffer_with_caps (in_string, in_size);
+ buffer_out = make_buffer_with_caps (out_string, out_size);
+
+ /* check that there are no buffers waiting */
+ gst_check_drop_buffers ();
+
+ /* create the element */
+ element = gst_check_setup_element ("aspectratiocrop");
+
+ /* set the requested aspect ratio */
+ g_object_set (G_OBJECT (element), "aspect-ratio", ar_n, ar_d, NULL);
+
+ /* create the src pad */
+ src_pad = gst_pad_new (NULL, GST_PAD_SRC);
+ gst_pad_set_caps (src_pad, GST_BUFFER_CAPS (buffer));
+ pad_peer = gst_element_get_static_pad (element, "sink");
+ fail_if (pad_peer == NULL);
+ fail_unless (gst_pad_link (src_pad, pad_peer) == GST_PAD_LINK_OK,
+ "Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (pad_peer);
+ gst_pad_set_active (src_pad, TRUE);
+
+ /* create the sink pad */
+ pad_peer = gst_element_get_static_pad (element, "src");
+ sink_caps = gst_caps_from_string (ASPECT_RATIO_CROP_CAPS);
+ sink_pad = gst_pad_new (NULL, GST_PAD_SINK);
+ GST_PAD_CAPS (sink_pad) = sink_caps;
+ fail_unless (gst_pad_link (pad_peer, sink_pad) == GST_PAD_LINK_OK,
+ "Could not link sink and %s source pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (pad_peer);
+ gst_pad_set_chain_function (sink_pad, gst_check_chain_func);
+ gst_pad_set_active (sink_pad, TRUE);
+
+ /* configure the sink pad */
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ fail_unless (gst_pad_push (src_pad, buffer) == GST_FLOW_OK,
+ "Failed to push buffer");
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+
+ /* check the result */
+ fail_unless (g_list_length (buffers) == 1);
+ new = GST_BUFFER (buffers->data);
+ buffers = g_list_remove (buffers, new);
+ fail_unless (GST_BUFFER_SIZE (buffer_out) == GST_BUFFER_SIZE (new),
+ "size of the buffers are not the same");
+ gst_check_caps_equal (GST_BUFFER_CAPS (buffer_out), GST_BUFFER_CAPS (new));
+ gst_buffer_unref (new);
+ gst_buffer_unref (buffer_out);
+
+ /* teardown the element and pads */
+ gst_pad_set_active (src_pad, FALSE);
+ gst_check_teardown_src_pad (element);
+ gst_pad_set_active (sink_pad, FALSE);
+ gst_check_teardown_sink_pad (element);
+ gst_check_teardown_element (element);
+}
+
+GST_START_TEST (test_no_cropping)
+{
+ check_aspectratiocrop
+ ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1",
+ "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1",
+ 153600, 153600, 4, 3);
+ check_aspectratiocrop
+ ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)320, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)4/3",
+ "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)320, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)4/3",
+ 204800, 204800, 4, 3);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_autocropping)
+{
+ check_aspectratiocrop
+ ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)4/3",
+ "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)240, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)4/3",
+ 153600, 115200, 4, 3);
+
+ check_aspectratiocrop
+ ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)16/9",
+ "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)180, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)16/9",
+ 153600, 86400, 4, 3);
+
+ check_aspectratiocrop
+ ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)16/15",
+ "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)192, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)16/15",
+ 153600, 122880, 16, 9);
+
+}
+
+GST_END_TEST;
+
+static Suite *
+aspectratiocrop_suite (void)
+{
+ Suite *s = suite_create ("aspectratiocrop");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_no_cropping);
+ tcase_add_test (tc_chain, test_autocropping);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = aspectratiocrop_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audioamplify.c b/tests/check/elements/audioamplify.c
new file mode 100644
index 0000000..48ce8ff
--- /dev/null
+++ b/tests/check/elements/audioamplify.c
@@ -0,0 +1,469 @@
+/* GStreamer
+ *
+ * unit test for audioamplify
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * Greatly based on the audiopanorama unit test
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+
+#define AMPLIFY_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) TRUE"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+
+static GstElement *
+setup_amplify (void)
+{
+ GstElement *amplify;
+
+ GST_DEBUG ("setup_amplify");
+ amplify = gst_check_setup_element ("audioamplify");
+ mysrcpad = gst_check_setup_src_pad (amplify, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (amplify, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return amplify;
+}
+
+static void
+cleanup_amplify (GstElement * amplify)
+{
+ GST_DEBUG ("cleanup_amplify");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (amplify);
+ gst_check_teardown_sink_pad (amplify);
+ gst_check_teardown_element (amplify);
+}
+
+GST_START_TEST (test_passthrough)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ in[0], in[1], in[2], in[3], in[4], in[5], res[0], res[1], res[2], res[3],
+ res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_zero)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { 0, 0, 0, 0, 0, 0 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 0.0, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_050_clip)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { 12288, -8192, 128, -64, 0, -12288 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 0.5, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_200_clip)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { G_MAXINT16, -32768, 512, -256, 0, G_MININT16 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 2.0, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_050_wrap_negative)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { 12288, -8192, 128, -64, 0, -12288 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 0.5, NULL);
+ g_object_set (G_OBJECT (amplify), "clipping-method", 1, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_200_wrap_negative)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { -16384, -32768, 512, -256, 0, 16384 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 2.0, NULL);
+ g_object_set (G_OBJECT (amplify), "clipping-method", 1, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_050_wrap_positive)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { 12288, -8192, 128, -64, 0, -12288 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 0.5, NULL);
+ g_object_set (G_OBJECT (amplify), "clipping-method", 2, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_200_wrap_positive)
+{
+ GstElement *amplify;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 out[6] = { 16382, -32768, 512, -256, 0, -16384 };
+ gint16 *res;
+
+ amplify = setup_amplify ();
+ g_object_set (G_OBJECT (amplify), "amplification", 2.0, NULL);
+ g_object_set (G_OBJECT (amplify), "clipping-method", 2, NULL);
+ fail_unless (gst_element_set_state (amplify,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (AMPLIFY_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], out[4], out[5], res[0], res[1], res[2],
+ res[3], res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 12) == 0);
+
+ /* cleanup */
+ cleanup_amplify (amplify);
+}
+
+GST_END_TEST;
+
+static Suite *
+amplify_suite (void)
+{
+ Suite *s = suite_create ("amplify");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_passthrough);
+ tcase_add_test (tc_chain, test_zero);
+ tcase_add_test (tc_chain, test_050_clip);
+ tcase_add_test (tc_chain, test_200_clip);
+ tcase_add_test (tc_chain, test_050_wrap_negative);
+ tcase_add_test (tc_chain, test_200_wrap_negative);
+ tcase_add_test (tc_chain, test_050_wrap_positive);
+ tcase_add_test (tc_chain, test_200_wrap_positive);
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = amplify_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiochebband.c b/tests/check/elements/audiochebband.c
new file mode 100644
index 0000000..73a8b15
--- /dev/null
+++ b/tests/check/elements/audiochebband.c
@@ -0,0 +1,1538 @@
+/* GStreamer
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * audiochebband.c: Unit test for the audiochebband element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define BUFFER_CAPS_STRING_32 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 32" \
+
+#define BUFFER_CAPS_STRING_64 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64" \
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+
+static GstElement *
+setup_audiochebband (void)
+{
+ GstElement *audiochebband;
+
+ GST_DEBUG ("setup_audiochebband");
+ audiochebband = gst_check_setup_element ("audiochebband");
+ mysrcpad = gst_check_setup_src_pad (audiochebband, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (audiochebband, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return audiochebband;
+}
+
+static void
+cleanup_audiochebband (GstElement * audiochebband)
+{
+ GST_DEBUG ("cleanup_audiochebband");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (audiochebband);
+ gst_check_teardown_sink_pad (audiochebband);
+ gst_check_teardown_element (audiochebband);
+}
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_bp_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is preserved with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_bp_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.6);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_bp_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_br_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_br_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_32_br_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_bp_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is preserved with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_bp_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.6);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_bp_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_br_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_br_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type1_64_br_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_bp_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is preserved with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_bp_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.6);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_bp_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_br_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_br_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_32_br_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_bp_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is preserved with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_bp_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.6);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_bp_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiochebband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_br_0hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at band center is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_br_11025hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_type2_64_br_22050hz)
+{
+ GstElement *audiochebband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiochebband = setup_audiochebband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiochebband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiochebband), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiochebband), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiochebband), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiochebband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiochebband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiochebband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 1024.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiochebband (audiochebband);
+}
+
+GST_END_TEST;
+
+static Suite *
+audiochebband_suite (void)
+{
+ Suite *s = suite_create ("audiochebband");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_type1_32_bp_0hz);
+ tcase_add_test (tc_chain, test_type1_32_bp_11025hz);
+ tcase_add_test (tc_chain, test_type1_32_bp_22050hz);
+ tcase_add_test (tc_chain, test_type1_32_br_0hz);
+ tcase_add_test (tc_chain, test_type1_32_br_11025hz);
+ tcase_add_test (tc_chain, test_type1_32_br_22050hz);
+ tcase_add_test (tc_chain, test_type1_64_bp_0hz);
+ tcase_add_test (tc_chain, test_type1_64_bp_11025hz);
+ tcase_add_test (tc_chain, test_type1_64_bp_22050hz);
+ tcase_add_test (tc_chain, test_type1_64_br_0hz);
+ tcase_add_test (tc_chain, test_type1_64_br_11025hz);
+ tcase_add_test (tc_chain, test_type1_64_br_22050hz);
+ tcase_add_test (tc_chain, test_type2_32_bp_0hz);
+ tcase_add_test (tc_chain, test_type2_32_bp_11025hz);
+ tcase_add_test (tc_chain, test_type2_32_bp_22050hz);
+ tcase_add_test (tc_chain, test_type2_32_br_0hz);
+ tcase_add_test (tc_chain, test_type2_32_br_11025hz);
+ tcase_add_test (tc_chain, test_type2_32_br_22050hz);
+ tcase_add_test (tc_chain, test_type2_64_bp_0hz);
+ tcase_add_test (tc_chain, test_type2_64_bp_11025hz);
+ tcase_add_test (tc_chain, test_type2_64_bp_22050hz);
+ tcase_add_test (tc_chain, test_type2_64_br_0hz);
+ tcase_add_test (tc_chain, test_type2_64_br_11025hz);
+ tcase_add_test (tc_chain, test_type2_64_br_22050hz);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = audiochebband_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiocheblimit.c b/tests/check/elements/audiocheblimit.c
new file mode 100644
index 0000000..3b46504
--- /dev/null
+++ b/tests/check/elements/audiocheblimit.c
@@ -0,0 +1,1002 @@
+/* GStreamer
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * audiocheblimit.c: Unit test for the audiocheblimit element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define BUFFER_CAPS_STRING_32 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 32" \
+
+#define BUFFER_CAPS_STRING_64 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64" \
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+
+static GstElement *
+setup_audiocheblimit (void)
+{
+ GstElement *audiocheblimit;
+
+ GST_DEBUG ("setup_audiocheblimit");
+ audiocheblimit = gst_check_setup_element ("audiocheblimit");
+ mysrcpad = gst_check_setup_src_pad (audiocheblimit, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (audiocheblimit, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return audiocheblimit;
+}
+
+static void
+cleanup_audiocheblimit (GstElement * audiocheblimit)
+{
+ GST_DEBUG ("cleanup_audiocheblimit");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (audiocheblimit);
+ gst_check_teardown_sink_pad (audiocheblimit);
+ gst_check_teardown_element (audiocheblimit);
+}
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_32_lp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_32_lp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_32_hp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_32_hp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_64_lp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_64_lp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_64_hp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type1_64_hp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 0.25, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_32_lp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_32_lp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_32_hp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_32_hp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_64_lp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_64_lp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_64_hp_0hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms <= 0.1);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_type2_64_hp_22050hz)
+{
+ GstElement *audiocheblimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+
+ audiocheblimit = setup_audiocheblimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiocheblimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "poles", 8, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "type", 2, NULL);
+ g_object_set (G_OBJECT (audiocheblimit), "ripple", 40.0, NULL);
+
+ fail_unless (gst_element_set_state (audiocheblimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (BUFFER_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+
+ rms = 0.0;
+ for (i = 0; i < 128; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / 128.0);
+ fail_unless (rms >= 0.9);
+
+ /* cleanup */
+ cleanup_audiocheblimit (audiocheblimit);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+audiocheblimit_suite (void)
+{
+ Suite *s = suite_create ("audiocheblimit");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_type1_32_lp_0hz);
+ tcase_add_test (tc_chain, test_type1_32_lp_22050hz);
+ tcase_add_test (tc_chain, test_type1_32_hp_0hz);
+ tcase_add_test (tc_chain, test_type1_32_hp_22050hz);
+ tcase_add_test (tc_chain, test_type1_64_lp_0hz);
+ tcase_add_test (tc_chain, test_type1_64_lp_22050hz);
+ tcase_add_test (tc_chain, test_type1_64_hp_0hz);
+ tcase_add_test (tc_chain, test_type1_64_hp_22050hz);
+ tcase_add_test (tc_chain, test_type2_32_lp_0hz);
+ tcase_add_test (tc_chain, test_type2_32_lp_22050hz);
+ tcase_add_test (tc_chain, test_type2_32_hp_0hz);
+ tcase_add_test (tc_chain, test_type2_32_hp_22050hz);
+ tcase_add_test (tc_chain, test_type2_64_lp_0hz);
+ tcase_add_test (tc_chain, test_type2_64_lp_22050hz);
+ tcase_add_test (tc_chain, test_type2_64_hp_0hz);
+ tcase_add_test (tc_chain, test_type2_64_hp_22050hz);
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = audiocheblimit_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiodynamic.c b/tests/check/elements/audiodynamic.c
new file mode 100644
index 0000000..1119779
--- /dev/null
+++ b/tests/check/elements/audiodynamic.c
@@ -0,0 +1,459 @@
+/* GStreamer
+ *
+ * unit test for audiodynamic
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * Greatly based on the audiopanorama unit test
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+
+#define DYNAMIC_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) TRUE"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+
+static GstElement *
+setup_dynamic (void)
+{
+ GstElement *dynamic;
+
+ GST_DEBUG ("setup_dynamic");
+ dynamic = gst_check_setup_element ("audiodynamic");
+ mysrcpad = gst_check_setup_src_pad (dynamic, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (dynamic, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return dynamic;
+}
+
+static void
+cleanup_dynamic (GstElement * dynamic)
+{
+ GST_DEBUG ("cleanup_dynamic");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (dynamic);
+ gst_check_teardown_sink_pad (dynamic);
+ gst_check_teardown_element (dynamic);
+}
+
+GST_START_TEST (test_passthrough)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[6] = { 24576, -16384, 256, -128, 0, -24576 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (12);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 12);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 12) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+5d %+5d %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d %+5d %+5d",
+ in[0], in[1], in[2], in[3], in[4], in[5], res[0], res[1], res[2], res[3],
+ res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 12) == 0);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_compress_hard_50_50)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16384, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 0.5, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 0.5, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] > in[0]);
+ fail_unless (res[1] < in[1]);
+ fail_unless (res[2] == in[2]);
+ fail_unless (res[3] == in[3]);
+ fail_unless (res[4] == in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] > in[6]);
+ fail_unless (res[7] < in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_compress_soft_50_50)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16384, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 1, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 0.5, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 0.5, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] > in[0]);
+ fail_unless (res[1] < in[1]);
+ fail_unless (res[2] == in[2]);
+ fail_unless (res[3] == in[3]);
+ fail_unless (res[4] == in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] > in[6]);
+ fail_unless (res[7] < in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_compress_hard_100_50)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16384, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 0.5, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 1.0, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] == in[0]);
+ fail_unless (res[1] == in[1]);
+ fail_unless (res[2] == in[2]);
+ fail_unless (res[3] == in[3]);
+ fail_unless (res[4] == in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] == in[6]);
+ fail_unless (res[7] == in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_expand_hard_50_200)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16383, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 1, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 2.0, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 0.5, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] == in[0]);
+ fail_unless (res[1] == in[1]);
+ fail_unless (res[2] > in[2]);
+ fail_unless (res[3] < in[3]);
+ fail_unless (res[4] > in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] == in[6]);
+ fail_unless (res[7] == in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_expand_soft_50_200)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16383, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 1, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 1, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 2.0, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 0.5, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] == in[0]);
+ fail_unless (res[1] == in[1]);
+ fail_unless (res[2] > in[2]);
+ fail_unless (res[3] < in[3]);
+ fail_unless (res[4] > in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] == in[6]);
+ fail_unless (res[7] == in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_expand_hard_0_200)
+{
+ GstElement *dynamic;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[8] = { -30000, 24576, -16383, 256, -128, 0, -24576, 30000 };
+ gint16 *res;
+
+ dynamic = setup_dynamic ();
+ g_object_set (G_OBJECT (dynamic), "mode", 1, NULL);
+ g_object_set (G_OBJECT (dynamic), "characteristics", 0, NULL);
+ g_object_set (G_OBJECT (dynamic), "ratio", 2.0, NULL);
+ g_object_set (G_OBJECT (dynamic), "threshold", 0.0, NULL);
+ fail_unless (gst_element_set_state (dynamic,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (16);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 16) == 0);
+ caps = gst_caps_from_string (DYNAMIC_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (res[0] == in[0]);
+ fail_unless (res[1] == in[1]);
+ fail_unless (res[2] == in[2]);
+ fail_unless (res[3] == in[3]);
+ fail_unless (res[4] == in[4]);
+ fail_unless (res[5] == in[5]);
+ fail_unless (res[6] == in[6]);
+ fail_unless (res[7] == in[7]);
+
+ /* cleanup */
+ cleanup_dynamic (dynamic);
+}
+
+GST_END_TEST;
+
+static Suite *
+dynamic_suite (void)
+{
+ Suite *s = suite_create ("dynamic");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_passthrough);
+ tcase_add_test (tc_chain, test_compress_hard_50_50);
+ tcase_add_test (tc_chain, test_compress_soft_50_50);
+ tcase_add_test (tc_chain, test_compress_hard_100_50);
+ tcase_add_test (tc_chain, test_expand_hard_50_200);
+ tcase_add_test (tc_chain, test_expand_soft_50_200);
+ tcase_add_test (tc_chain, test_expand_hard_0_200);
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = dynamic_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audioecho.c b/tests/check/elements/audioecho.c
new file mode 100644
index 0000000..fa88c3f
--- /dev/null
+++ b/tests/check/elements/audioecho.c
@@ -0,0 +1,229 @@
+/* GStreamer
+ *
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define ECHO_CAPS_STRING \
+ "audio/x-raw-float, " \
+ "channels = (int) 2, " \
+ "rate = (int) 100000, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) [ 1, 2 ], "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) [ 1, 2 ], "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 }")
+ );
+
+static GstElement *
+setup_echo (void)
+{
+ GstElement *echo;
+
+ GST_DEBUG ("setup_echo");
+ echo = gst_check_setup_element ("audioecho");
+ mysrcpad = gst_check_setup_src_pad (echo, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (echo, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return echo;
+}
+
+static void
+cleanup_echo (GstElement * echo)
+{
+ GST_DEBUG ("cleanup_echo");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (echo);
+ gst_check_teardown_sink_pad (echo);
+ gst_check_teardown_element (echo);
+}
+
+GST_START_TEST (test_passthrough)
+{
+ GstElement *echo;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble in[] = { 1.0, -1.0, 0.0, 0.5, -0.5, 0.0 };
+ gdouble *res;
+
+ echo = setup_echo ();
+ g_object_set (G_OBJECT (echo), "delay", (GstClockTime) 1, "intensity", 0.0,
+ "feedback", 0.0, NULL);
+ fail_unless (gst_element_set_state (echo,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (in));
+ memcpy (GST_BUFFER_DATA (inbuffer), in, sizeof (in));
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, sizeof (in)) == 0);
+ caps = gst_caps_from_string (ECHO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+lf %+lf %+lf %+lf %+lf %+lf real %+lf %+lf %+lf %+lf %+lf %+lf",
+ in[0], in[1], in[2], in[3], in[4], in[5], res[0], res[1], res[2], res[3],
+ res[4], res[5]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, sizeof (in)) == 0);
+
+ /* cleanup */
+ cleanup_echo (echo);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_echo)
+{
+ GstElement *echo;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble in[] = { 1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, };
+ gdouble out[] = { 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 0.0 };
+ gdouble *res;
+
+ echo = setup_echo ();
+ g_object_set (G_OBJECT (echo), "delay", (GstClockTime) 20000, "intensity",
+ 1.0, "feedback", 0.0, NULL);
+ fail_unless (gst_element_set_state (echo,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (in));
+ memcpy (GST_BUFFER_DATA (inbuffer), in, sizeof (in));
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, sizeof (in)) == 0);
+ caps = gst_caps_from_string (ECHO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf real %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf",
+ out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8],
+ out[9], res[0], res[1], res[2], res[3], res[4], res[5], res[6], res[7],
+ res[8], res[9]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, sizeof (out)) == 0);
+
+ /* cleanup */
+ cleanup_echo (echo);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_feedback)
+{
+ GstElement *echo;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble in[] = { 1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, };
+ gdouble out[] = { 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0 };
+ gdouble *res;
+
+ echo = setup_echo ();
+ g_object_set (G_OBJECT (echo), "delay", (GstClockTime) 20000, "intensity",
+ 1.0, "feedback", 1.0, NULL);
+ fail_unless (gst_element_set_state (echo,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (in));
+ memcpy (GST_BUFFER_DATA (inbuffer), in, sizeof (in));
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, sizeof (in)) == 0);
+ caps = gst_caps_from_string (ECHO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO
+ ("expected %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf real %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf %+lf",
+ out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8],
+ out[9], res[0], res[1], res[2], res[3], res[4], res[5], res[6], res[7],
+ res[8], res[9]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, sizeof (out)) == 0);
+
+ /* cleanup */
+ cleanup_echo (echo);
+}
+
+GST_END_TEST;
+
+static Suite *
+audioecho_suite (void)
+{
+ Suite *s = suite_create ("audioecho");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_passthrough);
+ tcase_add_test (tc_chain, test_echo);
+ tcase_add_test (tc_chain, test_feedback);
+
+ return s;
+}
+
+GST_CHECK_MAIN (audioecho);
diff --git a/tests/check/elements/audiofirfilter.c b/tests/check/elements/audiofirfilter.c
new file mode 100644
index 0000000..c4eb723
--- /dev/null
+++ b/tests/check/elements/audiofirfilter.c
@@ -0,0 +1,169 @@
+/* GStreamer
+ *
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/check/gstcheck.h>
+
+static gboolean have_eos = FALSE;
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ case GST_MESSAGE_WARNING:
+ g_assert_not_reached ();
+ g_main_loop_quit (loop);
+ break;
+
+ case GST_MESSAGE_EOS:
+ have_eos = TRUE;
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+ GValueArray *va;
+ GValue v = { 0, };
+
+ fail_unless (rate > 0);
+
+ va = g_value_array_new (6);
+
+ g_value_init (&v, G_TYPE_DOUBLE);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 1.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+
+ g_object_set (G_OBJECT (element), "kernel", va, NULL);
+
+ g_value_array_free (va);
+}
+
+static gboolean have_data = FALSE;
+
+static void
+on_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ if (!have_data) {
+ gdouble *data = (gdouble *) GST_BUFFER_DATA (buffer);
+
+ fail_unless (GST_BUFFER_SIZE (buffer) > 5 * sizeof (gdouble));
+ fail_unless (data[0] == 0.0);
+ fail_unless (data[1] == 0.0);
+ fail_unless (data[2] == 0.0);
+ fail_unless (data[3] == 0.0);
+ fail_unless (data[4] == 0.0);
+ fail_unless (data[5] != 0.0);
+ have_data = TRUE;
+ }
+}
+
+GST_START_TEST (test_pipeline)
+{
+ GstElement *pipeline, *src, *filter, *sink;
+ GstBus *bus;
+ GMainLoop *loop;
+
+ have_data = FALSE;
+ have_eos = FALSE;
+
+ pipeline = gst_element_factory_make ("pipeline", NULL);
+ fail_unless (pipeline != NULL);
+
+ src = gst_element_factory_make ("audiotestsrc", NULL);
+ fail_unless (src != NULL);
+ g_object_set (G_OBJECT (src), "num-buffers", 1000, NULL);
+
+ filter = gst_element_factory_make ("audiofirfilter", NULL);
+ fail_unless (filter != NULL);
+ g_signal_connect (G_OBJECT (filter), "rate-changed",
+ G_CALLBACK (on_rate_changed), NULL);
+
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (sink != NULL);
+ g_object_set (G_OBJECT (sink), "signal-handoffs", TRUE, NULL);
+ g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (on_handoff), NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, sink, NULL);
+ fail_unless (gst_element_link_many (src, filter, sink, NULL));
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ fail_if (gst_element_set_state (pipeline,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
+
+ g_main_loop_run (loop);
+
+ fail_unless (have_data);
+ fail_unless (have_eos);
+
+ fail_unless (gst_element_set_state (pipeline,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_unref (loop);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static Suite *
+audiofirfilter_suite (void)
+{
+ Suite *s = suite_create ("audiofirfilter");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_pipeline);
+
+ return s;
+}
+
+GST_CHECK_MAIN (audiofirfilter);
diff --git a/tests/check/elements/audioiirfilter.c b/tests/check/elements/audioiirfilter.c
new file mode 100644
index 0000000..d144792
--- /dev/null
+++ b/tests/check/elements/audioiirfilter.c
@@ -0,0 +1,179 @@
+/* GStreamer
+ *
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/check/gstcheck.h>
+
+static gboolean have_eos = FALSE;
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ case GST_MESSAGE_WARNING:
+ g_assert_not_reached ();
+ g_main_loop_quit (loop);
+ break;
+
+ case GST_MESSAGE_EOS:
+ have_eos = TRUE;
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+ GValueArray *va;
+ GValue v = { 0, };
+
+ fail_unless (rate > 0);
+
+ va = g_value_array_new (6);
+
+ g_value_init (&v, G_TYPE_DOUBLE);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_value_set_double (&v, 1.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+
+ g_object_set (G_OBJECT (element), "a", va, NULL);
+
+ g_value_array_free (va);
+
+ va = g_value_array_new (6);
+
+ g_value_set_double (&v, 0.0);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+
+ g_object_set (G_OBJECT (element), "b", va, NULL);
+
+ g_value_array_free (va);
+}
+
+static gboolean have_data = FALSE;
+
+static void
+on_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ if (!have_data) {
+ gdouble *data = (gdouble *) GST_BUFFER_DATA (buffer);
+
+ fail_unless (GST_BUFFER_SIZE (buffer) > 5 * sizeof (gdouble));
+ fail_unless (data[0] == 0.0);
+ fail_unless (data[1] == 0.0);
+ fail_unless (data[2] == 0.0);
+ fail_unless (data[3] == 0.0);
+ fail_unless (data[4] == 0.0);
+ fail_unless (data[5] != 0.0);
+ have_data = TRUE;
+ }
+}
+
+GST_START_TEST (test_pipeline)
+{
+ GstElement *pipeline, *src, *filter, *sink;
+ GstBus *bus;
+ GMainLoop *loop;
+
+ have_data = FALSE;
+ have_eos = FALSE;
+
+ pipeline = gst_element_factory_make ("pipeline", NULL);
+ fail_unless (pipeline != NULL);
+
+ src = gst_element_factory_make ("audiotestsrc", NULL);
+ fail_unless (src != NULL);
+ g_object_set (G_OBJECT (src), "num-buffers", 1000, NULL);
+
+ filter = gst_element_factory_make ("audioiirfilter", NULL);
+ fail_unless (filter != NULL);
+ g_signal_connect (G_OBJECT (filter), "rate-changed",
+ G_CALLBACK (on_rate_changed), NULL);
+
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (sink != NULL);
+ g_object_set (G_OBJECT (sink), "signal-handoffs", TRUE, NULL);
+ g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (on_handoff), NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, sink, NULL);
+ fail_unless (gst_element_link_many (src, filter, sink, NULL));
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ fail_if (gst_element_set_state (pipeline,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
+
+ g_main_loop_run (loop);
+
+ fail_unless (have_data);
+ fail_unless (have_eos);
+
+ fail_unless (gst_element_set_state (pipeline,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_unref (loop);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static Suite *
+audioiirfilter_suite (void)
+{
+ Suite *s = suite_create ("audioiirfilter");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_pipeline);
+
+ return s;
+}
+
+GST_CHECK_MAIN (audioiirfilter);
diff --git a/tests/check/elements/audioinvert.c b/tests/check/elements/audioinvert.c
new file mode 100644
index 0000000..39ff80e
--- /dev/null
+++ b/tests/check/elements/audioinvert.c
@@ -0,0 +1,286 @@
+/* GStreamer
+ *
+ * unit test for audioinvert
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * Greatly based on the audiopanorama unit test
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+
+#define INVERT_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) TRUE"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+
+static GstElement *
+setup_invert (void)
+{
+ GstElement *invert;
+
+ GST_DEBUG ("setup_invert");
+ invert = gst_check_setup_element ("audioinvert");
+ mysrcpad = gst_check_setup_src_pad (invert, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (invert, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return invert;
+}
+
+static void
+cleanup_invert (GstElement * invert)
+{
+ GST_DEBUG ("cleanup_invert");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (invert);
+ gst_check_teardown_sink_pad (invert);
+ gst_check_teardown_element (invert);
+}
+
+GST_START_TEST (test_passthrough)
+{
+ GstElement *invert;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 128, -512 };
+ gint16 *res;
+
+ invert = setup_invert ();
+ fail_unless (gst_element_set_state (invert,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (INVERT_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ in[0], in[1], in[2], in[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 8) == 0);
+
+ /* cleanup */
+ cleanup_invert (invert);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_zero)
+{
+ GstElement *invert;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 128, -512 };
+ gint16 out[4] = { 0, 0, 0, 0 };
+ gint16 *res;
+
+ invert = setup_invert ();
+ g_object_set (G_OBJECT (invert), "degree", 0.5, NULL);
+ fail_unless (gst_element_set_state (invert,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (INVERT_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_invert (invert);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_full_inverse)
+{
+ GstElement *invert;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 128, -512 };
+ gint16 out[4] = { -16385, 255, -129, 511 };
+ gint16 *res;
+
+ invert = setup_invert ();
+ g_object_set (G_OBJECT (invert), "degree", 1.0, NULL);
+ fail_unless (gst_element_set_state (invert,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (INVERT_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_invert (invert);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_25_inverse)
+{
+ GstElement *invert;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 128, -512 };
+ gint16 out[4] = { 8191, -128, 63, -256 };
+ gint16 *res;
+
+ invert = setup_invert ();
+ g_object_set (G_OBJECT (invert), "degree", 0.25, NULL);
+ fail_unless (gst_element_set_state (invert,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (INVERT_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_invert (invert);
+}
+
+GST_END_TEST;
+
+static Suite *
+invert_suite (void)
+{
+ Suite *s = suite_create ("invert");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_passthrough);
+ tcase_add_test (tc_chain, test_zero);
+ tcase_add_test (tc_chain, test_full_inverse);
+ tcase_add_test (tc_chain, test_25_inverse);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = invert_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiopanorama.c b/tests/check/elements/audiopanorama.c
new file mode 100644
index 0000000..07abca7
--- /dev/null
+++ b/tests/check/elements/audiopanorama.c
@@ -0,0 +1,707 @@
+/* GStreamer
+ *
+ * unit test for audiopanorama
+ *
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+
+#define PANORAMA_MONO_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) TRUE"
+
+#define PANORAMA_STEREO_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 2, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) TRUE"
+
+#define PANORAMA_WRONG_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "channels = (int) 5, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (bool) FALSE"
+
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 2, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+static GstStaticPadTemplate msrctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 1, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+static GstStaticPadTemplate ssrctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "channels = (int) 2, "
+ "rate = (int) [ 1, MAX ], "
+ "endianness = (int) BYTE_ORDER, "
+ "width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE")
+ );
+
+static GstElement *
+setup_panorama_m (void)
+{
+ GstElement *panorama;
+
+ GST_DEBUG ("setup_panorama");
+ panorama = gst_check_setup_element ("audiopanorama");
+ mysrcpad = gst_check_setup_src_pad (panorama, &msrctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (panorama, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return panorama;
+}
+
+static GstElement *
+setup_panorama_s (void)
+{
+ GstElement *panorama;
+
+ GST_DEBUG ("setup_panorama");
+ panorama = gst_check_setup_element ("audiopanorama");
+ mysrcpad = gst_check_setup_src_pad (panorama, &ssrctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (panorama, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return panorama;
+}
+
+static void
+cleanup_panorama (GstElement * panorama)
+{
+ GST_DEBUG ("cleanup_panorama");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (panorama);
+ gst_check_teardown_sink_pad (panorama);
+ gst_check_teardown_element (panorama);
+}
+
+GST_START_TEST (test_mono_middle)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 8192, 8192, -128, -128 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mono_left)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 16384, 0, -256, 0 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ g_object_set (G_OBJECT (panorama), "panorama", -1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 4) == 0);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mono_right)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 0, 16384, 0, -256 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ g_object_set (G_OBJECT (panorama), "panorama", 1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 4) == 0);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_middle)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... so keep an extra one */
+ gst_buffer_ref (inbuffer);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (inbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ in[0], in[1], in[2], in[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 8) == 0);
+
+ /* cleanup */
+ gst_buffer_unref (inbuffer);
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_left)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 out[4] = { 16384 - 256, 0, 8192 + 128, 0 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ g_object_set (G_OBJECT (panorama), "panorama", -1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_right)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 out[4] = { 0, -256 + 16384, 0, 128 + 8192 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ g_object_set (G_OBJECT (panorama), "panorama", 1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mono_middle_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 16384, 16384, -256, -256 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mono_left_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 16384, 0, -256, 0 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ g_object_set (G_OBJECT (panorama), "panorama", -1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 4) == 0);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mono_right_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[2] = { 16384, -256 };
+ gint16 out[4] = { 0, 16384, 0, -256 };
+ gint16 *res;
+
+ panorama = setup_panorama_m ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ g_object_set (G_OBJECT (panorama), "panorama", 1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 4) == 0);
+ caps = gst_caps_from_string (PANORAMA_MONO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_middle_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... so keep an extra one */
+ gst_buffer_ref (inbuffer);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (inbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ in[0], in[1], in[2], in[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), in, 8) == 0);
+
+ /* cleanup */
+ gst_buffer_unref (inbuffer);
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_left_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 out[4] = { 16384, 0, 8192, 0 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ g_object_set (G_OBJECT (panorama), "panorama", -1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_stereo_right_simple)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gint16 in[4] = { 16384, -256, 8192, 128 };
+ gint16 out[4] = { 0, -256, 0, 128 };
+ gint16 *res;
+
+ panorama = setup_panorama_s ();
+ g_object_set (G_OBJECT (panorama), "method", 1, NULL);
+ g_object_set (G_OBJECT (panorama), "panorama", 1.0, NULL);
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (8);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (inbuffer), in, 8) == 0);
+ caps = gst_caps_from_string (PANORAMA_STEREO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... and puts a new buffer on the global list */
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ res = (gint16 *) GST_BUFFER_DATA (outbuffer);
+ GST_INFO ("expected %+5d %+5d %+5d %+5d real %+5d %+5d %+5d %+5d",
+ out[0], out[1], out[2], out[3], res[0], res[1], res[2], res[3]);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), out, 8) == 0);
+
+ /* cleanup */
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_wrong_caps)
+{
+ GstElement *panorama;
+ GstBuffer *inbuffer;
+ gint16 in[2] = { 16384, -256 };
+ GstBus *bus;
+ GstMessage *message;
+ GstCaps *caps;
+
+ panorama = setup_panorama_m ();
+ bus = gst_bus_new ();
+
+ fail_unless (gst_element_set_state (panorama,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (4);
+ memcpy (GST_BUFFER_DATA (inbuffer), in, 4);
+ caps = gst_caps_from_string (PANORAMA_WRONG_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_ref (inbuffer);
+
+ /* set a bus here so we avoid getting state change messages */
+ gst_element_set_bus (panorama, bus);
+
+ /* pushing gives an error because it can't negotiate with wrong caps */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer),
+ GST_FLOW_NOT_NEGOTIATED);
+ /* ... and the buffer would have been lost if we didn't ref it ourselves */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_unref (inbuffer);
+ fail_unless_equals_int (g_list_length (buffers), 0);
+
+ /* panorama_set_caps should not have been called since basetransform caught
+ * the negotiation problem */
+ fail_if ((message = gst_bus_pop (bus)) != NULL);
+
+ /* cleanup */
+ gst_element_set_bus (panorama, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+ cleanup_panorama (panorama);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+panorama_suite (void)
+{
+ Suite *s = suite_create ("panorama");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_mono_middle);
+ tcase_add_test (tc_chain, test_mono_left);
+ tcase_add_test (tc_chain, test_mono_right);
+ tcase_add_test (tc_chain, test_stereo_middle);
+ tcase_add_test (tc_chain, test_stereo_left);
+ tcase_add_test (tc_chain, test_stereo_right);
+ tcase_add_test (tc_chain, test_mono_middle_simple);
+ tcase_add_test (tc_chain, test_mono_left_simple);
+ tcase_add_test (tc_chain, test_mono_right_simple);
+ tcase_add_test (tc_chain, test_stereo_middle_simple);
+ tcase_add_test (tc_chain, test_stereo_left_simple);
+ tcase_add_test (tc_chain, test_stereo_right_simple);
+ tcase_add_test (tc_chain, test_wrong_caps);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = panorama_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiowsincband.c b/tests/check/elements/audiowsincband.c
new file mode 100644
index 0000000..137f425
--- /dev/null
+++ b/tests/check/elements/audiowsincband.c
@@ -0,0 +1,1010 @@
+/* GStreamer
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * audiowsincband.c: Unit test for the audiowsincband element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define AUDIO_WSINC_BAND_CAPS_STRING_32 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 32" \
+
+#define AUDIO_WSINC_BAND_CAPS_STRING_64 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64" \
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 } ")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 } ")
+ );
+
+static GstElement *
+setup_audiowsincband (void)
+{
+ GstElement *audiowsincband;
+
+ GST_DEBUG ("setup_audiowsincband");
+ audiowsincband = gst_check_setup_element ("audiowsincband");
+ mysrcpad = gst_check_setup_src_pad (audiowsincband, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (audiowsincband, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return audiowsincband;
+}
+
+static void
+cleanup_audiowsincband (GstElement * audiowsincband)
+{
+ GST_DEBUG ("cleanup_audiowsincband");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (audiowsincband);
+ gst_check_teardown_sink_pad (audiowsincband);
+ gst_check_teardown_element (audiowsincband);
+}
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_bp_0hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at the band center is preserved with bandreject mode
+ * and a 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_bp_11025hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.4);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_bp_22050hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.3);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_br_0hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at the band center is erased with bandreject mode
+ * and a 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_br_11025hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.35);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_32_br_22050hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if buffers smaller than the kernel size are handled
+ * correctly without accessing wrong memory areas */
+GST_START_TEST (test_32_small_buffer)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ gfloat *in;
+ gint i;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 101, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 44100 / 16.0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 44100 / 16.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (20 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 20; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+
+
+
+
+
+
+
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandpass mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_bp_0hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at the band center is preserved with bandreject mode
+ * and a 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_bp_11025hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.4);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_bp_22050hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.3);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_br_0hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at the band center is erased with bandreject mode
+ * and a 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_br_11025hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+
+ for (i = 0; i < 1024; i += 4) {
+ in[i] = 0.0;
+ in[i + 1] = 1.0;
+ in[i + 2] = 0.0;
+ in[i + 3] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.35);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with bandreject mode and a
+ * 2000Hz frequency band around rate/4 */
+GST_START_TEST (test_64_br_22050hz)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandreject */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 31, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 1000, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 1000, NULL);
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+/* Test if buffers smaller than the kernel size are handled
+ * correctly without accessing wrong memory areas */
+GST_START_TEST (test_64_small_buffer)
+{
+ GstElement *audiowsincband;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ gdouble *in;
+ gint i;
+
+ audiowsincband = setup_audiowsincband ();
+ /* Set to bandpass */
+ g_object_set (G_OBJECT (audiowsincband), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "length", 101, NULL);
+
+ fail_unless (gst_element_set_state (audiowsincband,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsincband), "lower-frequency",
+ 44100 / 4.0 - 44100 / 16.0, NULL);
+ g_object_set (G_OBJECT (audiowsincband), "upper-frequency",
+ 44100 / 4.0 + 44100 / 16.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (20 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 20; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_BAND_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ /* cleanup */
+ cleanup_audiowsincband (audiowsincband);
+}
+
+GST_END_TEST;
+
+static Suite *
+audiowsincband_suite (void)
+{
+ Suite *s = suite_create ("audiowsincband");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_32_bp_0hz);
+ tcase_add_test (tc_chain, test_32_bp_11025hz);
+ tcase_add_test (tc_chain, test_32_bp_22050hz);
+ tcase_add_test (tc_chain, test_32_br_0hz);
+ tcase_add_test (tc_chain, test_32_br_11025hz);
+ tcase_add_test (tc_chain, test_32_br_22050hz);
+ tcase_add_test (tc_chain, test_32_small_buffer);
+ tcase_add_test (tc_chain, test_64_bp_0hz);
+ tcase_add_test (tc_chain, test_64_bp_11025hz);
+ tcase_add_test (tc_chain, test_64_bp_22050hz);
+ tcase_add_test (tc_chain, test_64_br_0hz);
+ tcase_add_test (tc_chain, test_64_br_11025hz);
+ tcase_add_test (tc_chain, test_64_br_22050hz);
+ tcase_add_test (tc_chain, test_64_small_buffer);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = audiowsincband_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/audiowsinclimit.c b/tests/check/elements/audiowsinclimit.c
new file mode 100644
index 0000000..a5f0291
--- /dev/null
+++ b/tests/check/elements/audiowsinclimit.c
@@ -0,0 +1,704 @@
+/* GStreamer
+ *
+ * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * audiowsinclimit.c: Unit test for the audiowsinclimit element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define AUDIO_WSINC_LIMIT_CAPS_STRING_32 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 32" \
+
+#define AUDIO_WSINC_LIMIT_CAPS_STRING_64 \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64" \
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 } ")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) { 32, 64 } ")
+ );
+
+static GstElement *
+setup_audiowsinclimit (void)
+{
+ GstElement *audiowsinclimit;
+
+ GST_DEBUG ("setup_audiowsinclimit");
+ audiowsinclimit = gst_check_setup_element ("audiowsinclimit");
+ mysrcpad = gst_check_setup_src_pad (audiowsinclimit, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (audiowsinclimit, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return audiowsinclimit;
+}
+
+static void
+cleanup_audiowsinclimit (GstElement * audiowsinclimit)
+{
+ GST_DEBUG ("cleanup_audiowsinclimit");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (audiowsinclimit);
+ gst_check_teardown_sink_pad (audiowsinclimit);
+ gst_check_teardown_element (audiowsinclimit);
+}
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_32_lp_0hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* cutoff = sampling rate / 4, data = 0 */
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_32_lp_22050hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_32_hp_0hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_32_hp_22050hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gfloat *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gfloat);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if buffers smaller than the kernel size are handled
+ * correctly without accessing wrong memory areas */
+GST_START_TEST (test_32_small_buffer)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gfloat *in;
+ gint i;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 101, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (20 * sizeof (gfloat));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 20; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is preserved with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_64_lp_0hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* cutoff = sampling rate / 4, data = 0 */
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is erased with lowpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_64_lp_22050hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at 0 is erased with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_64_hp_0hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms <= 0.1);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if data containing only one frequency component
+ * at rate/2 is preserved with highpass mode and a cutoff
+ * at rate/4 */
+GST_START_TEST (test_64_hp_22050hz)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms;
+ gint i;
+ GList *node;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to highpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 1, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 21, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (128 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 128; i += 2) {
+ in[i] = 1.0;
+ in[i + 1] = -1.0;
+ }
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ for (node = buffers; node; node = node->next) {
+ gint buffer_length;
+
+ fail_if ((outbuffer = (GstBuffer *) node->data) == NULL);
+
+ res = (gdouble *) GST_BUFFER_DATA (outbuffer);
+ buffer_length = GST_BUFFER_SIZE (outbuffer) / sizeof (gdouble);
+ rms = 0.0;
+ for (i = 0; i < buffer_length; i++)
+ rms += res[i] * res[i];
+ rms = sqrt (rms / buffer_length);
+ fail_unless (rms >= 0.9);
+ }
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+/* Test if buffers smaller than the kernel size are handled
+ * correctly without accessing wrong memory areas */
+GST_START_TEST (test_64_small_buffer)
+{
+ GstElement *audiowsinclimit;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ gdouble *in;
+ gint i;
+
+ audiowsinclimit = setup_audiowsinclimit ();
+ /* Set to lowpass */
+ g_object_set (G_OBJECT (audiowsinclimit), "mode", 0, NULL);
+ g_object_set (G_OBJECT (audiowsinclimit), "length", 101, NULL);
+
+ fail_unless (gst_element_set_state (audiowsinclimit,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ g_object_set (G_OBJECT (audiowsinclimit), "cutoff", 44100 / 4.0, NULL);
+ inbuffer = gst_buffer_new_and_alloc (20 * sizeof (gdouble));
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 20; i++)
+ in[i] = 1.0;
+
+ caps = gst_caps_from_string (AUDIO_WSINC_LIMIT_CAPS_STRING_64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) >= 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+
+ /* cleanup */
+ cleanup_audiowsinclimit (audiowsinclimit);
+}
+
+GST_END_TEST;
+
+static Suite *
+audiowsinclimit_suite (void)
+{
+ Suite *s = suite_create ("audiowsinclimit");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_32_lp_0hz);
+ tcase_add_test (tc_chain, test_32_lp_22050hz);
+ tcase_add_test (tc_chain, test_32_hp_0hz);
+ tcase_add_test (tc_chain, test_32_hp_22050hz);
+ tcase_add_test (tc_chain, test_32_small_buffer);
+ tcase_add_test (tc_chain, test_64_lp_0hz);
+ tcase_add_test (tc_chain, test_64_lp_22050hz);
+ tcase_add_test (tc_chain, test_64_hp_0hz);
+ tcase_add_test (tc_chain, test_64_hp_22050hz);
+ tcase_add_test (tc_chain, test_64_small_buffer);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = audiowsinclimit_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/autodetect.c b/tests/check/elements/autodetect.c
new file mode 100644
index 0000000..21f9bb5
--- /dev/null
+++ b/tests/check/elements/autodetect.c
@@ -0,0 +1,163 @@
+/* GStreamer unit test for the autodetect elements
+ *
+ * Copyright (C) <2006> Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gst/check/gstcheck.h>
+
+GST_START_TEST (test_autovideosink_ghostpad_error_case)
+{
+ GstStateChangeReturn state_ret;
+ GstElement *pipeline, *src, *filter, *sink;
+ GstCaps *caps;
+
+ /* check that there's a usable video sink (think of build bot case) */
+ sink = gst_element_factory_make ("autovideosink", NULL);
+ state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+ /* need to set state back to NULL, or our test won't work since we
+ * already have detected the real caps in ready and then linking fails */
+ gst_element_set_state (sink, GST_STATE_NULL);
+
+ if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+ GST_WARNING ("No usable video sink, skipping test");
+ gst_object_unref (sink);
+ return;
+ }
+
+ pipeline = gst_pipeline_new ("pipeline");
+ src = gst_element_factory_make ("fakesrc", NULL);
+ filter = gst_element_factory_make ("capsfilter", NULL);
+
+ caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC,
+ GST_MAKE_FOURCC ('A', 'C', 'D', 'C'), NULL);
+
+ g_object_set (filter, "caps", caps, NULL);
+ gst_caps_unref (caps);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, sink, NULL);
+
+ fail_unless (gst_element_link (src, filter), "Failed to link src to filter");
+ fail_unless (gst_element_link (filter, sink),
+ "Failed to link filter to sink");
+
+ /* this should fail, there's no such format */
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ if (state_ret == GST_STATE_CHANGE_ASYNC) {
+ /* make sure we wait for the actual success/failure to happen */
+ GstState state;
+ state_ret =
+ gst_element_get_state (pipeline, &state, &state, GST_CLOCK_TIME_NONE);
+ }
+ fail_unless (state_ret == GST_STATE_CHANGE_FAILURE,
+ "pipeline _set_state() to PAUSED succeeded but should have failed");
+
+ /* so, we hit an error and try to shut down the pipeline; this shouldn't
+ * deadlock or block anywhere when autovideosink resets the ghostpad
+ * targets etc. */
+ state_ret = gst_element_set_state (pipeline, GST_STATE_NULL);
+ fail_unless (state_ret == GST_STATE_CHANGE_SUCCESS,
+ "State change on pipeline failed");
+
+ /* clean up */
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+/* disable this for now, too many valgrind suppressions needed for libasound */
+#if 0
+GST_START_TEST (test_autoaudiosink_ghostpad_error_case)
+{
+ GstStateChangeReturn state_ret;
+ GstElement *pipeline, *src, *filter, *sink;
+ GstCaps *caps;
+
+ /* check that there's a usable audio sink (think of build bot case) */
+ sink = gst_element_factory_make ("autoaudiosink", NULL);
+ state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+ /* need to set state back to NULL, or our test won't work since we
+ * already have detected the real caps in ready and then linking fails */
+ gst_element_set_state (sink, GST_STATE_NULL);
+
+ if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+ GST_WARNING ("No usable audio sink, skipping test");
+ gst_object_unref (sink);
+ return;
+ }
+
+ pipeline = gst_pipeline_new ("pipeline");
+ src = gst_element_factory_make ("fakesrc", NULL);
+ filter = gst_element_factory_make ("capsfilter", NULL);
+
+ caps = gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 42, NULL);
+
+ g_object_set (filter, "caps", caps, NULL);
+ gst_caps_unref (caps);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, sink, NULL);
+
+ fail_unless (gst_element_link (src, filter));
+ fail_unless (gst_element_link (filter, sink));
+
+ /* this should fail, there's no such width (hopefully) */
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret == GST_STATE_CHANGE_FAILURE,
+ "pipeline _set_state() to PAUSED succeeded but should have failed");
+
+ /* so, we hit an error and try to shut down the pipeline; this shouldn't
+ * deadlock or block anywhere when autoaudiosink resets the ghostpad
+ * targets etc. */
+ state_ret = gst_element_set_state (pipeline, GST_STATE_NULL);
+ fail_unless (state_ret == GST_STATE_CHANGE_SUCCESS);
+
+ /* clean up */
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+#endif
+
+static Suite *
+autodetect_suite (void)
+{
+ guint maj, min, mic, nano;
+
+ Suite *s = suite_create ("autodetect");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+
+ gst_version (&maj, &min, &mic, &nano);
+
+ /* requires fixes from 0.10.10.1, but don't want to add a hard dependency
+ * in configure.ac just for this yet */
+ if (maj > 0 || min > 10 || mic > 10 || (mic == 10 && nano > 0)) {
+ tcase_add_test (tc_chain, test_autovideosink_ghostpad_error_case);
+ /* tcase_add_test (tc_chain, test_autoaudiosink_ghostpad_error_case); */
+ }
+
+ return s;
+}
+
+GST_CHECK_MAIN (autodetect);
diff --git a/tests/check/elements/avimux.c b/tests/check/elements/avimux.c
new file mode 100644
index 0000000..be06a6b
--- /dev/null
+++ b/tests/check/elements/avimux.c
@@ -0,0 +1,276 @@
+/* GStreamer
+ *
+ * unit test for avimux
+ *
+ * Copyright (C) <2006> Mark Nauwelaerts <manauw@skynet.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+#define AUDIO_CAPS_STRING "audio/x-ac3, " \
+ "channels = (int) 1, " \
+ "rate = (int) 8000"
+#define VIDEO_CAPS_STRING "video/x-xvid, " \
+ "width = (int) 384, " \
+ "height = (int) 288, " \
+ "framerate = (fraction) 25/1"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("video/x-msvideo"));
+static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_STRING));
+
+static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (AUDIO_CAPS_STRING));
+
+
+/* setup and teardown needs some special handling for muxer */
+static GstPad *
+setup_src_pad (GstElement * element,
+ GstStaticPadTemplate * template, GstCaps * caps, const gchar * sinkname)
+{
+ GstPad *srcpad, *sinkpad;
+
+ GST_DEBUG_OBJECT (element, "setting up sending pad");
+ /* sending pad */
+ srcpad = gst_pad_new_from_static_template (template, "src");
+ fail_if (srcpad == NULL, "Could not create a srcpad");
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
+
+ if (!(sinkpad = gst_element_get_static_pad (element, sinkname)))
+ sinkpad = gst_element_get_request_pad (element, sinkname);
+ fail_if (sinkpad == NULL, "Could not get sink pad from %s",
+ GST_ELEMENT_NAME (element));
+ /* references are owned by: 1) us, 2) avimux, 3) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ if (caps)
+ fail_unless (gst_pad_set_caps (srcpad, caps));
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (sinkpad); /* because we got it higher up */
+
+ /* references are owned by: 1) avimux, 2) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
+
+ return srcpad;
+}
+
+static void
+teardown_src_pad (GstElement * element, const gchar * sinkname)
+{
+ GstPad *srcpad, *sinkpad;
+ gchar *padname;
+
+ /* clean up floating src pad */
+ /* hm, avimux uses _00 as suffixes for padnames */
+ padname = g_strdup (sinkname);
+ memcpy (strchr (padname, '%'), "00", 2);
+ if (!(sinkpad = gst_element_get_static_pad (element, padname)))
+ sinkpad = gst_element_get_request_pad (element, padname);
+ g_free (padname);
+ /* pad refs held by 1) avimux 2) collectpads and 3) us (through _get) */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ srcpad = gst_pad_get_peer (sinkpad);
+
+ gst_pad_unlink (srcpad, sinkpad);
+
+ /* after unlinking, pad refs still held by
+ * 1) avimux and 2) collectpads and 3) us (through _get) */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ gst_object_unref (sinkpad);
+ /* one more ref is held by element itself */
+
+ /* pad refs held by both creator and this function (through _get_peer) */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 2);
+ gst_object_unref (srcpad);
+ gst_object_unref (srcpad);
+
+}
+
+static GstElement *
+setup_avimux (GstStaticPadTemplate * srctemplate, const gchar * sinkname)
+{
+ GstElement *avimux;
+
+ GST_DEBUG ("setup_avimux");
+ avimux = gst_check_setup_element ("avimux");
+ mysrcpad = setup_src_pad (avimux, srctemplate, NULL, sinkname);
+ mysinkpad = gst_check_setup_sink_pad (avimux, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return avimux;
+}
+
+static void
+cleanup_avimux (GstElement * avimux, const gchar * sinkname)
+{
+ GST_DEBUG ("cleanup_avimux");
+ gst_element_set_state (avimux, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ teardown_src_pad (avimux, sinkname);
+ gst_check_teardown_sink_pad (avimux);
+ gst_check_teardown_element (avimux);
+}
+
+static void
+check_avimux_pad (GstStaticPadTemplate * srctemplate,
+ const gchar * src_caps_string, const gchar * chunk_id,
+ const gchar * sinkname)
+{
+ GstElement *avimux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int num_buffers;
+ int i;
+ guint8 data0[4] = "RIFF";
+ guint8 data1[8] = "AVI LIST";
+ guint8 data2[8] = "hdrlavih";
+ guint8 data3[4] = "LIST";
+ guint8 data4[8] = "strlstrh";
+ guint8 data5[4] = "strf";
+ guint8 data6[4] = "LIST";
+ guint8 data7[4] = "movi";
+
+ avimux = setup_avimux (srctemplate, sinkname);
+ fail_unless (gst_element_set_state (avimux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ caps = gst_caps_from_string (src_caps_string);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+ /* at least expect avi header, chunk header, chunk and padding */
+ fail_unless (num_buffers >= 4);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ switch (i) {
+ case 0:{ /* check riff header */
+ /* avi header */
+ guint8 *data = GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (memcmp (data, data0, sizeof (data0)) == 0);
+ fail_unless (memcmp (data + 8, data1, sizeof (data1)) == 0);
+ fail_unless (memcmp (data + 20, data2, sizeof (data2)) == 0);
+ /* video or audio header */
+ data += 32 + 56;
+ fail_unless (memcmp (data, data3, sizeof (data3)) == 0);
+ fail_unless (memcmp (data + 8, data4, sizeof (data4)) == 0);
+ fail_unless (memcmp (data + 76, data5, sizeof (data5)) == 0);
+ /* avi data header */
+ data = GST_BUFFER_DATA (outbuffer);
+ data += GST_BUFFER_SIZE (outbuffer) - 12;
+ fail_unless (memcmp (data, data6, sizeof (data6)) == 0);
+ data += 8;
+ fail_unless (memcmp (data, data7, sizeof (data7)) == 0);
+ break;
+ }
+ case 1: /* chunk header */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), chunk_id, 4) == 0);
+ break;
+ case 2:
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 1);
+ break;
+ case 3: /* buffer we put in, must be padded to even size */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 1);
+ break;
+ default:
+ break;
+ }
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ cleanup_avimux (avimux, sinkname);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+
+GST_START_TEST (test_video_pad)
+{
+ check_avimux_pad (&srcvideotemplate, VIDEO_CAPS_STRING, "00db", "video_%d");
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_audio_pad)
+{
+ check_avimux_pad (&srcaudiotemplate, AUDIO_CAPS_STRING, "00wb", "audio_%d");
+}
+
+GST_END_TEST;
+
+
+static Suite *
+avimux_suite (void)
+{
+ Suite *s = suite_create ("avimux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_video_pad);
+ tcase_add_test (tc_chain, test_audio_pad);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = avimux_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/avisubtitle.c b/tests/check/elements/avisubtitle.c
new file mode 100644
index 0000000..06598ac
--- /dev/null
+++ b/tests/check/elements/avisubtitle.c
@@ -0,0 +1,264 @@
+/* GStreamer
+ *
+ * unit test for avisubtitle
+ *
+ * Copyright (C) <2007> Thijs Vermeir <thijsvermeir@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/* Element-Checklist-Version: 5 */
+
+#include <unistd.h>
+
+#include <gst/gst.h>
+#include <gst/check/gstcheck.h>
+
+GstPad *mysinkpad;
+GstPad *mysrcpad;
+
+guint8 avisub_utf_8_with_bom[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x8e, 0x00, 0x00,
+ 0x00, 0xef, 0xbb, 0xbf, 0x31, 0x0d, 0x0a, 0x30,
+ 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x2c,
+ 0x31, 0x30, 0x30, 0x20, 0x2d, 0x2d, 0x3e, 0x20,
+ 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x32,
+ 0x2c, 0x30, 0x30, 0x30, 0x0d, 0x0a, 0x3c, 0x62,
+ 0x3e, 0x41, 0x6e, 0x20, 0x55, 0x54, 0x46, 0x38,
+ 0x20, 0x53, 0x75, 0x62, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42,
+ 0x4f, 0x4d, 0x3c, 0x2f, 0x62, 0x3e, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x32, 0x0d, 0x0a, 0x30, 0x30, 0x3a,
+ 0x30, 0x30, 0x3a, 0x30, 0x32, 0x2c, 0x31, 0x30,
+ 0x30, 0x20, 0x2d, 0x2d, 0x3e, 0x20, 0x30, 0x30,
+ 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x34, 0x2c, 0x30,
+ 0x30, 0x30, 0x0d, 0x0a, 0x53, 0x6f, 0x6d, 0x65,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f,
+ 0x6e, 0x41, 0x53, 0x43, 0x49, 0x49, 0x20, 0x2d,
+ 0x20, 0xc2, 0xb5, 0xc3, 0xb6, 0xc3, 0xa4, 0xc3,
+ 0xbc, 0xc3, 0x9f, 0x0d, 0x0a, 0x0d, 0x0a
+};
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-subtitle")
+ );
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-subtitle-avi")
+ );
+
+static GstElement *
+setup_avisubtitle (void)
+{
+ GstElement *avisubtitle;
+ GstCaps *caps;
+
+ GST_DEBUG ("setup_avisubtitle");
+ avisubtitle = gst_check_setup_element ("avisubtitle");
+ caps = gst_caps_new_simple ("application/x-subtitle", NULL);
+ mysinkpad = gst_check_setup_sink_pad (avisubtitle, &sink_template, caps);
+ gst_caps_unref (caps);
+ caps = gst_caps_new_simple ("application/x-subtitle-avi", NULL);
+ mysrcpad = gst_check_setup_src_pad (avisubtitle, &src_template, caps);
+ gst_caps_unref (caps);
+ gst_pad_set_active (mysinkpad, TRUE);
+ gst_pad_set_active (mysrcpad, TRUE);
+ return avisubtitle;
+}
+
+static void
+cleanup_avisubtitle (GstElement * avisubtitle)
+{
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_check_teardown_sink_pad (avisubtitle);
+ gst_check_teardown_src_pad (avisubtitle);
+ gst_check_teardown_element (avisubtitle);
+}
+
+static void
+check_wrong_buffer (guint8 * data, guint length)
+{
+ GstBuffer *buffer = gst_buffer_new ();
+ GstElement *avisubtitle = setup_avisubtitle ();
+
+ gst_buffer_set_data (buffer, data, length);
+ fail_unless (gst_element_set_state (avisubtitle,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ gst_buffer_ref (buffer);
+ ASSERT_BUFFER_REFCOUNT (buffer, "inbuffer", 2);
+ /* push the broken buffer */
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_ERROR,
+ "accepted a broken buffer");
+ /* check if we have unreffed this buffer on failure */
+ ASSERT_BUFFER_REFCOUNT (buffer, "inbuffer", 1);
+ gst_buffer_unref (buffer);
+ fail_unless (gst_element_set_state (avisubtitle,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ cleanup_avisubtitle (avisubtitle);
+}
+
+static void
+check_correct_buffer (guint8 * src_data, guint src_size, guint8 * dst_data,
+ guint dst_size)
+{
+ GstBuffer *buffer = gst_buffer_new ();
+ GstBuffer *newBuffer;
+ GstElement *avisubtitle = setup_avisubtitle ();
+ GstEvent *event;
+
+ fail_unless (g_list_length (buffers) == 0, "Buffers list needs to be empty");
+ gst_buffer_set_data (buffer, src_data, src_size);
+ fail_unless (gst_element_set_state (avisubtitle,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ ASSERT_BUFFER_REFCOUNT (buffer, "inbuffer", 1);
+ event = gst_event_new_seek (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, 2 * GST_SECOND, GST_SEEK_TYPE_SET, 5 * GST_SECOND);
+ fail_unless (gst_element_send_event (avisubtitle, event) == FALSE,
+ "Seeking is not possible when there is no buffer yet");
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK,
+ "not accepted a correct buffer");
+ /* we gave away our reference to the buffer, don't assume anything */
+ buffer = NULL;
+ /* a new buffer is created in the list */
+ fail_unless (g_list_length (buffers) == 1,
+ "No new buffer in the buffers list");
+ event = gst_event_new_seek (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, 2 * GST_SECOND, GST_SEEK_TYPE_SET, 5 * GST_SECOND);
+ fail_unless (gst_element_send_event (avisubtitle, event) == TRUE,
+ "seeking should be working now");
+ fail_unless (g_list_length (buffers) == 2,
+ "After seeking we need another buffer in the buffers");
+ newBuffer = GST_BUFFER (buffers->data);
+ buffers = g_list_remove (buffers, newBuffer);
+ fail_unless (g_list_length (buffers) == 1, "Buffers list needs to be empty");
+ fail_unless (GST_BUFFER_SIZE (newBuffer) == dst_size,
+ "size of the new buffer is wrong ( %d != %d)",
+ GST_BUFFER_SIZE (newBuffer), dst_size);
+ fail_unless (memcmp (GST_BUFFER_DATA (newBuffer), dst_data, dst_size) == 0,
+ "data of the buffer is not correct");
+ gst_buffer_unref (newBuffer);
+ /* free the buffer from seeking */
+ gst_buffer_unref (GST_BUFFER (buffers->data));
+ buffers = g_list_remove (buffers, buffers->data);
+ fail_unless (gst_element_set_state (avisubtitle,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ cleanup_avisubtitle (avisubtitle);
+}
+
+
+GST_START_TEST (test_avisubtitle_negative)
+{
+ guint8 wrong_magic[] =
+ { 0x47, 0x41, 0x41, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00
+ };
+ guint8 wrong_fixed_word_2[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x01, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68
+ };
+ guint8 wrong_length_after_name[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68
+ };
+ guint8 wrong_fixed_word_4[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68,
+ 0x00, 0x00, 0x00, 0x04, 0x01, 0x8e, 0x00, 0x00,
+ 0x00, 0xef, 0xbb, 0xbf, 0x31, 0x0d, 0x0a, 0x30
+ };
+ guint8 wrong_total_length[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x8e, 0x00, 0x00,
+ 0x00, 0xef, 0xbb, 0xbf, 0x31, 0x0d, 0x0a, 0x30
+ };
+ /* size of the buffer must be larger than 11 */
+ check_wrong_buffer (avisub_utf_8_with_bom, 11);
+ /* buffer must start with 'GAB2\0' */
+ check_wrong_buffer (wrong_magic, 14);
+ /* next word must be 2 */
+ check_wrong_buffer (wrong_fixed_word_2, 24);
+ /* length must be larger than the length of the name + 17 */
+ check_wrong_buffer (wrong_length_after_name, 24);
+ /* next word must be 4 */
+ check_wrong_buffer (wrong_fixed_word_4, 36);
+ /* check wrong total length */
+ check_wrong_buffer (wrong_total_length, 36);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_avisubtitle_positive)
+{
+ guint8 avisub_utf_8_without_bom[] = {
+ 0x47, 0x41, 0x42, 0x32, 0x00, 0x02, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x45, 0x00, 0x6e, 0x00, 0x67,
+ 0x00, 0x6c, 0x00, 0x69, 0x00, 0x73, 0x00, 0x68,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x8b, 0x00, 0x00,
+ 0x00, 0x31, 0x0d, 0x0a, 0x30,
+ 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x2c,
+ 0x31, 0x30, 0x30, 0x20, 0x2d, 0x2d, 0x3e, 0x20,
+ 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x32,
+ 0x2c, 0x30, 0x30, 0x30, 0x0d, 0x0a, 0x3c, 0x62,
+ 0x3e, 0x41, 0x6e, 0x20, 0x55, 0x54, 0x46, 0x38,
+ 0x20, 0x53, 0x75, 0x62, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x42,
+ 0x4f, 0x4d, 0x3c, 0x2f, 0x62, 0x3e, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x32, 0x0d, 0x0a, 0x30, 0x30, 0x3a,
+ 0x30, 0x30, 0x3a, 0x30, 0x32, 0x2c, 0x31, 0x30,
+ 0x30, 0x20, 0x2d, 0x2d, 0x3e, 0x20, 0x30, 0x30,
+ 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x34, 0x2c, 0x30,
+ 0x30, 0x30, 0x0d, 0x0a, 0x53, 0x6f, 0x6d, 0x65,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f,
+ 0x6e, 0x41, 0x53, 0x43, 0x49, 0x49, 0x20, 0x2d,
+ 0x20, 0xc2, 0xb5, 0xc3, 0xb6, 0xc3, 0xa4, 0xc3,
+ 0xbc, 0xc3, 0x9f, 0x0d, 0x0a, 0x0d, 0x0a
+ };
+ check_correct_buffer (avisub_utf_8_with_bom, 175, avisub_utf_8_with_bom + 36,
+ 139);
+ check_correct_buffer (avisub_utf_8_without_bom, 172,
+ avisub_utf_8_without_bom + 33, 139);
+}
+
+GST_END_TEST;
+
+static Suite *
+avisubtitle_suite (void)
+{
+ Suite *s = suite_create ("avisubtitle");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_avisubtitle_negative);
+ tcase_add_test (tc_chain, test_avisubtitle_positive);
+
+ return s;
+}
+
+GST_CHECK_MAIN (avisubtitle);
diff --git a/tests/check/elements/capssetter.c b/tests/check/elements/capssetter.c
new file mode 100644
index 0000000..0a6986b
--- /dev/null
+++ b/tests/check/elements/capssetter.c
@@ -0,0 +1,228 @@
+/* GStreamer
+ *
+ * unit test for capssetter
+ *
+ * Copyright (C) <2009> Mark Nauwelaerts <mnauw@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+static GstElement *
+setup_capssetter (void)
+{
+ GstElement *capssetter;
+
+ GST_DEBUG ("setup_capssetter");
+
+ capssetter = gst_check_setup_element ("capssetter");
+ mysrcpad = gst_check_setup_src_pad (capssetter, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (capssetter, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return capssetter;
+}
+
+static void
+cleanup_capssetter (GstElement * capssetter)
+{
+ GST_DEBUG ("cleanup_capssetter");
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (capssetter);
+ gst_check_teardown_sink_pad (capssetter);
+ gst_check_teardown_element (capssetter);
+}
+
+static void
+push_and_test (GstCaps * prop_caps, gboolean join, gboolean replace,
+ GstCaps * in_caps, GstCaps * out_caps)
+{
+ GstElement *capssetter;
+ GstBuffer *buffer;
+
+ capssetter = setup_capssetter ();
+ fail_unless (gst_element_set_state (capssetter,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ buffer = gst_buffer_new_and_alloc (4);
+ ASSERT_BUFFER_REFCOUNT (buffer, "buffer", 1);
+ memcpy (GST_BUFFER_DATA (buffer), "data", 4);
+
+ gst_buffer_set_caps (buffer, in_caps);
+ gst_caps_unref (in_caps);
+
+ g_object_set (capssetter, "join", join, NULL);
+ g_object_set (capssetter, "replace", replace, NULL);
+ g_object_set (capssetter, "caps", prop_caps, NULL);
+ gst_caps_unref (prop_caps);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK,
+ "Failed pushing buffer to capssetter");
+
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
+
+ /* ... but it should end up being collected on the global buffer list */
+ fail_unless (g_list_length (buffers) == 1);
+ buffer = g_list_first (buffers)->data;
+ ASSERT_BUFFER_REFCOUNT (buffer, "buffer", 1);
+
+ fail_unless (gst_caps_is_equal (out_caps, GST_BUFFER_CAPS (buffer)));
+ gst_caps_unref (out_caps);
+
+ /* cleanup */
+ cleanup_capssetter (capssetter);
+}
+
+#define SRC_WIDTH 8
+#define SRC_HEIGHT 12
+
+static GstCaps *
+make_src_caps (void)
+{
+ return gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT, SRC_WIDTH,
+ "height", G_TYPE_INT, SRC_HEIGHT, NULL);
+}
+
+/* don't try these caps mutations at home, folks */
+
+GST_START_TEST (test_n_join_n_replace)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH,
+ "height", G_TYPE_INT, SRC_HEIGHT, NULL);
+ push_and_test (prop_caps, FALSE, FALSE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_n_join_replace)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_copy (prop_caps);
+ push_and_test (prop_caps, FALSE, TRUE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_join_n_replace_n_match)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ /* non joining caps */
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_copy (in_caps);
+ push_and_test (prop_caps, TRUE, FALSE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_join_n_replace_match)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ /* joining caps */
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH,
+ "height", G_TYPE_INT, SRC_HEIGHT, NULL);
+ push_and_test (prop_caps, TRUE, FALSE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_join_replace_n_match)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ /* non joining caps */
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-rgb",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_copy (in_caps);
+ push_and_test (prop_caps, TRUE, TRUE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_join_replace_match)
+{
+ GstCaps *in_caps, *prop_caps, *out_caps;
+
+ /* joining caps */
+ in_caps = make_src_caps ();
+ prop_caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "width", G_TYPE_INT, 2 * SRC_WIDTH, NULL);
+ out_caps = gst_caps_copy (prop_caps);
+ push_and_test (prop_caps, TRUE, TRUE, in_caps, out_caps);
+}
+
+GST_END_TEST;
+
+static Suite *
+capssetter_suite (void)
+{
+ Suite *s = suite_create ("capssetter");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_n_join_n_replace);
+ tcase_add_test (tc_chain, test_n_join_replace);
+ tcase_add_test (tc_chain, test_join_n_replace_n_match);
+ tcase_add_test (tc_chain, test_join_n_replace_match);
+ tcase_add_test (tc_chain, test_join_replace_n_match);
+ tcase_add_test (tc_chain, test_join_replace_match);
+
+ return s;
+}
+
+GST_CHECK_MAIN (capssetter);
diff --git a/tests/check/elements/cmmldec.c b/tests/check/elements/cmmldec.c
new file mode 100644
index 0000000..a6b8559
--- /dev/null
+++ b/tests/check/elements/cmmldec.c
@@ -0,0 +1,600 @@
+/*
+ * cmmldec.c - GStreamer CMML decoder test suite
+ * Copyright (C) 2005 Alessandro Decina
+ *
+ * Authors:
+ * Alessandro Decina <alessandro@nnva.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/tag/tag.h>
+
+#define SINK_CAPS "text/x-cmml"
+#define SRC_CAPS "text/x-cmml, encoded=(boolean)TRUE"
+
+#define IDENT_HEADER \
+ "CMML\x00\x00\x00\x00"\
+ "\x03\x00\x00\x00"\
+ "\xe8\x03\x00\x00\x00\x00\x00\x00"\
+ "\x01\x00\x00\x00\x00\x00\x00\x00"\
+ "\x20"
+#define IDENT_HEADER_SIZE 29
+
+#define PREAMBLE_NO_PI \
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"\
+ "<!DOCTYPE cmml SYSTEM \"cmml.dtd\">\n"
+#define PREAMBLE PREAMBLE_NO_PI "<?cmml?>"
+#define PREAMBLE_DECODED PREAMBLE_NO_PI "<cmml >"
+
+#define HEAD_TAG \
+ "<head>"\
+ "<title>The Research Hunter</title>"\
+ "<meta name=\"DC.audience\" content=\"General\"/>"\
+ "<meta name=\"DC.author\" content=\"CSIRO Publishing\"/>"\
+ "<meta name=\"DC.format\" content=\"video\"/>"\
+ "<meta name=\"DC.language\" content=\"English\"/>"\
+ "<meta name=\"DC.publisher\" content=\"CSIRO Australia\"/>"\
+ "</head>"
+
+#define HEAD_TAG_DECODED HEAD_TAG
+
+#define CLIP_TEMPLATE \
+ "<clip id=\"%s\" track=\"%s\">"\
+ "<a href=\"http://www.csiro.au/\">http://www.csiro.au</a>"\
+ "<img src=\"images/index1.jpg\"/>"\
+ "<desc>Welcome to CSIRO</desc>"\
+ "<meta name=\"test\" content=\"test content\"/>"\
+ "</clip>"
+
+#define CLIP_TEMPLATE_DECODED \
+ "<clip id=\"%s\" track=\"%s\" start=\"%s\">"\
+ "<a href=\"http://www.csiro.au/\">http://www.csiro.au</a>"\
+ "<img src=\"images/index1.jpg\"/>"\
+ "<desc>Welcome to CSIRO</desc>"\
+ "<meta name=\"test\" content=\"test content\"/>"\
+ "</clip>"
+
+#define EMPTY_CLIP_TEMPLATE \
+ "<clip id=\"%s\" track=\"%s\" />"
+
+#define END_TAG \
+ "</cmml>"
+
+#define fail_unless_equals_flow_return(a, b) \
+G_STMT_START { \
+ gchar *a_up = g_ascii_strup (gst_flow_get_name (a), -1); \
+ gchar *b_up = g_ascii_strup (gst_flow_get_name (b), -1); \
+ fail_unless (a == b, \
+ "'" #a "' (GST_FLOW_%s) is not equal to '" #b "' (GST_FLOW_%s)", \
+ a_up, b_up); \
+ g_free (a_up); \
+ g_free (b_up); \
+} G_STMT_END;
+
+static GstElement *cmmldec;
+
+static GstBus *bus;
+
+static GstFlowReturn flow;
+
+static GList *current_buf;
+
+static gint64 granulerate;
+
+static guint8 granuleshift;
+
+static GstPad *srcpad, *sinkpad;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS)
+ );
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS)
+ );
+
+static GstBuffer *
+buffer_new (const gchar * buffer_data, guint size)
+{
+ GstBuffer *buffer;
+
+ GstCaps *caps;
+
+ buffer = gst_buffer_new_and_alloc (size);
+ memcpy (GST_BUFFER_DATA (buffer), buffer_data, size);
+ caps = gst_caps_from_string (SRC_CAPS);
+ gst_buffer_set_caps (buffer, caps);
+ gst_caps_unref (caps);
+
+ return buffer;
+}
+
+static void
+buffer_unref (void *buffer, void *user_data)
+{
+ ASSERT_OBJECT_REFCOUNT (buffer, "buf", 1);
+ gst_buffer_unref (GST_BUFFER (buffer));
+}
+
+static void
+setup_cmmldec (void)
+{
+ GST_DEBUG ("setup_cmmldec");
+ cmmldec = gst_check_setup_element ("cmmldec");
+ srcpad = gst_check_setup_src_pad (cmmldec, &srctemplate, NULL);
+ sinkpad = gst_check_setup_sink_pad (cmmldec, &sinktemplate, NULL);
+ gst_pad_set_active (srcpad, TRUE);
+ gst_pad_set_active (sinkpad, TRUE);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (cmmldec, bus);
+
+ fail_unless (gst_element_set_state (cmmldec,
+ GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+ "could not set to playing");
+
+ granulerate = GST_SECOND / 1000;
+ granuleshift = 32;
+ buffers = NULL;
+}
+
+static void
+teardown_cmmldec (void)
+{
+ g_list_foreach (buffers, buffer_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+ current_buf = NULL;
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_object_unref (bus);
+
+ GST_DEBUG ("teardown_cmmldec");
+ gst_pad_set_active (srcpad, FALSE);
+ gst_pad_set_active (sinkpad, FALSE);
+ gst_check_teardown_src_pad (cmmldec);
+ gst_check_teardown_sink_pad (cmmldec);
+ gst_check_teardown_element (cmmldec);
+}
+
+static void
+check_output_buffer_is_equal (const gchar * name,
+ const gchar * data, gint refcount)
+{
+ GstBuffer *buffer;
+
+ if (current_buf == NULL)
+ current_buf = buffers;
+ else
+ current_buf = g_list_next (current_buf);
+
+ fail_unless (current_buf != NULL);
+
+ buffer = GST_BUFFER (current_buf->data);
+
+ ASSERT_OBJECT_REFCOUNT (buffer, name, refcount);
+ fail_unless (memcmp (GST_BUFFER_DATA (buffer), data,
+ GST_BUFFER_SIZE (buffer)) == 0,
+ "'%s' (%s) is not equal to (%s)", name, GST_BUFFER_DATA (buffer), data);
+}
+
+static GstFlowReturn
+push_data (const gchar * name, const gchar * data, gint size, gint64 granulepos)
+{
+ GstBuffer *buffer;
+
+ buffer = buffer_new (data, size);
+ GST_BUFFER_OFFSET_END (buffer) = granulepos;
+ return gst_pad_push (srcpad, buffer);
+}
+
+static GObject *
+cmml_tag_message_pop (GstBus * bus, const gchar * tag)
+{
+ GstMessage *message;
+
+ GstTagList *taglist;
+
+ const GValue *value;
+
+ GObject *obj;
+
+ message = gst_bus_poll (bus, GST_MESSAGE_TAG, 0);
+ if (message == NULL)
+ return NULL;
+
+ gst_message_parse_tag (message, &taglist);
+ value = gst_tag_list_get_value_index (taglist, tag, 0);
+ if (value == NULL) {
+ gst_message_unref (message);
+ gst_tag_list_free (taglist);
+ return NULL;
+ }
+
+ obj = g_value_dup_object (value);
+ gst_message_unref (message);
+ gst_tag_list_free (taglist);
+
+ return obj;
+}
+
+static void
+check_headers (void)
+{
+ GObject *head_tag;
+
+ gchar *title, *base;
+
+ GValueArray *meta;
+
+ /* push the ident header */
+ flow = push_data ("ident-header", IDENT_HEADER, IDENT_HEADER_SIZE, 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* push the cmml preamble */
+ flow = push_data ("preamble", PREAMBLE, strlen (PREAMBLE), 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* push the head tag */
+ flow = push_data ("head", HEAD_TAG, strlen (HEAD_TAG), 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ fail_unless_equals_int (g_list_length (buffers), 2);
+
+ /* check the decoded preamble */
+ check_output_buffer_is_equal ("cmml-preamble-buffer", PREAMBLE_DECODED, 1);
+
+ /* check the decoded head tag */
+ check_output_buffer_is_equal ("head-tag-buffer", HEAD_TAG_DECODED, 1);
+
+ /* check the GstCmmlTagHead tag object */
+ head_tag = cmml_tag_message_pop (bus, GST_TAG_CMML_HEAD);
+ fail_unless (head_tag != NULL);
+ g_object_get (head_tag,
+ "title", &title, "base-uri", &base, "meta", &meta, NULL);
+ fail_unless_equals_string ("The Research Hunter", title);
+ fail_unless (base == NULL);
+ fail_unless (meta != NULL);
+ fail_unless_equals_int (meta->n_values, 10);
+
+ g_free (title);
+ g_free (base);
+ g_value_array_free (meta);
+ g_object_unref (head_tag);
+}
+
+static GstFlowReturn
+push_clip_full (const gchar * name, const gchar * track, const gchar * template,
+ GstClockTime prev, GstClockTime start)
+{
+ gchar *clip;
+
+ gint64 keyindex, keyoffset, granulepos;
+
+ GstFlowReturn res;
+
+ if (track == NULL)
+ track = "default";
+
+ if (prev == GST_CLOCK_TIME_NONE)
+ prev = 0;
+
+ keyindex = prev / granulerate << granuleshift;
+ keyoffset = (start - prev) / granulerate;
+ granulepos = keyindex + keyoffset;
+
+ clip = g_strdup_printf (template, name, track);
+ res = push_data (name, clip, strlen (clip), granulepos);
+ g_free (clip);
+
+ return res;
+}
+
+static GstFlowReturn
+push_clip (const gchar * name, const gchar * track,
+ GstClockTime prev, GstClockTime start)
+{
+ return push_clip_full (name, track, CLIP_TEMPLATE, prev, start);
+}
+
+static GstFlowReturn
+push_empty_clip (const gchar * name, const gchar * track, GstClockTime start)
+{
+ return push_clip_full (name, track,
+ EMPTY_CLIP_TEMPLATE, GST_CLOCK_TIME_NONE, start);
+}
+
+
+static void
+check_output_clip (const gchar * name, const gchar * track,
+ const gchar * start, const gchar * end)
+{
+ gchar *decoded_clip;
+
+ if (track == NULL)
+ track = "default";
+
+ decoded_clip = g_strdup_printf (CLIP_TEMPLATE_DECODED, name, track, start);
+ check_output_buffer_is_equal (name, decoded_clip, 1);
+ g_free (decoded_clip);
+}
+
+GST_START_TEST (test_dec)
+{
+ GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND;
+
+ GstClockTime clip2_start = clip1_start;
+
+ GstClockTime clip3_start =
+ ((100 * 3600) + (59 * 60) + 59) * GST_SECOND + 678 * GST_MSECOND;
+
+ check_headers ();
+
+ flow = push_clip ("clip-1", "default", GST_CLOCK_TIME_NONE, clip1_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ flow = push_clip ("clip-2", "othertrack", GST_CLOCK_TIME_NONE, clip2_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ flow = push_clip ("clip-3", "default", clip1_start, clip3_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* send EOS to flush clip-2 and clip-3 */
+ gst_pad_send_event (GST_PAD_PEER (srcpad), gst_event_new_eos ());
+
+ check_output_clip ("clip-1", "default", "0:00:01.234", NULL);
+ check_output_clip ("clip-2", "othertrack", "0:00:01.234", NULL);
+ check_output_clip ("clip-3", "default", "100:59:59.678", NULL);
+ check_output_buffer_is_equal ("cmml-end-tag", END_TAG, 1);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_preamble_no_pi)
+{
+ flow = push_data ("ident-header", IDENT_HEADER, IDENT_HEADER_SIZE, 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ fail_unless_equals_int (g_list_length (buffers), 0);
+
+ flow = push_data ("preamble-no-pi",
+ PREAMBLE_NO_PI, strlen (PREAMBLE_NO_PI), 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+
+ check_output_buffer_is_equal ("cmml-preamble-buffer",
+ PREAMBLE_NO_PI "<cmml>", 1);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_tags)
+{
+ GObject *tag;
+
+ gboolean empty;
+
+ gchar *id, *track;
+
+ gint64 start_time, end_time;
+
+ gchar *anchor_href, *anchor_text;
+
+ gchar *img_src, *img_alt;
+
+ gchar *desc;
+
+ GValueArray *meta;
+
+ GstClockTime clip1_start;
+
+ check_headers ();
+
+ clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND;
+ flow = push_clip ("clip-1", "default", 0, clip1_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ tag = cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP);
+ fail_unless (tag != NULL);
+
+ g_object_get (tag, "id", &id, "empty", &empty, "track", &track,
+ "start-time", &start_time, "end-time", &end_time,
+ "anchor-uri", &anchor_href, "anchor-text", &anchor_text,
+ "img-uri", &img_src, "img-alt", &img_alt,
+ "description", &desc, "meta", &meta, NULL);
+
+ fail_unless (empty == FALSE);
+ fail_unless_equals_string (id, "clip-1");
+ fail_unless_equals_string (track, "default");
+ fail_unless_equals_int (start_time, 1 * GST_SECOND + 234 * GST_MSECOND);
+ fail_unless_equals_uint64 (end_time, GST_CLOCK_TIME_NONE);
+ fail_unless_equals_string (anchor_href, "http://www.csiro.au/");
+ fail_unless_equals_string (anchor_text, "http://www.csiro.au");
+ fail_unless_equals_string (img_src, "images/index1.jpg");
+ fail_unless (img_alt == NULL);
+ fail_unless_equals_string (desc, "Welcome to CSIRO");
+ fail_unless (meta != NULL);
+ fail_unless_equals_int (meta->n_values, 2);
+
+ g_free (id);
+ g_free (track);
+ g_free (anchor_href);
+ g_free (anchor_text);
+ g_free (img_src);
+ g_free (img_alt);
+ g_free (desc);
+ g_value_array_free (meta);
+ g_object_unref (tag);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_wait_clip_end)
+{
+ GObject *tag;
+
+ gchar *id;
+
+ GstClockTime end_time = 0;
+
+ GstClockTime clip1_start = 1 * GST_SECOND + 234 * GST_MSECOND;
+
+ GstClockTime clip2_start = 2 * GST_SECOND + 234 * GST_MSECOND;
+
+ GstClockTime clip3_start = 3 * GST_SECOND + 234 * GST_MSECOND;
+
+ GstClockTime clip3_end = 4 * GST_SECOND + 234 * GST_MSECOND;
+
+ GstClockTime clip4_start = 5 * GST_SECOND + 234 * GST_MSECOND;
+
+ g_object_set (cmmldec, "wait-clip-end-time", TRUE, NULL);
+
+ check_headers ();
+
+ flow = push_clip ("clip-1", "default", 0, clip1_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ /* no tag has been posted yet */
+ fail_unless (cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP) == NULL);
+
+ flow = push_clip ("clip-2", "default", clip1_start, clip2_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ tag = cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP);
+ fail_unless (tag != NULL);
+ g_object_get (tag, "id", &id, "end-time", &end_time, NULL);
+ /* clip-1 is posted when clip-2 is decoded. clip-1 ends when clip-2 starts */
+ fail_unless_equals_string (id, "clip-1");
+ fail_unless_equals_int (end_time, clip2_start);
+ g_free (id);
+ g_object_unref (tag);
+
+ flow = push_clip ("clip-3", "default", clip2_start, clip3_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ tag = cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP);
+ fail_unless (tag != NULL);
+ g_object_get (tag, "id", &id, "end-time", &end_time, NULL);
+ /* clip-2 is posted when clip-3 is decoded. It ends when clip-3 starts */
+ fail_unless_equals_string (id, "clip-2");
+ fail_unless_equals_int (end_time, clip3_start);
+ g_free (id);
+ g_object_unref (tag);
+
+ flow = push_empty_clip ("empty-clip", "default", clip3_end);
+ tag = cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP);
+ fail_unless (tag != NULL);
+ g_object_get (tag, "id", &id, "end-time", &end_time, NULL);
+ /* clip-3 ends when empty-clip is decoded */
+ fail_unless_equals_string (id, "clip-3");
+ fail_unless_equals_int (end_time, clip3_end);
+ g_free (id);
+ g_object_unref (tag);
+
+ flow = push_clip ("clip-4", "default", clip3_start, clip4_start);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* an empty clip just marks the end of the previous one, so no tag is posted
+ * for empty-clip */
+ fail_unless (cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP) == NULL);
+ /* send EOS to flush clip-4 */
+ gst_pad_send_event (GST_PAD_PEER (srcpad), gst_event_new_eos ());
+
+ tag = cmml_tag_message_pop (bus, GST_TAG_CMML_CLIP);
+ fail_unless (tag != NULL);
+ g_object_get (tag, "id", &id, NULL);
+ fail_unless_equals_string (id, "clip-4");
+ g_free (id);
+ g_object_unref (tag);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_weird_input)
+{
+ const gchar *bad_xml = "<?xml version=\"1.0\"?><a><b></a>";
+
+ /* malformed ident header */
+ flow = push_data ("bad-ident-header", "CMML\0\0\0\0garbage", 15, 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* push invalid xml */
+ flow = push_data ("bad-xml", bad_xml, strlen (bad_xml), 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* and now for something completely different: an empty buffer. This is valid
+ * as 'NIL' EOS pages are allowed */
+ flow = push_data ("empty-eos", NULL, 0, 0);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_sink_query_convert)
+{
+ guint64 keyindex, keyoffset, granulepos;
+
+ GstClockTime index_time, offset_time;
+
+ GstFormat dstfmt = GST_FORMAT_TIME;
+
+ gint64 dstval;
+
+ /* send headers to set the granulerate */
+ check_headers ();
+
+ /* create a 1|1 granulepos */
+ index_time = 1 * GST_SECOND;
+ offset_time = 1 * GST_SECOND;
+
+ keyindex = (index_time / granulerate) << granuleshift;
+ keyoffset = offset_time / granulerate;
+ granulepos = keyindex + keyoffset;
+
+ fail_unless (gst_pad_query_convert (GST_PAD_PEER (srcpad),
+ GST_FORMAT_DEFAULT, granulepos, &dstfmt, &dstval));
+
+ fail_unless (dstfmt == GST_FORMAT_TIME);
+ /* fail unless dstval == index + offset */
+ fail_unless_equals_int (2 * GST_SECOND, dstval);
+}
+
+GST_END_TEST;
+
+static Suite *
+cmmldec_suite (void)
+{
+ Suite *s = suite_create ("cmmldec");
+
+ TCase *tc_general = tcase_create ("general");
+
+ suite_add_tcase (s, tc_general);
+ tcase_add_checked_fixture (tc_general, setup_cmmldec, teardown_cmmldec);
+ tcase_add_test (tc_general, test_dec);
+ tcase_add_test (tc_general, test_tags);
+ tcase_add_test (tc_general, test_preamble_no_pi);
+ tcase_add_test (tc_general, test_wait_clip_end);
+ tcase_add_test (tc_general, test_sink_query_convert);
+ tcase_add_test (tc_general, test_weird_input);
+
+ return s;
+}
+
+GST_CHECK_MAIN (cmmldec);
diff --git a/tests/check/elements/cmmlenc.c b/tests/check/elements/cmmlenc.c
new file mode 100644
index 0000000..4b95d71
--- /dev/null
+++ b/tests/check/elements/cmmlenc.c
@@ -0,0 +1,491 @@
+/*
+ * cmmlenc.c - GStreamer CMML decoder test suite
+ * Copyright (C) 2005 Alessandro Decina
+ *
+ * Authors:
+ * Alessandro Decina <alessandro@nnva.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/tag/tag.h>
+
+#define SINK_CAPS "text/x-cmml"
+#define SRC_CAPS "text/x-cmml,encoded=(boolean)FALSE"
+
+#define IDENT_HEADER \
+ "CMML\x00\x00\x00\x00"\
+ "\x03\x00\x00\x00"\
+ "\xe8\x03\x00\x00\x00\x00\x00\x00"\
+ "\x01\x00\x00\x00\x00\x00\x00\x00"\
+ "\x20"
+
+#define XML_PREAMBLE \
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"\
+ "<!DOCTYPE cmml SYSTEM \"cmml.dtd\">\n"
+
+#define START_TAG \
+ "<cmml>"
+
+#define PROCESSING_INSTRUCTION \
+ "<?cmml ?>"
+
+#define PREAMBLE \
+ XML_PREAMBLE START_TAG
+
+#define PREAMBLE_ENCODED \
+ XML_PREAMBLE PROCESSING_INSTRUCTION
+
+#define STREAM_TAG \
+ "<stream timebase=\"10\">"\
+ "<import src=\"test.ogg\"/>"\
+ "<import src=\"test1.ogg\"/>"\
+ "</stream>"
+
+#define STREAM_TAG_ENCODED STREAM_TAG
+
+#define HEAD_TAG \
+ "<head>"\
+ "<title>The Research Hunter</title>"\
+ "<meta name=\"DC.audience\" content=\"General\"/>"\
+ "<meta name=\"DC.author\" content=\"CSIRO Publishing\"/>"\
+ "<meta name=\"DC.format\" content=\"video\"/>"\
+ "<meta name=\"DC.language\" content=\"English\"/>"\
+ "<meta name=\"DC.publisher\" content=\"CSIRO Australia\"/>"\
+ "</head>"
+
+#define HEAD_TAG_ENCODED HEAD_TAG
+
+#define CLIP_TEMPLATE \
+ "<clip id=\"%s\" track=\"%s\" start=\"%s\">"\
+ "<a href=\"http://www.annodex.org/\">http://www.annodex.org</a>"\
+ "<img src=\"images/index.jpg\"/>"\
+ "<desc>Annodex Foundation</desc>"\
+ "<meta name=\"test\" content=\"test content\"/>"\
+ "</clip>"
+
+#define ENDED_CLIP_TEMPLATE \
+ "<clip id=\"%s\" track=\"%s\" start=\"%s\" end=\"%s\">"\
+ "<a href=\"http://www.annodex.org/\">http://www.annodex.org</a>"\
+ "<img src=\"images/index.jpg\"/>"\
+ "<desc>Annodex Foundation</desc>"\
+ "<meta name=\"test\" content=\"test content\"/>"\
+ "</clip>"
+
+#define CLIP_TEMPLATE_ENCODED \
+ "<clip id=\"%s\" track=\"%s\">"\
+ "<a href=\"http://www.annodex.org/\">http://www.annodex.org</a>"\
+ "<img src=\"images/index.jpg\"/>"\
+ "<desc>Annodex Foundation</desc>"\
+ "<meta name=\"test\" content=\"test content\"/>"\
+ "</clip>"
+
+#define EMPTY_CLIP_TEMPLATE_ENCODED \
+ "<clip track=\"%s\"/>"
+
+#define fail_unless_equals_flow_return(a, b) \
+G_STMT_START { \
+ gchar *a_up = g_ascii_strup (gst_flow_get_name (a), -1); \
+ gchar *b_up = g_ascii_strup (gst_flow_get_name (b), -1); \
+ fail_unless (a == b, \
+ "'" #a "' (GST_FLOW_%s) is not equal to '" #b "' (GST_FLOW_%s)", \
+ a_up, b_up); \
+ g_free (a_up); \
+ g_free (b_up); \
+} G_STMT_END;
+
+static GList *current_buf;
+static guint64 granulerate;
+static guint8 granuleshift;
+static GstElement *cmmlenc;
+static GstBus *bus;
+static GstFlowReturn flow;
+static GstPad *srcpad, *sinkpad;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS)
+ );
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS)
+ );
+
+static GstBuffer *
+buffer_new (const gchar * buffer_data, guint size)
+{
+ GstBuffer *buffer;
+ GstCaps *caps;
+
+ buffer = gst_buffer_new_and_alloc (size);
+ memcpy (GST_BUFFER_DATA (buffer), buffer_data, size);
+ caps = gst_caps_from_string (SRC_CAPS);
+ gst_buffer_set_caps (buffer, caps);
+ gst_caps_unref (caps);
+
+ return buffer;
+}
+
+static void
+buffer_unref (void *buffer, void *user_data)
+{
+ gst_buffer_unref (GST_BUFFER (buffer));
+}
+
+static void
+setup_cmmlenc (void)
+{
+ guint64 granulerate_n, granulerate_d;
+
+ GST_DEBUG ("setup_cmmlenc");
+
+ cmmlenc = gst_check_setup_element ("cmmlenc");
+ srcpad = gst_check_setup_src_pad (cmmlenc, &srctemplate, NULL);
+ sinkpad = gst_check_setup_sink_pad (cmmlenc, &sinktemplate, NULL);
+ gst_pad_set_active (srcpad, TRUE);
+ gst_pad_set_active (sinkpad, TRUE);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (cmmlenc, bus);
+
+ fail_unless (gst_element_set_state (cmmlenc,
+ GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+ "could not set to playing");
+
+ g_object_get (cmmlenc, "granule-rate-numerator", &granulerate_n,
+ "granule-rate-denominator", &granulerate_d,
+ "granule-shift", &granuleshift, NULL);
+
+ granulerate = GST_SECOND * granulerate_d / granulerate_n;
+}
+
+static void
+teardown_cmmlenc (void)
+{
+ /* free encoded buffers */
+ g_list_foreach (buffers, buffer_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+ current_buf = NULL;
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_object_unref (bus);
+
+ GST_DEBUG ("teardown_cmmlenc");
+ gst_pad_set_active (srcpad, FALSE);
+ gst_pad_set_active (sinkpad, FALSE);
+ gst_check_teardown_src_pad (cmmlenc);
+ gst_check_teardown_sink_pad (cmmlenc);
+ gst_check_teardown_element (cmmlenc);
+}
+
+static void
+check_output_buffer_is_equal (const gchar * name,
+ const gchar * data, gint refcount)
+{
+ GstBuffer *buffer;
+
+ if (current_buf == NULL)
+ current_buf = buffers;
+ else
+ current_buf = g_list_next (current_buf);
+
+ fail_unless (current_buf != NULL);
+ buffer = GST_BUFFER (current_buf->data);
+
+ ASSERT_OBJECT_REFCOUNT (buffer, name, refcount);
+ fail_unless (memcmp (GST_BUFFER_DATA (buffer), data,
+ GST_BUFFER_SIZE (buffer)) == 0,
+ "'%s' (%s) is not equal to (%s)", name, GST_BUFFER_DATA (buffer), data);
+}
+
+static GstFlowReturn
+push_data (const gchar * name, const gchar * data, gint size)
+{
+ GstBuffer *buffer;
+ GstFlowReturn res;
+
+ buffer = buffer_new (data, size);
+ res = gst_pad_push (srcpad, buffer);
+
+ return res;
+}
+
+static void
+check_headers (void)
+{
+ /* push the cmml start tag */
+ flow = push_data ("preamble", PREAMBLE, strlen (PREAMBLE));
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* push the stream tag */
+ flow = push_data ("stream", STREAM_TAG, strlen (STREAM_TAG));
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ /* push the head tag */
+ flow = push_data ("head", HEAD_TAG, strlen (HEAD_TAG));
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+
+ /* should output 3 buffers: the ident, preamble and head headers */
+ fail_unless_equals_int (g_list_length (buffers), 3);
+
+ /* check the ident header */
+ check_output_buffer_is_equal ("cmml-ident-buffer", IDENT_HEADER, 1);
+
+ /* check the cmml processing instruction */
+ check_output_buffer_is_equal ("cmml-preamble-buffer", PREAMBLE_ENCODED, 1);
+
+ /* check the encoded head tag */
+ check_output_buffer_is_equal ("head-tag-buffer", HEAD_TAG_ENCODED, 1);
+}
+
+static GstFlowReturn
+push_clip (const gchar * name, const gchar * track,
+ const gchar * start, const gchar * end)
+{
+ gchar *clip;
+ GstFlowReturn res;
+
+ if (end != NULL)
+ clip = g_strdup_printf (ENDED_CLIP_TEMPLATE, name, track, start, end);
+ else
+ clip = g_strdup_printf (CLIP_TEMPLATE, name, track, start);
+ res = push_data (name, clip, strlen (clip));
+ g_free (clip);
+
+ return res;
+}
+
+static void
+check_clip_times (GstBuffer * buffer, GstClockTime start, GstClockTime prev)
+{
+ guint64 keyindex, keyoffset, granulepos;
+
+ granulepos = GST_BUFFER_OFFSET_END (buffer);
+ if (granuleshift == 0 || granuleshift == 64)
+ keyindex = 0;
+ else
+ keyindex = granulepos >> granuleshift;
+ keyoffset = granulepos - (keyindex << granuleshift);
+ fail_unless_equals_uint64 (keyindex * granulerate, prev);
+ fail_unless_equals_uint64 ((keyindex + keyoffset) * granulerate, start);
+}
+
+static void
+check_clip (const gchar * name, const gchar * track,
+ GstClockTime start, GstClockTime prev)
+{
+ gchar *encoded_clip;
+ GstBuffer *buffer;
+
+ encoded_clip = g_strdup_printf (CLIP_TEMPLATE_ENCODED, name, track);
+ check_output_buffer_is_equal (name, encoded_clip, 1);
+ g_free (encoded_clip);
+ buffer = GST_BUFFER (current_buf->data);
+ check_clip_times (buffer, start, prev);
+}
+
+static void
+check_empty_clip (const gchar * name, const gchar * track,
+ GstClockTime start, GstClockTime prev)
+{
+ gchar *encoded_clip;
+ GstBuffer *buffer;
+
+ encoded_clip = g_strdup_printf (EMPTY_CLIP_TEMPLATE_ENCODED, track);
+ check_output_buffer_is_equal (name, encoded_clip, 1);
+ g_free (encoded_clip);
+ buffer = GST_BUFFER (current_buf->data);
+ check_clip_times (buffer, start, prev);
+}
+
+GST_START_TEST (test_enc)
+{
+ check_headers ();
+
+ flow = push_clip ("clip-1", "default", "1.234", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-1", "default", 1 * GST_SECOND + 234 * GST_MSECOND, 0);
+
+ flow = push_clip ("clip-2", "default", "5.678", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-2", "default",
+ 5 * GST_SECOND + 678 * GST_MSECOND, 1 * GST_SECOND + 234 * GST_MSECOND);
+
+ flow = push_clip ("clip-3", "othertrack", "9.123", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-3", "othertrack", 9 * GST_SECOND + 123 * GST_MSECOND, 0);
+
+ flow = push_data ("end-tag", "</cmml>", strlen ("</cmml>"));
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_output_buffer_is_equal ("cmml-eos", NULL, 1);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_clip_end_time)
+{
+ check_headers ();
+
+ /* push a clip that starts at 1.234 an ends at 2.234 */
+ flow = push_clip ("clip-1", "default", "1.234", "2.234");
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-1", "default", 1 * GST_SECOND + 234 * GST_MSECOND, 0);
+
+ /* now check that the encoder created an empty clip starting at 2.234 to mark
+ * the end of clip-1 */
+ check_empty_clip ("clip-1-end", "default",
+ 2 * GST_SECOND + 234 * GST_MSECOND, 1 * GST_SECOND + 234 * GST_MSECOND);
+
+ /* now push another clip on the same track and check that the keyindex part of
+ * the granulepos points to clip-1 and not to the empty clip */
+ flow = push_clip ("clip-2", "default", "5", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-2", "default",
+ 5 * GST_SECOND, 1 * GST_SECOND + 234 * GST_MSECOND);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_time_order)
+{
+ check_headers ();
+
+ /* clips belonging to the same track must have start times in non decreasing
+ * order */
+ flow = push_clip ("clip-1", "default", "1000:00:00.000", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-1", "default", 3600 * 1000 * GST_SECOND, 0);
+
+ /* this will make the encoder throw an error message */
+ flow = push_clip ("clip-2", "default", "5.678", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ flow = push_clip ("clip-3", "default", "1000:00:00.001", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-3", "default",
+ 3600 * 1000 * GST_SECOND + 1 * GST_MSECOND, 3600 * 1000 * GST_SECOND);
+
+ /* tracks don't interfere with each other */
+ flow = push_clip ("clip-4", "othertrack", "9.123", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("clip-4", "othertrack", 9 * GST_SECOND + 123 * GST_MSECOND, 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_time_parsing)
+{
+ check_headers ();
+
+ flow = push_clip ("bad-msecs", "default", "0.1000", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ flow = push_clip ("bad-secs", "default", "00:00:60.123", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ flow = push_clip ("bad-minutes", "default", "00:60:12.345", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* this fails since we can't store 5124096 * 3600 * GST_SECOND in a
+ * GstClockTime */
+ flow = push_clip ("bad-hours", "default", "5124096:00:00.000", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_time_limits)
+{
+ check_headers ();
+
+ /* ugly hack to make sure that the following checks actually overflow parsing
+ * the times in gst_cmml_clock_time_from_npt rather than converting them to
+ * granulepos in gst_cmml_clock_time_to_granule */
+ granuleshift = 64;
+ g_object_set (cmmlenc, "granule-shift", granuleshift, NULL);
+
+ /* 5124095:34:33.709 is the max npt-hhmmss time representable with
+ * GstClockTime */
+ flow = push_clip ("max-npt-hhmmss", "foo", "5124095:34:33.709", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("max-npt-hhmmss", "foo",
+ (GstClockTime) 5124095 * 3600 * GST_SECOND + 34 * 60 * GST_SECOND +
+ 33 * GST_SECOND + 709 * GST_MSECOND, 0);
+
+ flow = push_clip ("overflow-max-npt-hhmmss", "overflows",
+ "5124095:34:33.710", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* 18446744073.709 is the max ntp-sec time */
+ flow = push_clip ("max-npt-secs", "bar", "18446744073.709", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("max-npt-secs", "bar",
+ (GstClockTime) 5124095 * 3600 * GST_SECOND + 34 * 60 * GST_SECOND +
+ 33 * GST_SECOND + 709 * GST_MSECOND, 0);
+
+ /* overflow doing 18446744074 * GST_SECOND */
+ flow = push_clip ("overflow-max-npt-secs", "overflows",
+ "18446744074.000", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* overflow doing seconds + milliseconds */
+ flow = push_clip ("overflow-max-npt-secs-msecs", "overflows",
+ "18446744073.710", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+
+ /* reset granuleshift to 32 to check keyoffset overflows in
+ * gst_cmml_clock_time_to_granule */
+ granuleshift = 32;
+ g_object_set (cmmlenc, "granule-shift", granuleshift, NULL);
+
+ /* 1193:02:47.295 is the max time we can encode in the keyoffset part of a
+ * granulepos given a granuleshift of 32 */
+ flow = push_clip ("max-granule-keyoffset", "baz", "1193:02:47.295", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_OK);
+ check_clip ("max-granule-keyoffset", "baz",
+ 1193 * 3600 * GST_SECOND + 2 * 60 * GST_SECOND +
+ 47 * GST_SECOND + 295 * GST_MSECOND, 0);
+
+ flow = push_clip ("overflow-max-granule-keyoffset", "overflows",
+ "1193:02:47.296", NULL);
+ fail_unless_equals_flow_return (flow, GST_FLOW_ERROR);
+}
+
+GST_END_TEST;
+
+static Suite *
+cmmlenc_suite (void)
+{
+ Suite *s = suite_create ("cmmlenc");
+ TCase *tc_general = tcase_create ("general");
+
+ suite_add_tcase (s, tc_general);
+ tcase_add_checked_fixture (tc_general, setup_cmmlenc, teardown_cmmlenc);
+ tcase_add_test (tc_general, test_enc);
+ tcase_add_test (tc_general, test_clip_end_time);
+ tcase_add_test (tc_general, test_time_order);
+ tcase_add_test (tc_general, test_time_parsing);
+ tcase_add_test (tc_general, test_time_limits);
+
+ return s;
+}
+
+GST_CHECK_MAIN (cmmlenc);
diff --git a/tests/check/elements/deinterlace.c b/tests/check/elements/deinterlace.c
new file mode 100644
index 0000000..6aeb3de
--- /dev/null
+++ b/tests/check/elements/deinterlace.c
@@ -0,0 +1,445 @@
+/* GStreamer unit tests for the deinterlace element
+ * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+
+static gboolean
+gst_caps_is_interlaced (GstCaps * caps)
+{
+ GstStructure G_GNUC_UNUSED *structure;
+ gboolean interlaced = FALSE;
+
+ fail_unless (gst_caps_is_fixed (caps));
+ structure = gst_caps_get_structure (caps, 0);
+ fail_unless (gst_video_format_parse_caps_interlaced (caps, &interlaced));
+ return interlaced;
+}
+
+GST_START_TEST (test_create_and_unref)
+{
+ GstElement *deinterlace;
+
+ deinterlace = gst_element_factory_make ("deinterlace", NULL);
+ fail_unless (deinterlace != NULL);
+
+ gst_element_set_state (deinterlace, GST_STATE_NULL);
+ gst_object_unref (deinterlace);
+}
+
+GST_END_TEST;
+
+#define CAPS_VIDEO_COMMON \
+ "width=(int)800, height=(int)600, framerate=(fraction)15/1"
+
+#define CAPS_IMAGE_COMMON \
+ "width=(int)3200, height=(int)3400, framerate=(fraction)0/1"
+
+#define CAPS_YUY2 \
+ "video/x-raw-yuv, " \
+ CAPS_VIDEO_COMMON ", " \
+ "format=(fourcc)YUY2"
+
+#define CAPS_YUY2_INTERLACED \
+ CAPS_YUY2 ", " \
+ "interlaced=(boolean)true"
+
+#define CAPS_YVYU \
+ "video/x-raw-yuv, " \
+ CAPS_VIDEO_COMMON ", " \
+ "format=(fourcc)YVYU"
+
+#define CAPS_YVYU_INTERLACED \
+ CAPS_YVYU ", " \
+ "interlaced=(boolean)true"
+
+#define CAPS_YUY2_IMAGE \
+ "video/x-raw-yuv, " \
+ CAPS_IMAGE_COMMON ", " \
+ "format=(fourcc)YUY2"
+
+#define CAPS_YUY2_INTERLACED_IMAGE \
+ CAPS_YUY2_IMAGE ", " \
+ "interlaced=(boolean)true"
+
+#define CAPS_YVYU_IMAGE \
+ "video/x-raw-yuv, " \
+ CAPS_IMAGE_COMMON ", " \
+ "format=(fourcc)YVYU"
+
+#define CAPS_YVYU_INTERLACED_IMAGE \
+ CAPS_YVYU_IMAGE ", " \
+ "interlaced=(boolean)true"
+
+static GstElement *deinterlace;
+static GstPad *srcpad;
+static GstPad *sinkpad;
+
+static GstElement *pipeline;
+
+/* sets up deinterlace and shortcut pointers to its pads */
+static void
+setup_deinterlace (void)
+{
+ deinterlace = gst_element_factory_make ("deinterlace", NULL);
+ fail_unless (deinterlace != NULL);
+
+ sinkpad = gst_element_get_static_pad (deinterlace, "sink");
+ fail_unless (sinkpad != NULL);
+ srcpad = gst_element_get_static_pad (deinterlace, "src");
+ fail_unless (srcpad != NULL);
+}
+
+/* sets up a basic test pipeline containing:
+ *
+ * videotestsrc ! capsfilter ! deinterlace ! fakesink
+ *
+ * The parameters set the capsfilter caps and the num-buffers
+ * property of videotestsrc
+ *
+ * It is useful for adding buffer probes to deinterlace pads
+ * and validating inputs/outputs
+ */
+static void
+setup_test_pipeline (gint mode, GstCaps * infiltercaps, GstCaps * outfiltercaps,
+ gint numbuffers)
+{
+ GstElement *src;
+ GstElement *infilter;
+ GstElement *outfilter;
+ GstElement *sink;
+
+ setup_deinterlace ();
+
+ pipeline = gst_pipeline_new ("pipeline");
+ src = gst_element_factory_make ("videotestsrc", NULL);
+ infilter = gst_element_factory_make ("capsfilter", "infilter");
+ outfilter = gst_element_factory_make ("capsfilter", "outfilter");
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_if (src == NULL);
+ fail_if (infilter == NULL);
+ fail_if (outfilter == NULL);
+ fail_if (sink == NULL);
+
+ fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+ fail_unless (gst_bin_add (GST_BIN (pipeline), infilter));
+ fail_unless (gst_bin_add (GST_BIN (pipeline), deinterlace));
+ fail_unless (gst_bin_add (GST_BIN (pipeline), outfilter));
+ fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+
+ /* set the properties */
+ g_object_set (deinterlace, "mode", mode, NULL);
+ if (numbuffers > 0)
+ g_object_set (src, "num-buffers", numbuffers, NULL);
+ if (infiltercaps)
+ g_object_set (infilter, "caps", infiltercaps, NULL);
+ if (outfiltercaps)
+ g_object_set (outfilter, "caps", outfiltercaps, NULL);
+
+ fail_unless (gst_element_link_many (src, infilter, deinterlace, outfilter,
+ sink, NULL));
+ if (infiltercaps)
+ gst_caps_unref (infiltercaps);
+ if (outfiltercaps)
+ gst_caps_unref (outfiltercaps);
+}
+
+/*
+ * Checks if 2 buffers are equal
+ *
+ * Equals means same caps and same data
+ */
+static gboolean
+test_buffer_equals (GstBuffer * buf_a, GstBuffer * buf_b)
+{
+ GstCaps *caps_a;
+ GstCaps *caps_b;
+
+ if (GST_BUFFER_SIZE (buf_a) != GST_BUFFER_SIZE (buf_b))
+ return FALSE;
+
+ caps_a = gst_buffer_get_caps (buf_a);
+ caps_b = gst_buffer_get_caps (buf_b);
+
+ if (!gst_caps_is_equal (caps_a, caps_b))
+ return FALSE;
+
+ gst_caps_unref (caps_a);
+ gst_caps_unref (caps_b);
+
+ return memcmp (GST_BUFFER_DATA (buf_a), GST_BUFFER_DATA (buf_b),
+ GST_BUFFER_SIZE (buf_a)) == 0;
+}
+
+static gboolean
+sinkpad_enqueue_buffer (GstPad * pad, GstBuffer * buf, gpointer data)
+{
+ GQueue *queue = (GQueue *) data;
+
+ /* enqueue a copy for being compared later */
+ g_queue_push_tail (queue, gst_buffer_copy (buf));
+
+ return TRUE;
+}
+
+/*
+ * pad buffer probe that compares the buffer with the top one
+ * in the GQueue passed as the user data
+ */
+static gboolean
+srcpad_dequeue_and_compare_buffer (GstPad * pad, GstBuffer * buf, gpointer data)
+{
+ GQueue *queue = (GQueue *) data;
+ GstBuffer *queue_buf;
+
+ queue_buf = (GstBuffer *) g_queue_pop_head (queue);
+ fail_if (queue_buf == NULL);
+
+ fail_unless (test_buffer_equals (buf, queue_buf));
+
+ gst_buffer_unref (queue_buf);
+
+ return TRUE;
+}
+
+/*
+ * Utility function that sets up a pipeline with deinterlace for
+ * validanting that it operates in passthrough mode when receiving
+ * data with 'infiltercaps' as the input caps and operating in 'mode' mode
+ */
+static void
+deinterlace_check_passthrough (gint mode, const gchar * infiltercaps)
+{
+ GstMessage *msg;
+ GQueue *queue;
+ GstCaps *incaps = NULL;
+
+ if (infiltercaps)
+ incaps = gst_caps_from_string (infiltercaps);
+
+ setup_test_pipeline (mode, incaps, NULL, 20);
+
+ queue = g_queue_new ();
+
+ /* set up probes for testing */
+ gst_pad_add_buffer_probe (sinkpad, (GCallback) sinkpad_enqueue_buffer, queue);
+ gst_pad_add_buffer_probe (srcpad,
+ (GCallback) srcpad_dequeue_and_compare_buffer, queue);
+
+ fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING) !=
+ GST_STATE_CHANGE_FAILURE);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ gst_message_unref (msg);
+
+ /* queue should be empty */
+ fail_unless (g_queue_is_empty (queue));
+
+ fail_unless (gst_element_set_state (pipeline, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (pipeline);
+ g_queue_free (queue);
+}
+
+/*
+ * Sets the caps on deinterlace sinkpad and validates the
+ * caps that is set on the srcpad
+ */
+static void
+deinterlace_set_caps_and_check (GstCaps * input, gboolean must_deinterlace)
+{
+ GstCaps *othercaps = NULL;
+
+ fail_unless (gst_pad_set_caps (sinkpad, input));
+ g_object_get (srcpad, "caps", &othercaps, NULL);
+
+ if (must_deinterlace) {
+ fail_if (gst_caps_is_interlaced (othercaps));
+ } else {
+ GstStructure *s;
+
+ fail_unless (gst_caps_is_interlaced (input) ==
+ gst_caps_is_interlaced (othercaps));
+
+ othercaps = gst_caps_make_writable (othercaps);
+ s = gst_caps_get_structure (othercaps, 0);
+ gst_structure_remove_field (s, "interlaced");
+
+ input = gst_caps_make_writable (input);
+ s = gst_caps_get_structure (input, 0);
+ gst_structure_remove_field (s, "interlaced");
+
+ fail_unless (gst_caps_is_equal (input, othercaps));
+ }
+ gst_caps_unref (input);
+ gst_caps_unref (othercaps);
+}
+
+static void
+deinterlace_set_string_caps_and_check (const gchar * input,
+ gboolean must_deinterlace)
+{
+ deinterlace_set_caps_and_check (gst_caps_from_string (input),
+ must_deinterlace);
+}
+
+GST_START_TEST (test_mode_auto_accept_caps)
+{
+ setup_deinterlace ();
+
+ /* auto mode */
+ g_object_set (deinterlace, "mode", 0, NULL);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* try to set non interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, FALSE);
+
+ /* now try to set interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, TRUE);
+
+ /* cleanup */
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (deinterlace);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mode_forced_accept_caps)
+{
+ setup_deinterlace ();
+
+ /* forced mode */
+ g_object_set (deinterlace, "mode", 1, NULL);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* try to set non interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, TRUE);
+
+ /* now try to set interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, TRUE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, TRUE);
+
+ /* cleanup */
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (deinterlace);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mode_disabled_accept_caps)
+{
+ setup_deinterlace ();
+
+ /* disabled mode */
+ g_object_set (deinterlace, "mode", 2, NULL);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_PLAYING) ==
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* try to set non interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_IMAGE, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_IMAGE, FALSE);
+
+ /* now try to set interlaced caps */
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YVYU_INTERLACED_IMAGE, FALSE);
+ deinterlace_set_string_caps_and_check (CAPS_YUY2_INTERLACED_IMAGE, FALSE);
+
+ /* cleanup */
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
+ fail_unless (gst_element_set_state (deinterlace, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (deinterlace);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mode_disabled_passthrough)
+{
+ /* 2 is disabled mode */
+ deinterlace_check_passthrough (2, CAPS_YUY2_INTERLACED);
+ deinterlace_check_passthrough (2, CAPS_YVYU_INTERLACED);
+ deinterlace_check_passthrough (2, CAPS_YUY2);
+ deinterlace_check_passthrough (2, CAPS_YVYU);
+
+ deinterlace_check_passthrough (2, CAPS_YUY2_INTERLACED_IMAGE);
+ deinterlace_check_passthrough (2, CAPS_YVYU_INTERLACED_IMAGE);
+ deinterlace_check_passthrough (2, CAPS_YUY2_IMAGE);
+ deinterlace_check_passthrough (2, CAPS_YVYU_IMAGE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_mode_auto_deinterlaced_passthrough)
+{
+ /* 0 is auto mode */
+ deinterlace_check_passthrough (0, CAPS_YUY2);
+ deinterlace_check_passthrough (0, CAPS_YVYU);
+ deinterlace_check_passthrough (0, CAPS_YUY2_IMAGE);
+ deinterlace_check_passthrough (0, CAPS_YVYU_IMAGE);
+}
+
+GST_END_TEST;
+
+static Suite *
+deinterlace_suite (void)
+{
+ Suite *s = suite_create ("deinterlace");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_set_timeout (tc_chain, 180);
+ tcase_add_test (tc_chain, test_create_and_unref);
+ tcase_add_test (tc_chain, test_mode_auto_accept_caps);
+ tcase_add_test (tc_chain, test_mode_forced_accept_caps);
+ tcase_add_test (tc_chain, test_mode_disabled_accept_caps);
+ tcase_add_test (tc_chain, test_mode_disabled_passthrough);
+ tcase_add_test (tc_chain, test_mode_auto_deinterlaced_passthrough);
+
+ return s;
+}
+
+GST_CHECK_MAIN (deinterlace);
diff --git a/tests/check/elements/deinterleave.c b/tests/check/elements/deinterleave.c
new file mode 100644
index 0000000..3a0eb0c
--- /dev/null
+++ b/tests/check/elements/deinterleave.c
@@ -0,0 +1,559 @@
+/* GStreamer unit tests for the interleave element
+ * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <gst/check/gstcheck.h>
+#include <gst/audio/multichannel.h>
+
+GST_START_TEST (test_create_and_unref)
+{
+ GstElement *deinterleave;
+
+ deinterleave = gst_element_factory_make ("deinterleave", NULL);
+ fail_unless (deinterleave != NULL);
+
+ gst_element_set_state (deinterleave, GST_STATE_NULL);
+ gst_object_unref (deinterleave);
+}
+
+GST_END_TEST;
+
+static GstPad *mysrcpad, **mysinkpads;
+static gint nsinkpads;
+static GstBus *bus;
+static GstElement *deinterleave;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "width = (int) 32, "
+ "channels = (int) 1, "
+ "rate = (int) {32000, 48000}, " "endianness = (int) BYTE_ORDER"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "width = (int) 32, "
+ "channels = (int) { 2, 3 }, "
+ "rate = (int) {32000, 48000}, " "endianness = (int) BYTE_ORDER"));
+
+#define CAPS_32khz \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "channels = (int) 2, " \
+ "rate = (int) 32000, " \
+ "endianness = (int) BYTE_ORDER"
+
+#define CAPS_48khz \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "channels = (int) 2, " \
+ "rate = (int) 48000, " \
+ "endianness = (int) BYTE_ORDER"
+
+#define CAPS_48khz_3CH \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "channels = (int) 3, " \
+ "rate = (int) 48000, " \
+ "endianness = (int) BYTE_ORDER"
+
+static GstFlowReturn
+deinterleave_chain_func (GstPad * pad, GstBuffer * buffer)
+{
+ gint i;
+ gfloat *indata;
+
+ fail_unless (GST_IS_BUFFER (buffer));
+ fail_unless_equals_int (GST_BUFFER_SIZE (buffer), 48000 * sizeof (gfloat));
+ fail_unless (GST_BUFFER_DATA (buffer) != NULL);
+
+ indata = (gfloat *) GST_BUFFER_DATA (buffer);
+
+ if (strcmp (GST_PAD_NAME (pad), "sink0") == 0) {
+ for (i = 0; i < 48000; i++)
+ fail_unless_equals_float (indata[i], -1.0);
+ } else if (strcmp (GST_PAD_NAME (pad), "sink1") == 0) {
+ for (i = 0; i < 48000; i++)
+ fail_unless_equals_float (indata[i], 1.0);
+ } else {
+ g_assert_not_reached ();
+ }
+
+ gst_buffer_unref (buffer);
+
+ return GST_FLOW_OK;
+}
+
+static void
+deinterleave_pad_added (GstElement * src, GstPad * pad, gpointer data)
+{
+ gchar *name;
+ gint link = GPOINTER_TO_INT (data);
+
+ if (nsinkpads >= link)
+ return;
+
+ name = g_strdup_printf ("sink%d", nsinkpads);
+
+ mysinkpads[nsinkpads] =
+ gst_pad_new_from_static_template (&sinktemplate, name);
+ g_free (name);
+ fail_if (mysinkpads[nsinkpads] == NULL);
+
+ gst_pad_set_chain_function (mysinkpads[nsinkpads], deinterleave_chain_func);
+ fail_unless (gst_pad_link (pad, mysinkpads[nsinkpads]) == GST_PAD_LINK_OK);
+ gst_pad_set_active (mysinkpads[nsinkpads], TRUE);
+ nsinkpads++;
+}
+
+GST_START_TEST (test_2_channels)
+{
+ GstPad *sinkpad;
+ gint i;
+ GstBuffer *inbuf;
+ GstCaps *caps;
+ gfloat *indata;
+
+ mysinkpads = g_new0 (GstPad *, 2);
+ nsinkpads = 0;
+
+ deinterleave = gst_element_factory_make ("deinterleave", NULL);
+ fail_unless (deinterleave != NULL);
+
+ mysrcpad = gst_pad_new_from_static_template (&srctemplate, "src");
+ fail_unless (mysrcpad != NULL);
+
+ caps = gst_caps_from_string (CAPS_48khz);
+ fail_unless (gst_pad_set_caps (mysrcpad, caps));
+ gst_pad_use_fixed_caps (mysrcpad);
+
+ sinkpad = gst_element_get_static_pad (deinterleave, "sink");
+ fail_unless (sinkpad != NULL);
+ fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK);
+ g_object_unref (sinkpad);
+
+ g_signal_connect (deinterleave, "pad-added",
+ G_CALLBACK (deinterleave_pad_added), GINT_TO_POINTER (2));
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (deinterleave, bus);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ inbuf = gst_buffer_new_and_alloc (2 * 48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 2 * 48000; i += 2) {
+ indata[i] = -1.0;
+ indata[i + 1] = 1.0;
+ }
+ gst_buffer_set_caps (inbuf, caps);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuf) == GST_FLOW_OK);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ for (i = 0; i < nsinkpads; i++)
+ g_object_unref (mysinkpads[i]);
+ g_free (mysinkpads);
+ mysinkpads = NULL;
+
+ g_object_unref (deinterleave);
+ g_object_unref (bus);
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_2_channels_1_linked)
+{
+ GstPad *sinkpad;
+ gint i;
+ GstBuffer *inbuf;
+ GstCaps *caps;
+ gfloat *indata;
+
+ nsinkpads = 0;
+ mysinkpads = g_new0 (GstPad *, 2);
+
+ deinterleave = gst_element_factory_make ("deinterleave", NULL);
+ fail_unless (deinterleave != NULL);
+
+ mysrcpad = gst_pad_new_from_static_template (&srctemplate, "src");
+ fail_unless (mysrcpad != NULL);
+
+ caps = gst_caps_from_string (CAPS_48khz);
+ fail_unless (gst_pad_set_caps (mysrcpad, caps));
+ gst_pad_use_fixed_caps (mysrcpad);
+
+ sinkpad = gst_element_get_static_pad (deinterleave, "sink");
+ fail_unless (sinkpad != NULL);
+ fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK);
+ g_object_unref (sinkpad);
+
+ g_signal_connect (deinterleave, "pad-added",
+ G_CALLBACK (deinterleave_pad_added), GINT_TO_POINTER (1));
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (deinterleave, bus);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ inbuf = gst_buffer_new_and_alloc (2 * 48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 2 * 48000; i += 2) {
+ indata[i] = -1.0;
+ indata[i + 1] = 1.0;
+ }
+ gst_buffer_set_caps (inbuf, caps);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuf) == GST_FLOW_OK);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ for (i = 0; i < nsinkpads; i++)
+ g_object_unref (mysinkpads[i]);
+ g_free (mysinkpads);
+ mysinkpads = NULL;
+
+ g_object_unref (deinterleave);
+ g_object_unref (bus);
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_2_channels_caps_change)
+{
+ GstPad *sinkpad;
+ GstCaps *caps, *caps2;
+ gint i;
+ GstBuffer *inbuf;
+ gfloat *indata;
+
+ nsinkpads = 0;
+ mysinkpads = g_new0 (GstPad *, 2);
+
+ deinterleave = gst_element_factory_make ("deinterleave", NULL);
+ fail_unless (deinterleave != NULL);
+
+ mysrcpad = gst_pad_new_from_static_template (&srctemplate, "src");
+ fail_unless (mysrcpad != NULL);
+
+ caps = gst_caps_from_string (CAPS_48khz);
+ fail_unless (gst_pad_set_caps (mysrcpad, caps));
+ gst_pad_use_fixed_caps (mysrcpad);
+
+ sinkpad = gst_element_get_static_pad (deinterleave, "sink");
+ fail_unless (sinkpad != NULL);
+ fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK);
+ g_object_unref (sinkpad);
+
+ g_signal_connect (deinterleave, "pad-added",
+ G_CALLBACK (deinterleave_pad_added), GINT_TO_POINTER (2));
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (deinterleave, bus);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ inbuf = gst_buffer_new_and_alloc (2 * 48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 2 * 48000; i += 2) {
+ indata[i] = -1.0;
+ indata[i + 1] = 1.0;
+ }
+ gst_buffer_set_caps (inbuf, caps);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuf) == GST_FLOW_OK);
+
+ caps2 = gst_caps_from_string (CAPS_32khz);
+ gst_pad_set_caps (mysrcpad, caps2);
+
+ inbuf = gst_buffer_new_and_alloc (2 * 48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 2 * 48000; i += 2) {
+ indata[i] = -1.0;
+ indata[i + 1] = 1.0;
+ }
+ gst_buffer_set_caps (inbuf, caps2);
+
+ /* Should work fine because the caps changed in a compatible way */
+ fail_unless (gst_pad_push (mysrcpad, inbuf) == GST_FLOW_OK);
+
+ gst_caps_unref (caps2);
+
+ caps2 = gst_caps_from_string (CAPS_48khz_3CH);
+ gst_pad_set_caps (mysrcpad, caps2);
+
+ inbuf = gst_buffer_new_and_alloc (3 * 48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 3 * 48000; i += 3) {
+ indata[i] = -1.0;
+ indata[i + 1] = 1.0;
+ indata[i + 2] = 0.0;
+ }
+ gst_buffer_set_caps (inbuf, caps2);
+
+ /* Should break because the caps changed in an incompatible way */
+ fail_if (gst_pad_push (mysrcpad, inbuf) == GST_FLOW_OK);
+
+ fail_unless (gst_element_set_state (deinterleave,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ for (i = 0; i < nsinkpads; i++)
+ g_object_unref (mysinkpads[i]);
+ g_free (mysinkpads);
+ mysinkpads = NULL;
+
+ g_object_unref (deinterleave);
+ g_object_unref (bus);
+ gst_caps_unref (caps);
+ gst_caps_unref (caps2);
+}
+
+GST_END_TEST;
+
+
+#define SAMPLES_PER_BUFFER 10
+#define NUM_CHANNELS 8
+#define SAMPLE_RATE 44100
+
+static guint pads_created;
+
+static void
+set_channel_positions (GstCaps * caps, int channels,
+ GstAudioChannelPosition * channelpositions)
+{
+ GValue chanpos = { 0 };
+ GValue pos = { 0 };
+ GstStructure *structure = gst_caps_get_structure (caps, 0);
+ int c;
+
+ g_value_init (&chanpos, GST_TYPE_ARRAY);
+ g_value_init (&pos, GST_TYPE_AUDIO_CHANNEL_POSITION);
+
+ for (c = 0; c < channels; c++) {
+ g_value_set_enum (&pos, channelpositions[c]);
+ gst_value_array_append_value (&chanpos, &pos);
+ }
+ g_value_unset (&pos);
+
+ gst_structure_set_value (structure, "channel-positions", &chanpos);
+ g_value_unset (&chanpos);
+}
+
+static void
+src_handoff_float32_8ch (GstElement * src, GstBuffer * buf, GstPad * pad,
+ gpointer user_data)
+{
+ GstAudioChannelPosition layout[NUM_CHANNELS];
+ GstCaps *caps;
+ gfloat *data;
+ guint size, i, c;
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "width", G_TYPE_INT, 32,
+ "depth", G_TYPE_INT, 32,
+ "channels", G_TYPE_INT, NUM_CHANNELS,
+ "rate", G_TYPE_INT, SAMPLE_RATE,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
+
+ for (i = 0; i < NUM_CHANNELS; ++i)
+ layout[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
+
+ set_channel_positions (caps, NUM_CHANNELS, layout);
+
+ size = sizeof (gfloat) * SAMPLES_PER_BUFFER * NUM_CHANNELS;
+ data = (gfloat *) g_malloc (size);
+
+ GST_BUFFER_MALLOCDATA (buf) = (guint8 *) data;
+ GST_BUFFER_DATA (buf) = (guint8 *) data;
+ GST_BUFFER_SIZE (buf) = size;
+
+ GST_BUFFER_OFFSET (buf) = 0;
+ GST_BUFFER_TIMESTAMP (buf) = 0;
+
+ GST_BUFFER_CAPS (buf) = caps;
+
+ for (i = 0; i < SAMPLES_PER_BUFFER; ++i) {
+ for (c = 0; c < NUM_CHANNELS; ++c) {
+ *data = (gfloat) ((i * NUM_CHANNELS) + c);
+ ++data;
+ }
+ }
+}
+
+static gboolean
+float_buffer_check_probe (GstPad * pad, GstBuffer * buf, gpointer userdata)
+{
+ gfloat *data;
+ guint padnum, numpads;
+ guint num, i;
+ GstCaps *caps;
+ GstStructure *s;
+ GstAudioChannelPosition *pos;
+ gint channels;
+
+ fail_unless_equals_int (sscanf (GST_PAD_NAME (pad), "src%u", &padnum), 1);
+
+ numpads = pads_created;
+
+ /* Check caps */
+ caps = GST_BUFFER_CAPS (buf);
+ fail_unless (caps != NULL);
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (gst_structure_get_int (s, "channels", &channels));
+ fail_unless_equals_int (channels, 1);
+ fail_unless (gst_structure_has_field (s, "channel-positions"));
+ pos = gst_audio_get_channel_positions (s);
+ fail_unless (pos != NULL && pos[0] == GST_AUDIO_CHANNEL_POSITION_NONE);
+ g_free (pos);
+
+ data = (gfloat *) GST_BUFFER_DATA (buf);
+ num = GST_BUFFER_SIZE (buf) / sizeof (gfloat);
+
+ /* Check buffer content */
+ for (i = 0; i < num; ++i) {
+ guint val, rest;
+
+ val = (guint) data[i];
+ GST_LOG ("%s[%u]: %8f", GST_PAD_NAME (pad), i, data[i]);
+ /* can't use the modulo operator in the assertion statement, since due to
+ * the way it gets expanded it would be interpreted as a printf operator
+ * in the failure case, which will result in segfaults */
+ rest = val % numpads;
+ /* check that the first channel is on pad src0, the second on src1 etc. */
+ fail_unless_equals_int (rest, padnum);
+ }
+
+ return TRUE; /* don't drop data */
+}
+
+static void
+pad_added_setup_data_check_float32_8ch_cb (GstElement * deinterleave,
+ GstPad * pad, GstElement * pipeline)
+{
+ GstElement *queue, *sink;
+ GstPad *sinkpad;
+
+ queue = gst_element_factory_make ("queue", NULL);
+ fail_unless (queue != NULL);
+
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (sink != NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), queue, sink, NULL);
+ fail_unless (gst_element_link_many (queue, sink, NULL));
+
+ sinkpad = gst_element_get_static_pad (queue, "sink");
+ fail_unless_equals_int (gst_pad_link (pad, sinkpad), GST_PAD_LINK_OK);
+ gst_object_unref (sinkpad);
+
+ gst_pad_add_buffer_probe (pad, G_CALLBACK (float_buffer_check_probe), NULL);
+
+ gst_element_set_state (sink, GST_STATE_PLAYING);
+ gst_element_set_state (queue, GST_STATE_PLAYING);
+
+ GST_LOG ("new pad: %s", GST_PAD_NAME (pad));
+ ++pads_created;
+}
+
+static GstElement *
+make_fake_src_8chans_float32 (void)
+{
+ GstElement *src;
+
+ src = gst_element_factory_make ("fakesrc", "src");
+ fail_unless (src != NULL, "failed to create fakesrc element");
+
+ g_object_set (src, "num-buffers", 1, NULL);
+ g_object_set (src, "signal-handoffs", TRUE, NULL);
+
+ g_signal_connect (src, "handoff", G_CALLBACK (src_handoff_float32_8ch), NULL);
+
+ return src;
+}
+
+GST_START_TEST (test_8_channels_float32)
+{
+ GstElement *pipeline, *src, *deinterleave;
+ GstMessage *msg;
+
+ pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL, "failed to create pipeline");
+
+ src = make_fake_src_8chans_float32 ();
+
+ deinterleave = gst_element_factory_make ("deinterleave", "deinterleave");
+ fail_unless (deinterleave != NULL, "failed to create deinterleave element");
+ g_object_set (deinterleave, "keep-positions", TRUE, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, deinterleave, NULL);
+
+ fail_unless (gst_element_link (src, deinterleave),
+ "failed to link src <=> deinterleave");
+
+ g_signal_connect (deinterleave, "pad-added",
+ G_CALLBACK (pad_added_setup_data_check_float32_8ch_cb), pipeline);
+
+ pads_created = 0;
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ gst_message_unref (msg);
+
+ fail_unless_equals_int (pads_created, NUM_CHANNELS);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static Suite *
+deinterleave_suite (void)
+{
+ Suite *s = suite_create ("deinterleave");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_set_timeout (tc_chain, 180);
+ tcase_add_test (tc_chain, test_create_and_unref);
+ tcase_add_test (tc_chain, test_2_channels);
+ tcase_add_test (tc_chain, test_2_channels_1_linked);
+ tcase_add_test (tc_chain, test_2_channels_caps_change);
+ tcase_add_test (tc_chain, test_8_channels_float32);
+
+ return s;
+}
+
+GST_CHECK_MAIN (deinterleave);
diff --git a/tests/check/elements/equalizer.c b/tests/check/elements/equalizer.c
new file mode 100644
index 0000000..29b2e38
--- /dev/null
+++ b/tests/check/elements/equalizer.c
@@ -0,0 +1,327 @@
+/* GStreamer
+ *
+ * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * equalizer.c: Unit test for the equalizer element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/gst.h>
+#include <gst/base/gstbasetransform.h>
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define EQUALIZER_CAPS_STRING \
+ "audio/x-raw-float, " \
+ "channels = (int) 1, " \
+ "rate = (int) 48000, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 64" \
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 48000, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) 64 ")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "channels = (int) 1, "
+ "rate = (int) 48000, "
+ "endianness = (int) BYTE_ORDER, " "width = (int) 64 ")
+ );
+
+static GstElement *
+setup_equalizer (void)
+{
+ GstElement *equalizer;
+
+ GST_DEBUG ("setup_equalizer");
+ equalizer = gst_check_setup_element ("equalizer-nbands");
+ mysrcpad = gst_check_setup_src_pad (equalizer, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (equalizer, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return equalizer;
+}
+
+static void
+cleanup_equalizer (GstElement * equalizer)
+{
+ GST_DEBUG ("cleanup_equalizer");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (equalizer);
+ gst_check_teardown_sink_pad (equalizer);
+ gst_check_teardown_element (equalizer);
+}
+
+GST_START_TEST (test_equalizer_5bands_passthrough)
+{
+ GstElement *equalizer;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ gdouble *in, *res;
+ gint i;
+
+ equalizer = setup_equalizer ();
+ g_object_set (G_OBJECT (equalizer), "num-bands", 5, NULL);
+
+ fail_unless_equals_int (gst_child_proxy_get_children_count (GST_CHILD_PROXY
+ (equalizer)), 5);
+
+ fail_unless (gst_element_set_state (equalizer,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = g_random_double_range (-1.0, 1.0);
+
+ caps = gst_caps_from_string (EQUALIZER_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) == 1);
+
+ res = (gdouble *) GST_BUFFER_DATA (GST_BUFFER (buffers->data));
+
+ for (i = 0; i < 1024; i++)
+ fail_unless_equals_float (in[i], res[i]);
+
+ /* cleanup */
+ cleanup_equalizer (equalizer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_equalizer_5bands_minus_24)
+{
+ GstElement *equalizer;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms_in, rms_out;
+ gint i;
+
+ equalizer = setup_equalizer ();
+ g_object_set (G_OBJECT (equalizer), "num-bands", 5, NULL);
+
+ fail_unless_equals_int (gst_child_proxy_get_children_count (GST_CHILD_PROXY
+ (equalizer)), 5);
+
+ for (i = 0; i < 5; i++) {
+ GstObject *band =
+ gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
+ fail_unless (band != NULL);
+
+ g_object_set (G_OBJECT (band), "gain", -24.0, NULL);
+ g_object_unref (G_OBJECT (band));
+ }
+
+ fail_unless (gst_element_set_state (equalizer,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = g_random_double_range (-1.0, 1.0);
+
+ rms_in = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms_in += in[i] * in[i];
+ rms_in = sqrt (rms_in / 1024);
+
+ caps = gst_caps_from_string (EQUALIZER_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) == 1);
+
+ res = (gdouble *) GST_BUFFER_DATA (GST_BUFFER (buffers->data));
+
+ rms_out = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms_out += res[i] * res[i];
+ rms_out = sqrt (rms_out / 1024);
+
+ fail_unless (rms_in > rms_out);
+
+ /* cleanup */
+ cleanup_equalizer (equalizer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_equalizer_5bands_plus_12)
+{
+ GstElement *equalizer;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ gdouble *in, *res, rms_in, rms_out;
+ gint i;
+
+ equalizer = setup_equalizer ();
+ g_object_set (G_OBJECT (equalizer), "num-bands", 5, NULL);
+
+ fail_unless_equals_int (gst_child_proxy_get_children_count (GST_CHILD_PROXY
+ (equalizer)), 5);
+
+ for (i = 0; i < 5; i++) {
+ GstObject *band =
+ gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
+ fail_unless (band != NULL);
+
+ g_object_set (G_OBJECT (band), "gain", 12.0, NULL);
+ g_object_unref (G_OBJECT (band));
+ }
+
+ fail_unless (gst_element_set_state (equalizer,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1024 * sizeof (gdouble));
+ in = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (i = 0; i < 1024; i++)
+ in[i] = g_random_double_range (-1.0, 1.0);
+
+ rms_in = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms_in += in[i] * in[i];
+ rms_in = sqrt (rms_in / 1024);
+
+ caps = gst_caps_from_string (EQUALIZER_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()));
+ /* ... and puts a new buffer on the global list */
+ fail_unless (g_list_length (buffers) == 1);
+
+ res = (gdouble *) GST_BUFFER_DATA (GST_BUFFER (buffers->data));
+
+ rms_out = 0.0;
+ for (i = 0; i < 1024; i++)
+ rms_out += res[i] * res[i];
+ rms_out = sqrt (rms_out / 1024);
+
+ fail_unless (rms_in < rms_out);
+
+ /* cleanup */
+ cleanup_equalizer (equalizer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_equalizer_band_number_changing)
+{
+ GstElement *equalizer;
+ gint i;
+
+ equalizer = setup_equalizer ();
+
+ g_object_set (G_OBJECT (equalizer), "num-bands", 5, NULL);
+ fail_unless_equals_int (gst_child_proxy_get_children_count (GST_CHILD_PROXY
+ (equalizer)), 5);
+
+ for (i = 0; i < 5; i++) {
+ GstObject *band;
+
+ band = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
+ fail_unless (band != NULL);
+ gst_object_unref (band);
+ }
+
+ g_object_set (G_OBJECT (equalizer), "num-bands", 10, NULL);
+ fail_unless_equals_int (gst_child_proxy_get_children_count (GST_CHILD_PROXY
+ (equalizer)), 10);
+
+ for (i = 0; i < 10; i++) {
+ GstObject *band;
+
+ band = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
+ fail_unless (band != NULL);
+ gst_object_unref (band);
+ }
+
+ /* cleanup */
+ cleanup_equalizer (equalizer);
+}
+
+GST_END_TEST;
+
+static Suite *
+equalizer_suite (void)
+{
+ Suite *s = suite_create ("equalizer");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_equalizer_5bands_passthrough);
+ tcase_add_test (tc_chain, test_equalizer_5bands_minus_24);
+ tcase_add_test (tc_chain, test_equalizer_5bands_plus_12);
+ tcase_add_test (tc_chain, test_equalizer_band_number_changing);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = equalizer_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/flacparse.c b/tests/check/elements/flacparse.c
new file mode 100644
index 0000000..ebff9b4
--- /dev/null
+++ b/tests/check/elements/flacparse.c
@@ -0,0 +1,319 @@
+/*
+ * GStreamer
+ *
+ * unit test for flacparse
+ *
+ * Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "parser.h"
+
+#define SRC_CAPS_TMPL "audio/x-flac, framed=(boolean)false"
+#define SINK_CAPS_TMPL "audio/x-flac, framed=(boolean)true"
+
+GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_TMPL)
+ );
+
+GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_TMPL)
+ );
+
+/* some data */
+static guint8 streaminfo_header[] = {
+ 0x7f, 0x46, 0x4c, 0x41, 0x43, 0x01, 0x00, 0x00,
+ 0x02, 0x66, 0x4c, 0x61, 0x43, 0x00, 0x00, 0x00,
+ 0x22, 0x12, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0a, 0xc4, 0x40, 0xf0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00
+};
+
+static guint8 comment_header[] = {
+ 0x84, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+};
+
+static guint8 flac_frame[] = {
+ 0xff, 0xf8, 0xa9, 0x08, 0x00, 0x50, 0x18, 0x06,
+ 0x6a, 0x0c, 0xce, 0x13, 0x24, 0x19, 0x68, 0x00,
+ 0x46, 0x23, 0x08, 0xca, 0xcb, 0x58, 0x9c, 0x26,
+ 0x92, 0x30, 0xa6, 0x29, 0x8a, 0xca, 0xd1, 0x18,
+ 0xae, 0x26, 0x5c, 0x90, 0x60, 0xbf, 0x11, 0xad,
+ 0x43, 0x02, 0x06, 0x26, 0xbd, 0x35, 0xdd, 0xa3,
+ 0x11, 0xa6, 0x4d, 0x18, 0x8c, 0x9a, 0xe4, 0x62,
+ 0xd9, 0x23, 0x11, 0x8b, 0xcb, 0x56, 0x55, 0x45,
+ 0xc2, 0x18, 0x56, 0xa2, 0xe2, 0xe1, 0x18, 0x99,
+ 0x54, 0x98, 0x46, 0x4d, 0x08, 0x70, 0x9a, 0x64,
+ 0xc4, 0x18, 0x4f, 0x27, 0x64, 0x31, 0x66, 0x27,
+ 0x79, 0x19, 0x3c, 0x8c, 0x8c, 0xa3, 0x44, 0x18,
+ 0x23, 0xd2, 0x6b, 0x8b, 0x64, 0x8c, 0x21, 0x84,
+ 0xd6, 0x23, 0x13, 0x13, 0x2d, 0x44, 0xca, 0x5a,
+ 0x23, 0x09, 0x93, 0x25, 0x18, 0x10, 0x61, 0x38,
+ 0xb4, 0x60, 0x8f, 0x2c, 0x8d, 0x26, 0xb4, 0xc9,
+ 0xd9, 0x19, 0x19, 0x34, 0xd7, 0x31, 0x06, 0x10,
+ 0xc4, 0x30, 0x83, 0x17, 0xe2, 0x0c, 0x2c, 0xc4,
+ 0xc8, 0xc9, 0x3c, 0x5e, 0x93, 0x11, 0x8a, 0x62,
+ 0x64, 0x8c, 0x26, 0x23, 0x22, 0x30, 0x9a, 0x58,
+ 0x86, 0x04, 0x18, 0x4c, 0xab, 0x2b, 0x26, 0x5c,
+ 0x46, 0x88, 0xcb, 0xb1, 0x0d, 0x26, 0xbb, 0x5e,
+ 0x8c, 0xa7, 0x64, 0x31, 0x3d, 0x31, 0x06, 0x26,
+ 0x43, 0x17, 0xa3, 0x08, 0x61, 0x06, 0x17, 0xc4,
+ 0x62, 0xec, 0x4d, 0x4b, 0x2e, 0x2d, 0x4a, 0x94,
+ 0xa4, 0xc2, 0x31, 0x4c, 0x4c, 0x20, 0xc0, 0x83,
+ 0x14, 0x8c, 0x27, 0x8b, 0x31, 0x23, 0x2f, 0x23,
+ 0x11, 0x91, 0x94, 0x65, 0x1a, 0x20, 0xc2, 0x18,
+ 0x86, 0x51, 0x88, 0x62, 0x7c, 0x43, 0x2e, 0xa3,
+ 0x04, 0x18, 0x8c, 0x20, 0xc2, 0xf5, 0xaa, 0x94,
+ 0xc2, 0x31, 0x32, 0xd2, 0xb2, 0xa2, 0x30, 0xba,
+ 0x10, 0xc2, 0xb5, 0x89, 0xa5, 0x18, 0x10, 0x62,
+ 0x9a, 0x10, 0x61, 0x19, 0x72, 0x71, 0x1a, 0xb9,
+ 0x0c, 0x23, 0x46, 0x10, 0x62, 0x78, 0x81, 0x82,
+ 0x3d, 0x75, 0xea, 0x6b, 0x51, 0x8b, 0x61, 0x06,
+ 0x08, 0x62, 0x32, 0x5e, 0x84, 0x18, 0x27, 0x25,
+ 0xc2, 0x6a, 0x4b, 0x51, 0x31, 0x34, 0x5e, 0x29,
+ 0xa1, 0x3c, 0x4d, 0x26, 0x23, 0x10, 0xc2, 0x6b,
+ 0xb1, 0x0d, 0x11, 0xae, 0x46, 0x88, 0x31, 0x35,
+ 0xb1, 0x06, 0x08, 0x79, 0x7e, 0x4f, 0x53, 0x23,
+ 0x29, 0xa4, 0x30, 0x20, 0x30, 0x23, 0x5a, 0xb2,
+ 0xc8, 0x60, 0x9c, 0x93, 0x13, 0x17, 0x92, 0x98,
+ 0x46, 0x13, 0x54, 0x53, 0x08, 0xcb, 0x13, 0xa1,
+ 0x1a, 0x89, 0xe5, 0x46, 0x08, 0x18, 0x10, 0x30,
+ 0x9d, 0x68, 0xc2, 0x1c, 0x46, 0x46, 0xae, 0x62,
+ 0x1a, 0x46, 0x4e, 0x4d, 0x34, 0x8c, 0xbd, 0x26,
+ 0xc0, 0x40, 0x62, 0xc9, 0xa9, 0x31, 0x74, 0xa8,
+ 0x99, 0x52, 0xb0, 0x8c, 0xa9, 0x29, 0x84, 0x61,
+ 0x19, 0x54, 0x43, 0x02, 0x06, 0x04, 0x32, 0xe5,
+ 0x18, 0x21, 0x91, 0x8b, 0xf2, 0xcc, 0x10, 0x30,
+ 0x8e, 0x23, 0xc4, 0x76, 0x43, 0x08, 0x30, 0x83,
+ 0x08, 0x62, 0x6c, 0x4e, 0xe2, 0x35, 0x96, 0xd0,
+ 0x8e, 0x89, 0x97, 0x42, 0x18, 0x91, 0x84, 0x61,
+ 0x3c, 0x26, 0xa5, 0x2c, 0x4e, 0x17, 0x94, 0xb8,
+ 0xb5, 0xa4, 0xcb, 0x88, 0xc9, 0x84, 0x18, 0xb9,
+ 0x84, 0x19, 0x23, 0x2d, 0xa4, 0x64, 0x62, 0x18,
+ 0x86, 0x53, 0x93, 0xcb, 0x30, 0x8f, 0x2f, 0x93,
+ 0x55, 0xc4, 0xd7, 0x08, 0x62, 0xb8, 0x46, 0x84,
+ 0x68, 0xa3, 0x02, 0xaf, 0x33
+};
+
+static guint8 garbage_frame[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+
+GST_START_TEST (test_parse_flac_normal)
+{
+ gst_parser_test_normal (flac_frame, sizeof (flac_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_flac_drain_single)
+{
+ gst_parser_test_drain_single (flac_frame, sizeof (flac_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_flac_drain_garbage)
+{
+ /* We always output the after frame garbage too because we
+ * have no way of detecting it
+ */
+#if 0
+ gst_parser_test_drain_garbage (flac_frame, sizeof (flac_frame),
+ garbage_frame, sizeof (garbage_frame));
+#endif
+ guint8 frame[sizeof (flac_frame) + sizeof (garbage_frame)];
+
+ memcpy (frame, flac_frame, sizeof (flac_frame));
+ memcpy (frame + sizeof (flac_frame), garbage_frame, sizeof (garbage_frame));
+
+ gst_parser_test_drain_single (frame, sizeof (frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_flac_split)
+{
+ gst_parser_test_split (flac_frame, sizeof (flac_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_flac_skip_garbage)
+{
+ /* We always include the garbage into the frame because
+ * we have no easy way for finding the real end of the
+ * frame. The decoder will later skip the garbage
+ */
+#if 0
+ gst_parser_test_skip_garbage (flac_frame, sizeof (flac_frame),
+ garbage_frame, sizeof (garbage_frame));
+#endif
+ guint8 frame[sizeof (flac_frame) + sizeof (garbage_frame)];
+
+ memcpy (frame, flac_frame, sizeof (flac_frame));
+ memcpy (frame + sizeof (flac_frame), garbage_frame, sizeof (garbage_frame));
+
+ gst_parser_test_normal (frame, sizeof (frame));
+}
+
+GST_END_TEST;
+
+
+#define structure_get_int(s,f) \
+ (g_value_get_int(gst_structure_get_value(s,f)))
+#define fail_unless_structure_field_int_equals(s,field,num) \
+ fail_unless_equals_int (structure_get_int(s,field), num)
+/*
+ * Test if the parser handles raw stream and codec_data info properly.
+ */
+GST_START_TEST (test_parse_flac_detect_stream)
+{
+ GstCaps *caps;
+ GstStructure *s;
+ const GValue *streamheader;
+ GArray *bufarr;
+ gint i;
+
+ /* Push random data. It should get through since the parser should be
+ * initialized because it got codec_data in the caps */
+ caps = gst_parser_test_get_output_caps (flac_frame, sizeof (flac_frame),
+ SRC_CAPS_TMPL);
+ fail_unless (caps != NULL);
+
+ /* Check that the negotiated caps are as expected */
+ /* When codec_data is present, parser assumes that data is version 4 */
+ GST_LOG ("flac output caps: %" GST_PTR_FORMAT, caps);
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (gst_structure_has_name (s, "audio/x-flac"));
+ fail_unless_structure_field_int_equals (s, "channels", 1);
+ fail_unless_structure_field_int_equals (s, "rate", 44100);
+ fail_unless (gst_structure_has_field (s, "streamheader"));
+ streamheader = gst_structure_get_value (s, "streamheader");
+ fail_unless (G_VALUE_TYPE (streamheader) == GST_TYPE_ARRAY);
+ bufarr = g_value_peek_pointer (streamheader);
+ fail_unless (bufarr->len == 2);
+ for (i = 0; i < bufarr->len; i++) {
+ GstBuffer *buf;
+ GValue *bufval = &g_array_index (bufarr, GValue, i);
+
+ fail_unless (G_VALUE_TYPE (bufval) == GST_TYPE_BUFFER);
+ buf = g_value_peek_pointer (bufval);
+ if (i == 0) {
+ fail_unless (GST_BUFFER_SIZE (buf) == sizeof (streaminfo_header));
+ fail_unless (memcmp (GST_BUFFER_DATA (buf), streaminfo_header,
+ sizeof (streaminfo_header)) == 0);
+ } else if (i == 1) {
+ fail_unless (GST_BUFFER_SIZE (buf) == sizeof (comment_header));
+ fail_unless (memcmp (GST_BUFFER_DATA (buf), comment_header,
+ sizeof (comment_header)) == 0);
+ }
+ }
+
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_parse_flac_set_index)
+{
+ GstElement *parse;
+ GstIndex *idx;
+
+ idx = gst_index_factory_make ("memindex");
+ if (idx == NULL)
+ return;
+ parse = gst_element_factory_make ("flacparse", NULL);
+ fail_unless (parse != NULL);
+ gst_object_ref_sink (idx);
+ gst_element_set_index (parse, GST_INDEX (idx));
+ gst_object_unref (idx);
+ gst_object_unref (parse);
+}
+
+GST_END_TEST;
+
+static Suite *
+flacparse_suite (void)
+{
+ Suite *s = suite_create ("flacparse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_parse_flac_normal);
+ tcase_add_test (tc_chain, test_parse_flac_drain_single);
+ tcase_add_test (tc_chain, test_parse_flac_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_flac_split);
+ tcase_add_test (tc_chain, test_parse_flac_skip_garbage);
+
+ /* Other tests */
+ tcase_add_test (tc_chain, test_parse_flac_detect_stream);
+ tcase_add_test (tc_chain, test_parse_flac_set_index);
+
+ return s;
+}
+
+
+/*
+ * TODO:
+ * - Both push- and pull-modes need to be tested
+ * * Pull-mode & EOS
+ */
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = flacparse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ /* init test context */
+ ctx_factory = "flacparse";
+ ctx_sink_template = &sinktemplate;
+ ctx_src_template = &srctemplate;
+ ctx_discard = 3;
+ ctx_headers[0].data = streaminfo_header;
+ ctx_headers[0].size = sizeof (streaminfo_header);
+ ctx_headers[1].data = comment_header;
+ ctx_headers[1].size = sizeof (comment_header);
+ /* custom offsets, and ts always repeatedly 0 */
+ ctx_no_metadata = TRUE;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/flvdemux.c b/tests/check/elements/flvdemux.c
new file mode 100644
index 0000000..2fe8ab3
--- /dev/null
+++ b/tests/check/elements/flvdemux.c
@@ -0,0 +1,184 @@
+/* GStreamer unit tests for flvdemux
+ *
+ * Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+
+static void
+pad_added_cb (GstElement * flvdemux, GstPad * pad, GstBin * pipeline)
+{
+ GstElement *sink;
+
+ sink = gst_bin_get_by_name (pipeline, "fakesink");
+ fail_unless (gst_element_link (flvdemux, sink));
+ gst_object_unref (sink);
+
+ gst_element_set_state (sink, GST_STATE_PAUSED);
+}
+
+static GstBusSyncReply
+error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
+{
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ const gchar *file = (const gchar *) user_data;
+ GError *err = NULL;
+ gchar *dbg = NULL;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_error ("ERROR for %s: %s\n%s\n", file, err->message, dbg);
+ }
+
+ return GST_BUS_PASS;
+}
+
+static void
+handoff_cb (GstElement * element, GstBuffer * buf, GstPad * pad,
+ gint * p_counter)
+{
+ *p_counter += 1;
+ GST_LOG ("counter = %d", *p_counter);
+
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL);
+}
+
+static void
+process_file (const gchar * file, gboolean push_mode, gint repeat,
+ gint num_buffers)
+{
+ GstElement *src, *sep, *sink, *flvdemux, *pipeline;
+ GstBus *bus;
+ gchar *path;
+ gint counter;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL, "Failed to create pipeline!");
+
+ bus = gst_element_get_bus (pipeline);
+
+ /* kids, don't use a sync handler for this at home, really; we do because
+ * we just want to abort and nothing else */
+ gst_bus_set_sync_handler (bus, error_cb, (gpointer) file);
+
+ src = gst_element_factory_make ("filesrc", "filesrc");
+ fail_unless (src != NULL, "Failed to create 'filesrc' element!");
+
+ if (push_mode) {
+ sep = gst_element_factory_make ("queue", "queue");
+ fail_unless (sep != NULL, "Failed to create 'queue' element");
+ } else {
+ sep = gst_element_factory_make ("identity", "identity");
+ fail_unless (sep != NULL, "Failed to create 'identity' element");
+ }
+
+ flvdemux = gst_element_factory_make ("flvdemux", "flvdemux");
+ fail_unless (flvdemux != NULL, "Failed to create 'flvdemux' element!");
+
+ sink = gst_element_factory_make ("fakesink", "fakesink");
+ fail_unless (sink != NULL, "Failed to create 'fakesink' element!");
+
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (handoff_cb), &counter);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, sep, flvdemux, sink, NULL);
+
+ fail_unless (gst_element_link (src, sep));
+ fail_unless (gst_element_link (sep, flvdemux));
+
+ /* can't link flvdemux and sink yet, do that later */
+ g_signal_connect (flvdemux, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
+
+ path = g_build_filename (GST_TEST_FILES_PATH, file, NULL);
+ GST_LOG ("processing file '%s'", path);
+ g_object_set (src, "location", path, NULL);
+
+ do {
+ GstStateChangeReturn state_ret;
+ GstMessage *msg;
+
+ GST_LOG ("repeat=%d", repeat);
+
+ counter = 0;
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ if (state_ret == GST_STATE_CHANGE_ASYNC) {
+ GST_LOG ("waiting for pipeline to reach PAUSED state");
+ state_ret = gst_element_get_state (pipeline, NULL, NULL, -1);
+ fail_unless_equals_int (state_ret, GST_STATE_CHANGE_SUCCESS);
+ }
+
+ GST_LOG ("PAUSED, let's read all of it");
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ msg = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
+ fail_unless (msg != NULL, "Expected EOS message on bus! (%s)", file);
+
+ gst_message_unref (msg);
+
+ if (num_buffers >= 0) {
+ fail_unless_equals_int (counter, num_buffers);
+ }
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
+ --repeat;
+ } while (repeat > 0);
+
+ gst_object_unref (bus);
+ gst_object_unref (pipeline);
+
+ g_free (path);
+}
+
+GST_START_TEST (test_reuse_pull)
+{
+ process_file ("pcm16sine.flv", FALSE, 3, 129);
+ gst_task_cleanup_all ();
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_reuse_push)
+{
+ process_file ("pcm16sine.flv", TRUE, 3, 129);
+ gst_task_cleanup_all ();
+}
+
+GST_END_TEST;
+
+static Suite *
+flvdemux_suite (void)
+{
+ Suite *s = suite_create ("flvdemux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_reuse_push);
+ tcase_add_test (tc_chain, test_reuse_pull);
+
+ return s;
+}
+
+GST_CHECK_MAIN (flvdemux)
diff --git a/tests/check/elements/flvmux.c b/tests/check/elements/flvmux.c
new file mode 100644
index 0000000..fe10282
--- /dev/null
+++ b/tests/check/elements/flvmux.c
@@ -0,0 +1,161 @@
+/* GStreamer unit tests for flvmux
+ *
+ * Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+
+static GstBusSyncReply
+error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
+{
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err = NULL;
+ gchar *dbg = NULL;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_error ("ERROR: %s\n%s\n", err->message, dbg);
+ }
+
+ return GST_BUS_PASS;
+}
+
+static void
+handoff_cb (GstElement * element, GstBuffer * buf, GstPad * pad,
+ gint * p_counter)
+{
+ *p_counter += 1;
+ GST_LOG ("counter = %d", *p_counter);
+
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL);
+}
+
+static void
+mux_pcm_audio (guint num_buffers, guint repeat)
+{
+ GstElement *src, *sink, *flvmux, *conv, *pipeline;
+ GstPad *sinkpad, *srcpad;
+ gint counter;
+
+ GST_LOG ("num_buffers = %u", num_buffers);
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL, "Failed to create pipeline!");
+
+ /* kids, don't use a sync handler for this at home, really; we do because
+ * we just want to abort and nothing else */
+ gst_bus_set_sync_handler (GST_ELEMENT_BUS (pipeline), error_cb, NULL);
+
+ src = gst_element_factory_make ("audiotestsrc", "audiotestsrc");
+ fail_unless (src != NULL, "Failed to create 'audiotestsrc' element!");
+
+ g_object_set (src, "num-buffers", num_buffers, NULL);
+
+ conv = gst_element_factory_make ("audioconvert", "audioconvert");
+ fail_unless (conv != NULL, "Failed to create 'audioconvert' element!");
+
+ flvmux = gst_element_factory_make ("flvmux", "flvmux");
+ fail_unless (flvmux != NULL, "Failed to create 'flvmux' element!");
+
+ sink = gst_element_factory_make ("fakesink", "fakesink");
+ fail_unless (sink != NULL, "Failed to create 'fakesink' element!");
+
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (handoff_cb), &counter);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, conv, flvmux, sink, NULL);
+
+ fail_unless (gst_element_link (src, conv));
+ fail_unless (gst_element_link (flvmux, sink));
+
+ /* now link the elements */
+ sinkpad = gst_element_get_request_pad (flvmux, "audio");
+ fail_unless (sinkpad != NULL, "Could not get audio request pad");
+
+ srcpad = gst_element_get_static_pad (conv, "src");
+ fail_unless (srcpad != NULL, "Could not get audioconvert's source pad");
+
+ fail_unless_equals_int (gst_pad_link (srcpad, sinkpad), GST_PAD_LINK_OK);
+
+ gst_object_unref (srcpad);
+ gst_object_unref (sinkpad);
+
+ do {
+ GstStateChangeReturn state_ret;
+ GstMessage *msg;
+
+ GST_LOG ("repeat=%d", repeat);
+
+ counter = 0;
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ if (state_ret == GST_STATE_CHANGE_ASYNC) {
+ GST_LOG ("waiting for pipeline to reach PAUSED state");
+ state_ret = gst_element_get_state (pipeline, NULL, NULL, -1);
+ fail_unless_equals_int (state_ret, GST_STATE_CHANGE_SUCCESS);
+ }
+
+ GST_LOG ("PAUSED, let's do the rest of it");
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ fail_unless (msg != NULL, "Expected EOS message on bus!");
+
+ GST_LOG ("EOS");
+ gst_message_unref (msg);
+
+ /* should have some output */
+ fail_unless (counter > 2);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* repeat = test re-usability */
+ --repeat;
+ } while (repeat > 0);
+
+ gst_object_unref (pipeline);
+}
+
+GST_START_TEST (test_index_writing)
+{
+ /* note: there's a magic 128 value in flvmux when doing index writing */
+ if ((__i__ % 33) == 1)
+ mux_pcm_audio (__i__, 2);
+}
+
+GST_END_TEST;
+
+static Suite *
+flvmux_suite (void)
+{
+ Suite *s = suite_create ("flvmux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_loop_test (tc_chain, test_index_writing, 1, 499);
+
+ return s;
+}
+
+GST_CHECK_MAIN (flvmux)
diff --git a/tests/check/elements/gdkpixbufsink.c b/tests/check/elements/gdkpixbufsink.c
new file mode 100644
index 0000000..242cf85
--- /dev/null
+++ b/tests/check/elements/gdkpixbufsink.c
@@ -0,0 +1,291 @@
+/* GStreamer unit test for the gdkpixbufsink element
+ * Copyright (C) 2008 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#define WxH ",width=(int)319,height=(int)241"
+
+#define N_BUFFERS 5
+
+typedef struct
+{
+ GstElement *pipe;
+ GstElement *src;
+ GstElement *filter;
+ GstElement *sink;
+} GstGdkPixbufSinkTestContext;
+
+static void
+gdkpixbufsink_init_test_context (GstGdkPixbufSinkTestContext * ctx,
+ const gchar * filter_caps_string, gint num_buffers)
+{
+ GstCaps *caps;
+
+ fail_unless (ctx != NULL);
+
+ ctx->pipe = gst_pipeline_new ("pipeline");
+ fail_unless (ctx->pipe != NULL);
+ ctx->src = gst_element_factory_make ("videotestsrc", "src");
+ fail_unless (ctx->src != NULL, "Failed to create videotestsrc element");
+ ctx->filter = gst_element_factory_make ("capsfilter", "filter");
+ fail_unless (ctx->filter != NULL, "Failed to create capsfilter element");
+ ctx->sink = gst_element_factory_make ("gdkpixbufsink", "sink");
+ fail_unless (ctx->sink != NULL, "Failed to create gdkpixbufsink element");
+
+ caps = gst_caps_from_string (filter_caps_string);
+ fail_unless (caps != NULL);
+ g_object_set (ctx->filter, "caps", caps, NULL);
+ gst_caps_unref (caps);
+
+ if (num_buffers > 0)
+ g_object_set (ctx->src, "num-buffers", num_buffers, NULL);
+
+ fail_unless (gst_bin_add (GST_BIN (ctx->pipe), ctx->src));
+ fail_unless (gst_bin_add (GST_BIN (ctx->pipe), ctx->filter));
+ fail_unless (gst_bin_add (GST_BIN (ctx->pipe), ctx->sink));
+ fail_unless (gst_element_link (ctx->src, ctx->filter));
+ fail_unless (gst_element_link (ctx->filter, ctx->sink));
+}
+
+static void
+gdkpixbufsink_unset_test_context (GstGdkPixbufSinkTestContext * ctx)
+{
+ gst_element_set_state (ctx->pipe, GST_STATE_NULL);
+ gst_object_unref (ctx->pipe);
+ memset (ctx, 0, sizeof (GstGdkPixbufSinkTestContext));
+}
+
+static gboolean
+check_last_pixbuf (GstGdkPixbufSinkTestContext * ctx, gpointer pixbuf)
+{
+ gpointer last_pb = NULL;
+ gboolean ret;
+
+ g_object_get (ctx->sink, "last-pixbuf", &last_pb, NULL);
+
+ ret = (last_pb == pixbuf);
+
+ if (last_pb)
+ g_object_unref (last_pb);
+
+ return ret;
+}
+
+/* doesn't return a ref to the pixbuf */
+static GdkPixbuf *
+check_message_pixbuf (GstMessage * msg, const gchar * name, gint channels,
+ gboolean has_alpha)
+{
+ GdkPixbuf *pixbuf;
+ GstStructure *s;
+
+ fail_unless (msg->structure != NULL);
+
+ s = msg->structure;
+ fail_unless_equals_string (gst_structure_get_name (s), name);
+
+ fail_unless (gst_structure_has_field (s, "pixbuf"));
+ fail_unless (gst_structure_has_field_typed (s, "pixel-aspect-ratio",
+ GST_TYPE_FRACTION));
+ pixbuf =
+ GDK_PIXBUF (g_value_get_object (gst_structure_get_value (s, "pixbuf")));
+ fail_unless (GDK_IS_PIXBUF (pixbuf));
+ fail_unless_equals_int (gdk_pixbuf_get_n_channels (pixbuf), channels);
+ fail_unless_equals_int (gdk_pixbuf_get_has_alpha (pixbuf), has_alpha);
+ fail_unless_equals_int (gdk_pixbuf_get_width (pixbuf), 319);
+ fail_unless_equals_int (gdk_pixbuf_get_height (pixbuf), 241);
+
+ return pixbuf;
+}
+
+GST_START_TEST (test_rgb)
+{
+ GstGdkPixbufSinkTestContext ctx;
+ GstMessage *msg;
+ GdkPixbuf *pixbuf;
+ GstBus *bus;
+ gint i;
+
+ gdkpixbufsink_init_test_context (&ctx, GST_VIDEO_CAPS_RGB WxH, N_BUFFERS);
+
+ fail_unless (check_last_pixbuf (&ctx, NULL));
+
+ /* start prerolling */
+ fail_unless_equals_int (gst_element_set_state (ctx.pipe, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_ASYNC);
+
+ /* wait until prerolled */
+ fail_unless_equals_int (gst_element_get_state (ctx.pipe, NULL, NULL, -1),
+ GST_STATE_CHANGE_SUCCESS);
+
+ bus = gst_element_get_bus (ctx.pipe);
+
+ /* find element message from our gdkpixbufsink, ignore element messages from
+ * other elemements (which just seems prudent to do, we don't expect any) */
+ while (1) {
+ msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ELEMENT);
+ fail_if (msg == NULL, "Expected element message from gdkpixbufsink");
+
+ if (msg->src == GST_OBJECT (ctx.sink))
+ break;
+ }
+
+ pixbuf = check_message_pixbuf (msg, "preroll-pixbuf", 3, FALSE);
+ fail_unless (check_last_pixbuf (&ctx, pixbuf));
+ gst_message_unref (msg);
+ pixbuf = NULL;
+
+ /* and go! */
+ fail_unless_equals_int (gst_element_set_state (ctx.pipe, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* This is racy, supposed to make sure locking and refcounting works at
+ * least to some extent */
+ for (i = 0; i < 10000; ++i) {
+ gpointer obj = NULL;
+
+ g_object_get (ctx.sink, "last-pixbuf", &obj, NULL);
+ fail_unless (obj == NULL || GDK_IS_PIXBUF (obj));
+ if (obj)
+ g_object_unref (obj);
+ }
+
+ /* there should be as many pixbuf messages as buffers */
+ for (i = 0; i < N_BUFFERS; ++i) {
+ /* find element message from our gdkpixbufsink, ignore element messages from
+ * other elemements (which just seems prudent to do, we don't expect any) */
+ while (1) {
+ msg = gst_bus_timed_pop_filtered (bus, -1, GST_MESSAGE_ELEMENT);
+ fail_if (msg == NULL, "Expected element message from gdkpixbufsink");
+ if (msg->src == GST_OBJECT (ctx.sink))
+ break;
+ }
+
+ pixbuf = check_message_pixbuf (msg, "pixbuf", 3, FALSE);
+ gst_message_unref (msg);
+ }
+
+ /* note: we don't hold a ref to pixbuf any longer here, but it should be ok */
+ fail_unless (check_last_pixbuf (&ctx, pixbuf));
+ pixbuf = NULL;
+
+ gdkpixbufsink_unset_test_context (&ctx);
+ gst_object_unref (bus);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_rgba)
+{
+ GstGdkPixbufSinkTestContext ctx;
+ GstMessage *msg;
+ GdkPixbuf *pixbuf;
+ GstBus *bus;
+ gint i;
+
+ gdkpixbufsink_init_test_context (&ctx, GST_VIDEO_CAPS_RGBA WxH, N_BUFFERS);
+
+ fail_unless (check_last_pixbuf (&ctx, NULL));
+
+ /* start prerolling */
+ fail_unless_equals_int (gst_element_set_state (ctx.pipe, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_ASYNC);
+
+ /* wait until prerolled */
+ fail_unless_equals_int (gst_element_get_state (ctx.pipe, NULL, NULL, -1),
+ GST_STATE_CHANGE_SUCCESS);
+
+ bus = gst_element_get_bus (ctx.pipe);
+
+ /* find element message from our gdkpixbufsink, ignore element messages from
+ * other elemements (which just seems prudent to do, we don't expect any) */
+ while (1) {
+ msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ELEMENT);
+ fail_if (msg == NULL, "Expected element message from gdkpixbufsink");
+
+ if (msg->src == GST_OBJECT (ctx.sink))
+ break;
+ }
+
+ pixbuf = check_message_pixbuf (msg, "preroll-pixbuf", 4, TRUE);
+ fail_unless (check_last_pixbuf (&ctx, pixbuf));
+ gst_message_unref (msg);
+ pixbuf = NULL;
+
+ /* and go! */
+ fail_unless_equals_int (gst_element_set_state (ctx.pipe, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ /* This is racy, supposed to make sure locking and refcounting works at
+ * least to some extent */
+ for (i = 0; i < 10000; ++i) {
+ gpointer obj = NULL;
+
+ g_object_get (ctx.sink, "last-pixbuf", &obj, NULL);
+ fail_unless (obj == NULL || GDK_IS_PIXBUF (obj));
+ if (obj)
+ g_object_unref (obj);
+ }
+
+ /* there should be as many pixbuf messages as buffers */
+ for (i = 0; i < N_BUFFERS; ++i) {
+ /* find element message from our gdkpixbufsink, ignore element messages from
+ * other elemements (which just seems prudent to do, we don't expect any) */
+ while (1) {
+ msg = gst_bus_timed_pop_filtered (bus, -1, GST_MESSAGE_ELEMENT);
+ fail_if (msg == NULL, "Expected element message from gdkpixbufsink");
+ if (msg->src == GST_OBJECT (ctx.sink))
+ break;
+ }
+
+ pixbuf = check_message_pixbuf (msg, "pixbuf", 4, TRUE);
+ gst_message_unref (msg);
+ }
+
+ /* note: we don't hold a ref to pixbuf any longer here, but it should be ok */
+ fail_unless (check_last_pixbuf (&ctx, pixbuf));
+ pixbuf = NULL;
+
+ gdkpixbufsink_unset_test_context (&ctx);
+ gst_object_unref (bus);
+}
+
+GST_END_TEST;
+
+static Suite *
+gdkpixbufsink_suite (void)
+{
+ Suite *s = suite_create ("gdkpixbufsink");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_rgb);
+ tcase_add_test (tc_chain, test_rgba);
+
+ return s;
+}
+
+GST_CHECK_MAIN (gdkpixbufsink);
diff --git a/tests/check/elements/icydemux.c b/tests/check/elements/icydemux.c
new file mode 100644
index 0000000..e1686c8
--- /dev/null
+++ b/tests/check/elements/icydemux.c
@@ -0,0 +1,272 @@
+/*
+ * icydemux.c - Test icydemux element
+ * Copyright (C) 2006 Michael Smith <msmith@fluendo.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/check/gstcheck.h>
+
+/* Chunk of data: 8 bytes, followed by a metadata-length byte of 2, followed by
+ * some metadata (32 bytes), then some more data.
+ */
+#define TEST_METADATA \
+ "Test metadata"
+#define ICY_METADATA \
+ "StreamTitle='" TEST_METADATA "';\0\0\0\0"
+
+#define ICY_DATA \
+ "aaaaaaaa" \
+ "\x02" \
+ ICY_METADATA \
+ "bbbbbbbb"
+
+#define ICYCAPS "application/x-icy, metadata-interval = (int)8"
+
+#define SRC_CAPS "application/x-icy, metadata-interval = (int)[0, MAX]"
+#define SINK_CAPS "ANY"
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS)
+ );
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS)
+ );
+
+static GstElement *icydemux;
+static GstBus *bus;
+GstPad *srcpad, *sinkpad;
+
+static GstStaticCaps typefind_caps =
+GST_STATIC_CAPS ("application/octet-stream");
+
+static gboolean fake_typefind_caps; /* FALSE */
+
+static void
+typefind_succeed (GstTypeFind * tf, gpointer private)
+{
+ if (fake_typefind_caps) {
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM,
+ gst_static_caps_get (&typefind_caps));
+ }
+}
+
+static void
+icydemux_found_pad (GstElement * src, GstPad * pad, gpointer data)
+{
+ GST_DEBUG ("got new pad %" GST_PTR_FORMAT, pad);
+
+ /* Turns out that this asserts a refcount which is wrong for this
+ * case (adding the pad from a pad-added callback), so just do the same
+ * thing inline... */
+ /* sinkpad = gst_check_setup_sink_pad (icydemux, &sinktemplate, NULL); */
+ sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+ fail_if (sinkpad == NULL, "Couldn't create sinkpad");
+ srcpad = gst_element_get_static_pad (icydemux, "src");
+ fail_if (srcpad == NULL, "Failed to get srcpad from icydemux");
+ gst_pad_set_chain_function (sinkpad, gst_check_chain_func);
+
+ GST_DEBUG ("checking srcpad %p refcount", srcpad);
+ /* 1 from element, 1 from signal, 1 from us */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 3);
+
+ GST_DEBUG ("linking srcpad");
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Failed to link pads");
+ gst_object_unref (srcpad);
+
+ gst_pad_set_active (sinkpad, TRUE);
+}
+
+static GstElement *
+create_icydemux (void)
+{
+ icydemux = gst_check_setup_element ("icydemux");
+ srcpad = gst_check_setup_src_pad (icydemux, &srctemplate, NULL);
+
+ g_signal_connect (icydemux, "pad-added", G_CALLBACK (icydemux_found_pad),
+ NULL);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (icydemux, bus);
+
+ fail_unless (gst_element_set_state (icydemux, GST_STATE_PLAYING) !=
+ GST_STATE_CHANGE_FAILURE, "could not set to playing");
+
+ return icydemux;
+}
+
+static void
+cleanup_icydemux (void)
+{
+ gst_bus_set_flushing (bus, TRUE);
+ gst_object_unref (bus);
+ bus = NULL;
+
+ gst_check_teardown_src_pad (icydemux);
+ if (sinkpad)
+ gst_check_teardown_sink_pad (icydemux);
+ gst_check_teardown_element (icydemux);
+
+ srcpad = NULL;
+ sinkpad = NULL;
+ icydemux = NULL;
+}
+
+static void
+push_data (const guint8 * data, int len, GstCaps * caps, gint64 offset)
+{
+ GstFlowReturn res;
+ GstBuffer *buffer = gst_buffer_new_and_alloc (len);
+
+ memcpy (GST_BUFFER_DATA (buffer), data, len);
+ gst_buffer_set_caps (buffer, caps);
+
+ GST_BUFFER_OFFSET (buffer) = offset;
+
+ res = gst_pad_push (srcpad, buffer);
+
+ fail_unless (res == GST_FLOW_OK, "Failed pushing buffer: %d", res);
+}
+
+GST_START_TEST (test_demux)
+{
+ GstMessage *message;
+ GstTagList *tags;
+ const GValue *tag_val;
+ const gchar *tag;
+ GstCaps *caps;
+
+ fail_unless (gst_type_find_register (NULL, "success", GST_RANK_PRIMARY,
+ typefind_succeed, NULL, gst_static_caps_get (&typefind_caps), NULL,
+ NULL));
+
+ fake_typefind_caps = TRUE;
+
+ caps = gst_caps_from_string (ICYCAPS);
+
+ create_icydemux ();
+
+ push_data ((guint8 *) ICY_DATA, sizeof (ICY_DATA), caps, -1);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_TAG, -1);
+ fail_unless (message != NULL);
+
+ gst_message_parse_tag (message, &tags);
+ fail_unless (tags != NULL);
+
+ tag_val = gst_tag_list_get_value_index (tags, GST_TAG_TITLE, 0);
+ fail_unless (tag_val != NULL);
+
+ tag = g_value_get_string (tag_val);
+ fail_unless (tag != NULL);
+
+ fail_unless_equals_string (TEST_METADATA, (char *) tag);
+
+ gst_tag_list_free (tags);
+ gst_message_unref (message);
+ gst_caps_unref (caps);
+
+ cleanup_icydemux ();
+
+ fake_typefind_caps = FALSE;
+}
+
+GST_END_TEST;
+
+/* run this test first before the custom typefind function is set up */
+GST_START_TEST (test_first_buf_offset_when_merged_for_typefinding)
+{
+ const guint8 buf1[] = { 'M' };
+ const guint8 buf2[] = { 'P', '+', 0xff, 0xfb, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ GstCaps *icy_caps;
+ GstPad *icy_srcpad;
+
+ fake_typefind_caps = FALSE;
+
+ create_icydemux ();
+
+ icy_caps = gst_caps_from_string (ICYCAPS);
+
+ push_data (buf1, G_N_ELEMENTS (buf1), icy_caps, 0);
+
+ /* one byte isn't really enough for typefinding, can't have a srcpad yet */
+ fail_unless (gst_element_get_static_pad (icydemux, "src") == NULL);
+
+ push_data (buf2, G_N_ELEMENTS (buf2), icy_caps, -1);
+
+ /* should have been enough to create a audio/x-musepack source pad .. */
+ icy_srcpad = gst_element_get_static_pad (icydemux, "src");
+ fail_unless (icy_srcpad != NULL);
+ gst_object_unref (icy_srcpad);
+
+ fail_unless (g_list_length (buffers) > 0);
+
+ /* first buffer should have offset 0 even after it was merged with 2nd buf */
+ fail_unless (GST_BUFFER_OFFSET (GST_BUFFER_CAST (buffers->data)) == 0);
+
+ /* first buffer should have caps set */
+ fail_unless (GST_BUFFER_CAPS (GST_BUFFER_CAST (buffers->data)) != NULL);
+
+ gst_caps_unref (icy_caps);
+
+ cleanup_icydemux ();
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_not_negotiated)
+{
+ GstBuffer *buf;
+
+ create_icydemux ();
+
+ buf = gst_buffer_new_and_alloc (0);
+ GST_BUFFER_OFFSET (buf) = 0;
+
+ fail_unless_equals_int (gst_pad_push (srcpad, buf), GST_FLOW_NOT_NEGOTIATED);
+ buf = NULL;
+
+ cleanup_icydemux ();
+}
+
+GST_END_TEST;
+
+static Suite *
+icydemux_suite (void)
+{
+ Suite *s = suite_create ("icydemux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_demux);
+ tcase_add_test (tc_chain, test_first_buf_offset_when_merged_for_typefinding);
+ tcase_add_test (tc_chain, test_not_negotiated);
+
+ return s;
+}
+
+GST_CHECK_MAIN (icydemux)
diff --git a/tests/check/elements/id3demux.c b/tests/check/elements/id3demux.c
new file mode 100644
index 0000000..724461b
--- /dev/null
+++ b/tests/check/elements/id3demux.c
@@ -0,0 +1,290 @@
+/* GStreamer unit tests for id3demux
+ *
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+
+typedef void (CheckTagsFunc) (const GstTagList * tags, const gchar * file);
+
+static void
+pad_added_cb (GstElement * id3demux, GstPad * pad, GstBin * pipeline)
+{
+ GstElement *sink;
+
+ sink = gst_bin_get_by_name (pipeline, "fakesink");
+ fail_unless (gst_element_link (id3demux, sink));
+ gst_object_unref (sink);
+
+ gst_element_set_state (sink, GST_STATE_PAUSED);
+}
+
+static GstBusSyncReply
+error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
+{
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ const gchar *file = (const gchar *) user_data;
+ GError *err = NULL;
+ gchar *dbg = NULL;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_error ("ERROR for %s: %s\n%s\n", file, err->message, dbg);
+ }
+
+ return GST_BUS_PASS;
+}
+
+static GstTagList *
+read_tags_from_file (const gchar * file, gboolean push_mode)
+{
+ GstStateChangeReturn state_ret;
+ GstTagList *tags = NULL;
+ GstMessage *msg;
+ GstElement *src, *sep, *sink, *id3demux, *pipeline;
+ GstBus *bus;
+ gchar *path;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL, "Failed to create pipeline!");
+
+ bus = gst_element_get_bus (pipeline);
+
+ /* kids, don't use a sync handler for this at home, really; we do because
+ * we just want to abort and nothing else */
+ gst_bus_set_sync_handler (bus, error_cb, (gpointer) file);
+
+ src = gst_element_factory_make ("filesrc", "filesrc");
+ fail_unless (src != NULL, "Failed to create 'filesrc' element!");
+
+ if (push_mode) {
+ sep = gst_element_factory_make ("queue", "queue");
+ fail_unless (sep != NULL, "Failed to create 'queue' element");
+ } else {
+ sep = gst_element_factory_make ("identity", "identity");
+ fail_unless (sep != NULL, "Failed to create 'identity' element");
+ }
+
+ id3demux = gst_element_factory_make ("id3demux", "id3demux");
+ fail_unless (id3demux != NULL, "Failed to create 'id3demux' element!");
+
+ sink = gst_element_factory_make ("fakesink", "fakesink");
+ fail_unless (sink != NULL, "Failed to create 'fakesink' element!");
+
+ gst_bin_add_many (GST_BIN (pipeline), src, sep, id3demux, sink, NULL);
+
+ fail_unless (gst_element_link (src, sep));
+ fail_unless (gst_element_link (sep, id3demux));
+
+ /* can't link id3demux and sink yet, do that later */
+ g_signal_connect (id3demux, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
+
+ path = g_build_filename (GST_TEST_FILES_PATH, file, NULL);
+ GST_LOG ("reading file '%s'", path);
+ g_object_set (src, "location", path, NULL);
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ if (state_ret == GST_STATE_CHANGE_ASYNC) {
+ GST_LOG ("waiting for pipeline to reach PAUSED state");
+ state_ret = gst_element_get_state (pipeline, NULL, NULL, -1);
+ fail_unless_equals_int (state_ret, GST_STATE_CHANGE_SUCCESS);
+ }
+
+ GST_LOG ("PAUSED, let's retrieve our tags");
+
+ msg = gst_bus_poll (bus, GST_MESSAGE_TAG, -1);
+ fail_unless (msg != NULL, "Expected TAG message on bus! (%s)", file);
+
+ gst_message_parse_tag (msg, &tags);
+ fail_unless (tags != NULL, "TAG message did not contain taglist! (%s)", file);
+
+ gst_message_unref (msg);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (pipeline);
+
+ g_free (path);
+
+ GST_INFO ("%s: tags = %" GST_PTR_FORMAT, file, tags);
+ return tags;
+}
+
+static void
+run_check_for_file (const gchar * filename, CheckTagsFunc * check_func)
+{
+ GstTagList *tags;
+
+ /* first, pull-based */
+ tags = read_tags_from_file (filename, FALSE);
+ fail_unless (tags != NULL, "Failed to extract tags from '%s'", filename);
+ check_func (tags, filename);
+ gst_tag_list_free (tags);
+
+ /* FIXME: need to fix id3demux for short content in push mode */
+#if 0
+ /* now try push-based */
+ tags = read_tags_from_file (filename, TRUE);
+ fail_unless (tags != NULL, "Failed to extract tags from '%s'", filename);
+ check_func (tags, filename);
+ gst_tag_list_free (tags);
+#endif
+}
+
+static void
+check_date_1977_06_23 (const GstTagList * tags, const gchar * file)
+{
+ GDate *date = NULL;
+
+ gst_tag_list_get_date (tags, GST_TAG_DATE, &date);
+ fail_unless (date != NULL, "Tags from %s should contain a GST_TAG_DATE tag");
+ fail_unless_equals_int (g_date_get_year (date), 1977);
+ fail_unless_equals_int (g_date_get_month (date), 6);
+ fail_unless_equals_int (g_date_get_day (date), 23);
+ g_date_free (date);
+}
+
+GST_START_TEST (test_tdat_tyer)
+{
+ run_check_for_file ("id3-407349-1.tag", check_date_1977_06_23);
+ run_check_for_file ("id3-407349-2.tag", check_date_1977_06_23);
+}
+
+GST_END_TEST;
+
+static void
+check_wcop (const GstTagList * tags, const gchar * file)
+{
+ gchar *copyright = NULL;
+ gchar *uri = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_LICENSE_URI, &uri));
+ fail_unless (uri != NULL);
+ fail_unless_equals_string (uri,
+ "http://creativecommons.org/licenses/by/3.0/");
+ g_free (uri);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_COPYRIGHT, &copyright));
+ fail_unless (copyright != NULL);
+ fail_unless_equals_string (copyright,
+ " Steadman. Licensed to the public under http://creativecommons.org/licenses/by/3.0/ verify at http://test.com");
+ g_free (copyright);
+}
+
+GST_START_TEST (test_wcop)
+{
+ run_check_for_file ("id3-447000-wcop.tag", check_wcop);
+}
+
+GST_END_TEST;
+
+static void
+check_unsync_v23 (const GstTagList * tags, const gchar * file)
+{
+ gchar *album = NULL;
+ gchar *title = NULL;
+ gchar *artist = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_TITLE, &title));
+ fail_unless (title != NULL);
+ fail_unless_equals_string (title, "ARTIST"); /* sic */
+ g_free (title);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &album));
+ fail_unless (album != NULL);
+ fail_unless_equals_string (album, "Album");
+ g_free (album);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &artist));
+ fail_unless (artist != NULL);
+ fail_unless_equals_string (artist, "藝人");
+ g_free (artist);
+}
+
+GST_START_TEST (test_unsync_v23)
+{
+ run_check_for_file ("id3-577468-unsynced-tag.tag", check_unsync_v23);
+}
+
+GST_END_TEST;
+
+static void
+check_unsync_v24 (const GstTagList * tags, const gchar * file)
+{
+ const GValue *val;
+ GstBuffer *buf;
+ gchar *album = NULL;
+ gchar *title = NULL;
+ gchar *artist = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_TITLE, &title));
+ fail_unless (title != NULL);
+ fail_unless_equals_string (title, "Starlight");
+ g_free (title);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &album));
+ fail_unless (album != NULL);
+ fail_unless_equals_string (album, "L'albumRockVol.4 CD1");
+ g_free (album);
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &artist));
+ fail_unless (artist != NULL);
+ fail_unless_equals_string (artist, "Muse");
+ g_free (artist);
+
+ val = gst_tag_list_get_value_index (tags, GST_TAG_IMAGE, 0);
+ fail_unless (val != NULL);
+ fail_unless (GST_VALUE_HOLDS_BUFFER (val));
+ buf = gst_value_get_buffer (val);
+ fail_unless (buf != NULL);
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL);
+ fail_unless_equals_int (GST_BUFFER_SIZE (buf), 38022);
+ /* check for jpeg start/end markers */
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[0], 0xff);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[1], 0xd8);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[38020], 0xff);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[38021], 0xd9);
+}
+
+GST_START_TEST (test_unsync_v24)
+{
+ run_check_for_file ("id3-588148-unsynced-v24.tag", check_unsync_v24);
+}
+
+GST_END_TEST;
+
+static Suite *
+id3demux_suite (void)
+{
+ Suite *s = suite_create ("id3demux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_tdat_tyer);
+ tcase_add_test (tc_chain, test_wcop);
+ tcase_add_test (tc_chain, test_unsync_v23);
+ tcase_add_test (tc_chain, test_unsync_v24);
+
+ return s;
+}
+
+GST_CHECK_MAIN (id3demux)
diff --git a/tests/check/elements/id3v2mux.c b/tests/check/elements/id3v2mux.c
new file mode 100644
index 0000000..b32827d
--- /dev/null
+++ b/tests/check/elements/id3v2mux.c
@@ -0,0 +1,538 @@
+/* GStreamer
+ *
+ * unit test for the taglib-based id3v2mux element
+ *
+ * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+#include <string.h>
+
+#define TEST_ARTIST "Ar T\303\255st"
+#define TEST_TITLE "M\303\274llermilch!"
+#define TEST_ALBUM "Boom"
+#define TEST_DATE g_date_new_dmy(1,1,2006)
+#define TEST_TRACK_NUMBER 7
+#define TEST_TRACK_COUNT 19
+#define TEST_VOLUME_NUMBER 2
+#define TEST_VOLUME_COUNT 3
+#define TEST_TRACK_GAIN 1.45
+#define TEST_ALBUM_GAIN 0.78
+#define TEST_TRACK_PEAK 0.83
+#define TEST_ALBUM_PEAK 0.18
+#define TEST_BPM 113.0
+
+/* for dummy mp3 frame sized MP3_FRAME_SIZE bytes,
+ * start: ff fb b0 44 00 00 08 00 00 4b 00 00 00 00 00 00 */
+static const guint8 mp3_dummyhdr[] = { 0xff, 0xfb, 0xb0, 0x44, 0x00, 0x00,
+ 0x08, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00
+};
+
+#define MP3_FRAME_SIZE 626
+
+/* the peak and gain values are stored pretty roughly, so check that they're
+ * within 2% of the expected value.
+ */
+#define fail_unless_sorta_equals_float(a, b) \
+G_STMT_START { \
+ double first = a; \
+ double second = b; \
+ fail_unless(fabs (first - second) < (0.02 * fabs (first)), \
+ "'" #a "' (%g) is not equal to '" #b "' (%g)", first, second); \
+} G_STMT_END;
+
+
+static GstTagList *
+test_taglib_id3mux_create_tags (guint32 mask)
+{
+ GstTagList *tags;
+
+ tags = gst_tag_list_new ();
+
+ if (mask & (1 << 0)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ARTIST, TEST_ARTIST, NULL);
+ }
+ if (mask & (1 << 1)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TITLE, TEST_TITLE, NULL);
+ }
+ if (mask & (1 << 2)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM, TEST_ALBUM, NULL);
+ }
+ if (mask & (1 << 3)) {
+ GDate *date;
+
+ date = TEST_DATE;
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP, GST_TAG_DATE, date, NULL);
+ g_date_free (date);
+ }
+ if (mask & (1 << 4)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_NUMBER, TEST_TRACK_NUMBER, NULL);
+ }
+ if (mask & (1 << 5)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_COUNT, TEST_TRACK_COUNT, NULL);
+ }
+ if (mask & (1 << 6)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM_VOLUME_NUMBER, TEST_VOLUME_NUMBER, NULL);
+ }
+ if (mask & (1 << 7)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM_VOLUME_COUNT, TEST_VOLUME_COUNT, NULL);
+ }
+ if (mask & (1 << 8)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_GAIN, TEST_TRACK_GAIN, NULL);
+ }
+ if (mask & (1 << 9)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM_GAIN, TEST_ALBUM_GAIN, NULL);
+ }
+ if (mask & (1 << 10)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_TRACK_PEAK, TEST_TRACK_PEAK, NULL);
+ }
+ if (mask & (1 << 11)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_ALBUM_PEAK, TEST_ALBUM_PEAK, NULL);
+ }
+ if (mask & (1 << 12)) {
+ gst_tag_list_add (tags, GST_TAG_MERGE_KEEP,
+ GST_TAG_BEATS_PER_MINUTE, TEST_BPM, NULL);
+ }
+ if (mask & (1 << 13)) {
+ }
+ return tags;
+}
+
+static gboolean
+utf8_string_in_buf (GstBuffer * buf, const gchar * s)
+{
+ gint i, len;
+
+ len = strlen (s);
+ for (i = 0; i < (GST_BUFFER_SIZE (buf) - len); ++i) {
+ if (memcmp (GST_BUFFER_DATA (buf) + i, s, len) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+test_taglib_id3mux_check_tag_buffer (GstBuffer * buf, guint32 mask)
+{
+ /* make sure our UTF-8 string hasn't been put into the tag as ISO-8859-1 */
+ if (mask & (1 << 0)) {
+ fail_unless (utf8_string_in_buf (buf, TEST_ARTIST));
+ }
+ /* make sure our UTF-8 string hasn't been put into the tag as ISO-8859-1 */
+ if (mask & (1 << 1)) {
+ fail_unless (utf8_string_in_buf (buf, TEST_TITLE));
+ }
+ /* make sure our UTF-8 string hasn't been put into the tag as ISO-8859-1 */
+ if (mask & (1 << 2)) {
+ fail_unless (utf8_string_in_buf (buf, TEST_ALBUM));
+ }
+}
+
+static void
+test_taglib_id3mux_check_tags (GstTagList * tags, guint32 mask)
+{
+ if (mask & (1 << 0)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ARTIST, &s));
+ fail_unless (g_str_equal (s, TEST_ARTIST));
+ g_free (s);
+ }
+ if (mask & (1 << 1)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_TITLE, &s));
+ fail_unless (g_str_equal (s, TEST_TITLE));
+ g_free (s);
+ }
+ if (mask & (1 << 2)) {
+ gchar *s = NULL;
+
+ fail_unless (gst_tag_list_get_string (tags, GST_TAG_ALBUM, &s));
+ fail_unless (g_str_equal (s, TEST_ALBUM));
+ g_free (s);
+ }
+ if (mask & (1 << 3)) {
+ GDate *shouldbe, *date = NULL;
+
+ shouldbe = TEST_DATE;
+ fail_unless (gst_tag_list_get_date (tags, GST_TAG_DATE, &date));
+ fail_unless (g_date_compare (shouldbe, date) == 0);
+ g_date_free (shouldbe);
+ g_date_free (date);
+ }
+ if (mask & (1 << 4)) {
+ guint num;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_TRACK_NUMBER, &num));
+ fail_unless (num == TEST_TRACK_NUMBER);
+ }
+ if (mask & (1 << 5)) {
+ guint count;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_TRACK_COUNT, &count));
+ fail_unless (count == TEST_TRACK_COUNT);
+ }
+ if (mask & (1 << 6)) {
+ guint num;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_ALBUM_VOLUME_NUMBER,
+ &num));
+ fail_unless (num == TEST_VOLUME_NUMBER);
+ }
+ if (mask & (1 << 7)) {
+ guint count;
+
+ fail_unless (gst_tag_list_get_uint (tags, GST_TAG_ALBUM_VOLUME_COUNT,
+ &count));
+ fail_unless (count == TEST_VOLUME_COUNT);
+ }
+ if (mask & (1 << 8)) {
+ gdouble gain;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_TRACK_GAIN, &gain));
+ fail_unless_sorta_equals_float (gain, TEST_TRACK_GAIN);
+ }
+ if (mask & (1 << 9)) {
+ gdouble gain;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_ALBUM_GAIN, &gain));
+ fail_unless_sorta_equals_float (gain, TEST_ALBUM_GAIN);
+ }
+ if (mask & (1 << 10)) {
+ gdouble peak;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_TRACK_PEAK, &peak));
+ fail_unless_sorta_equals_float (peak, TEST_TRACK_PEAK);
+ }
+ if (mask & (1 << 11)) {
+ gdouble peak;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_ALBUM_PEAK, &peak));
+ fail_unless_sorta_equals_float (peak, TEST_ALBUM_PEAK);
+ }
+ if (mask & (1 << 12)) {
+ gdouble bpm;
+
+ fail_unless (gst_tag_list_get_double (tags, GST_TAG_BEATS_PER_MINUTE,
+ &bpm));
+ fail_unless_sorta_equals_float (bpm, TEST_BPM);
+ }
+ if (mask & (1 << 13)) {
+ }
+}
+
+static void
+fill_mp3_buffer (GstElement * fakesrc, GstBuffer * buf, GstPad * pad,
+ guint64 * p_offset)
+{
+ fail_unless (GST_BUFFER_SIZE (buf) == MP3_FRAME_SIZE);
+
+ GST_LOG ("filling buffer with fake mp3 data, offset = %" G_GUINT64_FORMAT,
+ *p_offset);
+
+ memcpy (GST_BUFFER_DATA (buf), mp3_dummyhdr, sizeof (mp3_dummyhdr));
+
+ /* can't use gst_buffer_set_caps() here because the metadata isn't writable
+ * because of the extra refcounts taken by the signal emission mechanism;
+ * we know it's fine to use GST_BUFFER_CAPS() here though */
+ GST_BUFFER_CAPS (buf) = gst_caps_new_simple ("audio/mpeg", "mpegversion",
+ G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
+
+ GST_BUFFER_OFFSET (buf) = *p_offset;
+ *p_offset += GST_BUFFER_SIZE (buf);
+}
+
+static void
+got_buffer (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
+ GstBuffer ** p_buf)
+{
+ gint64 off;
+ guint size;
+
+ off = GST_BUFFER_OFFSET (buf);
+ size = GST_BUFFER_SIZE (buf);
+
+ GST_LOG ("got buffer, size=%u, offset=%" G_GINT64_FORMAT, size, off);
+
+ fail_unless (GST_BUFFER_OFFSET_IS_VALID (buf));
+
+ if (*p_buf == NULL || (off + size) > GST_BUFFER_SIZE (*p_buf)) {
+ GstBuffer *newbuf;
+
+ /* not very elegant, but who cares */
+ newbuf = gst_buffer_new_and_alloc (off + size);
+ if (*p_buf) {
+ memcpy (GST_BUFFER_DATA (newbuf), GST_BUFFER_DATA (*p_buf),
+ GST_BUFFER_SIZE (*p_buf));
+ }
+ memcpy (GST_BUFFER_DATA (newbuf) + off, GST_BUFFER_DATA (buf), size);
+ if (*p_buf)
+ gst_buffer_unref (*p_buf);
+ *p_buf = newbuf;
+ } else {
+ memcpy (GST_BUFFER_DATA (*p_buf) + off, GST_BUFFER_DATA (buf), size);
+ }
+}
+
+static void
+demux_pad_added (GstElement * id3demux, GstPad * srcpad, GstBuffer ** p_outbuf)
+{
+ GstElement *fakesink, *pipeline;
+
+ GST_LOG ("id3demux added source pad with caps %" GST_PTR_FORMAT,
+ GST_PAD_CAPS (srcpad));
+
+ pipeline = id3demux;
+ while (GST_OBJECT_PARENT (pipeline) != NULL)
+ pipeline = (GstElement *) GST_OBJECT_PARENT (pipeline);
+
+ fakesink = gst_element_factory_make ("fakesink", "fakesink");
+ g_assert (fakesink != NULL);
+
+ /* set up sink */
+ g_object_set (fakesink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (fakesink, "handoff", G_CALLBACK (got_buffer), p_outbuf);
+
+ gst_bin_add (GST_BIN (pipeline), fakesink);
+ gst_element_set_state (fakesink, GST_STATE_PLAYING);
+
+ fail_unless (gst_element_link (id3demux, fakesink));
+}
+
+static void
+test_taglib_id3mux_check_output_buffer (GstBuffer * buf)
+{
+ guint8 *data = GST_BUFFER_DATA (buf);
+ guint size = GST_BUFFER_SIZE (buf);
+ guint off;
+
+ g_assert (size % MP3_FRAME_SIZE == 0);
+
+ for (off = 0; off < size; off += MP3_FRAME_SIZE) {
+ fail_unless (memcmp (data + off, mp3_dummyhdr, sizeof (mp3_dummyhdr)) == 0);
+ }
+}
+
+static void
+identity_cb (GstElement * identity, GstBuffer * buf, GstBuffer ** p_tagbuf)
+{
+ if (*p_tagbuf == NULL) {
+ *p_tagbuf = gst_buffer_ref (buf);
+ }
+}
+
+static void
+test_taglib_id3mux_with_tags (GstTagList * tags, guint32 mask)
+{
+ GstMessage *msg;
+ GstTagList *tags_read = NULL;
+ GstElement *pipeline, *id3mux, *id3demux, *fakesrc, *identity;
+ GstBus *bus;
+ guint64 offset;
+ GstBuffer *outbuf = NULL;
+ GstBuffer *tagbuf = NULL;
+ GstStateChangeReturn state_result;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ g_assert (pipeline != NULL);
+
+ fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
+ g_assert (fakesrc != NULL);
+
+ id3mux = gst_element_factory_make ("id3v2mux", "id3v2mux");
+ g_assert (id3mux != NULL);
+
+ identity = gst_element_factory_make ("identity", "identity");
+ g_assert (identity != NULL);
+
+ id3demux = gst_element_factory_make ("id3demux", "id3demux");
+ g_assert (id3demux != NULL);
+
+ outbuf = NULL;
+ g_signal_connect (id3demux, "pad-added",
+ G_CALLBACK (demux_pad_added), &outbuf);
+
+ gst_bin_add (GST_BIN (pipeline), fakesrc);
+ gst_bin_add (GST_BIN (pipeline), id3mux);
+ gst_bin_add (GST_BIN (pipeline), identity);
+ gst_bin_add (GST_BIN (pipeline), id3demux);
+
+ gst_tag_setter_merge_tags (GST_TAG_SETTER (id3mux), tags,
+ GST_TAG_MERGE_APPEND);
+
+ gst_element_link_many (fakesrc, id3mux, identity, id3demux, NULL);
+
+ /* set up source */
+ g_object_set (fakesrc, "signal-handoffs", TRUE, "can-activate-pull", FALSE,
+ "filltype", 2, "sizetype", 2, "sizemax", MP3_FRAME_SIZE,
+ "num-buffers", 16, NULL);
+
+ offset = 0;
+ g_signal_connect (fakesrc, "handoff", G_CALLBACK (fill_mp3_buffer), &offset);
+
+ /* set up identity to catch tag buffer */
+ g_signal_connect (identity, "handoff", G_CALLBACK (identity_cb), &tagbuf);
+
+ GST_LOG ("setting and getting state ...");
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ state_result = gst_element_get_state (pipeline, NULL, NULL, -1);
+ fail_unless (state_result == GST_STATE_CHANGE_SUCCESS,
+ "Unexpected result from get_state(). Expected success, got %d",
+ state_result);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+
+ GST_LOG ("Waiting for tag ...");
+ msg =
+ gst_bus_poll (bus, GST_MESSAGE_TAG | GST_MESSAGE_EOS | GST_MESSAGE_ERROR,
+ -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err;
+ gchar *dbg;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_printerr ("ERROR from element %s: %s\n%s\n",
+ GST_OBJECT_NAME (msg->src), err->message, GST_STR_NULL (dbg));
+ g_error_free (err);
+ g_free (dbg);
+ } else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
+ g_printerr ("EOS message, but were waiting for TAGS!\n");
+ }
+ fail_unless (msg->type == GST_MESSAGE_TAG);
+
+ gst_message_parse_tag (msg, &tags_read);
+ gst_message_unref (msg);
+
+ GST_LOG ("Got tags: %" GST_PTR_FORMAT, tags_read);
+ test_taglib_id3mux_check_tags (tags_read, mask);
+ gst_tag_list_free (tags_read);
+
+ fail_unless (tagbuf != NULL);
+ test_taglib_id3mux_check_tag_buffer (tagbuf, mask);
+ gst_buffer_unref (tagbuf);
+
+ GST_LOG ("Waiting for EOS ...");
+ msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err;
+ gchar *dbg;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_printerr ("ERROR from element %s: %s\n%s\n",
+ GST_OBJECT_NAME (msg->src), err->message, GST_STR_NULL (dbg));
+ g_error_free (err);
+ g_free (dbg);
+ }
+ fail_unless (msg->type == GST_MESSAGE_EOS);
+ gst_message_unref (msg);
+
+ gst_object_unref (bus);
+
+ GST_LOG ("Got EOS, shutting down ...");
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+
+ test_taglib_id3mux_check_output_buffer (outbuf);
+ gst_buffer_unref (outbuf);
+
+ GST_LOG ("Done");
+}
+
+GST_START_TEST (test_id3v2mux)
+{
+ GstTagList *tags;
+ gint i;
+
+ g_random_set_seed (247166295);
+
+ /* internal consistency check */
+ tags = test_taglib_id3mux_create_tags (0xFFFFFFFF);
+ test_taglib_id3mux_check_tags (tags, 0xFFFFFFFF);
+ gst_tag_list_free (tags);
+
+ /* now the real tests */
+ for (i = 0; i < 50; ++i) {
+ guint32 mask;
+
+ mask = g_random_int ();
+ GST_LOG ("tag mask = %08x (i=%d)", mask, i);
+
+ if (mask == 0)
+ continue;
+
+ /* create tags */
+ tags = test_taglib_id3mux_create_tags (mask);
+ GST_LOG ("tags for mask %08x = %" GST_PTR_FORMAT, mask, tags);
+
+ /* double-check for internal consistency */
+ test_taglib_id3mux_check_tags (tags, mask);
+
+ /* test with pipeline */
+ test_taglib_id3mux_with_tags (tags, mask);
+
+ /* free tags */
+ gst_tag_list_free (tags);
+ }
+}
+
+GST_END_TEST;
+
+static Suite *
+id3v2mux_suite (void)
+{
+ Suite *s = suite_create ("id3v2mux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_id3v2mux);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = id3v2mux_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/imagefreeze.c b/tests/check/elements/imagefreeze.c
new file mode 100644
index 0000000..15da222
--- /dev/null
+++ b/tests/check/elements/imagefreeze.c
@@ -0,0 +1,640 @@
+/* GStreamer
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+
+static gboolean
+bus_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ GMainLoop *loop = (GMainLoop *) data;
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+ gchar *debug;
+
+ if (message->type == GST_MESSAGE_WARNING)
+ gst_message_parse_warning (message, &gerror, &debug);
+ else
+ gst_message_parse_error (message, &gerror, &debug);
+ g_error ("error from %s: %s (%s)\n",
+ GST_ELEMENT_NAME (GST_MESSAGE_SRC (message)), gerror->message,
+ GST_STR_NULL (debug));
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static GstElement *
+setup_imagefreeze (const GstCaps * caps1, const GstCaps * caps2,
+ GCallback sink_handoff, gpointer sink_handoff_data)
+{
+ GstElement *pipeline;
+ GstElement *videotestsrc, *capsfilter1, *imagefreeze, *capsfilter2, *fakesink;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ videotestsrc = gst_element_factory_make ("videotestsrc", "src");
+ fail_unless (videotestsrc != NULL);
+ g_object_set (videotestsrc, "num-buffers", 1, NULL);
+
+ capsfilter1 = gst_element_factory_make ("capsfilter", "filter1");
+ fail_unless (capsfilter1 != NULL);
+ g_object_set (capsfilter1, "caps", caps1, NULL);
+
+ imagefreeze = gst_element_factory_make ("imagefreeze", "freeze");
+ fail_unless (imagefreeze != NULL);
+
+ capsfilter2 = gst_element_factory_make ("capsfilter", "filter2");
+ fail_unless (capsfilter2 != NULL);
+ g_object_set (capsfilter2, "caps", caps2, NULL);
+
+ fakesink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (fakesink != NULL);
+ g_object_set (fakesink, "signal-handoffs", TRUE, "async", FALSE, NULL);
+
+ if (sink_handoff)
+ g_signal_connect (fakesink, "handoff", sink_handoff, sink_handoff_data);
+
+ gst_bin_add_many (GST_BIN (pipeline), videotestsrc, capsfilter1, imagefreeze,
+ capsfilter2, fakesink, NULL);
+
+ fail_unless (gst_element_link_pads (videotestsrc, "src", capsfilter1,
+ "sink"));
+ fail_unless (gst_element_link_pads (capsfilter1, "src", imagefreeze, "sink"));
+ fail_unless (gst_element_link_pads (imagefreeze, "src", capsfilter2, "sink"));
+ fail_unless (gst_element_link_pads (capsfilter2, "src", fakesink, "sink"));
+
+ return pipeline;
+}
+
+static void
+sink_handoff_cb_0_1 (GstElement * object, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer), 0);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), GST_CLOCK_TIME_NONE);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET (buffer), 0);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET_END (buffer), 1);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_0_1)
+{
+ GstElement *pipeline;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 0, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2, G_CALLBACK (sink_handoff_cb_0_1),
+ &n_buffers);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ n_buffers = 0;
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless_equals_int (n_buffers, 1);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static void
+sink_handoff_cb_25_1_0ms_400ms (GstElement * object, GstBuffer * buffer,
+ GstPad * pad, gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ *n_buffers * 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET (buffer), *n_buffers);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET_END (buffer), *n_buffers + 1);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_25_1_0ms_400ms)
+{
+ GstElement *pipeline;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2,
+ G_CALLBACK (sink_handoff_cb_25_1_0ms_400ms), &n_buffers);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET,
+ 400 * GST_MSECOND));
+
+ n_buffers = 0;
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless_equals_int (n_buffers, 10);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static void
+sink_handoff_cb_25_1_200ms_400ms (GstElement * object, GstBuffer * buffer,
+ GstPad * pad, gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ 200 * GST_MSECOND + *n_buffers * 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET (buffer), 5 + *n_buffers);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET_END (buffer),
+ 5 + *n_buffers + 1);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_25_1_200ms_400ms)
+{
+ GstElement *pipeline;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2,
+ G_CALLBACK (sink_handoff_cb_25_1_200ms_400ms), &n_buffers);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 200 * GST_MSECOND,
+ GST_SEEK_TYPE_SET, 400 * GST_MSECOND));
+
+ n_buffers = 0;
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless_equals_int (n_buffers, 5);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static void
+sink_handoff_cb_25_1_400ms_0ms (GstElement * object, GstBuffer * buffer,
+ GstPad * pad, gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ 400 * GST_MSECOND - (*n_buffers + 1) * 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET (buffer), 10 - (*n_buffers + 1));
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET_END (buffer),
+ 10 - (*n_buffers + 1) + 1);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_25_1_400ms_0ms)
+{
+ GstElement *pipeline;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2,
+ G_CALLBACK (sink_handoff_cb_25_1_400ms_0ms), &n_buffers);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, -1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET,
+ 400 * GST_MSECOND));
+
+ n_buffers = 0;
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless_equals_int (n_buffers, 10);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static void
+sink_handoff_cb_25_1_220ms_380ms (GstElement * object, GstBuffer * buffer,
+ GstPad * pad, gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ if (*n_buffers == 0) {
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ 220 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 20 * GST_MSECOND);
+ } else if (*n_buffers == 4) {
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ 360 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 20 * GST_MSECOND);
+ } else {
+ fail_unless_equals_uint64 (GST_BUFFER_TIMESTAMP (buffer),
+ 200 * GST_MSECOND + *n_buffers * 40 * GST_MSECOND);
+ fail_unless_equals_uint64 (GST_BUFFER_DURATION (buffer), 40 * GST_MSECOND);
+ }
+
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET (buffer), 5 + *n_buffers);
+ fail_unless_equals_uint64 (GST_BUFFER_OFFSET_END (buffer),
+ 5 + *n_buffers + 1);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_25_1_220ms_380ms)
+{
+ GstElement *pipeline;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2,
+ G_CALLBACK (sink_handoff_cb_25_1_220ms_380ms), &n_buffers);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 220 * GST_MSECOND,
+ GST_SEEK_TYPE_SET, 380 * GST_MSECOND));
+
+ n_buffers = 0;
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless_equals_int (n_buffers, 5);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static GstBuffer *test_buffer = NULL;
+
+static GstFlowReturn
+test_bufferalloc (GstPad * pad, guint64 offset, guint size, GstCaps * caps,
+ GstBuffer ** buf)
+{
+ fail_if (test_buffer != NULL);
+
+ test_buffer = gst_buffer_new_and_alloc (size);
+ gst_buffer_set_caps (test_buffer, caps);
+
+ *buf = gst_buffer_ref (test_buffer);
+
+ return GST_FLOW_OK;
+}
+
+static void
+sink_handoff_cb_bufferalloc (GstElement * object, GstBuffer * buffer,
+ GstPad * pad, gpointer user_data)
+{
+ guint *n_buffers = (guint *) user_data;
+
+ if (*n_buffers == G_MAXUINT)
+ return;
+
+ fail_unless (buffer->parent != NULL);
+ fail_unless (test_buffer != NULL);
+ fail_unless (buffer->parent == test_buffer);
+
+ *n_buffers = *n_buffers + 1;
+}
+
+GST_START_TEST (test_imagefreeze_bufferalloc)
+{
+ GstElement *pipeline;
+ GstElement *sink;
+ GstPad *sinkpad;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint n_buffers = G_MAXUINT;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline =
+ setup_imagefreeze (caps1, caps2, G_CALLBACK (sink_handoff_cb_bufferalloc),
+ &n_buffers);
+
+ sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
+ fail_unless (sink != NULL);
+ sinkpad = gst_element_get_static_pad (sink, "sink");
+ fail_unless (sinkpad != NULL);
+ gst_pad_set_bufferalloc_function (sinkpad, test_bufferalloc);
+ gst_object_unref (sinkpad);
+ gst_object_unref (sink);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET,
+ 400 * GST_MSECOND));
+
+ n_buffers = 0;
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless (test_buffer != NULL);
+ fail_unless (n_buffers >= 1);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_buffer_unref (test_buffer);
+ test_buffer = NULL;
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_imagefreeze_eos)
+{
+ GstElement *pipeline;
+ GstElement *src;
+ GstCaps *caps1, *caps2;
+ GstBus *bus;
+ GMainLoop *loop;
+ GstFormat fmt = GST_FORMAT_TIME;
+ gint64 position;
+ guint bus_watch = 0;
+
+ caps1 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+ caps2 =
+ gst_video_format_new_caps (GST_VIDEO_FORMAT_xRGB, 640, 480, 25, 1, 1, 1);
+
+ pipeline = setup_imagefreeze (caps1, caps2, NULL, NULL);
+
+ src = gst_bin_get_by_name (GST_BIN (pipeline), "src");
+ fail_unless (src != NULL);
+ g_object_set (src, "num-buffers", 100, NULL);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
+ GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET,
+ 400 * GST_MSECOND));
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
+ GST_STATE_CHANGE_SUCCESS);
+
+ g_main_loop_run (loop);
+
+ fail_unless (gst_element_query_position (src, &fmt, &position));
+ fail_unless_equals_uint64 (position, 40 * GST_MSECOND);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (src);
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ gst_caps_unref (caps1);
+ gst_caps_unref (caps2);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static Suite *
+imagefreeze_suite (void)
+{
+ Suite *s = suite_create ("imagefreeze");
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* time out after 120s, not the default 3 */
+ tcase_set_timeout (tc_chain, 120);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_imagefreeze_0_1);
+ tcase_add_test (tc_chain, test_imagefreeze_25_1_0ms_400ms);
+ tcase_add_test (tc_chain, test_imagefreeze_25_1_200ms_400ms);
+ tcase_add_test (tc_chain, test_imagefreeze_25_1_400ms_0ms);
+ tcase_add_test (tc_chain, test_imagefreeze_25_1_220ms_380ms);
+
+ tcase_add_test (tc_chain, test_imagefreeze_bufferalloc);
+ tcase_add_test (tc_chain, test_imagefreeze_eos);
+
+ return s;
+}
+
+GST_CHECK_MAIN (imagefreeze);
diff --git a/tests/check/elements/interleave.c b/tests/check/elements/interleave.c
new file mode 100644
index 0000000..1497a49
--- /dev/null
+++ b/tests/check/elements/interleave.c
@@ -0,0 +1,733 @@
+/* GStreamer unit tests for the interleave element
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/check/gstcheck.h>
+#include <gst/audio/multichannel.h>
+
+GST_START_TEST (test_create_and_unref)
+{
+ GstElement *interleave;
+
+ interleave = gst_element_factory_make ("interleave", NULL);
+ fail_unless (interleave != NULL);
+
+ gst_element_set_state (interleave, GST_STATE_NULL);
+ gst_object_unref (interleave);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_request_pads)
+{
+ GstElement *interleave;
+ GstPad *pad1, *pad2;
+
+ interleave = gst_element_factory_make ("interleave", NULL);
+ fail_unless (interleave != NULL);
+
+ pad1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (pad1 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (pad1), "sink0");
+
+ pad2 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (pad2 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (pad2), "sink1");
+
+ gst_element_release_request_pad (interleave, pad2);
+ gst_object_unref (pad2);
+ gst_element_release_request_pad (interleave, pad1);
+ gst_object_unref (pad1);
+
+ gst_element_set_state (interleave, GST_STATE_NULL);
+ gst_object_unref (interleave);
+}
+
+GST_END_TEST;
+
+static GstPad **mysrcpads, *mysinkpad;
+static GstBus *bus;
+static GstElement *interleave;
+static gint have_data;
+static gfloat input[2];
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "width = (int) 32, "
+ "channels = (int) 2, "
+ "rate = (int) 48000, " "endianness = (int) BYTE_ORDER"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-float, "
+ "width = (int) 32, "
+ "channels = (int) 1, "
+ "rate = (int) 48000, " "endianness = (int) BYTE_ORDER"));
+
+#define CAPS_48khz \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "channels = (int) 1, " \
+ "rate = (int) 48000, " \
+ "endianness = (int) BYTE_ORDER"
+
+static GstFlowReturn
+interleave_chain_func (GstPad * pad, GstBuffer * buffer)
+{
+ gfloat *outdata;
+ gint i;
+
+ fail_unless (GST_IS_BUFFER (buffer));
+ fail_unless_equals_int (GST_BUFFER_SIZE (buffer),
+ 48000 * 2 * sizeof (gfloat));
+ fail_unless (GST_BUFFER_DATA (buffer) != NULL);
+
+ outdata = (gfloat *) GST_BUFFER_DATA (buffer);
+
+ for (i = 0; i < 48000 * 2; i += 2) {
+ fail_unless_equals_float (outdata[i], input[0]);
+ fail_unless_equals_float (outdata[i + 1], input[1]);
+ }
+
+ have_data++;
+
+ gst_buffer_unref (buffer);
+
+ return GST_FLOW_OK;
+}
+
+GST_START_TEST (test_interleave_2ch)
+{
+ GstElement *queue;
+ GstPad *sink0, *sink1, *src, *tmp;
+ GstCaps *caps;
+ gint i;
+ GstBuffer *inbuf;
+ gfloat *indata;
+
+ mysrcpads = g_new0 (GstPad *, 2);
+
+ have_data = 0;
+
+ interleave = gst_element_factory_make ("interleave", NULL);
+ fail_unless (interleave != NULL);
+
+ queue = gst_element_factory_make ("queue", "queue");
+ fail_unless (queue != NULL);
+
+ sink0 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sink0 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink0");
+
+ sink1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sink1 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink1");
+
+ mysrcpads[0] = gst_pad_new_from_static_template (&srctemplate, "src0");
+ fail_unless (mysrcpads[0] != NULL);
+
+ caps = gst_caps_from_string (CAPS_48khz);
+ fail_unless (gst_pad_set_caps (mysrcpads[0], caps));
+ gst_pad_use_fixed_caps (mysrcpads[0]);
+
+ mysrcpads[1] = gst_pad_new_from_static_template (&srctemplate, "src1");
+ fail_unless (mysrcpads[1] != NULL);
+
+ fail_unless (gst_pad_set_caps (mysrcpads[1], caps));
+ gst_pad_use_fixed_caps (mysrcpads[1]);
+
+ tmp = gst_element_get_static_pad (queue, "sink");
+ fail_unless (gst_pad_link (mysrcpads[0], tmp) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ tmp = gst_element_get_static_pad (queue, "src");
+ fail_unless (gst_pad_link (tmp, sink0) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ fail_unless (gst_pad_link (mysrcpads[1], sink1) == GST_PAD_LINK_OK);
+
+ mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+ fail_unless (mysinkpad != NULL);
+ gst_pad_set_chain_function (mysinkpad, interleave_chain_func);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ src = gst_element_get_static_pad (interleave, "src");
+ fail_unless (src != NULL);
+ fail_unless (gst_pad_link (src, mysinkpad) == GST_PAD_LINK_OK);
+ gst_object_unref (src);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (interleave, bus);
+
+ fail_unless (gst_element_set_state (interleave,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+ fail_unless (gst_element_set_state (queue,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ input[0] = -1.0;
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = -1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+ input[1] = 1.0;
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = 1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = -1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = 1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+ fail_unless (have_data == 2);
+
+ gst_element_set_state (interleave, GST_STATE_NULL);
+ gst_element_set_state (queue, GST_STATE_NULL);
+
+ gst_object_unref (mysrcpads[0]);
+ gst_object_unref (mysrcpads[1]);
+ gst_object_unref (mysinkpad);
+
+ gst_element_release_request_pad (interleave, sink0);
+ gst_object_unref (sink0);
+ gst_element_release_request_pad (interleave, sink1);
+ gst_object_unref (sink1);
+
+ gst_object_unref (interleave);
+ gst_object_unref (queue);
+ gst_object_unref (bus);
+ gst_caps_unref (caps);
+
+ g_free (mysrcpads);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_interleave_2ch_1eos)
+{
+ GstElement *queue;
+ GstPad *sink0, *sink1, *src, *tmp;
+ GstCaps *caps;
+ gint i;
+ GstBuffer *inbuf;
+ gfloat *indata;
+
+ mysrcpads = g_new0 (GstPad *, 2);
+
+ have_data = 0;
+
+ interleave = gst_element_factory_make ("interleave", NULL);
+ fail_unless (interleave != NULL);
+
+ queue = gst_element_factory_make ("queue", "queue");
+ fail_unless (queue != NULL);
+
+ sink0 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sink0 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink0");
+
+ sink1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sink1 != NULL);
+ fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink1");
+
+ mysrcpads[0] = gst_pad_new_from_static_template (&srctemplate, "src0");
+ fail_unless (mysrcpads[0] != NULL);
+
+ caps = gst_caps_from_string (CAPS_48khz);
+ fail_unless (gst_pad_set_caps (mysrcpads[0], caps));
+ gst_pad_use_fixed_caps (mysrcpads[0]);
+
+ mysrcpads[1] = gst_pad_new_from_static_template (&srctemplate, "src1");
+ fail_unless (mysrcpads[1] != NULL);
+
+ fail_unless (gst_pad_set_caps (mysrcpads[1], caps));
+ gst_pad_use_fixed_caps (mysrcpads[1]);
+
+ tmp = gst_element_get_static_pad (queue, "sink");
+ fail_unless (gst_pad_link (mysrcpads[0], tmp) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ tmp = gst_element_get_static_pad (queue, "src");
+ fail_unless (gst_pad_link (tmp, sink0) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ fail_unless (gst_pad_link (mysrcpads[1], sink1) == GST_PAD_LINK_OK);
+
+ mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+ fail_unless (mysinkpad != NULL);
+ gst_pad_set_chain_function (mysinkpad, interleave_chain_func);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ src = gst_element_get_static_pad (interleave, "src");
+ fail_unless (src != NULL);
+ fail_unless (gst_pad_link (src, mysinkpad) == GST_PAD_LINK_OK);
+ gst_object_unref (src);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (interleave, bus);
+
+ fail_unless (gst_element_set_state (interleave,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+ fail_unless (gst_element_set_state (queue,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ input[0] = -1.0;
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = -1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[0], inbuf) == GST_FLOW_OK);
+
+ input[1] = 1.0;
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = 1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+ input[0] = 0.0;
+ gst_pad_push_event (mysrcpads[0], gst_event_new_eos ());
+
+ input[1] = 1.0;
+ inbuf = gst_buffer_new_and_alloc (48000 * sizeof (gfloat));
+ indata = (gfloat *) GST_BUFFER_DATA (inbuf);
+ for (i = 0; i < 48000; i++)
+ indata[i] = 1.0;
+ gst_buffer_set_caps (inbuf, caps);
+ fail_unless (gst_pad_push (mysrcpads[1], inbuf) == GST_FLOW_OK);
+
+ fail_unless (have_data == 2);
+
+ gst_element_set_state (interleave, GST_STATE_NULL);
+ gst_element_set_state (queue, GST_STATE_NULL);
+
+ gst_object_unref (mysrcpads[0]);
+ gst_object_unref (mysrcpads[1]);
+ gst_object_unref (mysinkpad);
+
+ gst_element_release_request_pad (interleave, sink0);
+ gst_object_unref (sink0);
+ gst_element_release_request_pad (interleave, sink1);
+ gst_object_unref (sink1);
+
+ gst_object_unref (interleave);
+ gst_object_unref (queue);
+ gst_object_unref (bus);
+ gst_caps_unref (caps);
+
+ g_free (mysrcpads);
+}
+
+GST_END_TEST;
+
+static void
+src_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ gint n = GPOINTER_TO_INT (user_data);
+ GstCaps *caps;
+ gfloat *data;
+ gint i;
+
+ if (GST_PAD_CAPS (pad))
+ caps = gst_caps_ref (GST_PAD_CAPS (pad));
+ else {
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "width", G_TYPE_INT, 32,
+ "channels", G_TYPE_INT, 1,
+ "rate", G_TYPE_INT, 48000, "endianness", G_TYPE_INT, G_BYTE_ORDER,
+ NULL);
+
+ if (n == 2) {
+ GstAudioChannelPosition pos[1] =
+ { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT };
+ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
+ } else if (n == 3) {
+ GstAudioChannelPosition pos[1] =
+ { GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT };
+ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
+ }
+ }
+
+ data = g_new (gfloat, 48000);
+ GST_BUFFER_MALLOCDATA (buffer) = (guint8 *) data;
+ GST_BUFFER_DATA (buffer) = (guint8 *) data;
+ GST_BUFFER_SIZE (buffer) = 48000 * sizeof (gfloat);
+
+ GST_BUFFER_OFFSET (buffer) = GST_BUFFER_OFFSET_NONE;
+ GST_BUFFER_TIMESTAMP (buffer) = GST_CLOCK_TIME_NONE;
+ GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE;
+ GST_BUFFER_DURATION (buffer) = GST_SECOND;
+
+ GST_BUFFER_CAPS (buffer) = caps;
+
+ for (i = 0; i < 48000; i++)
+ data[i] = (n % 2 == 0) ? -1.0 : 1.0;
+}
+
+static void
+sink_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ gint i;
+ gfloat *data;
+ GstCaps *caps;
+ gint n = GPOINTER_TO_INT (user_data);
+
+ fail_unless (GST_IS_BUFFER (buffer));
+ fail_unless_equals_int (GST_BUFFER_SIZE (buffer),
+ 48000 * 2 * sizeof (gfloat));
+ fail_unless_equals_int (GST_BUFFER_DURATION (buffer), GST_SECOND);
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "width", G_TYPE_INT, 32,
+ "channels", G_TYPE_INT, 2,
+ "rate", G_TYPE_INT, 48000, "endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
+
+ if (n == 0) {
+ GstAudioChannelPosition pos[2] =
+ { GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE };
+ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
+ } else if (n == 1) {
+ GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
+ GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
+ };
+ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
+ } else if (n == 2) {
+ GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
+ GST_AUDIO_CHANNEL_POSITION_REAR_CENTER
+ };
+ gst_audio_set_channel_positions (gst_caps_get_structure (caps, 0), pos);
+ }
+
+ fail_unless (gst_caps_is_equal (caps, GST_BUFFER_CAPS (buffer)));
+ gst_caps_unref (caps);
+
+ data = (gfloat *) GST_BUFFER_DATA (buffer);
+
+ for (i = 0; i < 48000 * 2; i += 2) {
+ fail_unless_equals_float (data[i], -1.0);
+ fail_unless_equals_float (data[i + 1], 1.0);
+ }
+
+ have_data++;
+}
+
+GST_START_TEST (test_interleave_2ch_pipeline)
+{
+ GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+ GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+ GstMessage *msg;
+
+ have_data = 0;
+
+ pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ src1 = gst_element_factory_make ("fakesrc", "src1");
+ fail_unless (src1 != NULL);
+ g_object_set (src1, "num-buffers", 4, NULL);
+ g_object_set (src1, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src1, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (0));
+ gst_bin_add (GST_BIN (pipeline), src1);
+
+ src2 = gst_element_factory_make ("fakesrc", "src2");
+ fail_unless (src2 != NULL);
+ g_object_set (src2, "num-buffers", 4, NULL);
+ g_object_set (src2, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src2, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (1));
+ gst_bin_add (GST_BIN (pipeline), src2);
+
+ queue = gst_element_factory_make ("queue", "queue");
+ fail_unless (queue != NULL);
+ gst_bin_add (GST_BIN (pipeline), queue);
+
+ interleave = gst_element_factory_make ("interleave", "interleave");
+ fail_unless (interleave != NULL);
+ gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+ sinkpad0 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad0 != NULL);
+ tmp = gst_element_get_static_pad (src1, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sinkpad1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad1 != NULL);
+ tmp = gst_element_get_static_pad (src2, "src");
+ tmp2 = gst_element_get_static_pad (queue, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+ tmp = gst_element_get_static_pad (queue, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (sink != NULL);
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+ GINT_TO_POINTER (0));
+ gst_bin_add (GST_BIN (pipeline), sink);
+ tmp = gst_element_get_static_pad (interleave, "src");
+ tmp2 = gst_element_get_static_pad (sink, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ gst_message_unref (msg);
+
+ fail_unless (have_data == 4);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_element_release_request_pad (interleave, sinkpad0);
+ gst_object_unref (sinkpad0);
+ gst_element_release_request_pad (interleave, sinkpad1);
+ gst_object_unref (sinkpad1);
+ gst_object_unref (interleave);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_interleave_2ch_pipeline_input_chanpos)
+{
+ GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+ GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+ GstMessage *msg;
+
+ have_data = 0;
+
+ pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ src1 = gst_element_factory_make ("fakesrc", "src1");
+ fail_unless (src1 != NULL);
+ g_object_set (src1, "num-buffers", 4, NULL);
+ g_object_set (src1, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src1, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (2));
+ gst_bin_add (GST_BIN (pipeline), src1);
+
+ src2 = gst_element_factory_make ("fakesrc", "src2");
+ fail_unless (src2 != NULL);
+ g_object_set (src2, "num-buffers", 4, NULL);
+ g_object_set (src2, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src2, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (3));
+ gst_bin_add (GST_BIN (pipeline), src2);
+
+ queue = gst_element_factory_make ("queue", "queue");
+ fail_unless (queue != NULL);
+ gst_bin_add (GST_BIN (pipeline), queue);
+
+ interleave = gst_element_factory_make ("interleave", "interleave");
+ fail_unless (interleave != NULL);
+ g_object_set (interleave, "channel-positions-from-input", TRUE, NULL);
+ gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+ sinkpad0 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad0 != NULL);
+ tmp = gst_element_get_static_pad (src1, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sinkpad1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad1 != NULL);
+ tmp = gst_element_get_static_pad (src2, "src");
+ tmp2 = gst_element_get_static_pad (queue, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+ tmp = gst_element_get_static_pad (queue, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (sink != NULL);
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+ GINT_TO_POINTER (1));
+ gst_bin_add (GST_BIN (pipeline), sink);
+ tmp = gst_element_get_static_pad (interleave, "src");
+ tmp2 = gst_element_get_static_pad (sink, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ gst_message_unref (msg);
+
+ fail_unless (have_data == 4);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_element_release_request_pad (interleave, sinkpad0);
+ gst_object_unref (sinkpad0);
+ gst_element_release_request_pad (interleave, sinkpad1);
+ gst_object_unref (sinkpad1);
+ gst_object_unref (interleave);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_interleave_2ch_pipeline_custom_chanpos)
+{
+ GstElement *pipeline, *queue, *src1, *src2, *interleave, *sink;
+ GstPad *sinkpad0, *sinkpad1, *tmp, *tmp2;
+ GstMessage *msg;
+ GValueArray *arr;
+ GValue val = { 0, };
+
+ have_data = 0;
+
+ pipeline = (GstElement *) gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ src1 = gst_element_factory_make ("fakesrc", "src1");
+ fail_unless (src1 != NULL);
+ g_object_set (src1, "num-buffers", 4, NULL);
+ g_object_set (src1, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src1, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (0));
+ gst_bin_add (GST_BIN (pipeline), src1);
+
+ src2 = gst_element_factory_make ("fakesrc", "src2");
+ fail_unless (src2 != NULL);
+ g_object_set (src2, "num-buffers", 4, NULL);
+ g_object_set (src2, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (src2, "handoff", G_CALLBACK (src_handoff_float32),
+ GINT_TO_POINTER (1));
+ gst_bin_add (GST_BIN (pipeline), src2);
+
+ queue = gst_element_factory_make ("queue", "queue");
+ fail_unless (queue != NULL);
+ gst_bin_add (GST_BIN (pipeline), queue);
+
+ interleave = gst_element_factory_make ("interleave", "interleave");
+ fail_unless (interleave != NULL);
+ g_object_set (interleave, "channel-positions-from-input", FALSE, NULL);
+ arr = g_value_array_new (2);
+ g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER);
+ g_value_array_append (arr, &val);
+ g_value_unset (&val);
+ g_object_set (interleave, "channel-positions", arr, NULL);
+ g_value_array_free (arr);
+ gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
+
+ sinkpad0 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad0 != NULL);
+ tmp = gst_element_get_static_pad (src1, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sinkpad1 = gst_element_get_request_pad (interleave, "sink%d");
+ fail_unless (sinkpad1 != NULL);
+ tmp = gst_element_get_static_pad (src2, "src");
+ tmp2 = gst_element_get_static_pad (queue, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+ tmp = gst_element_get_static_pad (queue, "src");
+ fail_unless (gst_pad_link (tmp, sinkpad1) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+
+ sink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (sink != NULL);
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (sink_handoff_float32),
+ GINT_TO_POINTER (2));
+ gst_bin_add (GST_BIN (pipeline), sink);
+ tmp = gst_element_get_static_pad (interleave, "src");
+ tmp2 = gst_element_get_static_pad (sink, "sink");
+ fail_unless (gst_pad_link (tmp, tmp2) == GST_PAD_LINK_OK);
+ gst_object_unref (tmp);
+ gst_object_unref (tmp2);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1);
+ gst_message_unref (msg);
+
+ fail_unless (have_data == 4);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_element_release_request_pad (interleave, sinkpad0);
+ gst_object_unref (sinkpad0);
+ gst_element_release_request_pad (interleave, sinkpad1);
+ gst_object_unref (sinkpad1);
+ gst_object_unref (interleave);
+ gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static Suite *
+interleave_suite (void)
+{
+ Suite *s = suite_create ("interleave");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_set_timeout (tc_chain, 180);
+ tcase_add_test (tc_chain, test_create_and_unref);
+ tcase_add_test (tc_chain, test_request_pads);
+ tcase_add_test (tc_chain, test_interleave_2ch);
+ tcase_add_test (tc_chain, test_interleave_2ch_1eos);
+ tcase_add_test (tc_chain, test_interleave_2ch_pipeline);
+ tcase_add_test (tc_chain, test_interleave_2ch_pipeline_input_chanpos);
+ tcase_add_test (tc_chain, test_interleave_2ch_pipeline_custom_chanpos);
+
+ return s;
+}
+
+GST_CHECK_MAIN (interleave);
diff --git a/tests/check/elements/jpegenc.c b/tests/check/elements/jpegenc.c
new file mode 100644
index 0000000..2c992f7
--- /dev/null
+++ b/tests/check/elements/jpegenc.c
@@ -0,0 +1,247 @@
+/* GStreamer
+ *
+ * unit test for jpegenc
+ *
+ * Copyright (C) <2010> Thiago Santos <thiago.sousa.santos@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/app/gstappsink.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysinkpad;
+static GstPad *mysrcpad;
+
+#define JPEG_CAPS_STRING "image/jpeg"
+
+#define JPEG_CAPS_RESTRICTIVE "image/jpeg, " \
+ "width = (int) [100, 200], " \
+ "framerate = (fraction) 25/1, " \
+ "extraparameter = (string) { abc, def }"
+
+static GstStaticPadTemplate jpeg_sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (JPEG_CAPS_STRING));
+
+static GstStaticPadTemplate any_sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate jpeg_restrictive_sinktemplate =
+GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (JPEG_CAPS_RESTRICTIVE));
+
+static GstStaticPadTemplate any_srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+
+static GstElement *
+setup_jpegenc (GstStaticPadTemplate * sinktemplate)
+{
+ GstElement *jpegenc;
+
+ GST_DEBUG ("setup_jpegenc");
+ jpegenc = gst_check_setup_element ("jpegenc");
+ mysinkpad = gst_check_setup_sink_pad (jpegenc, sinktemplate, NULL);
+ mysrcpad = gst_check_setup_src_pad (jpegenc, &any_srctemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return jpegenc;
+}
+
+static void
+cleanup_jpegenc (GstElement * jpegenc)
+{
+ GST_DEBUG ("cleanup_jpegenc");
+ gst_element_set_state (jpegenc, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_sink_pad (jpegenc);
+ gst_check_teardown_src_pad (jpegenc);
+ gst_check_teardown_element (jpegenc);
+}
+
+static GstBuffer *
+create_video_buffer (GstCaps * caps)
+{
+ GstElement *pipeline;
+ GstElement *cf;
+ GstElement *sink;
+ GstBuffer *buffer;
+
+ pipeline =
+ gst_parse_launch
+ ("videotestsrc num-buffers=1 ! capsfilter name=cf ! appsink name=sink",
+ NULL);
+ g_assert (pipeline != NULL);
+
+ cf = gst_bin_get_by_name (GST_BIN (pipeline), "cf");
+ sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
+
+ g_object_set (G_OBJECT (cf), "caps", caps, NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ buffer = gst_app_sink_pull_buffer (GST_APP_SINK (sink));
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+ gst_object_unref (sink);
+ gst_object_unref (cf);
+ return buffer;
+}
+
+
+GST_START_TEST (test_jpegenc_getcaps)
+{
+ GstElement *jpegenc;
+ GstPad *sinkpad;
+ GstCaps *caps;
+ GstStructure *structure;
+ gint fps_n;
+ gint fps_d;
+ const GValue *value;
+
+ /* we are going to do some get caps to confirm it doesn't return non-subset
+ * caps */
+
+ jpegenc = setup_jpegenc (&any_sinktemplate);
+ sinkpad = gst_element_get_static_pad (jpegenc, "sink");
+ /* this should assert if non-subset */
+ caps = gst_pad_get_caps (sinkpad);
+ gst_caps_unref (caps);
+ gst_object_unref (sinkpad);
+ cleanup_jpegenc (jpegenc);
+
+ jpegenc = setup_jpegenc (&jpeg_sinktemplate);
+ sinkpad = gst_element_get_static_pad (jpegenc, "sink");
+ /* this should assert if non-subset */
+ caps = gst_pad_get_caps (sinkpad);
+ gst_caps_unref (caps);
+ gst_object_unref (sinkpad);
+ cleanup_jpegenc (jpegenc);
+
+ /* now use a more restricted one and check the resulting caps */
+ jpegenc = setup_jpegenc (&jpeg_restrictive_sinktemplate);
+ sinkpad = gst_element_get_static_pad (jpegenc, "sink");
+ /* this should assert if non-subset */
+ caps = gst_pad_get_caps (sinkpad);
+ structure = gst_caps_get_structure (caps, 0);
+
+ /* check the width */
+ value = gst_structure_get_value (structure, "width");
+ fail_unless (gst_value_get_int_range_min (value) == 100);
+ fail_unless (gst_value_get_int_range_max (value) == 200);
+
+ fail_unless (gst_structure_get_fraction (structure, "framerate", &fps_n,
+ &fps_d));
+ fail_unless (fps_n == 25);
+ fail_unless (fps_d == 1);
+
+ gst_caps_unref (caps);
+ gst_object_unref (sinkpad);
+ cleanup_jpegenc (jpegenc);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_jpegenc_different_caps)
+{
+ GstElement *jpegenc;
+ GstBuffer *buffer;
+ GstCaps *caps;
+ GstCaps *allowed_caps;
+
+ /* now use a more restricted one and check the resulting caps */
+ jpegenc = setup_jpegenc (&any_sinktemplate);
+ gst_element_set_state (jpegenc, GST_STATE_PLAYING);
+
+ /* push first buffer with 800x600 resolution */
+ caps = gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT,
+ 800, "height", G_TYPE_INT, 600, "framerate",
+ GST_TYPE_FRACTION, 1, 1, "format", GST_TYPE_FOURCC,
+ GST_MAKE_FOURCC ('I', '4', '2', '0'), NULL);
+ buffer = create_video_buffer (caps);
+ gst_caps_unref (caps);
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+
+ /* check the allowed caps to see if a second buffer with a different
+ * caps could be negotiated */
+ allowed_caps = gst_pad_get_allowed_caps (mysrcpad);
+
+ /* the caps we want to negotiate to */
+ caps = gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT,
+ 640, "height", G_TYPE_INT, 480, "framerate",
+ GST_TYPE_FRACTION, 1, 1, "format", GST_TYPE_FOURCC,
+ GST_MAKE_FOURCC ('I', '4', '2', '0'), NULL);
+ fail_unless (gst_caps_can_intersect (allowed_caps, caps));
+
+ /* push second buffer with 640x480 resolution */
+ buffer = create_video_buffer (caps);
+ gst_caps_unref (caps);
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+
+ gst_caps_unref (allowed_caps);
+ gst_element_set_state (jpegenc, GST_STATE_NULL);
+ cleanup_jpegenc (jpegenc);
+}
+
+GST_END_TEST;
+
+static Suite *
+jpegenc_suite (void)
+{
+ Suite *s = suite_create ("jpegenc");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_jpegenc_getcaps);
+ tcase_add_test (tc_chain, test_jpegenc_different_caps);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = jpegenc_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/level.c b/tests/check/elements/level.c
new file mode 100644
index 0000000..2bb4eb7
--- /dev/null
+++ b/tests/check/elements/level.c
@@ -0,0 +1,326 @@
+/* GStreamer
+ *
+ * unit test for level
+ *
+ * Copyright (C) <2005> Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+#include <math.h>
+
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define LEVEL_CAPS_TEMPLATE_STRING \
+ "audio/x-raw-int, " \
+ "rate = (int) [ 1, MAX ], " \
+ "channels = (int) [ 1, 8 ], " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) {8, 16}, " \
+ "depth = (int) {8, 16}, " \
+ "signed = (boolean) true"
+
+#define LEVEL_CAPS_STRING \
+ "audio/x-raw-int, " \
+ "rate = (int) 1000, " \
+ "channels = (int) 2, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (boolean) true"
+
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (LEVEL_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (LEVEL_CAPS_TEMPLATE_STRING)
+ );
+
+/* takes over reference for outcaps */
+static GstElement *
+setup_level (void)
+{
+ GstElement *level;
+
+ GST_DEBUG ("setup_level");
+ level = gst_check_setup_element ("level");
+ mysrcpad = gst_check_setup_src_pad (level, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (level, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return level;
+}
+
+static void
+cleanup_level (GstElement * level)
+{
+ GST_DEBUG ("cleanup_level");
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (level);
+ gst_check_teardown_sink_pad (level);
+ gst_check_teardown_element (level);
+}
+
+
+GST_START_TEST (test_int16)
+{
+ GstElement *level;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int i, j;
+ gint16 *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gdouble dB;
+
+ level = setup_level ();
+ g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL);
+
+ fail_unless (gst_element_set_state (level,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a fake 0.1 sec buffer with a half-amplitude block signal */
+ inbuffer = gst_buffer_new_and_alloc (400);
+ data = (gint16 *) GST_BUFFER_DATA (inbuffer);
+ for (j = 0; j < 200; ++j) {
+ *data = 16536;
+ ++data;
+ }
+ caps = gst_caps_from_string (LEVEL_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the level message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (level, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (level));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "level");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ /* block wave of half amplitude has -5.94 dB for rms, peak and decay */
+ for (i = 0; i < 2; ++i) {
+ const gchar *fields[3] = { "rms", "peak", "decay" };
+ for (j = 0; j < 3; ++j) {
+ list = gst_structure_get_value (structure, fields[j]);
+ value = gst_value_list_get_value (list, i);
+ dB = g_value_get_double (value);
+ GST_DEBUG ("%s is %lf", fields[j], dB);
+ fail_if (dB < -6.0);
+ fail_if (dB > -5.9);
+ }
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (level, "level", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (level, "level", 1);
+
+ gst_element_set_bus (level, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ gst_buffer_unref (outbuffer);
+ fail_unless (gst_element_set_state (level,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (level, "level", 1);
+ cleanup_level (level);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_int16_panned)
+{
+ GstElement *level;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int j;
+ gint16 *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gdouble dB;
+ const gchar *fields[3] = { "rms", "peak", "decay" };
+
+ level = setup_level ();
+ g_object_set (level, "message", TRUE, "interval", GST_SECOND / 10, NULL);
+
+ fail_unless (gst_element_set_state (level,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a fake 0.1 sec buffer with a half-amplitude block signal */
+ inbuffer = gst_buffer_new_and_alloc (400);
+ data = (gint16 *) GST_BUFFER_DATA (inbuffer);
+ for (j = 0; j < 100; ++j) {
+ *data = 0;
+ ++data;
+ *data = 16536;
+ ++data;
+ }
+ caps = gst_caps_from_string (LEVEL_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the level message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (level, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (level));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "level");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ /* silence has 0 dB for rms, peak and decay */
+ for (j = 0; j < 3; ++j) {
+ list = gst_structure_get_value (structure, fields[j]);
+ value = gst_value_list_get_value (list, 0);
+ dB = g_value_get_double (value);
+ GST_DEBUG ("%s[0] is %lf", fields[j], dB);
+#ifdef HAVE_ISINF
+ fail_unless (isinf (dB));
+#elif defined (HAVE_FPCLASS)
+ fail_unless (fpclass (dB) == FP_NINF);
+#endif
+ }
+ /* block wave of half amplitude has -5.94 dB for rms, peak and decay */
+ for (j = 0; j < 3; ++j) {
+ list = gst_structure_get_value (structure, fields[j]);
+ value = gst_value_list_get_value (list, 1);
+ dB = g_value_get_double (value);
+ GST_DEBUG ("%s[1] is %lf", fields[j], dB);
+ fail_if (dB < -6.0);
+ fail_if (dB > -5.9);
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (level, "level", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (level, "level", 1);
+
+ gst_element_set_bus (level, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ gst_buffer_unref (outbuffer);
+ fail_unless (gst_element_set_state (level,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (level, "level", 1);
+ cleanup_level (level);
+}
+
+GST_END_TEST;
+
+static Suite *
+level_suite (void)
+{
+ Suite *s = suite_create ("level");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_int16);
+ tcase_add_test (tc_chain, test_int16_panned);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = level_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/matroskamux.c b/tests/check/elements/matroskamux.c
new file mode 100644
index 0000000..bbc1862
--- /dev/null
+++ b/tests/check/elements/matroskamux.c
@@ -0,0 +1,470 @@
+/* GStreamer
+ *
+ * unit test for matroskamux
+ *
+ * Copyright (C) <2005> Michal Benes <michal.benes@xeris.cz>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/base/gstadapter.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define AC3_CAPS_STRING "audio/x-ac3, " \
+ "channels = (int) 1, " \
+ "rate = (int) 8000"
+#define VORBIS_CAPS_STRING "audio/x-vorbis, " \
+ "channels = (int) 1, " \
+ "rate = (int) 8000, " \
+ "streamheader=(buffer)<10, 2020, 303030>"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("video/x-matroska"));
+static GstStaticPadTemplate srcvorbistemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VORBIS_CAPS_STRING));
+
+static GstStaticPadTemplate srcac3template = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (AC3_CAPS_STRING));
+
+
+static GstPad *
+setup_src_pad (GstElement * element,
+ GstStaticPadTemplate * template, GstCaps * caps)
+{
+ GstPad *srcpad, *sinkpad;
+
+ GST_DEBUG_OBJECT (element, "setting up sending pad");
+ /* sending pad */
+ srcpad = gst_pad_new_from_static_template (template, "src");
+ fail_if (srcpad == NULL, "Could not create a srcpad");
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
+ gst_pad_set_active (srcpad, TRUE);
+
+ if (!(sinkpad = gst_element_get_static_pad (element, "audio_%d")))
+ sinkpad = gst_element_get_request_pad (element, "audio_%d");
+ fail_if (sinkpad == NULL, "Could not get sink pad from %s",
+ GST_ELEMENT_NAME (element));
+ /* references are owned by: 1) us, 2) matroskamux, 3) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ if (caps)
+ fail_unless (gst_pad_set_caps (srcpad, caps));
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (sinkpad); /* because we got it higher up */
+
+ /* references are owned by: 1) matroskamux, 2) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
+
+ return srcpad;
+}
+
+static void
+teardown_src_pad (GstElement * element)
+{
+ GstPad *srcpad, *sinkpad;
+
+ /* clean up floating src pad */
+ if (!(sinkpad = gst_element_get_static_pad (element, "audio_0")))
+ sinkpad = gst_element_get_request_pad (element, "audio_0");
+ /* references are owned by: 1) us, 2) matroskamux, 3) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ srcpad = gst_pad_get_peer (sinkpad);
+
+ gst_pad_unlink (srcpad, sinkpad);
+
+ /* references are owned by: 1) us, 2) matroskamux, 3) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ gst_object_unref (sinkpad);
+ /* one more ref is held by element itself */
+
+ /* pad refs held by both creator and this function (through _get_peer) */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 2);
+ gst_object_unref (srcpad);
+ gst_object_unref (srcpad);
+}
+
+static GstPad *
+setup_sink_pad (GstElement * element, GstStaticPadTemplate * template,
+ GstCaps * caps)
+{
+ GstPad *srcpad, *sinkpad;
+
+ GST_DEBUG_OBJECT (element, "setting up receiving pad");
+ /* receiving pad */
+ sinkpad = gst_pad_new_from_static_template (template, "sink");
+
+ fail_if (sinkpad == NULL, "Could not create a sinkpad");
+ gst_pad_set_active (sinkpad, TRUE);
+
+ srcpad = gst_element_get_static_pad (element, "src");
+ fail_if (srcpad == NULL, "Could not get source pad from %s",
+ GST_ELEMENT_NAME (element));
+ if (caps)
+ fail_unless (gst_pad_set_caps (sinkpad, caps));
+ gst_pad_set_chain_function (sinkpad, gst_check_chain_func);
+
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Could not link %s source and sink pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (srcpad); /* because we got it higher up */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 2);
+
+ return sinkpad;
+}
+
+static void
+teardown_sink_pad (GstElement * element)
+{
+ GstPad *srcpad, *sinkpad;
+
+ /* clean up floating sink pad */
+ srcpad = gst_element_get_static_pad (element, "src");
+ sinkpad = gst_pad_get_peer (srcpad);
+ gst_pad_unlink (srcpad, sinkpad);
+
+ /* pad refs held by both creator and this function (through _get_pad) */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 3);
+ gst_object_unref (srcpad);
+ /* one more ref is held by element itself */
+
+ /* pad refs held by both creator and this function (through _get_peer) */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
+ gst_object_unref (sinkpad);
+ gst_object_unref (sinkpad);
+}
+
+
+static GstElement *
+setup_matroskamux (GstStaticPadTemplate * srctemplate)
+{
+ GstElement *matroskamux;
+
+ GST_DEBUG ("setup_matroskamux");
+ matroskamux = gst_check_setup_element ("matroskamux");
+ g_object_set (matroskamux, "version", 1, NULL);
+ mysrcpad = setup_src_pad (matroskamux, srctemplate, NULL);
+ mysinkpad = setup_sink_pad (matroskamux, &sinktemplate, NULL);
+
+ return matroskamux;
+}
+
+static void
+cleanup_matroskamux (GstElement * matroskamux)
+{
+ GST_DEBUG ("cleanup_matroskamux");
+ gst_element_set_state (matroskamux, GST_STATE_NULL);
+
+ teardown_src_pad (matroskamux);
+ teardown_sink_pad (matroskamux);
+ gst_check_teardown_element (matroskamux);
+}
+
+static void
+check_buffer_data (GstBuffer * buffer, void *data, size_t data_size)
+{
+ fail_unless (GST_BUFFER_SIZE (buffer) == data_size);
+ fail_unless (memcmp (data, GST_BUFFER_DATA (buffer), data_size) == 0);
+}
+
+GST_START_TEST (test_ebml_header)
+{
+ GstElement *matroskamux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstAdapter *adapter;
+ int num_buffers;
+ int i;
+ gint available;
+ guint8 data[] =
+ { 0x1a, 0x45, 0xdf, 0xa3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
+ 0x42, 0x82, 0x89, 0x6d, 0x61, 0x74, 0x72, 0x6f, 0x73, 0x6b, 0x61, 0x00,
+ 0x42, 0x87, 0x81, 0x01,
+ 0x42, 0x85, 0x81, 0x01
+ };
+
+ matroskamux = setup_matroskamux (&srcac3template);
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+ fail_unless (num_buffers >= 1,
+ "expected at least 5 buffers, but got only %d", num_buffers);
+
+ adapter = gst_adapter_new ();
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+
+ gst_adapter_push (adapter, outbuffer);
+ }
+
+ available = gst_adapter_available (adapter);
+ fail_unless (available >= sizeof (data));
+ outbuffer = gst_adapter_take_buffer (adapter, sizeof (data));
+ g_object_unref (adapter);
+
+ check_buffer_data (outbuffer, data, sizeof (data));
+ gst_buffer_unref (outbuffer);
+
+ cleanup_matroskamux (matroskamux);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_vorbis_header)
+{
+ GstElement *matroskamux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int num_buffers;
+ int i;
+ gboolean vorbis_header_found = FALSE;
+ guint8 data[12] =
+ { 0x63, 0xa2, 0x89, 0x02, 0x01, 0x02, 0x10, 0x20, 0x20, 0x30, 0x30,
+ 0x30
+ };
+
+ matroskamux = setup_matroskamux (&srcvorbistemplate);
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ caps = gst_caps_from_string (VORBIS_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+
+ for (i = 0; i < num_buffers; ++i) {
+ gint j;
+
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ if (!vorbis_header_found && GST_BUFFER_SIZE (outbuffer) >= sizeof (data)) {
+ for (j = 0; j <= GST_BUFFER_SIZE (outbuffer) - sizeof (data); j++) {
+ if (memcmp (GST_BUFFER_DATA (outbuffer) + j, data, sizeof (data)) == 0) {
+ vorbis_header_found = TRUE;
+ break;
+ }
+ }
+ }
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ fail_unless (vorbis_header_found);
+
+ cleanup_matroskamux (matroskamux);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_block_group)
+{
+ GstElement *matroskamux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int num_buffers;
+ int i;
+ guint8 data0[] = { 0xa0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+ 0xa1, 0x85,
+ 0x81, 0x00, 0x01, 0x00
+ };
+ guint8 data1[] = { 0x42 };
+
+ matroskamux = setup_matroskamux (&srcac3template);
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* Generate the header */
+ inbuffer = gst_buffer_new_and_alloc (1);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ caps = gst_caps_from_string (AC3_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ /* Now push a buffer */
+ inbuffer = gst_buffer_new_and_alloc (1);
+ GST_BUFFER_DATA (inbuffer)[0] = 0x42;
+ GST_BUFFER_TIMESTAMP (inbuffer) = 1000000;
+ caps = gst_caps_from_string (AC3_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+ fail_unless (num_buffers >= 2);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ switch (i) {
+ case 0:
+ check_buffer_data (outbuffer, data0, sizeof (data0));
+ break;
+ case 1:
+ check_buffer_data (outbuffer, data1, sizeof (data1));
+ break;
+ default:
+ break;
+ }
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_matroskamux (matroskamux);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_reset)
+{
+ GstElement *matroskamux;
+ GstBuffer *inbuffer;
+ GstBuffer *outbuffer;
+ int num_buffers;
+ int i;
+
+ matroskamux = setup_matroskamux (&srcac3template);
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+ fail_unless (num_buffers >= 1,
+ "expected at least 1 buffer, but got only %d", num_buffers);
+
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+
+ fail_unless (gst_element_set_state (matroskamux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ num_buffers = g_list_length (buffers);
+ fail_unless (num_buffers >= 2,
+ "expected at least 2 buffers, but got only %d", num_buffers);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ }
+
+ cleanup_matroskamux (matroskamux);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+GST_END_TEST;
+
+static Suite *
+matroskamux_suite (void)
+{
+ Suite *s = suite_create ("matroskamux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_ebml_header);
+ tcase_add_test (tc_chain, test_vorbis_header);
+ tcase_add_test (tc_chain, test_block_group);
+ tcase_add_test (tc_chain, test_reset);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = matroskamux_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/matroskaparse.c b/tests/check/elements/matroskaparse.c
new file mode 100644
index 0000000..e1d5e41
--- /dev/null
+++ b/tests/check/elements/matroskaparse.c
@@ -0,0 +1,118 @@
+/* GStreamer unit tests for matroskaparse
+ * Copyright (C) 2011 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/gst.h>
+
+static void
+run_check_for_file (const gchar * file_name, gboolean push_mode)
+{
+ GstStateChangeReturn state_ret;
+ GstMessage *msg;
+ GstElement *src, *sep, *sink, *matroskaparse, *pipeline;
+ GstBus *bus;
+ gchar *path;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL, "Failed to create pipeline!");
+
+ bus = gst_element_get_bus (pipeline);
+
+ src = gst_element_factory_make ("filesrc", "filesrc");
+ fail_unless (src != NULL, "Failed to create 'filesrc' element!");
+
+ if (push_mode) {
+ sep = gst_element_factory_make ("queue", "queue");
+ fail_unless (sep != NULL, "Failed to create 'queue' element");
+ } else {
+ sep = gst_element_factory_make ("identity", "identity");
+ fail_unless (sep != NULL, "Failed to create 'identity' element");
+ }
+
+ matroskaparse = gst_element_factory_make ("matroskaparse", "matroskaparse");
+ fail_unless (matroskaparse != NULL, "Failed to create matroskaparse element");
+
+ sink = gst_element_factory_make ("fakesink", "fakesink");
+ fail_unless (sink != NULL, "Failed to create 'fakesink' element!");
+
+ gst_bin_add_many (GST_BIN (pipeline), src, sep, matroskaparse, sink, NULL);
+
+ fail_unless (gst_element_link (src, sep));
+ fail_unless (gst_element_link (sep, matroskaparse));
+ fail_unless (gst_element_link (matroskaparse, sink));
+
+ path = g_build_filename (GST_TEST_FILES_PATH, file_name, NULL);
+ GST_LOG ("reading file '%s'", path);
+ g_object_set (src, "location", path, NULL);
+
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ if (state_ret == GST_STATE_CHANGE_ASYNC) {
+ GST_LOG ("waiting for pipeline to reach PAUSED state");
+ state_ret = gst_element_get_state (pipeline, NULL, NULL, -1);
+ fail_unless_equals_int (state_ret, GST_STATE_CHANGE_SUCCESS);
+ }
+
+ GST_LOG ("PAUSED, let's play a little..");
+ state_ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
+
+ msg = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
+ fail_unless (msg != NULL, "Expected EOS message on bus! (%s)", file_name);
+
+ gst_message_unref (msg);
+ gst_object_unref (bus);
+
+ fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+ gst_object_unref (pipeline);
+
+ g_free (path);
+}
+
+GST_START_TEST (test_parse_file_pull)
+{
+ run_check_for_file ("pinknoise-vorbis.mkv", TRUE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_parse_file_push)
+{
+ run_check_for_file ("pinknoise-vorbis.mkv", FALSE);
+}
+
+GST_END_TEST;
+
+static Suite *
+matroskaparse_suite (void)
+{
+ Suite *s = suite_create ("matroskaparse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_parse_file_pull);
+ tcase_add_test (tc_chain, test_parse_file_push);
+
+ return s;
+}
+
+GST_CHECK_MAIN (matroskaparse)
diff --git a/tests/check/elements/mpegaudioparse.c b/tests/check/elements/mpegaudioparse.c
new file mode 100644
index 0000000..2bb2699
--- /dev/null
+++ b/tests/check/elements/mpegaudioparse.c
@@ -0,0 +1,170 @@
+/*
+ * GStreamer
+ *
+ * unit test for aacparse
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "parser.h"
+
+#define SRC_CAPS_TMPL "audio/mpeg, parsed=(boolean)false, mpegversion=(int)1"
+#define SINK_CAPS_TMPL "audio/mpeg, parsed=(boolean)true, mpegversion=(int)1"
+
+GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SINK_CAPS_TMPL)
+ );
+
+GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SRC_CAPS_TMPL)
+ );
+
+/* some data */
+static guint8 mp3_frame[384] = {
+ 0xff, 0xfb, 0x94, 0xc4, 0xff, 0x83, 0xc0, 0x00,
+ 0x01, 0xa4, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x34, 0x80, 0x00, 0x00, 0x04, 0x00,
+};
+
+static guint8 garbage_frame[] = {
+ 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+
+GST_START_TEST (test_parse_normal)
+{
+ gst_parser_test_normal (mp3_frame, sizeof (mp3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_drain_single)
+{
+ gst_parser_test_drain_single (mp3_frame, sizeof (mp3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_drain_garbage)
+{
+ gst_parser_test_drain_garbage (mp3_frame, sizeof (mp3_frame),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_split)
+{
+ gst_parser_test_split (mp3_frame, sizeof (mp3_frame));
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_parse_skip_garbage)
+{
+ gst_parser_test_skip_garbage (mp3_frame, sizeof (mp3_frame),
+ garbage_frame, sizeof (garbage_frame));
+}
+
+GST_END_TEST;
+
+
+#define structure_get_int(s,f) \
+ (g_value_get_int(gst_structure_get_value(s,f)))
+#define fail_unless_structure_field_int_equals(s,field,num) \
+ fail_unless_equals_int (structure_get_int(s,field), num)
+
+GST_START_TEST (test_parse_detect_stream)
+{
+ GstStructure *s;
+ GstCaps *caps;
+
+ caps = gst_parser_test_get_output_caps (mp3_frame, sizeof (mp3_frame), NULL);
+
+ fail_unless (caps != NULL);
+
+ GST_LOG ("mpegaudio output caps: %" GST_PTR_FORMAT, caps);
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (gst_structure_has_name (s, "audio/mpeg"));
+ fail_unless_structure_field_int_equals (s, "mpegversion", 1);
+ fail_unless_structure_field_int_equals (s, "layer", 3);
+ fail_unless_structure_field_int_equals (s, "channels", 1);
+ fail_unless_structure_field_int_equals (s, "rate", 48000);
+
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+mpegaudioparse_suite (void)
+{
+ Suite *s = suite_create ("mpegaudioparse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_parse_normal);
+ tcase_add_test (tc_chain, test_parse_drain_single);
+ tcase_add_test (tc_chain, test_parse_drain_garbage);
+ tcase_add_test (tc_chain, test_parse_split);
+ tcase_add_test (tc_chain, test_parse_skip_garbage);
+ tcase_add_test (tc_chain, test_parse_detect_stream);
+
+ return s;
+}
+
+
+/*
+ * TODO:
+ * - Both push- and pull-modes need to be tested
+ * * Pull-mode & EOS
+ */
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = mpegaudioparse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ /* init test context */
+ ctx_factory = "mpegaudioparse";
+ ctx_sink_template = &sinktemplate;
+ ctx_src_template = &srctemplate;
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/multifile.c b/tests/check/elements/multifile.c
new file mode 100644
index 0000000..0a4849a
--- /dev/null
+++ b/tests/check/elements/multifile.c
@@ -0,0 +1,283 @@
+/* GStreamer unit test for multifile plugin
+ *
+ * Copyright (C) 2007 David A. Schleef <ds@schleef.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib/gstdio.h>
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/video/video.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static void
+run_pipeline (GstElement * pipeline)
+{
+ gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_get_state (pipeline, NULL, NULL, -1);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ /* FIXME too lazy */
+ g_usleep (1000000);
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+}
+
+#if !GLIB_CHECK_VERSION(2,30,0)
+static gchar *
+g_mkdtemp (gchar * template)
+{
+ gchar *tmpdir;
+
+ tmpdir = mkdtemp (template);
+ if (tmpdir == NULL) {
+ g_free (template);
+ }
+ return tmpdir;
+}
+#endif
+
+GST_START_TEST (test_multifilesink_key_frame)
+{
+ GstElement *pipeline;
+ GstElement *mfs;
+ int i;
+ const gchar *tmpdir;
+ gchar *my_tmpdir;
+ gchar *template;
+ gchar *mfs_pattern;
+
+ tmpdir = g_get_tmp_dir ();
+ template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL);
+ my_tmpdir = g_mkdtemp (template);
+ fail_if (my_tmpdir == NULL);
+
+ pipeline =
+ gst_parse_launch
+ ("videotestsrc num-buffers=10 ! video/x-raw-yuv,format=(fourcc)I420,width=320,height=240 ! multifilesink name=mfs",
+ NULL);
+ fail_if (pipeline == NULL);
+ mfs = gst_bin_get_by_name (GST_BIN (pipeline), "mfs");
+ fail_if (mfs == NULL);
+ mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
+ g_object_set (G_OBJECT (mfs), "location", mfs_pattern, NULL);
+ g_object_unref (mfs);
+ run_pipeline (pipeline);
+ gst_object_unref (pipeline);
+
+ for (i = 0; i < 10; i++) {
+ char *s;
+
+ s = g_strdup_printf (mfs_pattern, i);
+ fail_if (g_remove (s) != 0);
+ g_free (s);
+ }
+ fail_if (g_remove (my_tmpdir) != 0);
+
+ g_free (mfs_pattern);
+ g_free (my_tmpdir);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_multifilesink_max_files)
+{
+ GstElement *pipeline;
+ GstElement *mfs;
+ int i;
+ const gchar *tmpdir;
+ gchar *my_tmpdir;
+ gchar *template;
+ gchar *mfs_pattern;
+
+ tmpdir = g_get_tmp_dir ();
+ template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL);
+ my_tmpdir = g_mkdtemp (template);
+ fail_if (my_tmpdir == NULL);
+
+ pipeline =
+ gst_parse_launch
+ ("videotestsrc num-buffers=10 ! video/x-raw-yuv,format=(fourcc)I420,width=320,height=240 ! multifilesink name=mfs",
+ NULL);
+ fail_if (pipeline == NULL);
+ mfs = gst_bin_get_by_name (GST_BIN (pipeline), "mfs");
+ fail_if (mfs == NULL);
+ mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
+ g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "max-files", 3, NULL);
+ g_object_unref (mfs);
+ run_pipeline (pipeline);
+ gst_object_unref (pipeline);
+
+ for (i = 0; i < 7; i++) {
+ char *s;
+
+ s = g_strdup_printf (mfs_pattern, i);
+ fail_unless (g_remove (s) != 0);
+ g_free (s);
+ }
+ for (i = 7; i < 10; i++) {
+ char *s;
+
+ s = g_strdup_printf (mfs_pattern, i);
+ fail_if (g_remove (s) != 0);
+ g_free (s);
+ }
+ fail_if (g_remove (my_tmpdir) != 0);
+
+ g_free (mfs_pattern);
+ g_free (my_tmpdir);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_multifilesink_key_unit)
+{
+ GstElement *mfs;
+ int i;
+ const gchar *tmpdir;
+ gchar *my_tmpdir;
+ gchar *template;
+ gchar *mfs_pattern;
+ GstBuffer *buf;
+ GstPad *sink;
+
+ tmpdir = g_get_tmp_dir ();
+ template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL);
+ my_tmpdir = g_mkdtemp (template);
+ fail_if (my_tmpdir == NULL);
+
+ mfs = gst_element_factory_make ("multifilesink", NULL);
+ fail_if (mfs == NULL);
+ mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
+ g_object_set (G_OBJECT (mfs), "location", mfs_pattern, "next-file", 3, NULL);
+ fail_if (gst_element_set_state (mfs,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
+
+ sink = gst_element_get_static_pad (mfs, "sink");
+ buf = gst_buffer_new_and_alloc (4);
+
+ memcpy (GST_BUFFER_DATA (buf), "foo", 4);
+ fail_if (gst_pad_chain (sink, gst_buffer_ref (buf)) != GST_FLOW_OK);
+
+ memcpy (GST_BUFFER_DATA (buf), "bar", 4);
+ fail_if (gst_pad_chain (sink, gst_buffer_ref (buf)) != GST_FLOW_OK);
+
+ fail_unless (gst_pad_send_event (sink,
+ gst_video_event_new_downstream_force_key_unit (GST_CLOCK_TIME_NONE,
+ GST_CLOCK_TIME_NONE, GST_CLOCK_TIME_NONE, TRUE, 1)));
+
+ memcpy (GST_BUFFER_DATA (buf), "baz", 4);
+ fail_if (gst_pad_chain (sink, buf) != GST_FLOW_OK);
+
+ fail_if (gst_element_set_state (mfs,
+ GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE);
+
+ for (i = 0; i < 2; i++) {
+ char *s;
+
+ s = g_strdup_printf (mfs_pattern, i);
+ fail_if (g_remove (s) != 0);
+ g_free (s);
+ }
+ fail_if (g_remove (my_tmpdir) != 0);
+
+ g_free (mfs_pattern);
+ g_free (my_tmpdir);
+ gst_object_unref (sink);
+ gst_object_unref (mfs);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_multifilesrc)
+{
+ GstElement *pipeline;
+ GstElement *mfs;
+ int i;
+ const gchar *tmpdir;
+ gchar *my_tmpdir;
+ gchar *template;
+ gchar *mfs_pattern;
+
+ tmpdir = g_get_tmp_dir ();
+ template = g_build_filename (tmpdir, "multifile-test-XXXXXX", NULL);
+ my_tmpdir = g_mkdtemp (template);
+ fail_if (my_tmpdir == NULL);
+
+ pipeline =
+ gst_parse_launch
+ ("videotestsrc num-buffers=10 ! video/x-raw-yuv,format=(fourcc)I420,width=320,height=240 ! multifilesink name=mfs",
+ NULL);
+ fail_if (pipeline == NULL);
+ mfs = gst_bin_get_by_name (GST_BIN (pipeline), "mfs");
+ fail_if (mfs == NULL);
+ mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
+ g_object_set (G_OBJECT (mfs), "location", mfs_pattern, NULL);
+ g_free (mfs_pattern);
+ g_object_unref (mfs);
+ run_pipeline (pipeline);
+ gst_object_unref (pipeline);
+
+ pipeline =
+ gst_parse_launch
+ ("multifilesrc ! video/x-raw-yuv,format=(fourcc)I420,width=320,height=240,framerate=10/1 ! fakesink",
+ NULL);
+ fail_if (pipeline == NULL);
+ mfs = gst_bin_get_by_name (GST_BIN (pipeline), "multifilesrc0");
+ fail_if (mfs == NULL);
+ mfs_pattern = g_build_filename (my_tmpdir, "%05d", NULL);
+ g_object_set (G_OBJECT (mfs), "location", mfs_pattern, NULL);
+ g_object_unref (mfs);
+ run_pipeline (pipeline);
+ gst_object_unref (pipeline);
+
+ for (i = 0; i < 10; i++) {
+ char *s;
+
+ s = g_strdup_printf (mfs_pattern, i);
+ fail_if (g_remove (s) != 0);
+ g_free (s);
+ }
+ fail_if (g_remove (my_tmpdir) != 0);
+
+ g_free (mfs_pattern);
+ g_free (my_tmpdir);
+}
+
+GST_END_TEST;
+
+static Suite *
+libvisual_suite (void)
+{
+ Suite *s = suite_create ("multifile");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+
+ tcase_add_test (tc_chain, test_multifilesink_key_frame);
+ tcase_add_test (tc_chain, test_multifilesink_max_files);
+ tcase_add_test (tc_chain, test_multifilesink_key_unit);
+ tcase_add_test (tc_chain, test_multifilesrc);
+
+ return s;
+}
+
+GST_CHECK_MAIN (libvisual);
diff --git a/tests/check/elements/parser.c b/tests/check/elements/parser.c
new file mode 100644
index 0000000..4da658b
--- /dev/null
+++ b/tests/check/elements/parser.c
@@ -0,0 +1,436 @@
+/*
+ * GStreamer
+ *
+ * unit test for (audio) parser
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include "elements/parser.h"
+
+
+/* context state variables */
+const gchar *ctx_factory;
+GstStaticPadTemplate *ctx_sink_template;
+GstStaticPadTemplate *ctx_src_template;
+GstCaps *ctx_input_caps;
+GstCaps *ctx_output_caps;
+guint ctx_discard = 0;
+datablob ctx_headers[MAX_HEADERS] = { {NULL, 0}, };
+
+gboolean ctx_no_metadata = FALSE;
+
+/* helper variables */
+GList *current_buf = NULL;
+
+GstPad *srcpad, *sinkpad;
+guint dataoffset = 0;
+GstClockTime ts_counter = 0;
+gint64 offset_counter = 0;
+guint buffer_counter = 0;
+
+typedef struct
+{
+ guint discard;
+ guint buffers_before_offset_skip;
+ guint offset_skip_amount;
+ const guint8 *data_to_verify;
+ guint data_to_verify_size;
+ GstCaps *caps;
+ gboolean no_metadata;
+} buffer_verify_data_s;
+
+/* takes a copy of the passed buffer data */
+static GstBuffer *
+buffer_new (const unsigned char *buffer_data, guint size)
+{
+ GstBuffer *buffer;
+
+ buffer = gst_buffer_new_and_alloc (size);
+ if (buffer_data) {
+ memcpy (GST_BUFFER_DATA (buffer), buffer_data, size);
+ } else {
+ guint i;
+ /* Create a recognizable pattern (loop 0x00 -> 0xff) in the data block */
+ for (i = 0; i < size; i++) {
+ GST_BUFFER_DATA (buffer)[i] = i % 0x100;
+ }
+ }
+
+ gst_buffer_set_caps (buffer, GST_PAD_CAPS (srcpad));
+ GST_BUFFER_OFFSET (buffer) = dataoffset;
+ dataoffset += size;
+ return buffer;
+}
+
+/*
+ * Adds buffer sizes together.
+ */
+static void
+buffer_count_size (void *buffer, void *user_data)
+{
+ guint *sum = (guint *) user_data;
+ *sum += GST_BUFFER_SIZE (buffer);
+}
+
+/*
+ * Verify that given buffer contains predefined ADTS frame.
+ */
+static void
+buffer_verify_data (void *buffer, void *user_data)
+{
+ buffer_verify_data_s *vdata;
+
+ if (!user_data) {
+ return;
+ }
+
+ vdata = (buffer_verify_data_s *) user_data;
+
+ GST_DEBUG ("discard: %d", vdata->discard);
+ if (vdata->discard) {
+ buffer_counter++;
+ if (buffer_counter == vdata->discard) {
+ buffer_counter = 0;
+ vdata->discard = 0;
+ }
+ return;
+ }
+
+ fail_unless (GST_BUFFER_SIZE (buffer) == vdata->data_to_verify_size);
+ fail_unless (memcmp (GST_BUFFER_DATA (buffer), vdata->data_to_verify,
+ vdata->data_to_verify_size) == 0);
+
+ if (vdata->buffers_before_offset_skip) {
+ /* This is for skipping the garbage in some test cases */
+ if (buffer_counter == vdata->buffers_before_offset_skip) {
+ offset_counter += vdata->offset_skip_amount;
+ }
+ }
+ if (!vdata->no_metadata) {
+ fail_unless (GST_BUFFER_TIMESTAMP (buffer) == ts_counter);
+ fail_unless (GST_BUFFER_DURATION (buffer) != 0);
+ fail_unless (GST_BUFFER_OFFSET (buffer) == offset_counter);
+ }
+
+ if (vdata->caps) {
+ GST_LOG ("%" GST_PTR_FORMAT " = %" GST_PTR_FORMAT " ?",
+ GST_BUFFER_CAPS (buffer), vdata->caps);
+ fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), vdata->caps));
+ }
+
+ ts_counter += GST_BUFFER_DURATION (buffer);
+ offset_counter += GST_BUFFER_SIZE (buffer);
+ buffer_counter++;
+}
+
+static GstElement *
+setup_element (const gchar * factory, GstStaticPadTemplate * sink_template,
+ GstCaps * sink_caps, GstStaticPadTemplate * src_template,
+ GstCaps * src_caps)
+{
+ GstElement *element;
+ GstBus *bus;
+
+ element = gst_check_setup_element (factory);
+ srcpad = gst_check_setup_src_pad (element, src_template, src_caps);
+ sinkpad = gst_check_setup_sink_pad (element, sink_template, sink_caps);
+ gst_pad_set_active (srcpad, TRUE);
+ gst_pad_set_active (sinkpad, TRUE);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (element, bus);
+
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+ "could not set to playing");
+
+ ts_counter = offset_counter = buffer_counter = 0;
+ buffers = NULL;
+ return element;
+}
+
+static void
+cleanup_element (GstElement * element)
+{
+ GstBus *bus;
+
+ /* Free parsed buffers */
+ gst_check_drop_buffers ();
+
+ bus = GST_ELEMENT_BUS (element);
+ gst_bus_set_flushing (bus, TRUE);
+ gst_object_unref (bus);
+
+ gst_pad_set_active (srcpad, FALSE);
+ gst_pad_set_active (sinkpad, FALSE);
+ gst_check_teardown_src_pad (element);
+ gst_check_teardown_sink_pad (element);
+ gst_check_teardown_element (element);
+}
+
+/* inits a standard test */
+void
+gst_parser_test_init (GstParserTest * ptest, guint8 * data, guint size,
+ guint num)
+{
+ /* need these */
+ fail_unless (ctx_factory != NULL);
+ fail_unless (ctx_src_template != NULL);
+ fail_unless (ctx_sink_template != NULL);
+
+ /* basics */
+ memset (ptest, 0, sizeof (*ptest));
+ ptest->factory = ctx_factory;
+ ptest->sink_template = ctx_sink_template;
+ ptest->src_template = ctx_src_template;
+ ptest->framed = TRUE;
+ /* could be NULL if not relevant/needed */
+ ptest->src_caps = ctx_input_caps;
+ ptest->sink_caps = ctx_output_caps;
+ memcpy (ptest->headers, ctx_headers, sizeof (ptest->headers));
+ ptest->discard = ctx_discard;
+ /* some data that pleases caller */
+ ptest->series[0].data = data;
+ ptest->series[0].size = size;
+ ptest->series[0].num = num;
+ ptest->series[0].fpb = 1;
+ ptest->series[1].fpb = 1;
+ ptest->series[2].fpb = 1;
+ ptest->no_metadata = ctx_no_metadata;
+}
+
+/*
+ * Test if the parser pushes clean data properly.
+ */
+void
+gst_parser_test_run (GstParserTest * test, GstCaps ** out_caps)
+{
+ buffer_verify_data_s vdata = { 0, 0, 0, NULL, 0, NULL, FALSE };
+ GstElement *element;
+ GstBuffer *buffer = NULL;
+ GstCaps *src_caps;
+ guint i, j, k;
+ guint frames = 0, size = 0;
+
+ element = setup_element (test->factory, test->sink_template, NULL,
+ test->src_template, test->src_caps);
+
+ /* push some setup headers */
+ for (j = 0; j < G_N_ELEMENTS (test->headers) && test->headers[j].data; j++) {
+ buffer = buffer_new (test->headers[j].data, test->headers[j].size);
+ fail_unless_equals_int (gst_pad_push (srcpad, buffer), GST_FLOW_OK);
+ }
+
+ for (j = 0; j < 3; j++) {
+ for (i = 0; i < test->series[j].num; i++) {
+ /* sanity enforcing */
+ for (k = 0; k < MAX (1, test->series[j].fpb); k++) {
+ if (!k)
+ buffer = buffer_new (test->series[j].data, test->series[j].size);
+ else {
+ GstCaps *caps = gst_buffer_get_caps (buffer);
+
+ buffer = gst_buffer_join (buffer,
+ buffer_new (test->series[j].data, test->series[j].size));
+ if (caps) {
+ gst_buffer_set_caps (buffer, caps);
+ gst_caps_unref (caps);
+ }
+ }
+ }
+ fail_unless_equals_int (gst_pad_push (srcpad, buffer), GST_FLOW_OK);
+ if (j == 0)
+ vdata.buffers_before_offset_skip++;
+ else if (j == 1)
+ vdata.offset_skip_amount += test->series[j].size * test->series[j].fpb;
+ if (j != 1) {
+ frames += test->series[j].fpb;
+ size += test->series[j].size * test->series[j].fpb;
+ }
+ }
+ }
+ gst_pad_push_event (srcpad, gst_event_new_eos ());
+
+ if (G_LIKELY (test->framed))
+ fail_unless_equals_int (g_list_length (buffers) - test->discard, frames);
+
+ /* if all frames are identical, do extended test,
+ * otherwise only verify total data size */
+ if (test->series[0].data && (!test->series[2].size ||
+ (test->series[0].size == test->series[2].size && test->series[2].data
+ && !memcmp (test->series[0].data, test->series[2].data,
+ test->series[0].size)))) {
+ vdata.data_to_verify = test->series[0].data;
+ vdata.data_to_verify_size = test->series[0].size;
+ vdata.caps = test->sink_caps;
+ vdata.discard = test->discard;
+ vdata.no_metadata = test->no_metadata;
+ g_list_foreach (buffers, buffer_verify_data, &vdata);
+ } else {
+ guint datasum = 0;
+
+ g_list_foreach (buffers, buffer_count_size, &datasum);
+ size -= test->dropped;
+ fail_unless_equals_int (datasum, size);
+ }
+
+ src_caps = gst_pad_get_negotiated_caps (sinkpad);
+ GST_LOG ("output caps: %" GST_PTR_FORMAT, src_caps);
+
+ if (test->sink_caps) {
+ GST_LOG ("%" GST_PTR_FORMAT " = %" GST_PTR_FORMAT " ?", src_caps,
+ test->sink_caps);
+ fail_unless (gst_caps_is_equal (src_caps, test->sink_caps));
+ }
+
+ if (out_caps)
+ *out_caps = src_caps;
+ else
+ gst_caps_unref (src_caps);
+
+ cleanup_element (element);
+}
+
+/*
+ * Test if the parser pushes clean data properly.
+ */
+void
+gst_parser_test_normal (guint8 * data, guint size)
+{
+ GstParserTest ptest;
+
+ gst_parser_test_init (&ptest, data, size, 10);
+ gst_parser_test_run (&ptest, NULL);
+}
+
+/*
+ * Test if parser drains its buffers properly. Even one single frame
+ * should be drained and pushed forward when EOS occurs. This single frame
+ * case is special, since normally the parser needs more data to be sure
+ * about stream format. But it should still push the frame forward in EOS.
+ */
+void
+gst_parser_test_drain_single (guint8 * data, guint size)
+{
+ GstParserTest ptest;
+
+ gst_parser_test_init (&ptest, data, size, 1);
+ gst_parser_test_run (&ptest, NULL);
+}
+
+/*
+ * Make sure that parser does not drain garbage when EOS occurs.
+ */
+void
+gst_parser_test_drain_garbage (guint8 * data, guint size, guint8 * garbage,
+ guint gsize)
+{
+ GstParserTest ptest;
+
+ /* provide enough initial frames since it may take some parsers some
+ * time to be convinced of proper sync */
+ gst_parser_test_init (&ptest, data, size, 10);
+ ptest.series[1].data = garbage;
+ ptest.series[1].size = gsize;
+ ptest.series[1].num = 1;
+ gst_parser_test_run (&ptest, NULL);
+}
+
+/*
+ * Test if parser splits a buffer that contains two frames into two
+ * separate buffers properly.
+ */
+void
+gst_parser_test_split (guint8 * data, guint size)
+{
+ GstParserTest ptest;
+
+ gst_parser_test_init (&ptest, data, size, 10);
+ ptest.series[0].fpb = 2;
+ gst_parser_test_run (&ptest, NULL);
+}
+
+/*
+ * Test if the parser skips garbage between frames properly.
+ */
+void
+gst_parser_test_skip_garbage (guint8 * data, guint size, guint8 * garbage,
+ guint gsize)
+{
+ GstParserTest ptest;
+
+ gst_parser_test_init (&ptest, data, size, 10);
+ ptest.series[1].data = garbage;
+ ptest.series[1].size = gsize;
+ ptest.series[1].num = 1;
+ ptest.series[2].data = data;
+ ptest.series[2].size = size;
+ ptest.series[2].num = 10;
+ gst_parser_test_run (&ptest, NULL);
+}
+
+/*
+ * Test if the src caps are set according to stream format.
+ */
+void
+gst_parser_test_output_caps (guint8 * data, guint size,
+ const gchar * input_caps, const gchar * output_caps)
+{
+ GstParserTest ptest;
+
+ gst_parser_test_init (&ptest, data, size, 10);
+ if (input_caps) {
+ ptest.src_caps = gst_caps_from_string (input_caps);
+ fail_unless (ptest.src_caps != NULL);
+ }
+ if (output_caps) {
+ ptest.sink_caps = gst_caps_from_string (output_caps);
+ fail_unless (ptest.sink_caps != NULL);
+ }
+ gst_parser_test_run (&ptest, NULL);
+ if (ptest.sink_caps)
+ gst_caps_unref (ptest.sink_caps);
+ if (ptest.src_caps)
+ gst_caps_unref (ptest.src_caps);
+}
+
+/*
+ * Test if the src caps are set according to stream format.
+ */
+GstCaps *
+gst_parser_test_get_output_caps (guint8 * data, guint size,
+ const gchar * input_caps)
+{
+ GstParserTest ptest;
+ GstCaps *out_caps;
+
+ gst_parser_test_init (&ptest, data, size, 10);
+ if (input_caps) {
+ ptest.src_caps = gst_caps_from_string (input_caps);
+ fail_unless (ptest.src_caps != NULL);
+ }
+ gst_parser_test_run (&ptest, &out_caps);
+ if (ptest.src_caps)
+ gst_caps_unref (ptest.src_caps);
+
+ return out_caps;
+}
diff --git a/tests/check/elements/parser.h b/tests/check/elements/parser.h
new file mode 100644
index 0000000..470f594
--- /dev/null
+++ b/tests/check/elements/parser.h
@@ -0,0 +1,95 @@
+/*
+ * GStreamer
+ *
+ * unit test for (audio) parser
+ *
+ * Copyright (C) 2008 Nokia Corporation. All rights reserved.
+ *
+ * Contact: Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#define MAX_HEADERS 10
+
+typedef struct {
+ guint8 *data;
+ guint size;
+} datablob;
+
+/* context state variables; to be set by test using this helper */
+/* mandatory */
+extern const gchar *ctx_factory;
+extern GstStaticPadTemplate *ctx_sink_template;
+extern GstStaticPadTemplate *ctx_src_template;
+/* optional */
+extern GstCaps *ctx_input_caps;
+extern GstCaps *ctx_output_caps;
+extern guint ctx_discard;
+extern datablob ctx_headers[MAX_HEADERS];
+extern gboolean ctx_no_metadata;
+
+/* no refs taken/kept, all up to caller */
+typedef struct
+{
+ const gchar *factory;
+ GstStaticPadTemplate *sink_template;
+ GstStaticPadTemplate *src_template;
+ /* caps that go into element */
+ GstCaps *src_caps;
+ /* optional: output caps to verify */
+ GstCaps *sink_caps;
+ /* initial headers */
+ datablob headers[MAX_HEADERS];
+ /* initial (header) output to forego checking */
+ guint discard;
+ /* series of buffers; middle series considered garbage */
+ struct {
+ /* data and size */
+ guint8 *data;
+ guint size;
+ /* num of frames with above data per buffer */
+ guint fpb;
+ /* num of buffers */
+ guint num;
+ } series[3];
+ /* sigh, weird cases */
+ gboolean framed;
+ guint dropped;
+ gboolean no_metadata;
+} GstParserTest;
+
+void gst_parser_test_init (GstParserTest * ptest, guint8 * data, guint size, guint num);
+
+void gst_parser_test_run (GstParserTest * test, GstCaps ** out_caps);
+
+void gst_parser_test_normal (guint8 *data, guint size);
+
+void gst_parser_test_drain_single (guint8 *data, guint size);
+
+void gst_parser_test_drain_garbage (guint8 *data, guint size, guint8 *garbage, guint gsize);
+
+void gst_parser_test_split (guint8 *data, guint size);
+
+void gst_parser_test_skip_garbage (guint8 *data, guint size, guint8 *garbage, guint gsize);
+
+void gst_parser_test_output_caps (guint8 *data, guint size, const gchar * input_caps,
+ const gchar * output_caps);
+
+GstCaps *gst_parser_test_get_output_caps (guint8 *data, guint size, const gchar * input_caps);
+
diff --git a/tests/check/elements/qtmux.c b/tests/check/elements/qtmux.c
new file mode 100644
index 0000000..a9364c9
--- /dev/null
+++ b/tests/check/elements/qtmux.c
@@ -0,0 +1,899 @@
+/* GStreamer
+ *
+ * unit test for qtmux
+ *
+ * Copyright (C) <2008> Mark Nauwelaerts <mnauw@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <glib/gstdio.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/pbutils/encoding-profile.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+#define AUDIO_CAPS_STRING "audio/mpeg, " \
+ "mpegversion = (int) 1, " \
+ "layer = (int) 3, " \
+ "channels = (int) 2, " \
+ "rate = (int) 48000"
+
+#define AUDIO_AAC_CAPS_STRING "audio/mpeg, " \
+ "mpegversion=(int)4, " \
+ "channels=(int)1, " \
+ "rate=(int)44100, " \
+ "stream-format=(string)raw, " \
+ "level=(string)2, " \
+ "base-profile=(string)lc, " \
+ "profile=(string)lc, " \
+ "codec_data=(buffer)1208"
+
+#define VIDEO_CAPS_STRING "video/mpeg, " \
+ "mpegversion = (int) 4, " \
+ "systemstream = (boolean) false, " \
+ "width = (int) 384, " \
+ "height = (int) 288, " \
+ "framerate = (fraction) 25/1"
+
+#define VIDEO_CAPS_H264_STRING "video/x-h264, " \
+ "width=(int)320, " \
+ "height=(int)240, " \
+ "framerate=(fraction)30/1, " \
+ "pixel-aspect-ratio=(fraction)1/1, " \
+ "codec_data=(buffer)01640014ffe1001867640014a" \
+ "cd94141fb0110000003001773594000f14299600" \
+ "1000568ebecb22c, " \
+ "stream-format=(string)avc, " \
+ "alignment=(string)au, " \
+ "level=(string)2, " \
+ "profile=(string)high"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("video/quicktime"));
+static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_STRING));
+
+static GstStaticPadTemplate srcvideoh264template =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_H264_STRING));
+
+static GstStaticPadTemplate srcaudiotemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (AUDIO_CAPS_STRING));
+
+static GstStaticPadTemplate srcaudioaactemplate =
+GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (AUDIO_AAC_CAPS_STRING));
+
+/* setup and teardown needs some special handling for muxer */
+static GstPad *
+setup_src_pad (GstElement * element,
+ GstStaticPadTemplate * template, GstCaps * caps, const gchar * sinkname)
+{
+ GstPad *srcpad, *sinkpad;
+
+ GST_DEBUG_OBJECT (element, "setting up sending pad");
+ /* sending pad */
+ srcpad = gst_pad_new_from_static_template (template, "src");
+ fail_if (srcpad == NULL, "Could not create a srcpad");
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
+
+ if (!(sinkpad = gst_element_get_static_pad (element, sinkname)))
+ sinkpad = gst_element_get_request_pad (element, sinkname);
+ fail_if (sinkpad == NULL, "Could not get sink pad from %s",
+ GST_ELEMENT_NAME (element));
+ /* references are owned by: 1) us, 2) qtmux, 3) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ if (caps)
+ fail_unless (gst_pad_set_caps (srcpad, caps));
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Could not link source and %s sink pads", GST_ELEMENT_NAME (element));
+ gst_object_unref (sinkpad); /* because we got it higher up */
+
+ /* references are owned by: 1) qtmux, 2) collect pads */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
+
+ return srcpad;
+}
+
+static void
+teardown_src_pad (GstPad * srcpad)
+{
+ GstPad *sinkpad;
+
+ /* clean up floating src pad */
+ sinkpad = gst_pad_get_peer (srcpad);
+ fail_if (sinkpad == NULL);
+ /* pad refs held by 1) qtmux 2) collectpads and 3) us (through _get_peer) */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+
+ gst_pad_unlink (srcpad, sinkpad);
+
+ /* after unlinking, pad refs still held by
+ * 1) qtmux and 2) collectpads and 3) us (through _get_peer) */
+ ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);
+ gst_object_unref (sinkpad);
+ /* one more ref is held by element itself */
+
+ /* pad refs held by creator */
+ ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
+ gst_object_unref (srcpad);
+}
+
+static GstElement *
+setup_qtmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname)
+{
+ GstElement *qtmux;
+
+ GST_DEBUG ("setup_qtmux");
+ qtmux = gst_check_setup_element ("qtmux");
+ mysrcpad = setup_src_pad (qtmux, srctemplate, NULL, sinkname);
+ mysinkpad = gst_check_setup_sink_pad (qtmux, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return qtmux;
+}
+
+static void
+cleanup_qtmux (GstElement * qtmux, const gchar * sinkname)
+{
+ GST_DEBUG ("cleanup_qtmux");
+ gst_element_set_state (qtmux, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ teardown_src_pad (mysrcpad);
+ gst_check_teardown_sink_pad (qtmux);
+ gst_check_teardown_element (qtmux);
+}
+
+static void
+check_qtmux_pad (GstStaticPadTemplate * srctemplate, const gchar * sinkname,
+ guint32 dts_method)
+{
+ GstElement *qtmux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int num_buffers;
+ int i;
+ guint8 data0[12] = "\000\000\000\024ftypqt ";
+ guint8 data1[8] = "\000\000\000\001mdat";
+ guint8 data2[4] = "moov";
+
+ qtmux = setup_qtmux (srctemplate, sinkname);
+ g_object_set (qtmux, "dts-method", dts_method, NULL);
+ fail_unless (gst_element_set_state (qtmux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (mysrcpad));
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ GST_BUFFER_DURATION (inbuffer) = 40 * GST_MSECOND;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+
+ /* send eos to have moov written */
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
+
+ num_buffers = g_list_length (buffers);
+ /* at least expect ftyp, mdat header, buffer chunk and moov */
+ fail_unless (num_buffers >= 4);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ switch (i) {
+ case 0:
+ {
+ /* ftyp header */
+ guint8 *data = GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (GST_BUFFER_SIZE (outbuffer) >= 20);
+ fail_unless (memcmp (data, data0, sizeof (data0)) == 0);
+ fail_unless (memcmp (data + 16, data0 + 8, 4) == 0);
+ break;
+ }
+ case 1: /* mdat header */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 16);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), data1, sizeof (data1))
+ == 0);
+ break;
+ case 2: /* buffer we put in */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 1);
+ break;
+ case 3: /* moov */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) > 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer) + 4, data2,
+ sizeof (data2)) == 0);
+ break;
+ default:
+ break;
+ }
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_qtmux (qtmux, sinkname);
+}
+
+static void
+check_qtmux_pad_fragmented (GstStaticPadTemplate * srctemplate,
+ const gchar * sinkname, guint32 dts_method, gboolean streamable)
+{
+ GstElement *qtmux;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int num_buffers;
+ int i;
+ guint8 data0[12] = "\000\000\000\024ftypqt ";
+ guint8 data1[4] = "mdat";
+ guint8 data2[4] = "moov";
+ guint8 data3[4] = "moof";
+ guint8 data4[4] = "mfra";
+
+ qtmux = setup_qtmux (srctemplate, sinkname);
+ g_object_set (qtmux, "dts-method", dts_method, NULL);
+ g_object_set (qtmux, "fragment-duration", 2000, NULL);
+ g_object_set (qtmux, "streamable", streamable, NULL);
+ fail_unless (gst_element_set_state (qtmux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (mysrcpad));
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ GST_BUFFER_DURATION (inbuffer) = 40 * GST_MSECOND;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+
+ /* send eos to have all written */
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
+
+ num_buffers = g_list_length (buffers);
+ /* at least expect ftyp, moov, moof, mdat header, buffer chunk
+ * and optionally mfra */
+ fail_unless (num_buffers >= 5);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+ buffers = g_list_remove (buffers, outbuffer);
+
+ switch (i) {
+ case 0:
+ {
+ /* ftyp header */
+ guint8 *data = GST_BUFFER_DATA (outbuffer);
+
+ fail_unless (GST_BUFFER_SIZE (outbuffer) >= 20);
+ fail_unless (memcmp (data, data0, sizeof (data0)) == 0);
+ fail_unless (memcmp (data + 16, data0 + 8, 4) == 0);
+ break;
+ }
+ case 1: /* moov */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) > 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer) + 4, data2,
+ sizeof (data2)) == 0);
+ break;
+ case 2: /* moof */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) > 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer) + 4, data3,
+ sizeof (data3)) == 0);
+ break;
+ case 3: /* mdat header */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer) + 4, data1,
+ sizeof (data1)) == 0);
+ break;
+ case 4: /* buffer we put in */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == 1);
+ break;
+ case 5: /* mfra */
+ fail_unless (GST_BUFFER_SIZE (outbuffer) > 8);
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer) + 4, data4,
+ sizeof (data4)) == 0);
+ break;
+ default:
+ break;
+ }
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_qtmux (qtmux, sinkname);
+}
+
+/* dts-method dd */
+
+GST_START_TEST (test_video_pad_dd)
+{
+ check_qtmux_pad (&srcvideotemplate, "video_%d", 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_dd)
+{
+ check_qtmux_pad (&srcaudiotemplate, "audio_%d", 0);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_dd)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 0, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_frag_dd)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 0, FALSE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_dd_streamable)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 0, TRUE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_audio_pad_frag_dd_streamable)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 0, TRUE);
+}
+
+GST_END_TEST;
+
+/* dts-method reorder */
+
+GST_START_TEST (test_video_pad_reorder)
+{
+ check_qtmux_pad (&srcvideotemplate, "video_%d", 1);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_reorder)
+{
+ check_qtmux_pad (&srcaudiotemplate, "audio_%d", 1);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_reorder)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 1, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_frag_reorder)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 1, FALSE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_reorder_streamable)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 1, TRUE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_audio_pad_frag_reorder_streamable)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 1, TRUE);
+}
+
+GST_END_TEST;
+
+/* dts-method asc */
+
+GST_START_TEST (test_video_pad_asc)
+{
+ check_qtmux_pad (&srcvideotemplate, "video_%d", 2);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_asc)
+{
+ check_qtmux_pad (&srcaudiotemplate, "audio_%d", 2);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_asc)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 2, FALSE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_audio_pad_frag_asc)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 2, FALSE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_video_pad_frag_asc_streamable)
+{
+ check_qtmux_pad_fragmented (&srcvideotemplate, "video_%d", 2, TRUE);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_audio_pad_frag_asc_streamable)
+{
+ check_qtmux_pad_fragmented (&srcaudiotemplate, "audio_%d", 2, TRUE);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_reuse)
+{
+ GstElement *qtmux = setup_qtmux (&srcvideotemplate, "video_%d");
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+
+ gst_element_set_state (qtmux, GST_STATE_PLAYING);
+ gst_element_set_state (qtmux, GST_STATE_NULL);
+ gst_element_set_state (qtmux, GST_STATE_PLAYING);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ inbuffer = gst_buffer_new_and_alloc (1);
+ fail_unless (inbuffer != NULL);
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (mysrcpad));
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ GST_BUFFER_DURATION (inbuffer) = 40 * GST_MSECOND;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+
+ /* send eos to have all written */
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
+
+ cleanup_qtmux (qtmux, "video_%d");
+}
+
+GST_END_TEST;
+
+static GstEncodingContainerProfile *
+create_qtmux_profile (const gchar * variant)
+{
+ GstEncodingContainerProfile *cprof;
+ GstCaps *caps;
+
+ if (variant == NULL) {
+ caps = gst_caps_new_simple ("video/quicktime", NULL);
+ } else {
+ caps = gst_caps_new_simple ("video/quicktime",
+ "variant", G_TYPE_STRING, variant, NULL);
+ }
+
+ cprof = gst_encoding_container_profile_new ("Name", "blah", caps, NULL);
+ gst_caps_unref (caps);
+
+ caps = gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16, "endianness", G_TYPE_INT, 4321,
+ "channels", G_TYPE_INT, 2, "rate", G_TYPE_INT, 44100,
+ "signed", G_TYPE_BOOLEAN, TRUE, NULL);
+ gst_encoding_container_profile_add_profile (cprof,
+ GST_ENCODING_PROFILE (gst_encoding_audio_profile_new (caps, NULL, NULL,
+ 1)));
+ gst_caps_unref (caps);
+
+ return cprof;
+}
+
+GST_START_TEST (test_encodebin_qtmux)
+{
+ GstEncodingContainerProfile *cprof;
+ GstElement *enc;
+ GstPad *pad;
+
+ enc = gst_element_factory_make ("encodebin", NULL);
+ if (enc == NULL)
+ return;
+
+ /* Make sure encodebin finds a muxer for a profile with a variant field .. */
+ cprof = create_qtmux_profile ("apple");
+ g_object_set (enc, "profile", cprof, NULL);
+ gst_encoding_profile_unref (cprof);
+
+ /* should have created a pad after setting the profile */
+ pad = gst_element_get_static_pad (enc, "audio_0");
+ fail_unless (pad != NULL);
+ gst_object_unref (pad);
+ gst_object_unref (enc);
+
+ /* ... and for a profile without a variant field */
+ enc = gst_element_factory_make ("encodebin", NULL);
+ cprof = create_qtmux_profile (NULL);
+ g_object_set (enc, "profile", cprof, NULL);
+ gst_encoding_profile_unref (cprof);
+
+ /* should have created a pad after setting the profile */
+ pad = gst_element_get_static_pad (enc, "audio_0");
+ fail_unless (pad != NULL);
+ gst_object_unref (pad);
+ gst_object_unref (enc);
+}
+
+GST_END_TEST;
+
+/* Fake mp3 encoder for test */
+typedef GstElement TestMp3Enc;
+typedef GstElementClass TestMp3EncClass;
+
+static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/mpeg, mpegversion=1, layer=[1,3]")
+ );
+
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int")
+ );
+
+static GType test_mp3_enc_get_type (void);
+
+GST_BOILERPLATE (TestMp3Enc, test_mp3_enc, GstElement, GST_TYPE_ELEMENT);
+
+static void
+test_mp3_enc_base_init (gpointer klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_static_pad_template (element_class, &sink_template);
+ gst_element_class_add_static_pad_template (element_class, &src_template);
+
+ gst_element_class_set_details_simple (element_class, "MPEG1 Audio Encoder",
+ "Codec/Encoder/Audio", "Pretends to encode mp3", "Foo Bar <foo@bar.com>");
+}
+
+static void
+test_mp3_enc_class_init (TestMp3EncClass * klass)
+{
+ /* doesn't actually need to do anything for this test */
+}
+
+static void
+test_mp3_enc_init (TestMp3Enc * mp3enc, TestMp3EncClass * klass)
+{
+ GstPad *pad;
+
+ pad = gst_pad_new_from_static_template (&sink_template, "sink");
+ gst_element_add_pad (mp3enc, pad);
+
+ pad = gst_pad_new_from_static_template (&src_template, "src");
+ gst_element_add_pad (mp3enc, pad);
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ return gst_element_register (plugin, "testmp3enc", GST_RANK_NONE,
+ test_mp3_enc_get_type ());
+}
+
+static GstEncodingContainerProfile *
+create_mp4mux_profile (void)
+{
+ GstEncodingContainerProfile *cprof;
+ GstCaps *caps;
+
+ caps = gst_caps_new_simple ("video/quicktime",
+ "variant", G_TYPE_STRING, "iso", NULL);
+
+ cprof = gst_encoding_container_profile_new ("Name", "blah", caps, NULL);
+ gst_caps_unref (caps);
+
+ caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 1,
+ "layer", G_TYPE_INT, 3, "channels", G_TYPE_INT, 2, "rate", G_TYPE_INT,
+ 44100, NULL);
+ gst_encoding_container_profile_add_profile (cprof,
+ GST_ENCODING_PROFILE (gst_encoding_audio_profile_new (caps, NULL, NULL,
+ 1)));
+ gst_caps_unref (caps);
+
+ return cprof;
+}
+
+GST_START_TEST (test_encodebin_mp4mux)
+{
+ GstEncodingContainerProfile *cprof;
+ GstPluginFeature *feature;
+ GstElement *enc, *mux;
+ GstPad *pad;
+
+ /* need a fake mp3 encoder because mp4 only accepts encoded formats */
+ gst_plugin_register_static (GST_VERSION_MAJOR, GST_VERSION_MINOR,
+ "fakemp3enc", "fakemp3enc", plugin_init, VERSION, "LGPL",
+ "gst-plugins-good", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
+
+ feature = gst_default_registry_find_feature ("testmp3enc",
+ GST_TYPE_ELEMENT_FACTORY);
+ gst_plugin_feature_set_rank (feature, GST_RANK_PRIMARY + 100);
+
+ enc = gst_element_factory_make ("encodebin", NULL);
+ if (enc == NULL)
+ return;
+
+ /* Make sure encodebin finds mp4mux even though qtmux outputs a superset */
+ cprof = create_mp4mux_profile ();
+ g_object_set (enc, "profile", cprof, NULL);
+ gst_encoding_profile_unref (cprof);
+
+ /* should have created a pad after setting the profile */
+ pad = gst_element_get_static_pad (enc, "audio_0");
+ fail_unless (pad != NULL);
+ gst_object_unref (pad);
+
+ mux = gst_bin_get_by_interface (GST_BIN (enc), GST_TYPE_TAG_SETTER);
+ fail_unless (mux != NULL);
+ {
+ GstElementFactory *f = gst_element_get_factory (mux);
+
+ /* make sure we got mp4mux for variant=iso */
+ GST_INFO ("muxer: %s", G_OBJECT_TYPE_NAME (mux));
+ fail_unless_equals_string (GST_PLUGIN_FEATURE_NAME (f), "mp4mux");
+ }
+ gst_object_unref (mux);
+ gst_object_unref (enc);
+
+ gst_plugin_feature_set_rank (feature, GST_RANK_NONE);
+ gst_object_unref (feature);
+}
+
+GST_END_TEST;
+
+static gboolean
+extract_tags (const gchar * location, GstTagList ** taglist)
+{
+ gboolean ret = TRUE;
+ GstElement *src;
+ GstBus *bus;
+ GstElement *pipeline =
+ gst_parse_launch ("filesrc name=src ! qtdemux ! fakesink", NULL);
+
+ src = gst_bin_get_by_name (GST_BIN (pipeline), "src");
+ g_object_set (src, "location", location, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING)
+ != GST_STATE_CHANGE_FAILURE);
+
+ if (*taglist == NULL) {
+ *taglist = gst_tag_list_new ();
+ }
+
+ while (1) {
+ GstMessage *msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
+ GST_MESSAGE_TAG | GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
+
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
+ gst_message_unref (msg);
+ break;
+ } else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ ret = FALSE;
+ gst_message_unref (msg);
+ break;
+ } else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_TAG) {
+ GstTagList *tags;
+
+ gst_message_parse_tag (msg, &tags);
+ gst_tag_list_insert (*taglist, tags, GST_TAG_MERGE_REPLACE);
+ gst_tag_list_free (tags);
+ }
+ gst_message_unref (msg);
+ }
+
+ gst_object_unref (bus);
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (src);
+ gst_object_unref (pipeline);
+ return ret;
+}
+
+static void
+test_average_bitrate_custom (const gchar * elementname,
+ GstStaticPadTemplate * tmpl, const gchar * sinkpadname)
+{
+ gchar *location;
+ GstElement *qtmux;
+ GstElement *filesink;
+ GstBuffer *inbuffer;
+ GstCaps *caps;
+ int i;
+ gint bytes[] = { 16, 22, 12 };
+ gint64 durations[] = { GST_SECOND * 3, GST_SECOND * 5, GST_SECOND * 2 };
+ gint64 total_bytes = 0;
+ GstClockTime total_duration = 0;
+
+ location = g_strdup_printf ("%s/%s-%d", g_get_tmp_dir (), "qtmuxtest",
+ g_random_int ());
+ GST_INFO ("Using location %s for bitrate test", location);
+ qtmux = gst_check_setup_element (elementname);
+ filesink = gst_element_factory_make ("filesink", NULL);
+ g_object_set (filesink, "location", location, NULL);
+ gst_element_link (qtmux, filesink);
+ mysrcpad = setup_src_pad (qtmux, tmpl, NULL, sinkpadname);
+ fail_unless (mysrcpad != NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+
+ fail_unless (gst_element_set_state (filesink,
+ GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE,
+ "could not set filesink to playing");
+ fail_unless (gst_element_set_state (qtmux,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ for (i = 0; i < 3; i++) {
+ inbuffer = gst_buffer_new_and_alloc (bytes[i]);
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (mysrcpad));
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = total_duration;
+ GST_BUFFER_DURATION (inbuffer) = (GstClockTime) durations[i];
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ total_bytes += GST_BUFFER_SIZE (inbuffer);
+ total_duration += GST_BUFFER_DURATION (inbuffer);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ }
+
+ /* send eos to have moov written */
+ fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
+
+ gst_element_set_state (qtmux, GST_STATE_NULL);
+ gst_element_set_state (filesink, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ teardown_src_pad (mysrcpad);
+ gst_object_unref (filesink);
+ gst_check_teardown_element (qtmux);
+
+ /* check the bitrate tag */
+ {
+ GstTagList *taglist = NULL;
+ guint bitrate = 0;
+ guint expected;
+
+ fail_unless (extract_tags (location, &taglist));
+
+ fail_unless (gst_tag_list_get_uint (taglist, GST_TAG_BITRATE, &bitrate));
+
+ expected =
+ (guint) gst_util_uint64_scale_round ((guint64) total_bytes,
+ (guint64) 8 * GST_SECOND, (guint64) total_duration);
+ fail_unless (bitrate == expected);
+ gst_tag_list_free (taglist);
+ }
+
+ /* delete file */
+ g_unlink (location);
+ g_free (location);
+}
+
+GST_START_TEST (test_average_bitrate)
+{
+ test_average_bitrate_custom ("mp4mux", &srcaudioaactemplate, "audio_%d");
+ test_average_bitrate_custom ("mp4mux", &srcvideoh264template, "video_%d");
+
+ test_average_bitrate_custom ("qtmux", &srcaudioaactemplate, "audio_%d");
+ test_average_bitrate_custom ("qtmux", &srcvideoh264template, "video_%d");
+}
+
+GST_END_TEST;
+
+
+static Suite *
+qtmux_suite (void)
+{
+ Suite *s = suite_create ("qtmux");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_video_pad_dd);
+ tcase_add_test (tc_chain, test_audio_pad_dd);
+ tcase_add_test (tc_chain, test_video_pad_frag_dd);
+ tcase_add_test (tc_chain, test_audio_pad_frag_dd);
+ tcase_add_test (tc_chain, test_video_pad_frag_dd_streamable);
+ tcase_add_test (tc_chain, test_audio_pad_frag_dd_streamable);
+
+ tcase_add_test (tc_chain, test_video_pad_reorder);
+ tcase_add_test (tc_chain, test_audio_pad_reorder);
+ tcase_add_test (tc_chain, test_video_pad_frag_reorder);
+ tcase_add_test (tc_chain, test_audio_pad_frag_reorder);
+ tcase_add_test (tc_chain, test_video_pad_frag_reorder_streamable);
+ tcase_add_test (tc_chain, test_audio_pad_frag_reorder_streamable);
+
+ tcase_add_test (tc_chain, test_video_pad_asc);
+ tcase_add_test (tc_chain, test_audio_pad_asc);
+ tcase_add_test (tc_chain, test_video_pad_frag_asc);
+ tcase_add_test (tc_chain, test_audio_pad_frag_asc);
+ tcase_add_test (tc_chain, test_video_pad_frag_asc_streamable);
+ tcase_add_test (tc_chain, test_audio_pad_frag_asc_streamable);
+
+ tcase_add_test (tc_chain, test_average_bitrate);
+
+ tcase_add_test (tc_chain, test_reuse);
+ tcase_add_test (tc_chain, test_encodebin_qtmux);
+ tcase_add_test (tc_chain, test_encodebin_mp4mux);
+
+ return s;
+}
+
+GST_CHECK_MAIN (qtmux)
diff --git a/tests/check/elements/rganalysis.c b/tests/check/elements/rganalysis.c
new file mode 100644
index 0000000..8c26cf3
--- /dev/null
+++ b/tests/check/elements/rganalysis.c
@@ -0,0 +1,1878 @@
+/* GStreamer ReplayGain analysis
+ *
+ * Copyright (C) 2006 Rene Stadler <mail@renestadler.de>
+ *
+ * rganalysis.c: Unit test for the rganalysis element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+/* Some things to note about the RMS window length of the analysis algorithm and
+ * thus the implementation used in the element: Processing divides input data
+ * into 50ms windows at some point. Some details about this that normally do
+ * not matter:
+ *
+ * 1. At the end of a stream, the remainder of data that did not fill up the
+ * last 50ms window is simply discarded.
+ *
+ * 2. If the sample rate changes during a stream, the currently running window
+ * is discarded and the equal loudness filter gets reset as if a new stream
+ * started.
+ *
+ * 3. For the album gain, it is not entirely correct to think of obtaining it
+ * like "as if all the tracks are analyzed as one track". There isn't a
+ * separate window being tracked for album processing, so at stream (track)
+ * end, the remaining unfilled window does not contribute to the album gain
+ * either.
+ *
+ * 4. If a waveform with a result gain G is concatenated to itself and the
+ * result processed as a track, the gain can be different from G if and only
+ * if the duration of the original waveform is not an integer multiple of
+ * 50ms. If the original waveform gets processed as a single track and then
+ * the same data again as a subsequent track, the album result gain will
+ * always match G (this is implied by 3.).
+ *
+ * 5. A stream shorter than 50ms cannot be analyzed. At 8000 and 48000 Hz,
+ * this corresponds to 400 resp. 2400 frames. If a stream is shorter than
+ * 50ms, the element will not generate tags at EOS (only if an album
+ * finished, but only album tags are generated then). This is not an
+ * erroneous condition, the element should behave normally.
+ *
+ * The limitations outlined in 1.-4. do not apply to the peak values. Every
+ * single sample is accounted for when looking for the peak. Thus the album
+ * peak is guaranteed to be the maximum value of all track peaks.
+ *
+ * In normal day-to-day use, these little facts are unlikely to be relevant, but
+ * they have to be kept in mind for writing the tests here.
+ */
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating src and
+ * sink pads we create; otherwise we always have to do get_pad, get_peer, and
+ * then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+/* Mapping from supported sample rates to the correct result gain for the
+ * following test waveform: 20 * 512 samples with a quarter-full amplitude of
+ * toggling sign, changing every 48 samples and starting with the positive
+ * value.
+ *
+ * Even if we would generate a wave describing a signal with the same frequency
+ * at each sampling rate, the results would vary (slightly). Hence the simple
+ * generation method, since we cannot use a constant value as expected result
+ * anyways. For all sample rates, changing the sign every 48 frames gives a
+ * sane frequency. Buffers containing data that forms such a waveform is
+ * created using the test_buffer_square_{float,int16}_{mono,stereo} functions
+ * below.
+ *
+ * The results have been checked against what the metaflac and wavegain programs
+ * generate for such a stream. If you want to verify these, be sure that the
+ * metaflac program does not produce incorrect results in your environment: I
+ * found a strange bug in the (defacto) reference code for the analysis that
+ * sometimes leads to incorrect RMS window lengths. */
+
+struct rate_test
+{
+ guint sample_rate;
+ gdouble gain;
+};
+
+static const struct rate_test supported_rates[] = {
+ {8000, -0.91},
+ {11025, -2.80},
+ {12000, -3.13},
+ {16000, -4.26},
+ {22050, -5.64},
+ {24000, -5.87},
+ {32000, -6.03},
+ {44100, -6.20},
+ {48000, -6.14}
+};
+
+/* Lookup the correct gain adjustment result in above array. */
+
+static gdouble
+get_expected_gain (guint sample_rate)
+{
+ gint i;
+
+ for (i = G_N_ELEMENTS (supported_rates); i--;)
+ if (supported_rates[i].sample_rate == sample_rate)
+ return supported_rates[i].gain;
+ g_return_val_if_reached (0.0);
+}
+
+#define SILENCE_GAIN 64.82
+
+#define REPLAY_GAIN_CAPS \
+ "channels = (int) { 1, 2 }, " \
+ "rate = (int) { 8000, 11025, 12000, 16000, 22050, " \
+ "24000, 32000, 44100, 48000 }"
+
+#define RG_ANALYSIS_CAPS_TEMPLATE_STRING \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "endianness = (int) BYTE_ORDER, " \
+ REPLAY_GAIN_CAPS \
+ "; " \
+ "audio/x-raw-int, " \
+ "width = (int) 16, " \
+ "depth = (int) [ 1, 16 ], " \
+ "signed = (boolean) true, " \
+ "endianness = (int) BYTE_ORDER, " \
+ REPLAY_GAIN_CAPS
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_ANALYSIS_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_ANALYSIS_CAPS_TEMPLATE_STRING)
+ );
+
+static GstElement *
+setup_rganalysis (void)
+{
+ GstElement *analysis;
+ GstBus *bus;
+
+ GST_DEBUG ("setup_rganalysis");
+ analysis = gst_check_setup_element ("rganalysis");
+ mysrcpad = gst_check_setup_src_pad (analysis, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (analysis, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (analysis, bus);
+ /* gst_element_set_bus does not steal a reference. */
+ gst_object_unref (bus);
+
+ return analysis;
+}
+
+static void
+cleanup_rganalysis (GstElement * element)
+{
+ GST_DEBUG ("cleanup_rganalysis");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ /* The bus owns references to the element: */
+ gst_element_set_bus (element, NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (element);
+ gst_check_teardown_sink_pad (element);
+ gst_check_teardown_element (element);
+}
+
+static void
+set_playing_state (GstElement * element)
+{
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "Could not set state to PLAYING");
+}
+
+static void
+send_eos_event (GstElement * element)
+{
+ GstBus *bus = gst_element_get_bus (element);
+ GstPad *pad = gst_element_get_static_pad (element, "sink");
+ GstEvent *event = gst_event_new_eos ();
+
+ fail_unless (gst_pad_send_event (pad, event),
+ "Cannot send EOS event: Not handled.");
+
+ /* There is no sink element, so _we_ post the EOS message on the bus here. Of
+ * course we generate any EOS ourselves, but this allows us to poll for the
+ * EOS message in poll_eos if we expect the element to _not_ generate a TAG
+ * message. That's better than waiting for a timeout to lapse. */
+ fail_unless (gst_bus_post (bus, gst_message_new_eos (NULL)));
+
+ gst_object_unref (bus);
+ gst_object_unref (pad);
+}
+
+static void
+send_tag_event (GstElement * element, GstTagList * tag_list)
+{
+ GstPad *pad = gst_element_get_static_pad (element, "sink");
+ GstEvent *event = gst_event_new_tag (tag_list);
+
+ fail_unless (gst_pad_send_event (pad, event),
+ "Cannot send TAG event: Not handled.");
+
+ gst_object_unref (pad);
+}
+
+static void
+poll_eos (GstElement * element)
+{
+ GstBus *bus = gst_element_get_bus (element);
+ GstMessage *message;
+
+ message = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_TAG, GST_SECOND);
+ fail_unless (message != NULL, "Could not poll for EOS message: Timed out");
+ fail_unless (message->type == GST_MESSAGE_EOS,
+ "Could not poll for eos message: got message of type %s instead",
+ gst_message_type_get_name (message->type));
+
+ gst_message_unref (message);
+ gst_object_unref (bus);
+}
+
+/* This also polls for EOS since the TAG message comes right before the end of
+ * streams. */
+
+static GstTagList *
+poll_tags (GstElement * element)
+{
+ GstBus *bus = gst_element_get_bus (element);
+ GstTagList *tag_list;
+ GstMessage *message;
+
+ message = gst_bus_poll (bus, GST_MESSAGE_TAG, GST_SECOND);
+ fail_unless (message != NULL, "Could not poll for TAG message: Timed out");
+
+ gst_message_parse_tag (message, &tag_list);
+ gst_message_unref (message);
+ gst_object_unref (bus);
+
+ poll_eos (element);
+
+ return tag_list;
+}
+
+#define MATCH_PEAK(p1, p2) ((p1 < p2 + 1e-6) && (p2 < p1 + 1e-6))
+#define MATCH_GAIN(g1, g2) ((g1 < g2 + 1e-13) && (g2 < g1 + 1e-13))
+
+static void
+fail_unless_track_gain (const GstTagList * tag_list, gdouble gain)
+{
+ gdouble result;
+
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_GAIN, &result),
+ "Tag list contains no track gain value");
+ fail_unless (MATCH_GAIN (gain, result),
+ "Track gain %+.2f does not match, expected %+.2f", result, gain);
+}
+
+static void
+fail_unless_track_peak (const GstTagList * tag_list, gdouble peak)
+{
+ gdouble result;
+
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_PEAK, &result),
+ "Tag list contains no track peak value");
+ fail_unless (MATCH_PEAK (peak, result),
+ "Track peak %f does not match, expected %f", result, peak);
+}
+
+static void
+fail_unless_album_gain (const GstTagList * tag_list, gdouble gain)
+{
+ gdouble result;
+
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_GAIN, &result),
+ "Tag list contains no album gain value");
+ fail_unless (MATCH_GAIN (result, gain),
+ "Album gain %+.2f does not match, expected %+.2f", result, gain);
+}
+
+static void
+fail_unless_album_peak (const GstTagList * tag_list, gdouble peak)
+{
+ gdouble result;
+
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_PEAK, &result),
+ "Tag list contains no album peak value");
+ fail_unless (MATCH_PEAK (peak, result),
+ "Album peak %f does not match, expected %f", result, peak);
+}
+
+static void
+fail_if_track_tags (const GstTagList * tag_list)
+{
+ gdouble result;
+
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_GAIN, &result),
+ "Tag list contains track gain value (but should not)");
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_PEAK, &result),
+ "Tag list contains track peak value (but should not)");
+}
+
+static void
+fail_if_album_tags (const GstTagList * tag_list)
+{
+ gdouble result;
+
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_GAIN, &result),
+ "Tag list contains album gain value (but should not)");
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_PEAK, &result),
+ "Tag list contains album peak value (but should not)");
+}
+
+static void
+fail_unless_num_tracks (GstElement * element, guint num_tracks)
+{
+ guint current;
+
+ g_object_get (element, "num-tracks", &current, NULL);
+ fail_unless (current == num_tracks,
+ "num-tracks property has incorrect value %u, expected %u",
+ current, num_tracks);
+}
+
+/* Functions that create buffers with constant sample values, for peak
+ * tests. */
+
+static GstBuffer *
+test_buffer_const_float_mono (gint sample_rate, gsize n_frames, gfloat value)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gfloat));
+ gfloat *data = (gfloat *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;)
+ *data++ = value;
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 1,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_const_float_stereo (gint sample_rate, gsize n_frames,
+ gfloat value_l, gfloat value_r)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gfloat) * 2);
+ gfloat *data = (gfloat *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *data++ = value_l;
+ *data++ = value_r;
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 2,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_const_int16_mono (gint sample_rate, gint depth, gsize n_frames,
+ gint16 value)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gint16));
+ gint16 *data = (gint16 *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;)
+ *data++ = value;
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 1,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE,
+ "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, depth, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_const_int16_stereo (gint sample_rate, gint depth, gsize n_frames,
+ gint16 value_l, gint16 value_r)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gint16) * 2);
+ gint16 *data = (gint16 *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *data++ = value_l;
+ *data++ = value_r;
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 2,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE,
+ "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, depth, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+/* Functions that create data buffers containing square signal
+ * waveforms. */
+
+static GstBuffer *
+test_buffer_square_float_mono (gint * accumulator, gint sample_rate,
+ gsize n_frames, gfloat value)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gfloat));
+ gfloat *data = (gfloat *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *accumulator += 1;
+ *accumulator %= 96;
+
+ if (*accumulator < 48)
+ *data++ = value;
+ else
+ *data++ = -value;
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 1,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_square_float_stereo (gint * accumulator, gint sample_rate,
+ gsize n_frames, gfloat value_l, gfloat value_r)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gfloat) * 2);
+ gfloat *data = (gfloat *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *accumulator += 1;
+ *accumulator %= 96;
+
+ if (*accumulator < 48) {
+ *data++ = value_l;
+ *data++ = value_r;
+ } else {
+ *data++ = -value_l;
+ *data++ = -value_r;
+ }
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 2,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_square_int16_mono (gint * accumulator, gint sample_rate,
+ gint depth, gsize n_frames, gint16 value)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gint16));
+ gint16 *data = (gint16 *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *accumulator += 1;
+ *accumulator %= 96;
+
+ if (*accumulator < 48)
+ *data++ = value;
+ else
+ *data++ = -MAX (value, -32767);
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 1,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE,
+ "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, depth, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static GstBuffer *
+test_buffer_square_int16_stereo (gint * accumulator, gint sample_rate,
+ gint depth, gsize n_frames, gint16 value_l, gint16 value_r)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (n_frames * sizeof (gint16) * 2);
+ gint16 *data = (gint16 *) GST_BUFFER_DATA (buf);
+ GstCaps *caps;
+ gint i;
+
+ for (i = n_frames; i--;) {
+ *accumulator += 1;
+ *accumulator %= 96;
+
+ if (*accumulator < 48) {
+ *data++ = value_l;
+ *data++ = value_r;
+ } else {
+ *data++ = -MAX (value_l, -32767);
+ *data++ = -MAX (value_r, -32767);
+ }
+ }
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "rate", G_TYPE_INT, sample_rate, "channels", G_TYPE_INT, 2,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "signed", G_TYPE_BOOLEAN, TRUE,
+ "width", G_TYPE_INT, 16, "depth", G_TYPE_INT, depth, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static void
+push_buffer (GstBuffer * buf)
+{
+ /* gst_pad_push steals a reference. */
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+}
+
+/*** Start of the tests. ***/
+
+/* This test looks redundant, but early versions of the element
+ * crashed when doing, well, nothing: */
+
+GST_START_TEST (test_no_buffer)
+{
+ GstElement *element = setup_rganalysis ();
+
+ set_playing_state (element);
+ send_eos_event (element);
+ poll_eos (element);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_no_buffer_album_1)
+{
+ GstElement *element = setup_rganalysis ();
+
+ set_playing_state (element);
+
+ /* Single track: */
+ send_eos_event (element);
+ poll_eos (element);
+
+ /* First album: */
+ g_object_set (element, "num-tracks", 3, NULL);
+
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 2);
+
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 1);
+
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ /* Second album: */
+ g_object_set (element, "num-tracks", 2, NULL);
+
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 1);
+
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ /* Single track: */
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_no_buffer_album_2)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "num-tracks", 3, NULL);
+ set_playing_state (element);
+
+ /* No buffer for the first track. */
+
+ send_eos_event (element);
+ /* No tags should be posted, there was nothing to analyze: */
+ poll_eos (element);
+ fail_unless_num_tracks (element, 2);
+
+ /* A test waveform with known gain result as second track: */
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_mono (&accumulator, 44100, 512,
+ 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, -6.20);
+ /* Album is not finished yet: */
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ /* No buffer for the last track. */
+
+ send_eos_event (element);
+
+ tag_list = poll_tags (element);
+ fail_unless_album_peak (tag_list, 0.25);
+ fail_unless_album_gain (tag_list, -6.20);
+ /* No track tags should be posted, as there was no data for it: */
+ fail_if_track_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_empty_buffers)
+{
+ GstElement *element = setup_rganalysis ();
+
+ set_playing_state (element);
+
+ /* Single track: */
+ push_buffer (test_buffer_const_float_stereo (44100, 0, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+
+ /* First album: */
+ g_object_set (element, "num-tracks", 2, NULL);
+
+ push_buffer (test_buffer_const_float_stereo (44100, 0, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 1);
+
+ push_buffer (test_buffer_const_float_stereo (44100, 0, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ /* Second album, with a single track: */
+ g_object_set (element, "num-tracks", 1, NULL);
+ push_buffer (test_buffer_const_float_stereo (44100, 0, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ /* Single track: */
+ push_buffer (test_buffer_const_float_stereo (44100, 0, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Tests for correctness of the peak values. */
+
+/* Float peak test. For stereo, one channel has the constant value of -1.369,
+ * the other one 0.0. This tests many things: The result peak value should
+ * occur on any channel. The peak is of course the absolute amplitude, so 1.369
+ * should be the result. This will also detect if the code uses the absolute
+ * value during the comparison. If it is buggy it will return 0.0 since 0.0 >
+ * -1.369. Furthermore, this makes sure that there is no problem with headroom
+ * (exceeding 0dBFS). In the wild you get float samples > 1.0 from stuff like
+ * vorbis. */
+
+GST_START_TEST (test_peak_float)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ set_playing_state (element);
+ push_buffer (test_buffer_const_float_stereo (8000, 512, -1.369, 0.0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.369);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_float_stereo (8000, 512, 0.0, -1.369));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.369);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_float_mono (8000, 512, -1.369));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.369);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_peak_int16_16)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ set_playing_state (element);
+
+ /* Half amplitude. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 1 << 14, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 0, 1 << 14));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 16, 512, 1 << 14));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Half amplitude, negative variant. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, -1 << 14, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 0, -1 << 14));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 16, 512, -1 << 14));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+
+ /* Now check for correct normalization of the peak value: Sample
+ * values of this format range from -32768 to 32767. So for the
+ * highest positive amplitude we do not reach 1.0, only for
+ * -32768! */
+
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 32767, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 32767. / 32768.);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 0, 32767));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 32767. / 32768.);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 16, 512, 32767));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 32767. / 32768.);
+ gst_tag_list_free (tag_list);
+
+
+ /* Negative variant, reaching 1.0. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, -32768, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 16, 512, 0, -32768));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 16, 512, -32768));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Same as the test before, but with 8 bits (packed into 16 bits). */
+
+GST_START_TEST (test_peak_int16_8)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ set_playing_state (element);
+
+ /* Half amplitude. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, 1 << 6, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, 0, 1 << 6));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 8, 512, 1 << 6));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+
+ /* Half amplitude, negative variant. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, -1 << 6, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, 0, -1 << 6));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 8, 512, -1 << 6));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+
+
+ /* Almost full amplitude (maximum positive value). */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, (1 << 7) - 1, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.9921875);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, 0, (1 << 7) - 1));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.9921875);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 8, 512, (1 << 7) - 1));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.9921875);
+ gst_tag_list_free (tag_list);
+
+
+ /* Full amplitude (maximum negative value). */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, -1 << 7, 0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ /* Swapped channels. */
+ push_buffer (test_buffer_const_int16_stereo (8000, 8, 512, 0, -1 << 7));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ /* Mono. */
+ push_buffer (test_buffer_const_int16_mono (8000, 8, 512, -1 << 7));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_peak_album)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "num-tracks", 2, NULL);
+ set_playing_state (element);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 1.0, 0.0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.0, 0.5));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ fail_unless_album_peak (tag_list, 1.0);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ /* Try a second album: */
+ g_object_set (element, "num-tracks", 3, NULL);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.4, 0.4));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.4);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 2);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.45, 0.45));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.45);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.2, 0.2));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.2);
+ fail_unless_album_peak (tag_list, 0.45);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ /* And now a single track, not in album mode (num-tracks is 0
+ * now): */
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.1, 0.1));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.1);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Switching from track to album mode. */
+
+GST_START_TEST (test_peak_track_album)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ set_playing_state (element);
+
+ push_buffer (test_buffer_const_float_mono (8000, 1024, 1.0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ g_object_set (element, "num-tracks", 1, NULL);
+ push_buffer (test_buffer_const_float_mono (8000, 1024, 0.5));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ fail_unless_album_peak (tag_list, 0.5);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Disabling album processing before the end of the album. Probably a rare edge
+ * case and applications should not rely on this to work. They need to send the
+ * element to the READY state to clear up after an aborted album anyway since
+ * they might need to process another album afterwards. */
+
+GST_START_TEST (test_peak_album_abort_to_track)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "num-tracks", 2, NULL);
+ set_playing_state (element);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 1.0, 0.0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 1.0);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ g_object_set (element, "num-tracks", 0, NULL);
+
+ push_buffer (test_buffer_const_float_stereo (8000, 1024, 0.0, 0.5));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_gain_album)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator;
+ gint i;
+
+ g_object_set (element, "num-tracks", 3, NULL);
+ set_playing_state (element);
+
+ /* The three tracks are constructed such that if any of these is in fact
+ * ignored for the album gain, the album gain will differ. */
+
+ accumulator = 0;
+ for (i = 8; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.75, 0.75));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.75);
+ fail_unless_track_gain (tag_list, -15.70);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ accumulator = 0;
+ for (i = 12; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.5, 0.5));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.5);
+ fail_unless_track_gain (tag_list, -12.22);
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ accumulator = 0;
+ for (i = 180; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, -6.20);
+ fail_unless_album_peak (tag_list, 0.75);
+ /* Strangely, wavegain reports -12.17 for the album, but the fixed
+ * metaflac agrees to us. Could be a 32767 vs. 32768 issue. */
+ fail_unless_album_gain (tag_list, -12.18);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Checks ensuring that the "forced" property works as advertised. */
+
+GST_START_TEST (test_forced)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, NULL);
+ set_playing_state (element);
+
+ tag_list = gst_tag_list_new ();
+ /* Provided values are totally arbitrary. */
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 1.0, GST_TAG_TRACK_GAIN, 2.21, NULL);
+ send_tag_event (element, tag_list);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_const_float_stereo (44100, 512, 0.5, 0.5));
+ send_eos_event (element);
+ /* This fails if a tag message is generated: */
+ poll_eos (element);
+
+ /* Now back to a track without tags. */
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100));
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Sending track gain and peak in separate tag lists. */
+
+GST_START_TEST (test_forced_separate)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, NULL);
+ set_playing_state (element);
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, GST_TAG_TRACK_GAIN, 2.21,
+ NULL);
+ send_tag_event (element, tag_list);
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, GST_TAG_TRACK_PEAK, 1.0,
+ NULL);
+ send_tag_event (element, tag_list);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.5, 0.5));
+ send_eos_event (element);
+ /* This fails if a tag message is generated: */
+ poll_eos (element);
+
+ /* Now a track without tags. */
+
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100));
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* A TAG event is sent _after_ data has already been processed. In real
+ * pipelines, this could happen if there is more than one rganalysis element (by
+ * accident). While it would have analyzed all the data prior to receiving the
+ * event, I expect it to not post its results if not forced. This test is
+ * almost equivalent to test_forced. */
+
+GST_START_TEST (test_forced_after_data)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, NULL);
+ set_playing_state (element);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_const_float_stereo (8000, 512, 0.5, 0.5));
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 1.0, GST_TAG_TRACK_GAIN, 2.21, NULL);
+ send_tag_event (element, tag_list);
+
+ send_eos_event (element);
+ poll_eos (element);
+
+ /* Now back to a normal track, this one has no tags: */
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 8000, 512, 0.25,
+ 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (8000));
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Like test_forced, but *analyze* an album afterwards. The two tests following
+ * this one check the *skipping* of albums. */
+
+GST_START_TEST (test_forced_album)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, NULL);
+ set_playing_state (element);
+
+ tag_list = gst_tag_list_new ();
+ /* Provided values are totally arbitrary. */
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 1.0, GST_TAG_TRACK_GAIN, 2.21, NULL);
+ send_tag_event (element, tag_list);
+
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.5, 0.5));
+ send_eos_event (element);
+ /* This fails if a tag message is generated: */
+ poll_eos (element);
+
+ /* Now an album without tags. */
+ g_object_set (element, "num-tracks", 2, NULL);
+
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100));
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100));
+ fail_unless_album_peak (tag_list, 0.25);
+ fail_unless_album_gain (tag_list, get_expected_gain (44100));
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_forced_album_skip)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, "num-tracks", 2, NULL);
+ set_playing_state (element);
+
+ tag_list = gst_tag_list_new ();
+ /* Provided values are totally arbitrary. */
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 0.75, GST_TAG_TRACK_GAIN, 2.21,
+ GST_TAG_ALBUM_PEAK, 0.80, GST_TAG_ALBUM_GAIN, -0.11, NULL);
+ send_tag_event (element, tag_list);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 8000, 512, 0.25,
+ 0.25));
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 1);
+
+ /* This track has no tags, but needs to be skipped anyways since we
+ * are in album processing mode. */
+ for (i = 20; i--;)
+ push_buffer (test_buffer_const_float_stereo (8000, 512, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+ fail_unless_num_tracks (element, 0);
+
+ /* Normal track after the album. Of course not to be skipped. */
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 8000, 512, 0.25,
+ 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (8000));
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_forced_album_no_skip)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, "num-tracks", 2, NULL);
+ set_playing_state (element);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 8000, 512, 0.25,
+ 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (8000));
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ /* The second track has indeed full tags, but although being not forced, this
+ * one has to be processed because album processing is on. */
+ tag_list = gst_tag_list_new ();
+ /* Provided values are totally arbitrary. */
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 0.75, GST_TAG_TRACK_GAIN, 2.21,
+ GST_TAG_ALBUM_PEAK, 0.80, GST_TAG_ALBUM_GAIN, -0.11, NULL);
+ send_tag_event (element, tag_list);
+ for (i = 20; i--;)
+ push_buffer (test_buffer_const_float_stereo (8000, 512, 0.0, 0.0));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.0);
+ fail_unless_track_gain (tag_list, SILENCE_GAIN);
+ /* Second track was just silence so the album peak equals the first
+ * track's peak. */
+ fail_unless_album_peak (tag_list, 0.25);
+ /* Statistical processing leads to the second track being
+ * ignored for the gain (because it is so short): */
+ fail_unless_album_gain (tag_list, get_expected_gain (8000));
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 0);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_forced_abort_album_no_skip)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i;
+
+ g_object_set (element, "forced", FALSE, "num-tracks", 2, NULL);
+ set_playing_state (element);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 8000, 512, 0.25,
+ 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (8000));
+ fail_if_album_tags (tag_list);
+ gst_tag_list_free (tag_list);
+ fail_unless_num_tracks (element, 1);
+
+ /* Disabling album processing before end of album: */
+ g_object_set (element, "num-tracks", 0, NULL);
+
+ /* Processing a track that has to be skipped. */
+ tag_list = gst_tag_list_new ();
+ /* Provided values are totally arbitrary. */
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND,
+ GST_TAG_TRACK_PEAK, 0.75, GST_TAG_TRACK_GAIN, 2.21,
+ GST_TAG_ALBUM_PEAK, 0.80, GST_TAG_ALBUM_GAIN, -0.11, NULL);
+ send_tag_event (element, tag_list);
+ for (i = 20; i--;)
+ push_buffer (test_buffer_const_float_stereo (8000, 512, 0.0, 0.0));
+ send_eos_event (element);
+ poll_eos (element);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_reference_level)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gdouble ref_level;
+ gint accumulator = 0;
+ gint i;
+
+ set_playing_state (element);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100));
+ fail_if_album_tags (tag_list);
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
+ &ref_level) && MATCH_GAIN (ref_level, 89.),
+ "Incorrect reference level tag");
+ gst_tag_list_free (tag_list);
+
+ g_object_set (element, "reference-level", 83., "num-tracks", 2, NULL);
+
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100) - 6.);
+ fail_if_album_tags (tag_list);
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
+ &ref_level) && MATCH_GAIN (ref_level, 83.),
+ "Incorrect reference level tag");
+ gst_tag_list_free (tag_list);
+
+ accumulator = 0;
+ for (i = 20; i--;)
+ push_buffer (test_buffer_square_float_stereo (&accumulator, 44100, 512,
+ 0.25, 0.25));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, get_expected_gain (44100) - 6.);
+ fail_unless_album_peak (tag_list, 0.25);
+ /* We provided the same waveform twice, with a reset separating
+ * them. Therefore, the album gain matches the track gain. */
+ fail_unless_album_gain (tag_list, get_expected_gain (44100) - 6.);
+ fail_unless (gst_tag_list_get_double (tag_list, GST_TAG_REFERENCE_LEVEL,
+ &ref_level) && MATCH_GAIN (ref_level, 83.),
+ "Incorrect reference level tag");
+ gst_tag_list_free (tag_list);
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_all_formats)
+{
+ GstElement *element = setup_rganalysis ();
+ GstTagList *tag_list;
+ gint accumulator = 0;
+ gint i, j;
+
+ set_playing_state (element);
+ for (i = G_N_ELEMENTS (supported_rates); i--;) {
+ accumulator = 0;
+ for (j = 0; j < 4; j++)
+ push_buffer (test_buffer_square_float_stereo (&accumulator,
+ supported_rates[i].sample_rate, 512, 0.25, 0.25));
+ for (j = 0; j < 3; j++)
+ push_buffer (test_buffer_square_float_mono (&accumulator,
+ supported_rates[i].sample_rate, 512, 0.25));
+ for (j = 0; j < 4; j++)
+ push_buffer (test_buffer_square_int16_stereo (&accumulator,
+ supported_rates[i].sample_rate, 16, 512, 1 << 13, 1 << 13));
+ for (j = 0; j < 3; j++)
+ push_buffer (test_buffer_square_int16_mono (&accumulator,
+ supported_rates[i].sample_rate, 16, 512, 1 << 13));
+ for (j = 0; j < 3; j++)
+ push_buffer (test_buffer_square_int16_stereo (&accumulator,
+ supported_rates[i].sample_rate, 8, 512, 1 << 5, 1 << 5));
+ for (j = 0; j < 3; j++)
+ push_buffer (test_buffer_square_int16_mono (&accumulator,
+ supported_rates[i].sample_rate, 8, 512, 1 << 5));
+ send_eos_event (element);
+ tag_list = poll_tags (element);
+ fail_unless_track_peak (tag_list, 0.25);
+ fail_unless_track_gain (tag_list, supported_rates[i].gain);
+ gst_tag_list_free (tag_list);
+ }
+
+ cleanup_rganalysis (element);
+}
+
+GST_END_TEST;
+
+/* Checks ensuring all advertised supported sample rates are really
+ * accepted, for integer and float, mono and stereo. This also
+ * verifies that the correct gain is computed for all formats (except
+ * odd bit depths). */
+
+#define MAKE_GAIN_TEST_FLOAT_MONO(sample_rate) \
+ GST_START_TEST (test_gain_float_mono_##sample_rate) \
+{ \
+ GstElement *element = setup_rganalysis (); \
+ GstTagList *tag_list; \
+ gint accumulator = 0; \
+ gint i; \
+ \
+ set_playing_state (element); \
+ \
+ for (i = 0; i < 20; i++) \
+ push_buffer (test_buffer_square_float_mono (&accumulator, \
+ sample_rate, 512, 0.25)); \
+ send_eos_event (element); \
+ tag_list = poll_tags (element); \
+ fail_unless_track_peak (tag_list, 0.25); \
+ fail_unless_track_gain (tag_list, \
+ get_expected_gain (sample_rate)); \
+ gst_tag_list_free (tag_list); \
+ \
+ cleanup_rganalysis (element); \
+} \
+ \
+GST_END_TEST;
+
+#define MAKE_GAIN_TEST_FLOAT_STEREO(sample_rate) \
+ GST_START_TEST (test_gain_float_stereo_##sample_rate) \
+{ \
+ GstElement *element = setup_rganalysis (); \
+ GstTagList *tag_list; \
+ gint accumulator = 0; \
+ gint i; \
+ \
+ set_playing_state (element); \
+ \
+ for (i = 0; i < 20; i++) \
+ push_buffer (test_buffer_square_float_stereo (&accumulator, \
+ sample_rate, 512, 0.25, 0.25)); \
+ send_eos_event (element); \
+ tag_list = poll_tags (element); \
+ fail_unless_track_peak (tag_list, 0.25); \
+ fail_unless_track_gain (tag_list, \
+ get_expected_gain (sample_rate)); \
+ gst_tag_list_free (tag_list); \
+ \
+ cleanup_rganalysis (element); \
+} \
+ \
+GST_END_TEST;
+
+#define MAKE_GAIN_TEST_INT16_MONO(sample_rate, depth) \
+ GST_START_TEST (test_gain_int16_##depth##_mono_##sample_rate) \
+{ \
+ GstElement *element = setup_rganalysis (); \
+ GstTagList *tag_list; \
+ gint accumulator = 0; \
+ gint i; \
+ \
+ set_playing_state (element); \
+ \
+ for (i = 0; i < 20; i++) \
+ push_buffer (test_buffer_square_int16_mono (&accumulator, \
+ sample_rate, depth, 512, 1 << (13 + depth - 16))); \
+ \
+ send_eos_event (element); \
+ tag_list = poll_tags (element); \
+ fail_unless_track_peak (tag_list, 0.25); \
+ fail_unless_track_gain (tag_list, \
+ get_expected_gain (sample_rate)); \
+ gst_tag_list_free (tag_list); \
+ \
+ cleanup_rganalysis (element); \
+} \
+ \
+GST_END_TEST;
+
+#define MAKE_GAIN_TEST_INT16_STEREO(sample_rate, depth) \
+ GST_START_TEST (test_gain_int16_##depth##_stereo_##sample_rate) \
+{ \
+ GstElement *element = setup_rganalysis (); \
+ GstTagList *tag_list; \
+ gint accumulator = 0; \
+ gint i; \
+ \
+ set_playing_state (element); \
+ \
+ for (i = 0; i < 20; i++) \
+ push_buffer (test_buffer_square_int16_stereo (&accumulator, \
+ sample_rate, depth, 512, 1 << (13 + depth - 16), \
+ 1 << (13 + depth - 16))); \
+ send_eos_event (element); \
+ tag_list = poll_tags (element); \
+ fail_unless_track_peak (tag_list, 0.25); \
+ fail_unless_track_gain (tag_list, \
+ get_expected_gain (sample_rate)); \
+ gst_tag_list_free (tag_list); \
+ \
+ cleanup_rganalysis (element); \
+} \
+ \
+GST_END_TEST;
+
+MAKE_GAIN_TEST_FLOAT_MONO (8000);
+MAKE_GAIN_TEST_FLOAT_MONO (11025);
+MAKE_GAIN_TEST_FLOAT_MONO (12000);
+MAKE_GAIN_TEST_FLOAT_MONO (16000);
+MAKE_GAIN_TEST_FLOAT_MONO (22050);
+MAKE_GAIN_TEST_FLOAT_MONO (24000);
+MAKE_GAIN_TEST_FLOAT_MONO (32000);
+MAKE_GAIN_TEST_FLOAT_MONO (44100);
+MAKE_GAIN_TEST_FLOAT_MONO (48000);
+
+MAKE_GAIN_TEST_FLOAT_STEREO (8000);
+MAKE_GAIN_TEST_FLOAT_STEREO (11025);
+MAKE_GAIN_TEST_FLOAT_STEREO (12000);
+MAKE_GAIN_TEST_FLOAT_STEREO (16000);
+MAKE_GAIN_TEST_FLOAT_STEREO (22050);
+MAKE_GAIN_TEST_FLOAT_STEREO (24000);
+MAKE_GAIN_TEST_FLOAT_STEREO (32000);
+MAKE_GAIN_TEST_FLOAT_STEREO (44100);
+MAKE_GAIN_TEST_FLOAT_STEREO (48000);
+
+MAKE_GAIN_TEST_INT16_MONO (8000, 16);
+MAKE_GAIN_TEST_INT16_MONO (11025, 16);
+MAKE_GAIN_TEST_INT16_MONO (12000, 16);
+MAKE_GAIN_TEST_INT16_MONO (16000, 16);
+MAKE_GAIN_TEST_INT16_MONO (22050, 16);
+MAKE_GAIN_TEST_INT16_MONO (24000, 16);
+MAKE_GAIN_TEST_INT16_MONO (32000, 16);
+MAKE_GAIN_TEST_INT16_MONO (44100, 16);
+MAKE_GAIN_TEST_INT16_MONO (48000, 16);
+
+MAKE_GAIN_TEST_INT16_STEREO (8000, 16);
+MAKE_GAIN_TEST_INT16_STEREO (11025, 16);
+MAKE_GAIN_TEST_INT16_STEREO (12000, 16);
+MAKE_GAIN_TEST_INT16_STEREO (16000, 16);
+MAKE_GAIN_TEST_INT16_STEREO (22050, 16);
+MAKE_GAIN_TEST_INT16_STEREO (24000, 16);
+MAKE_GAIN_TEST_INT16_STEREO (32000, 16);
+MAKE_GAIN_TEST_INT16_STEREO (44100, 16);
+MAKE_GAIN_TEST_INT16_STEREO (48000, 16);
+
+MAKE_GAIN_TEST_INT16_MONO (8000, 8);
+MAKE_GAIN_TEST_INT16_MONO (11025, 8);
+MAKE_GAIN_TEST_INT16_MONO (12000, 8);
+MAKE_GAIN_TEST_INT16_MONO (16000, 8);
+MAKE_GAIN_TEST_INT16_MONO (22050, 8);
+MAKE_GAIN_TEST_INT16_MONO (24000, 8);
+MAKE_GAIN_TEST_INT16_MONO (32000, 8);
+MAKE_GAIN_TEST_INT16_MONO (44100, 8);
+MAKE_GAIN_TEST_INT16_MONO (48000, 8);
+
+MAKE_GAIN_TEST_INT16_STEREO (8000, 8);
+MAKE_GAIN_TEST_INT16_STEREO (11025, 8);
+MAKE_GAIN_TEST_INT16_STEREO (12000, 8);
+MAKE_GAIN_TEST_INT16_STEREO (16000, 8);
+MAKE_GAIN_TEST_INT16_STEREO (22050, 8);
+MAKE_GAIN_TEST_INT16_STEREO (24000, 8);
+MAKE_GAIN_TEST_INT16_STEREO (32000, 8);
+MAKE_GAIN_TEST_INT16_STEREO (44100, 8);
+MAKE_GAIN_TEST_INT16_STEREO (48000, 8);
+
+static Suite *
+rganalysis_suite (void)
+{
+ Suite *s = suite_create ("rganalysis");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+
+ tcase_add_test (tc_chain, test_no_buffer);
+ tcase_add_test (tc_chain, test_no_buffer_album_1);
+ tcase_add_test (tc_chain, test_no_buffer_album_2);
+ tcase_add_test (tc_chain, test_empty_buffers);
+
+ tcase_add_test (tc_chain, test_peak_float);
+ tcase_add_test (tc_chain, test_peak_int16_16);
+ tcase_add_test (tc_chain, test_peak_int16_8);
+
+ tcase_add_test (tc_chain, test_peak_album);
+ tcase_add_test (tc_chain, test_peak_track_album);
+ tcase_add_test (tc_chain, test_peak_album_abort_to_track);
+
+ tcase_add_test (tc_chain, test_gain_album);
+
+ tcase_add_test (tc_chain, test_forced);
+ tcase_add_test (tc_chain, test_forced_separate);
+ tcase_add_test (tc_chain, test_forced_after_data);
+ tcase_add_test (tc_chain, test_forced_album);
+ tcase_add_test (tc_chain, test_forced_album_skip);
+ tcase_add_test (tc_chain, test_forced_album_no_skip);
+ tcase_add_test (tc_chain, test_forced_abort_album_no_skip);
+
+ tcase_add_test (tc_chain, test_reference_level);
+
+ tcase_add_test (tc_chain, test_all_formats);
+
+ tcase_add_test (tc_chain, test_gain_float_mono_8000);
+ tcase_add_test (tc_chain, test_gain_float_mono_11025);
+ tcase_add_test (tc_chain, test_gain_float_mono_12000);
+ tcase_add_test (tc_chain, test_gain_float_mono_16000);
+ tcase_add_test (tc_chain, test_gain_float_mono_22050);
+ tcase_add_test (tc_chain, test_gain_float_mono_24000);
+ tcase_add_test (tc_chain, test_gain_float_mono_32000);
+ tcase_add_test (tc_chain, test_gain_float_mono_44100);
+ tcase_add_test (tc_chain, test_gain_float_mono_48000);
+
+ tcase_add_test (tc_chain, test_gain_float_stereo_8000);
+ tcase_add_test (tc_chain, test_gain_float_stereo_11025);
+ tcase_add_test (tc_chain, test_gain_float_stereo_12000);
+ tcase_add_test (tc_chain, test_gain_float_stereo_16000);
+ tcase_add_test (tc_chain, test_gain_float_stereo_22050);
+ tcase_add_test (tc_chain, test_gain_float_stereo_24000);
+ tcase_add_test (tc_chain, test_gain_float_stereo_32000);
+ tcase_add_test (tc_chain, test_gain_float_stereo_44100);
+ tcase_add_test (tc_chain, test_gain_float_stereo_48000);
+
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_8000);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_11025);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_12000);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_16000);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_22050);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_24000);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_32000);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_44100);
+ tcase_add_test (tc_chain, test_gain_int16_16_mono_48000);
+
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_8000);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_11025);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_12000);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_16000);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_22050);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_24000);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_32000);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_44100);
+ tcase_add_test (tc_chain, test_gain_int16_16_stereo_48000);
+
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_8000);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_11025);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_12000);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_16000);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_22050);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_24000);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_32000);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_44100);
+ tcase_add_test (tc_chain, test_gain_int16_8_mono_48000);
+
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_8000);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_11025);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_12000);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_16000);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_22050);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_24000);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_32000);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_44100);
+ tcase_add_test (tc_chain, test_gain_int16_8_stereo_48000);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ gint nf;
+
+ Suite *s = rganalysis_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_ENV);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/rglimiter.c b/tests/check/elements/rglimiter.c
new file mode 100644
index 0000000..6b4b96a
--- /dev/null
+++ b/tests/check/elements/rglimiter.c
@@ -0,0 +1,269 @@
+/* GStreamer ReplayGain limiter
+ *
+ * Copyright (C) 2007 Rene Stadler <mail@renestadler.de>
+ *
+ * rglimiter.c: Unit test for the rglimiter element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+#define RG_LIMITER_CAPS_TEMPLATE_STRING \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "channels = (int) [ 1, MAX ], " \
+ "rate = (int) [ 1, MAX ]"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_LIMITER_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_LIMITER_CAPS_TEMPLATE_STRING)
+ );
+
+static GstElement *
+setup_rglimiter (void)
+{
+ GstElement *element;
+
+ GST_DEBUG ("setup_rglimiter");
+ element = gst_check_setup_element ("rglimiter");
+ mysrcpad = gst_check_setup_src_pad (element, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (element, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return element;
+}
+
+static void
+cleanup_rglimiter (GstElement * element)
+{
+ GST_DEBUG ("cleanup_rglimiter");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_check_teardown_src_pad (element);
+ gst_check_teardown_sink_pad (element);
+ gst_check_teardown_element (element);
+}
+
+static void
+set_playing_state (GstElement * element)
+{
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "Could not set state to PLAYING");
+}
+
+static const gfloat test_input[] = {
+ -2.0, -1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0, 2.0
+};
+
+static const gfloat test_output[] = {
+ -0.99752737684336523, /* -2.0 */
+ -0.88079707797788243, /* -1.0 */
+ -0.7310585786300049, /* -0.75 */
+ -0.5, -0.25, 0.0, 0.25, 0.5,
+ 0.7310585786300049, /* 0.75 */
+ 0.88079707797788243, /* 1.0 */
+ 0.99752737684336523, /* 2.0 */
+};
+
+static GstBuffer *
+create_test_buffer (void)
+{
+ GstBuffer *buf = gst_buffer_new_and_alloc (sizeof (test_input));
+ GstCaps *caps;
+
+ memcpy (GST_BUFFER_DATA (buf), test_input, sizeof (test_input));
+
+ caps = gst_caps_new_simple ("audio/x-raw-float",
+ "rate", G_TYPE_INT, 44100, "channels", G_TYPE_INT, 1,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32, NULL);
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+static void
+verify_test_buffer (GstBuffer * buf)
+{
+ gfloat *output = (gfloat *) GST_BUFFER_DATA (buf);
+ gint i;
+
+ fail_unless (GST_BUFFER_SIZE (buf) == sizeof (test_output));
+ for (i = 0; i < G_N_ELEMENTS (test_input); i++)
+ fail_unless (ABS (output[i] - test_output[i]) < 1.e-6,
+ "Incorrect output value %.6f for input %.2f, expected %.6f",
+ output[i], test_input[i], test_output[i]);
+}
+
+/* Start of tests. */
+
+GST_START_TEST (test_no_buffer)
+{
+ GstElement *element = setup_rglimiter ();
+
+ set_playing_state (element);
+
+ cleanup_rglimiter (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_disabled)
+{
+ GstElement *element = setup_rglimiter ();
+ GstBuffer *buf, *out_buf;
+
+ g_object_set (element, "enabled", FALSE, NULL);
+ set_playing_state (element);
+
+ buf = create_test_buffer ();
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+ fail_unless (g_list_length (buffers) == 1);
+ out_buf = buffers->data;
+ fail_if (out_buf == NULL);
+ buffers = g_list_remove (buffers, out_buf);
+ ASSERT_BUFFER_REFCOUNT (out_buf, "out_buf", 1);
+ fail_unless (buf == out_buf);
+ gst_buffer_unref (out_buf);
+
+ cleanup_rglimiter (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_limiting)
+{
+ GstElement *element = setup_rglimiter ();
+ GstBuffer *buf, *out_buf;
+
+ set_playing_state (element);
+
+ /* Mutable variant. */
+ buf = create_test_buffer ();
+ GST_DEBUG ("push mutable buffer");
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+ fail_unless (g_list_length (buffers) == 1);
+ out_buf = buffers->data;
+ fail_if (out_buf == NULL);
+ ASSERT_BUFFER_REFCOUNT (out_buf, "out_buf", 1);
+ verify_test_buffer (out_buf);
+
+ /* Immutable variant. */
+ buf = create_test_buffer ();
+ /* Extra ref: */
+ gst_buffer_ref (buf);
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 2);
+ GST_DEBUG ("push immutable buffer");
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+ fail_unless (g_list_length (buffers) == 2);
+ out_buf = g_list_last (buffers)->data;
+ fail_if (out_buf == NULL);
+ ASSERT_BUFFER_REFCOUNT (out_buf, "out_buf", 1);
+ fail_unless (buf != out_buf);
+ /* Drop our extra ref: */
+ gst_buffer_unref (buf);
+ verify_test_buffer (out_buf);
+
+ cleanup_rglimiter (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_gap)
+{
+ GstElement *element = setup_rglimiter ();
+ GstBuffer *buf, *out_buf;
+
+ set_playing_state (element);
+
+ buf = create_test_buffer ();
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_GAP);
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+ fail_unless (g_list_length (buffers) == 1);
+ out_buf = buffers->data;
+ fail_if (out_buf == NULL);
+ ASSERT_BUFFER_REFCOUNT (out_buf, "out_buf", 1);
+
+ /* Verify that the baseclass does not lift the GAP flag: */
+ fail_unless (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_GAP));
+
+ g_assert (GST_BUFFER_SIZE (out_buf) == GST_BUFFER_SIZE (buf));
+ /* We cheated by passing an input buffer with non-silence that has the GAP
+ * flag set. The element cannot know that however and must have skipped
+ * adjusting the buffer because of the flag, which we can easily verify: */
+ fail_if (memcmp (GST_BUFFER_DATA (out_buf),
+ GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (out_buf)) != 0);
+
+ cleanup_rglimiter (element);
+}
+
+GST_END_TEST;
+
+static Suite *
+rglimiter_suite (void)
+{
+ Suite *s = suite_create ("rglimiter");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+
+ tcase_add_test (tc_chain, test_no_buffer);
+ tcase_add_test (tc_chain, test_disabled);
+ tcase_add_test (tc_chain, test_limiting);
+ tcase_add_test (tc_chain, test_gap);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ gint nf;
+
+ Suite *s = rglimiter_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_ENV);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/rgvolume.c b/tests/check/elements/rgvolume.c
new file mode 100644
index 0000000..5226259
--- /dev/null
+++ b/tests/check/elements/rgvolume.c
@@ -0,0 +1,617 @@
+/* GStreamer ReplayGain volume adjustment
+ *
+ * Copyright (C) 2007 Rene Stadler <mail@renestadler.de>
+ *
+ * rgvolume.c: Unit test for the rgvolume element
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <math.h>
+
+GList *events = NULL;
+
+/* For ease of programming we use globals to keep refs for our floating src and
+ * sink pads we create; otherwise we always have to do get_pad, get_peer, and
+ * then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+#define RG_VOLUME_CAPS_TEMPLATE_STRING \
+ "audio/x-raw-float, " \
+ "width = (int) 32, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "channels = (int) [ 1, MAX ], " \
+ "rate = (int) [ 1, MAX ]"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_VOLUME_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (RG_VOLUME_CAPS_TEMPLATE_STRING)
+ );
+
+static GstBuffer *test_buffer_new (gfloat value);
+
+/* gstcheck sets up a chain function that appends buffers to a global list.
+ * This is our equivalent of that for event handling. */
+static gboolean
+event_func (GstPad * pad, GstEvent * event)
+{
+ events = g_list_append (events, event);
+
+ return TRUE;
+}
+
+static GstElement *
+setup_rgvolume (void)
+{
+ GstElement *element;
+
+ GST_DEBUG ("setup_rgvolume");
+ element = gst_check_setup_element ("rgvolume");
+ mysrcpad = gst_check_setup_src_pad (element, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (element, &sinktemplate, NULL);
+
+ /* Capture events, to test tag filtering behavior: */
+ gst_pad_set_event_function (mysinkpad, event_func);
+
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return element;
+}
+
+static void
+send_newsegment_and_empty_buffer (void)
+{
+ GstBuffer *buf;
+ GstEvent *ev;
+
+ fail_unless (g_list_length (events) == 0);
+
+ ev = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, 0, -1, 0);
+ fail_unless (gst_pad_push_event (mysrcpad, ev),
+ "Pushing newsegment event failed");
+
+ buf = test_buffer_new (0.0);
+ GST_BUFFER_SIZE (buf) = 0;
+ GST_BUFFER_DURATION (buf) = 0;
+ GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET (buf);
+ fail_unless (gst_pad_push (mysrcpad, buf) == GST_FLOW_OK);
+
+ fail_unless (g_list_length (events) == 1);
+ fail_unless (events->data == ev);
+ gst_mini_object_unref ((GstMiniObject *) events->data);
+ events = g_list_remove (events, ev);
+
+ fail_unless (g_list_length (buffers) == 1);
+ fail_unless (buffers->data == buf);
+ gst_mini_object_unref ((GstMiniObject *) buffers->data);
+ buffers = g_list_remove (buffers, buf);
+}
+
+static void
+cleanup_rgvolume (GstElement * element)
+{
+ GST_DEBUG ("cleanup_rgvolume");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ g_list_foreach (events, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (events);
+ events = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (element);
+ gst_check_teardown_sink_pad (element);
+ gst_check_teardown_element (element);
+}
+
+static void
+set_playing_state (GstElement * element)
+{
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "Could not set state to PLAYING");
+}
+
+static void
+set_null_state (GstElement * element)
+{
+ fail_unless (gst_element_set_state (element,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS,
+ "Could not set state to NULL");
+}
+
+static void
+send_eos_event (GstElement * element)
+{
+ GstEvent *event = gst_event_new_eos ();
+
+ fail_unless (g_list_length (events) == 0);
+ fail_unless (gst_pad_push_event (mysrcpad, event),
+ "Pushing EOS event failed");
+ fail_unless (g_list_length (events) == 1);
+ fail_unless (events->data == event);
+ gst_mini_object_unref ((GstMiniObject *) events->data);
+ events = g_list_remove (events, event);
+}
+
+static GstEvent *
+send_tag_event (GstElement * element, GstEvent * event)
+{
+ g_return_val_if_fail (event->type == GST_EVENT_TAG, NULL);
+
+ fail_unless (g_list_length (events) == 0);
+ fail_unless (gst_pad_push_event (mysrcpad, event),
+ "Pushing tag event failed");
+
+ if (g_list_length (events) == 0) {
+ /* Event got filtered out. */
+ event = NULL;
+ } else {
+ GstTagList *tag_list;
+ gdouble dummy;
+
+ event = events->data;
+ events = g_list_remove (events, event);
+
+ fail_unless (event->type == GST_EVENT_TAG);
+ gst_event_parse_tag (event, &tag_list);
+
+ /* The element is supposed to filter out ReplayGain related tags. */
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_GAIN, &dummy),
+ "tag event still contains track gain tag");
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_TRACK_PEAK, &dummy),
+ "tag event still contains track peak tag");
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_GAIN, &dummy),
+ "tag event still contains album gain tag");
+ fail_if (gst_tag_list_get_double (tag_list, GST_TAG_ALBUM_PEAK, &dummy),
+ "tag event still contains album peak tag");
+ }
+
+ return event;
+}
+
+static GstBuffer *
+test_buffer_new (gfloat value)
+{
+ GstBuffer *buf;
+ GstCaps *caps;
+ gfloat *data;
+ gint i;
+
+ buf = gst_buffer_new_and_alloc (8 * sizeof (gfloat));
+ data = (gfloat *) GST_BUFFER_DATA (buf);
+ for (i = 0; i < 8; i++)
+ data[i] = value;
+
+ caps = gst_caps_from_string ("audio/x-raw-float, "
+ "rate = 8000, channels = 1, endianness = BYTE_ORDER, width = 32");
+ gst_buffer_set_caps (buf, caps);
+ gst_caps_unref (caps);
+
+ ASSERT_BUFFER_REFCOUNT (buf, "buf", 1);
+
+ return buf;
+}
+
+#define MATCH_GAIN(g1, g2) ((g1 < g2 + 1e-6) && (g2 < g1 + 1e-6))
+
+static void
+fail_unless_target_gain (GstElement * element, gdouble expected_gain)
+{
+ gdouble prop_gain;
+
+ g_object_get (element, "target-gain", &prop_gain, NULL);
+
+ fail_unless (MATCH_GAIN (prop_gain, expected_gain),
+ "Target gain is %.2f dB, expected %.2f dB", prop_gain, expected_gain);
+}
+
+static void
+fail_unless_result_gain (GstElement * element, gdouble expected_gain)
+{
+ GstBuffer *input_buf, *output_buf;
+ gfloat input_sample, output_sample;
+ gdouble gain, prop_gain;
+ gboolean is_passthrough, expect_passthrough;
+ gint i;
+
+ fail_unless (g_list_length (buffers) == 0);
+
+ input_sample = 1.0;
+ input_buf = test_buffer_new (input_sample);
+
+ /* We keep an extra reference to detect passthrough mode. */
+ gst_buffer_ref (input_buf);
+ /* Pushing steals a reference. */
+ fail_unless (gst_pad_push (mysrcpad, input_buf) == GST_FLOW_OK);
+ gst_buffer_unref (input_buf);
+
+ /* The output buffer ends up on the global buffer list. */
+ fail_unless (g_list_length (buffers) == 1);
+ output_buf = buffers->data;
+ fail_if (output_buf == NULL);
+
+ buffers = g_list_remove (buffers, output_buf);
+ ASSERT_BUFFER_REFCOUNT (output_buf, "output_buf", 1);
+ fail_unless_equals_int (GST_BUFFER_SIZE (output_buf), 8 * sizeof (gfloat));
+
+ output_sample = *((gfloat *) GST_BUFFER_DATA (output_buf));
+
+ fail_if (output_sample == 0.0, "First output sample is zero");
+ for (i = 1; i < 8; i++) {
+ gfloat output = ((gfloat *) GST_BUFFER_DATA (output_buf))[i];
+
+ fail_unless (output_sample == output, "Output samples not uniform");
+ };
+
+ gain = 20. * log10 (output_sample / input_sample);
+ fail_unless (MATCH_GAIN (gain, expected_gain),
+ "Applied gain is %.2f dB, expected %.2f dB", gain, expected_gain);
+ g_object_get (element, "result-gain", &prop_gain, NULL);
+ fail_unless (MATCH_GAIN (prop_gain, expected_gain),
+ "Result gain is %.2f dB, expected %.2f dB", prop_gain, expected_gain);
+
+ is_passthrough = (output_buf == input_buf);
+ expect_passthrough = MATCH_GAIN (expected_gain, +0.00);
+ fail_unless (is_passthrough == expect_passthrough,
+ expect_passthrough
+ ? "Expected operation in passthrough mode"
+ : "Incorrect passthrough behaviour");
+
+ gst_buffer_unref (output_buf);
+}
+
+static void
+fail_unless_gain (GstElement * element, gdouble expected_gain)
+{
+ fail_unless_target_gain (element, expected_gain);
+ fail_unless_result_gain (element, expected_gain);
+}
+
+/* Start of tests. */
+
+GST_START_TEST (test_no_buffer)
+{
+ GstElement *element = setup_rgvolume ();
+
+ set_playing_state (element);
+ set_null_state (element);
+ set_playing_state (element);
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_events)
+{
+ GstElement *element = setup_rgvolume ();
+ GstEvent *event;
+ GstEvent *new_event;
+ GstTagList *tag_list;
+ gchar *artist;
+
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +4.95, GST_TAG_TRACK_PEAK, 0.59463,
+ GST_TAG_ALBUM_GAIN, -1.54, GST_TAG_ALBUM_PEAK, 0.693415,
+ GST_TAG_ARTIST, "Foobar", NULL);
+ event = gst_event_new_tag (tag_list);
+ new_event = send_tag_event (element, event);
+ /* Expect the element to modify the writable event. */
+ fail_unless (event == new_event, "Writable tag event not reused");
+ gst_event_parse_tag (new_event, &tag_list);
+ fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_ARTIST, &artist));
+ fail_unless (g_str_equal (artist, "Foobar"));
+ g_free (artist);
+ gst_event_unref (new_event);
+
+ /* Same as above, but with a non-writable event. */
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +4.95, GST_TAG_TRACK_PEAK, 0.59463,
+ GST_TAG_ALBUM_GAIN, -1.54, GST_TAG_ALBUM_PEAK, 0.693415,
+ GST_TAG_ARTIST, "Foobar", NULL);
+ event = gst_event_new_tag (tag_list);
+ /* Holding an extra ref makes the event unwritable: */
+ gst_event_ref (event);
+ new_event = send_tag_event (element, event);
+ fail_unless (event != new_event, "Unwritable tag event reused");
+ gst_event_parse_tag (new_event, &tag_list);
+ fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_ARTIST, &artist));
+ fail_unless (g_str_equal (artist, "Foobar"));
+ g_free (artist);
+ gst_event_unref (event);
+ gst_event_unref (new_event);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_simple)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "album-mode", FALSE, "headroom", +0.00,
+ "pre-amp", -6.00, "fallback-gain", +1.23, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, -3.45, GST_TAG_TRACK_PEAK, 1.0,
+ GST_TAG_ALBUM_GAIN, +2.09, GST_TAG_ALBUM_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, -9.45); /* pre-amp + track gain */
+ send_eos_event (element);
+
+ g_object_set (element, "album-mode", TRUE, NULL);
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, -3.45, GST_TAG_TRACK_PEAK, 1.0,
+ GST_TAG_ALBUM_GAIN, +2.09, GST_TAG_ALBUM_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, -3.91); /* pre-amp + album gain */
+
+ /* Switching back to track mode in the middle of a stream: */
+ g_object_set (element, "album-mode", FALSE, NULL);
+ fail_unless_gain (element, -9.45); /* pre-amp + track gain */
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+/* If there are no gain tags at all, the fallback gain is used. */
+
+GST_START_TEST (test_fallback_gain)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ /* First some track where fallback does _not_ apply. */
+
+ g_object_set (element, "album-mode", FALSE, "headroom", 10.00,
+ "pre-amp", -6.00, "fallback-gain", -3.00, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +3.5, GST_TAG_TRACK_PEAK, 1.0,
+ GST_TAG_ALBUM_GAIN, -0.5, GST_TAG_ALBUM_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, -2.50); /* pre-amp + track gain */
+ send_eos_event (element);
+
+ /* Now a track completely missing tags. */
+
+ fail_unless_gain (element, -9.00); /* pre-amp + fallback-gain */
+
+ /* Changing the fallback gain in the middle of a stream, going to pass-through
+ * mode: */
+ g_object_set (element, "fallback-gain", +6.00, NULL);
+ fail_unless_gain (element, +0.00); /* pre-amp + fallback-gain */
+ send_eos_event (element);
+
+ /* Verify that result gain is set to +0.00 with pre-amp + fallback-gain >
+ * +0.00 and no headroom. */
+
+ g_object_set (element, "fallback-gain", +12.00, "headroom", +0.00, NULL);
+ fail_unless_target_gain (element, +6.00); /* pre-amp + fallback-gain */
+ fail_unless_result_gain (element, +0.00);
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+/* If album gain is to be preferred but not available, the track gain is to be
+ * taken instead. */
+
+GST_START_TEST (test_fallback_track)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "album-mode", TRUE, "headroom", +0.00,
+ "pre-amp", -6.00, "fallback-gain", +1.23, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +2.11, GST_TAG_TRACK_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, -3.89); /* pre-amp + track gain */
+
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+/* If track gain is to be preferred but not available, the album gain is to be
+ * taken instead. */
+
+GST_START_TEST (test_fallback_album)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "album-mode", FALSE, "headroom", +0.00,
+ "pre-amp", -6.00, "fallback-gain", +1.23, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_ALBUM_GAIN, +3.73, GST_TAG_ALBUM_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, -2.27); /* pre-amp + album gain */
+
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_headroom)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ g_object_set (element, "album-mode", FALSE, "headroom", +0.00,
+ "pre-amp", +0.00, "fallback-gain", +1.23, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +3.50, GST_TAG_TRACK_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_target_gain (element, +3.50); /* pre-amp + track gain */
+ fail_unless_result_gain (element, +0.00);
+ send_eos_event (element);
+
+ g_object_set (element, "headroom", +2.00, NULL);
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, +9.18, GST_TAG_TRACK_PEAK, 0.687149, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_target_gain (element, +9.18); /* pre-amp + track gain */
+ /* Result is 20. * log10 (1. / peak) + headroom. */
+ fail_unless_result_gain (element, 5.2589816238303335);
+ send_eos_event (element);
+
+ g_object_set (element, "album-mode", TRUE, NULL);
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_ALBUM_GAIN, +5.50, GST_TAG_ALBUM_PEAK, 1.0, NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_target_gain (element, +5.50); /* pre-amp + album gain */
+ fail_unless_result_gain (element, +2.00); /* headroom */
+ send_eos_event (element);
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_reference_level)
+{
+ GstElement *element = setup_rgvolume ();
+ GstTagList *tag_list;
+
+ g_object_set (element,
+ "album-mode", FALSE,
+ "headroom", +0.00, "pre-amp", +0.00, "fallback-gain", +1.23, NULL);
+ set_playing_state (element);
+
+ send_newsegment_and_empty_buffer ();
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, 0.00, GST_TAG_TRACK_PEAK, 0.2,
+ GST_TAG_REFERENCE_LEVEL, 83., NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ /* Because our authorative reference is 89 dB, we bump it up by +6 dB. */
+ fail_unless_gain (element, +6.00); /* pre-amp + track gain */
+ send_eos_event (element);
+
+ g_object_set (element, "album-mode", TRUE, NULL);
+
+ /* Same as above, but with album gain. */
+
+ tag_list = gst_tag_list_new ();
+ gst_tag_list_add (tag_list, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TRACK_GAIN, 1.23, GST_TAG_TRACK_PEAK, 0.1,
+ GST_TAG_ALBUM_GAIN, 0.00, GST_TAG_ALBUM_PEAK, 0.2,
+ GST_TAG_REFERENCE_LEVEL, 83., NULL);
+ fail_unless (send_tag_event (element, gst_event_new_tag (tag_list)) == NULL);
+ fail_unless_gain (element, +6.00); /* pre-amp + album gain */
+
+ cleanup_rgvolume (element);
+}
+
+GST_END_TEST;
+
+static Suite *
+rgvolume_suite (void)
+{
+ Suite *s = suite_create ("rgvolume");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+
+ tcase_add_test (tc_chain, test_no_buffer);
+ tcase_add_test (tc_chain, test_events);
+ tcase_add_test (tc_chain, test_simple);
+ tcase_add_test (tc_chain, test_fallback_gain);
+ tcase_add_test (tc_chain, test_fallback_track);
+ tcase_add_test (tc_chain, test_fallback_album);
+ tcase_add_test (tc_chain, test_headroom);
+ tcase_add_test (tc_chain, test_reference_level);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ gint nf;
+
+ Suite *s = rgvolume_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_ENV);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c
new file mode 100644
index 0000000..b2160f4
--- /dev/null
+++ b/tests/check/elements/rtp-payloading.c
@@ -0,0 +1,828 @@
+/* GStreamer RTP payloader unit tests
+ * Copyright (C) 2008 Nokia Corporation and its subsidary(-ies)
+ * contact: <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <gst/check/gstcheck.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define RELEASE_ELEMENT(x) if(x) {gst_object_unref(x); x = NULL;}
+
+#define LOOP_COUNT 1
+
+/*
+ * RTP pipeline structure to store the required elements.
+ */
+typedef struct
+{
+ GstElement *pipeline;
+ GstElement *fdsrc;
+ GstElement *capsfilter;
+ GstElement *rtppay;
+ GstElement *rtpdepay;
+ GstElement *fakesink;
+ int fd[2];
+ const char *frame_data;
+ int frame_data_size;
+ int frame_count;
+} rtp_pipeline;
+
+/*
+ * Number of bytes received in the chain list function when using buffer lists
+ */
+static guint chain_list_bytes_received;
+
+/*
+ * Chain list function for testing buffer lists
+ */
+static GstFlowReturn
+rtp_pipeline_chain_list (GstPad * pad, GstBufferList * list)
+{
+ GstBufferListIterator *it;
+
+ fail_if (!list);
+ it = gst_buffer_list_iterate (list);
+
+ /*
+ * Count the size of the payload in the buffer list.
+ */
+
+ /* Loop through all groups */
+ while (gst_buffer_list_iterator_next_group (it)) {
+ GstBuffer *paybuf;
+
+ /* Skip the first buffer in the group, its the RTP header */
+ fail_if (!gst_buffer_list_iterator_next (it));
+
+ /* Loop through all payload buffers in the current group */
+ while ((paybuf = gst_buffer_list_iterator_next (it))) {
+ chain_list_bytes_received += GST_BUFFER_SIZE (paybuf);
+ }
+ }
+
+ gst_buffer_list_iterator_free (it);
+ gst_buffer_list_unref (list);
+
+ return GST_FLOW_OK;
+}
+
+/*
+ * RTP bus callback.
+ */
+static gboolean
+rtp_bus_callback (GstBus * bus, GstMessage * message, gpointer data)
+{
+ GMainLoop *mainloop = (GMainLoop *) data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ {
+ GError *err;
+
+ gchar *debug;
+
+ gchar *element_name;
+
+ element_name = (message->src) ? gst_object_get_name (message->src) : NULL;
+ gst_message_parse_error (message, &err, &debug);
+ /* FIXME: should we fail the test here? */
+ g_print ("\nError from element %s: %s\n%s\n\n",
+ GST_STR_NULL (element_name), err->message, (debug) ? debug : "");
+ g_error_free (err);
+ g_free (debug);
+ g_free (element_name);
+
+ g_main_loop_quit (mainloop);
+ }
+ break;
+
+ case GST_MESSAGE_EOS:
+ {
+ g_main_loop_quit (mainloop);
+ }
+ break;
+ break;
+
+ default:
+ {
+ }
+ break;
+ }
+
+ return TRUE;
+}
+
+/*
+ * Creates a RTP pipeline for one test.
+ * @param frame_data Pointer to the frame data which is used to pass thru pay/depayloaders.
+ * @param frame_data_size Frame data size in bytes.
+ * @param frame_count Frame count.
+ * @param filtercaps Caps filters.
+ * @param pay Payloader name.
+ * @param depay Depayloader name.
+ * @return
+ * Returns pointer to the RTP pipeline.
+ * The user must free the RTP pipeline when it's not used anymore.
+ */
+static rtp_pipeline *
+rtp_pipeline_create (const char *frame_data, int frame_data_size,
+ int frame_count, const char *filtercaps, const char *pay, const char *depay)
+{
+ gchar *pipeline_name;
+
+ rtp_pipeline *p;
+
+ GstCaps *caps;
+
+ /* Check parameters. */
+ if (!frame_data || !pay || !depay) {
+ return NULL;
+ }
+
+ /* Allocate memory for the RTP pipeline. */
+ p = (rtp_pipeline *) malloc (sizeof (rtp_pipeline));
+
+ p->frame_data = frame_data;
+ p->frame_data_size = frame_data_size;
+ p->frame_count = frame_count;
+
+ /* Create elements. */
+ pipeline_name = g_strdup_printf ("%s-%s-pipeline", pay, depay);
+ p->pipeline = gst_pipeline_new (pipeline_name);
+ g_free (pipeline_name);
+ p->fdsrc = gst_element_factory_make ("fdsrc", NULL);
+ p->capsfilter = gst_element_factory_make ("capsfilter", NULL);
+ p->rtppay = gst_element_factory_make (pay, NULL);
+ p->rtpdepay = gst_element_factory_make (depay, NULL);
+ p->fakesink = gst_element_factory_make ("fakesink", NULL);
+
+ /* One or more elements are not created successfully or failed to create p? */
+ if (!p->pipeline || !p->fdsrc || !p->capsfilter || !p->rtppay || !p->rtpdepay
+ || !p->fakesink || pipe (p->fd) == -1) {
+ /* Release created elements. */
+ RELEASE_ELEMENT (p->pipeline);
+ RELEASE_ELEMENT (p->fdsrc);
+ RELEASE_ELEMENT (p->capsfilter);
+ RELEASE_ELEMENT (p->rtppay);
+ RELEASE_ELEMENT (p->rtpdepay);
+ RELEASE_ELEMENT (p->fakesink);
+
+ /* Close pipe. */
+ if (p->fd[0]) {
+ close (p->fd[0]);
+ }
+
+ if (p->fd[1]) {
+ close (p->fd[1]);
+ }
+
+ /* Release allocated memory. */
+ free (p);
+
+ return NULL;
+ }
+
+ /* Set fdsrc properties. */
+ g_object_set (p->fdsrc, "fd", p->fd[0], NULL);
+ g_object_set (p->fdsrc, "do-timestamp", TRUE, NULL);
+ g_object_set (p->fdsrc, "blocksize", p->frame_data_size, NULL);
+ g_object_set (p->fdsrc, "num-buffers", p->frame_count * LOOP_COUNT, NULL);
+
+ /* Set caps filters. */
+ caps = gst_caps_from_string (filtercaps);
+
+ g_object_set (p->capsfilter, "caps", caps, NULL);
+ gst_caps_unref (caps);
+
+ /* Add elements to the pipeline. */
+ gst_bin_add (GST_BIN (p->pipeline), p->fdsrc);
+ gst_bin_add (GST_BIN (p->pipeline), p->capsfilter);
+ gst_bin_add (GST_BIN (p->pipeline), p->rtppay);
+ gst_bin_add (GST_BIN (p->pipeline), p->rtpdepay);
+ gst_bin_add (GST_BIN (p->pipeline), p->fakesink);
+
+ /* Link elements. */
+ gst_element_link (p->fdsrc, p->capsfilter);
+ gst_element_link (p->capsfilter, p->rtppay);
+ gst_element_link (p->rtppay, p->rtpdepay);
+ gst_element_link (p->rtpdepay, p->fakesink);
+
+ return p;
+}
+
+/*
+ * Destroys the RTP pipeline.
+ * @param p Pointer to the RTP pipeline.
+ */
+static void
+rtp_pipeline_destroy (rtp_pipeline * p)
+{
+ /* Check parameters. */
+ if (p == NULL) {
+ return;
+ }
+
+ /* Release pipeline. */
+ RELEASE_ELEMENT (p->pipeline);
+
+ /* Close pipe. */
+ if (p->fd[0]) {
+ close (p->fd[0]);
+ }
+
+ if (p->fd[1]) {
+ close (p->fd[1]);
+ }
+
+ /* Release allocated memory. */
+ free (p);
+}
+
+/*
+ * Runs the RTP pipeline.
+ * @param p Pointer to the RTP pipeline.
+ */
+static void
+rtp_pipeline_run (rtp_pipeline * p)
+{
+ GMainLoop *mainloop = NULL;
+
+ GstBus *bus;
+
+ gint i;
+
+ /* Check parameters. */
+ if (p == NULL) {
+ return;
+ }
+
+ /* Create mainloop. */
+ mainloop = g_main_loop_new (NULL, FALSE);
+ if (!mainloop) {
+ return;
+ }
+
+ /* Add bus callback. */
+ bus = gst_pipeline_get_bus (GST_PIPELINE (p->pipeline));
+
+ gst_bus_add_watch (bus, rtp_bus_callback, (gpointer) mainloop);
+ gst_object_unref (bus);
+
+ /* Set pipeline to PLAYING. */
+ gst_element_set_state (p->pipeline, GST_STATE_PLAYING);
+
+ /* TODO: Writing may need some changes... */
+
+ for (i = 0; i < LOOP_COUNT; i++) {
+ const char *frame_data_pointer = p->frame_data;
+ int res;
+ int frame_count = p->frame_count;
+
+ /* Write in to the pipe. */
+ while (frame_count > 0) {
+ res = write (p->fd[1], frame_data_pointer, p->frame_data_size);
+ fail_unless_equals_int (res, p->frame_data_size);
+ frame_data_pointer += p->frame_data_size;
+ frame_count--;
+ }
+ }
+
+ /* Run mainloop. */
+ g_main_loop_run (mainloop);
+
+ /* Set pipeline to NULL. */
+ gst_element_set_state (p->pipeline, GST_STATE_NULL);
+
+ /* Release mainloop. */
+ g_main_loop_unref (mainloop);
+}
+
+/*
+ * Enables buffer lists. Sets the buffer-list property of the payloader
+ * and adds a chain_list_function to the depayloader.
+ * @param p Pointer to the RTP pipeline.
+ */
+static void
+rtp_pipeline_enable_lists (rtp_pipeline * p, guint mtu_size)
+{
+ GstPad *pad;
+
+ /* use buffer lists */
+ g_object_set (p->rtppay, "buffer-list", TRUE, NULL);
+
+ /* set mtu size if needed */
+ if (mtu_size) {
+ g_object_set (p->rtppay, "mtu", mtu_size, NULL);
+ }
+
+ /* Add chain list function for the buffer list tests */
+ pad = gst_element_get_static_pad (p->rtpdepay, "sink");
+ gst_pad_set_chain_list_function (pad,
+ GST_DEBUG_FUNCPTR (rtp_pipeline_chain_list));
+ gst_object_unref (pad);
+}
+
+/*
+ * Creates the RTP pipeline and runs the test using the pipeline.
+ * @param frame_data Pointer to the frame data which is used to pass thru pay/depayloaders.
+ * @param frame_data_size Frame data size in bytes.
+ * @param frame_count Frame count.
+ * @param filtercaps Caps filters.
+ * @param pay Payloader name.
+ * @param depay Depayloader name.
+ * @bytes_sent bytes that will be sent, used when testing buffer lists
+ * @mtu_size set mtu size when testing lists
+ * @use_lists enable buffer lists
+ */
+static void
+rtp_pipeline_test (const char *frame_data, int frame_data_size, int frame_count,
+ const char *filtercaps, const char *pay, const char *depay,
+ guint bytes_sent, guint mtu_size, gboolean use_lists)
+{
+ /* Create RTP pipeline. */
+ rtp_pipeline *p =
+ rtp_pipeline_create (frame_data, frame_data_size, frame_count, filtercaps,
+ pay, depay);
+
+ if (p == NULL) {
+ return;
+ }
+
+ if (use_lists) {
+ rtp_pipeline_enable_lists (p, mtu_size);
+ chain_list_bytes_received = 0;
+ }
+
+ /* Run RTP pipeline. */
+ rtp_pipeline_run (p);
+
+ /* Destroy RTP pipeline. */
+ rtp_pipeline_destroy (p);
+
+ if (use_lists) {
+ /* 'next NAL' indicator is 4 bytes */
+ fail_if (chain_list_bytes_received != bytes_sent * LOOP_COUNT);
+ }
+}
+
+static char rtp_ilbc_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_ilbc_frame_data_size = 20;
+
+static int rtp_ilbc_frame_count = 1;
+
+GST_START_TEST (rtp_ilbc)
+{
+ rtp_pipeline_test (rtp_ilbc_frame_data, rtp_ilbc_frame_data_size,
+ rtp_ilbc_frame_count, "audio/x-iLBC,mode=20", "rtpilbcpay",
+ "rtpilbcdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_gsm_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_gsm_frame_data_size = 20;
+
+static int rtp_gsm_frame_count = 1;
+
+GST_START_TEST (rtp_gsm)
+{
+ rtp_pipeline_test (rtp_gsm_frame_data, rtp_gsm_frame_data_size,
+ rtp_gsm_frame_count, "audio/x-gsm,rate=8000,channels=1", "rtpgsmpay",
+ "rtpgsmdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_amr_frame_data[] =
+ { 0x3c, 0x24, 0x03, 0xb3, 0x48, 0x10, 0x68, 0x46, 0x6c, 0xec, 0x03,
+ 0x7a, 0x37, 0x16, 0x41, 0x41, 0xc0, 0x00, 0x0d, 0xcd, 0x12, 0xed,
+ 0xad, 0x80, 0x00, 0x00, 0x11, 0x31, 0x00, 0x00, 0x0d, 0xa0
+};
+
+static int rtp_amr_frame_data_size = 32;
+
+static int rtp_amr_frame_count = 1;
+
+GST_START_TEST (rtp_amr)
+{
+ rtp_pipeline_test (rtp_amr_frame_data, rtp_amr_frame_data_size,
+ rtp_amr_frame_count, "audio/AMR,channels=1,rate=8000", "rtpamrpay",
+ "rtpamrdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_pcma_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_pcma_frame_data_size = 20;
+
+static int rtp_pcma_frame_count = 1;
+
+GST_START_TEST (rtp_pcma)
+{
+ rtp_pipeline_test (rtp_pcma_frame_data, rtp_pcma_frame_data_size,
+ rtp_pcma_frame_count, "audio/x-alaw,channels=1,rate=8000", "rtppcmapay",
+ "rtppcmadepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_pcmu_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_pcmu_frame_data_size = 20;
+
+static int rtp_pcmu_frame_count = 1;
+
+GST_START_TEST (rtp_pcmu)
+{
+ rtp_pipeline_test (rtp_pcmu_frame_data, rtp_pcmu_frame_data_size,
+ rtp_pcmu_frame_count, "audio/x-mulaw,channels=1,rate=8000", "rtppcmupay",
+ "rtppcmudepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_mpa_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_mpa_frame_data_size = 20;
+
+static int rtp_mpa_frame_count = 1;
+
+GST_START_TEST (rtp_mpa)
+{
+ rtp_pipeline_test (rtp_mpa_frame_data, rtp_mpa_frame_data_size,
+ rtp_mpa_frame_count, "audio/mpeg", "rtpmpapay", "rtpmpadepay", 0, 0,
+ FALSE);
+}
+
+GST_END_TEST;
+static char rtp_h263_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_h263_frame_data_size = 20;
+
+static int rtp_h263_frame_count = 1;
+
+GST_START_TEST (rtp_h263)
+{
+ rtp_pipeline_test (rtp_h263_frame_data, rtp_h263_frame_data_size,
+ rtp_h263_frame_count, "video/x-h263,variant=itu,h263version=h263",
+ "rtph263pay", "rtph263depay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_h263p_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_h263p_frame_data_size = 20;
+
+static int rtp_h263p_frame_count = 1;
+
+GST_START_TEST (rtp_h263p)
+{
+ rtp_pipeline_test (rtp_h263p_frame_data, rtp_h263p_frame_data_size,
+ rtp_h263p_frame_count, "video/x-h263,variant=itu", "rtph263ppay",
+ "rtph263pdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_h264_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_h264_frame_data_size = 20;
+
+static int rtp_h264_frame_count = 1;
+
+GST_START_TEST (rtp_h264)
+{
+ rtp_pipeline_test (rtp_h264_frame_data, rtp_h264_frame_data_size,
+ rtp_h264_frame_count, "video/x-h264", "rtph264pay", "rtph264depay",
+ 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_h264_list_lt_mtu_frame_data[] =
+ /* not packetized, next NAL starts with 0001 */
+{ 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0xad, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00
+};
+
+static int rtp_h264_list_lt_mtu_frame_data_size = 16;
+
+static int rtp_h264_list_lt_mtu_frame_count = 2;
+
+/* NAL = 4 bytes */
+static int rtp_h264_list_lt_mtu_bytes_sent = 2 * (16 - 4);
+
+static int rtp_h264_list_lt_mtu_mtu_size = 1024;
+
+GST_START_TEST (rtp_h264_list_lt_mtu)
+{
+ rtp_pipeline_test (rtp_h264_list_lt_mtu_frame_data,
+ rtp_h264_list_lt_mtu_frame_data_size, rtp_h264_list_lt_mtu_frame_count,
+ "video/x-h264", "rtph264pay", "rtph264depay",
+ rtp_h264_list_lt_mtu_bytes_sent, rtp_h264_list_lt_mtu_mtu_size, TRUE);
+}
+
+GST_END_TEST;
+static char rtp_h264_list_gt_mtu_frame_data[] =
+ /* not packetized, next NAL starts with 0001 */
+{ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_h264_list_gt_mtu_frame_data_size = 64;
+
+static int rtp_h264_list_gt_mtu_frame_count = 1;
+
+/* NAL = 4 bytes. When data does not fit into 1 mtu, 1 byte will be skipped */
+static int rtp_h264_list_gt_mtu_bytes_sent = 1 * (64 - 4) - 1;
+
+static int rtp_h264_list_gt_mtu_mty_size = 28;
+
+GST_START_TEST (rtp_h264_list_gt_mtu)
+{
+ rtp_pipeline_test (rtp_h264_list_gt_mtu_frame_data,
+ rtp_h264_list_gt_mtu_frame_data_size, rtp_h264_list_gt_mtu_frame_count,
+ "video/x-h264", "rtph264pay", "rtph264depay",
+ rtp_h264_list_gt_mtu_bytes_sent, rtp_h264_list_gt_mtu_mty_size, TRUE);
+}
+
+GST_END_TEST;
+static char rtp_L16_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_L16_frame_data_size = 20;
+
+static int rtp_L16_frame_count = 1;
+
+GST_START_TEST (rtp_L16)
+{
+ rtp_pipeline_test (rtp_L16_frame_data, rtp_L16_frame_data_size,
+ rtp_L16_frame_count,
+ "audio/x-raw-int,endianess=4321,signed=true,width=16,depth=16,rate=1,channels=1",
+ "rtpL16pay", "rtpL16depay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_mp2t_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_mp2t_frame_data_size = 20;
+
+static int rtp_mp2t_frame_count = 1;
+
+GST_START_TEST (rtp_mp2t)
+{
+ rtp_pipeline_test (rtp_mp2t_frame_data, rtp_mp2t_frame_data_size,
+ rtp_mp2t_frame_count, "video/mpegts,packetsize=188,systemstream=true",
+ "rtpmp2tpay", "rtpmp2tdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_mp4v_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_mp4v_frame_data_size = 20;
+
+static int rtp_mp4v_frame_count = 1;
+
+GST_START_TEST (rtp_mp4v)
+{
+ rtp_pipeline_test (rtp_mp4v_frame_data, rtp_mp4v_frame_data_size,
+ rtp_mp4v_frame_count, "video/mpeg,mpegversion=4,systemstream=false",
+ "rtpmp4vpay", "rtpmp4vdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_mp4v_list_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_mp4v_list_frame_data_size = 20;
+
+static int rtp_mp4v_list_frame_count = 1;
+
+static int rtp_mp4v_list_bytes_sent = 1 * 20;
+
+GST_START_TEST (rtp_mp4v_list)
+{
+ rtp_pipeline_test (rtp_mp4v_list_frame_data, rtp_mp4v_list_frame_data_size,
+ rtp_mp4v_list_frame_count,
+ "video/mpeg,mpegversion=4,codec_data=(buffer)000001b001",
+ "rtpmp4vpay", "rtpmp4vdepay", rtp_mp4v_list_bytes_sent, 0, TRUE);
+}
+
+GST_END_TEST;
+static char rtp_mp4g_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_mp4g_frame_data_size = 20;
+
+static int rtp_mp4g_frame_count = 1;
+
+GST_START_TEST (rtp_mp4g)
+{
+ rtp_pipeline_test (rtp_mp4g_frame_data, rtp_mp4g_frame_data_size,
+ rtp_mp4g_frame_count,
+ "video/mpeg,mpegversion=4,codec_data=(buffer)000001b001", "rtpmp4gpay",
+ "rtpmp4gdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_theora_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_theora_frame_data_size = 20;
+
+static int rtp_theora_frame_count = 1;
+
+GST_START_TEST (rtp_theora)
+{
+ rtp_pipeline_test (rtp_theora_frame_data, rtp_theora_frame_data_size,
+ rtp_theora_frame_count, "video/x-theora", "rtptheorapay",
+ "rtptheoradepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_vorbis_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_vorbis_frame_data_size = 20;
+
+static int rtp_vorbis_frame_count = 1;
+
+GST_START_TEST (rtp_vorbis)
+{
+ rtp_pipeline_test (rtp_vorbis_frame_data, rtp_vorbis_frame_data_size,
+ rtp_vorbis_frame_count, "audio/x-vorbis", "rtpvorbispay",
+ "rtpvorbisdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_jpeg_frame_data[] =
+ { /* SOF */ 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
+ 0x03, 0x00, 0x21, 0x08, 0x01, 0x11, 0x08, 0x02, 0x11, 0x08,
+ /* DQT */ 0xFF, 0xDB, 0x00, 0x43, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* DATA */ 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_jpeg_frame_data_size = sizeof (rtp_jpeg_frame_data);
+
+static int rtp_jpeg_frame_count = 1;
+
+GST_START_TEST (rtp_jpeg)
+{
+ rtp_pipeline_test (rtp_jpeg_frame_data, rtp_jpeg_frame_data_size,
+ rtp_jpeg_frame_count, "video/x-jpeg,height=640,width=480", "rtpjpegpay",
+ "rtpjpegdepay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+static char rtp_jpeg_list_frame_data[] =
+ { /* SOF */ 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08,
+ 0x03, 0x00, 0x21, 0x08, 0x01, 0x11, 0x08, 0x02, 0x11, 0x08,
+ /* DQT */ 0xFF, 0xDB, 0x00, 0x43, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* DATA */ 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_jpeg_list_frame_data_size = sizeof (rtp_jpeg_list_frame_data);
+
+static int rtp_jpeg_list_frame_count = 1;
+
+static int rtp_jpeg_list_bytes_sent = 1 * sizeof (rtp_jpeg_list_frame_data);
+
+GST_START_TEST (rtp_jpeg_list)
+{
+ rtp_pipeline_test (rtp_jpeg_list_frame_data, rtp_jpeg_list_frame_data_size,
+ rtp_jpeg_list_frame_count, "video/x-jpeg,height=640,width=480",
+ "rtpjpegpay", "rtpjpegdepay", rtp_jpeg_list_bytes_sent, 0, TRUE);
+}
+
+GST_END_TEST;
+static char rtp_g729_frame_data[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static int rtp_g729_frame_data_size = 22;
+
+static int rtp_g729_frame_count = 1;
+
+GST_START_TEST (rtp_g729)
+{
+ rtp_pipeline_test (rtp_g729_frame_data, rtp_g729_frame_data_size,
+ rtp_g729_frame_count, "audio/G729", "rtpg729pay",
+ "rtpg729depay", 0, 0, FALSE);
+}
+
+GST_END_TEST;
+
+/*
+ * Creates the test suite.
+ *
+ * Returns: pointer to the test suite.
+ */
+static Suite *
+rtp_payloading_suite (void)
+{
+ Suite *s = suite_create ("rtp_data_test");
+
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* Set timeout to 60 seconds. */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, rtp_ilbc);
+ tcase_add_test (tc_chain, rtp_gsm);
+ tcase_add_test (tc_chain, rtp_amr);
+ tcase_add_test (tc_chain, rtp_pcma);
+ tcase_add_test (tc_chain, rtp_pcmu);
+ tcase_add_test (tc_chain, rtp_mpa);
+ tcase_add_test (tc_chain, rtp_h263);
+ tcase_add_test (tc_chain, rtp_h263p);
+ tcase_add_test (tc_chain, rtp_h264);
+ tcase_add_test (tc_chain, rtp_h264_list_lt_mtu);
+ tcase_add_test (tc_chain, rtp_h264_list_gt_mtu);
+ tcase_add_test (tc_chain, rtp_L16);
+ tcase_add_test (tc_chain, rtp_mp2t);
+ tcase_add_test (tc_chain, rtp_mp4v);
+ tcase_add_test (tc_chain, rtp_mp4v_list);
+ tcase_add_test (tc_chain, rtp_mp4g);
+ tcase_add_test (tc_chain, rtp_theora);
+ tcase_add_test (tc_chain, rtp_vorbis);
+ tcase_add_test (tc_chain, rtp_jpeg);
+ tcase_add_test (tc_chain, rtp_jpeg_list);
+ tcase_add_test (tc_chain, rtp_g729);
+ return s;
+}
+
+GST_CHECK_MAIN (rtp_payloading)
diff --git a/tests/check/elements/rtpbin.c b/tests/check/elements/rtpbin.c
new file mode 100644
index 0000000..63c6ae7
--- /dev/null
+++ b/tests/check/elements/rtpbin.c
@@ -0,0 +1,447 @@
+/* GStreamer
+ *
+ * unit test for gstrtpbin
+ *
+ * Copyright (C) <2009> Wim Taymans <wim.taymans@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+GST_START_TEST (test_cleanup_send)
+{
+ GstElement *rtpbin;
+ GstPad *rtp_sink, *rtp_src, *rtcp_src;
+ GObject *session;
+ gint count = 2;
+
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+
+ while (count--) {
+ /* request session 0 */
+ rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0");
+ fail_unless (rtp_sink != NULL);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
+
+ /* this static pad should be created automatically now */
+ rtp_src = gst_element_get_static_pad (rtpbin, "send_rtp_src_0");
+ fail_unless (rtp_src != NULL);
+ ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 2);
+
+ /* we should be able to get an internal session 0 now */
+ g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
+ fail_unless (session != NULL);
+ g_object_unref (session);
+
+ /* get the send RTCP pad too */
+ rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
+ fail_unless (rtcp_src != NULL);
+ ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2);
+
+ gst_element_release_request_pad (rtpbin, rtp_sink);
+ /* we should only have our refs to the pads now */
+ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1);
+ ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1);
+ ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 2);
+
+ /* the other pad should be gone now */
+ fail_unless (gst_element_get_static_pad (rtpbin, "send_rtp_src_0") == NULL);
+
+ /* internal session should still be there */
+ g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
+ fail_unless (session != NULL);
+ g_object_unref (session);
+
+ /* release the RTCP pad */
+ gst_element_release_request_pad (rtpbin, rtcp_src);
+ /* we should only have our refs to the pads now */
+ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 1);
+ ASSERT_OBJECT_REFCOUNT (rtp_src, "rtp_src", 1);
+ ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtp_src", 1);
+
+ /* the session should be gone now */
+ g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
+ fail_unless (session == NULL);
+
+ /* unref the request pad and the static pad */
+ gst_object_unref (rtp_sink);
+ gst_object_unref (rtp_src);
+ gst_object_unref (rtcp_src);
+ }
+
+ gst_object_unref (rtpbin);
+}
+
+GST_END_TEST;
+
+typedef struct
+{
+ guint16 seqnum;
+ gboolean pad_added;
+ GstPad *pad;
+ GMutex *lock;
+ GCond *cond;
+ GstPad *sinkpad;
+ GList *pads;
+} CleanupData;
+
+static void
+init_data (CleanupData * data)
+{
+ data->seqnum = 10;
+ data->pad_added = FALSE;
+ data->lock = g_mutex_new ();
+ data->cond = g_cond_new ();
+ data->pads = NULL;
+}
+
+static void
+clean_data (CleanupData * data)
+{
+ g_list_foreach (data->pads, (GFunc) gst_object_unref, NULL);
+ g_list_free (data->pads);
+ g_mutex_free (data->lock);
+ g_cond_free (data->cond);
+}
+
+static guint8 rtp_packet[] = { 0x80, 0x60, 0x94, 0xbc, 0x8f, 0x37, 0x4e, 0xb8,
+ 0x44, 0xa8, 0xf3, 0x7c, 0x06, 0x6a, 0x0c, 0xce,
+ 0x13, 0x25, 0x19, 0x69, 0x1f, 0x93, 0x25, 0x9d,
+ 0x2b, 0x82, 0x31, 0x3b, 0x36, 0xc1, 0x3c, 0x13
+};
+
+static GstBuffer *
+make_rtp_packet (CleanupData * data)
+{
+ static GstCaps *caps = NULL;
+ GstBuffer *result;
+ guint8 *datap;
+
+ if (caps == NULL) {
+ caps = gst_caps_from_string ("application/x-rtp,"
+ "media=(string)audio, clock-rate=(int)44100, "
+ "encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1");
+ data->seqnum = 0;
+ }
+
+ result = gst_buffer_new_and_alloc (sizeof (rtp_packet));
+ datap = GST_BUFFER_DATA (result);
+ memcpy (datap, rtp_packet, sizeof (rtp_packet));
+
+ datap[2] = (data->seqnum >> 8) & 0xff;
+ datap[3] = data->seqnum & 0xff;
+
+ data->seqnum++;
+
+ gst_buffer_set_caps (result, caps);
+
+ return result;
+}
+
+static GstFlowReturn
+dummy_chain (GstPad * pad, GstBuffer * buffer)
+{
+ gst_buffer_unref (buffer);
+
+ return GST_FLOW_OK;
+}
+
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-rtp"));
+
+
+static GstPad *
+make_sinkpad (CleanupData * data)
+{
+ GstPad *pad;
+
+ pad = gst_pad_new_from_static_template (&sink_factory, "sink");
+
+ gst_pad_set_chain_function (pad, dummy_chain);
+ gst_pad_set_active (pad, TRUE);
+
+ data->pads = g_list_prepend (data->pads, pad);
+
+ return pad;
+}
+
+static void
+pad_added_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data)
+{
+ GstPad *sinkpad;
+
+ GST_DEBUG ("pad added %s:%s\n", GST_DEBUG_PAD_NAME (pad));
+
+ if (GST_PAD_IS_SINK (pad))
+ return;
+
+ fail_unless (data->pad_added == FALSE);
+
+ sinkpad = make_sinkpad (data);
+ fail_unless (gst_pad_link (pad, sinkpad) == GST_PAD_LINK_OK);
+
+ g_mutex_lock (data->lock);
+ data->pad_added = TRUE;
+ data->pad = pad;
+ g_cond_signal (data->cond);
+ g_mutex_unlock (data->lock);
+}
+
+static void
+pad_removed_cb (GstElement * rtpbin, GstPad * pad, CleanupData * data)
+{
+ GST_DEBUG ("pad removed %s:%s\n", GST_DEBUG_PAD_NAME (pad));
+
+ if (data->pad != pad)
+ return;
+
+ fail_unless (data->pad_added == TRUE);
+
+ g_mutex_lock (data->lock);
+ data->pad_added = FALSE;
+ g_cond_signal (data->cond);
+ g_mutex_unlock (data->lock);
+}
+
+GST_START_TEST (test_cleanup_recv)
+{
+ GstElement *rtpbin;
+ GstPad *rtp_sink;
+ CleanupData data;
+ GstStateChangeReturn ret;
+ GstFlowReturn res;
+ GstBuffer *buffer;
+ gint count = 2;
+
+ init_data (&data);
+
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+
+ g_signal_connect (rtpbin, "pad-added", (GCallback) pad_added_cb, &data);
+ g_signal_connect (rtpbin, "pad-removed", (GCallback) pad_removed_cb, &data);
+
+ ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+ while (count--) {
+ /* request session 0 */
+ rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
+ fail_unless (rtp_sink != NULL);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
+
+ /* no sourcepads are created yet */
+ fail_unless (rtpbin->numsinkpads == 1);
+ fail_unless (rtpbin->numsrcpads == 0);
+
+ buffer = make_rtp_packet (&data);
+ res = gst_pad_chain (rtp_sink, buffer);
+ GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
+ fail_unless (res == GST_FLOW_OK);
+
+ buffer = make_rtp_packet (&data);
+ res = gst_pad_chain (rtp_sink, buffer);
+ GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
+ fail_unless (res == GST_FLOW_OK);
+
+ /* we wait for the new pad to appear now */
+ g_mutex_lock (data.lock);
+ while (!data.pad_added)
+ g_cond_wait (data.cond, data.lock);
+ g_mutex_unlock (data.lock);
+
+ /* sourcepad created now */
+ fail_unless (rtpbin->numsinkpads == 1);
+ fail_unless (rtpbin->numsrcpads == 1);
+
+ /* remove the session */
+ gst_element_release_request_pad (rtpbin, rtp_sink);
+ gst_object_unref (rtp_sink);
+
+ /* pad should be gone now */
+ g_mutex_lock (data.lock);
+ while (data.pad_added)
+ g_cond_wait (data.cond, data.lock);
+ g_mutex_unlock (data.lock);
+
+ /* nothing left anymore now */
+ fail_unless (rtpbin->numsinkpads == 0);
+ fail_unless (rtpbin->numsrcpads == 0);
+ }
+
+ ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+ gst_object_unref (rtpbin);
+
+ clean_data (&data);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_cleanup_recv2)
+{
+ GstElement *rtpbin;
+ GstPad *rtp_sink;
+ CleanupData data;
+ GstStateChangeReturn ret;
+ GstFlowReturn res;
+ GstBuffer *buffer;
+ gint count = 2;
+
+ init_data (&data);
+
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+
+ g_signal_connect (rtpbin, "pad-added", (GCallback) pad_added_cb, &data);
+ g_signal_connect (rtpbin, "pad-removed", (GCallback) pad_removed_cb, &data);
+
+ ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+ /* request session 0 */
+ rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
+ fail_unless (rtp_sink != NULL);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
+
+ while (count--) {
+ /* no sourcepads are created yet */
+ fail_unless (rtpbin->numsinkpads == 1);
+ fail_unless (rtpbin->numsrcpads == 0);
+
+ buffer = make_rtp_packet (&data);
+ res = gst_pad_chain (rtp_sink, buffer);
+ GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
+ fail_unless (res == GST_FLOW_OK);
+
+ buffer = make_rtp_packet (&data);
+ res = gst_pad_chain (rtp_sink, buffer);
+ GST_DEBUG ("res %d, %s\n", res, gst_flow_get_name (res));
+ fail_unless (res == GST_FLOW_OK);
+
+ /* we wait for the new pad to appear now */
+ g_mutex_lock (data.lock);
+ while (!data.pad_added)
+ g_cond_wait (data.cond, data.lock);
+ g_mutex_unlock (data.lock);
+
+ /* sourcepad created now */
+ fail_unless (rtpbin->numsinkpads == 1);
+ fail_unless (rtpbin->numsrcpads == 1);
+
+ /* change state */
+ ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+ /* pad should be gone now */
+ g_mutex_lock (data.lock);
+ while (data.pad_added)
+ g_cond_wait (data.cond, data.lock);
+ g_mutex_unlock (data.lock);
+
+ /* back to playing for the next round */
+ ret = gst_element_set_state (rtpbin, GST_STATE_PLAYING);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+ }
+
+ /* remove the session */
+ gst_element_release_request_pad (rtpbin, rtp_sink);
+ gst_object_unref (rtp_sink);
+
+ /* nothing left anymore now */
+ fail_unless (rtpbin->numsinkpads == 0);
+ fail_unless (rtpbin->numsrcpads == 0);
+
+ ret = gst_element_set_state (rtpbin, GST_STATE_NULL);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+ gst_object_unref (rtpbin);
+
+ clean_data (&data);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_request_pad_by_template_name)
+{
+ GstElement *rtpbin;
+ GstPad *rtp_sink1, *rtp_sink2, *rtp_sink3;
+
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+ rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%d");
+ fail_unless (rtp_sink1 != NULL);
+ fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "recv_rtp_sink_0");
+ ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
+
+ rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%d");
+ fail_unless (rtp_sink2 != NULL);
+ fail_unless_equals_string (GST_PAD_NAME (rtp_sink2), "recv_rtp_sink_1");
+ ASSERT_OBJECT_REFCOUNT (rtp_sink2, "rtp_sink2", 2);
+
+ rtp_sink3 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%d");
+ fail_unless (rtp_sink3 != NULL);
+ fail_unless_equals_string (GST_PAD_NAME (rtp_sink3), "recv_rtp_sink_2");
+ ASSERT_OBJECT_REFCOUNT (rtp_sink3, "rtp_sink3", 2);
+
+
+ gst_element_release_request_pad (rtpbin, rtp_sink2);
+ gst_element_release_request_pad (rtpbin, rtp_sink1);
+ gst_element_release_request_pad (rtpbin, rtp_sink3);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink3, "rtp_sink3", 1);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink2, "rtp_sink2", 1);
+ ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink", 1);
+ gst_object_unref (rtp_sink1);
+ gst_object_unref (rtp_sink2);
+ gst_object_unref (rtp_sink3);
+
+ gst_object_unref (rtpbin);
+}
+
+GST_END_TEST;
+
+static Suite *
+gstrtpbin_suite (void)
+{
+ Suite *s = suite_create ("gstrtpbin");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_cleanup_send);
+ tcase_add_test (tc_chain, test_cleanup_recv);
+ tcase_add_test (tc_chain, test_cleanup_recv2);
+ tcase_add_test (tc_chain, test_request_pad_by_template_name);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = gstrtpbin_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/rtpbin_buffer_list.c b/tests/check/elements/rtpbin_buffer_list.c
new file mode 100644
index 0000000..f459b92
--- /dev/null
+++ b/tests/check/elements/rtpbin_buffer_list.c
@@ -0,0 +1,331 @@
+/* GStreamer
+ *
+ * Unit test for gstrtpbin sending rtp packets using GstBufferList.
+ * Copyright (C) 2009 Branko Subasic <branko dot subasic at axis dot com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#include <gst/rtp/gstrtpbuffer.h>
+
+
+
+/* This test makes sure that RTP packets sent as buffer lists are sent through
+ * the rtpbin as they are supposed to, and not corrupted in any way.
+ */
+
+
+#define TEST_CAPS \
+ "application/x-rtp, " \
+ "media=(string)video, " \
+ "clock-rate=(int)90000, " \
+ "encoding-name=(string)H264, " \
+ "profile-level-id=(string)4d4015, " \
+ "payload=(int)96, " \
+ "ssrc=(guint)2633237432, " \
+ "clock-base=(guint)1868267015, " \
+ "seqnum-base=(guint)54229"
+
+
+/* RTP headers and the first 2 bytes of the payload (FU indicator and FU header)
+ */
+static const guint8 rtp_header[2][14] = {
+ {0x80, 0x60, 0xbb, 0xb7, 0x5c, 0xe9, 0x09,
+ 0x0d, 0xf5, 0x9c, 0x43, 0x55, 0x1c, 0x86},
+ {0x80, 0x60, 0xbb, 0xb8, 0x5c, 0xe9, 0x09,
+ 0x0d, 0xf5, 0x9c, 0x43, 0x55, 0x1c, 0x46}
+};
+
+static const guint rtp_header_len[] = {
+ sizeof rtp_header[0],
+ sizeof rtp_header[1]
+};
+
+static GstBuffer *header_buffer[2] = { NULL, NULL };
+
+
+/* Some payload.
+ */
+static const char *payload =
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF0123456789ABSDEF"
+ "0123456789ABSDEF0123456";
+
+static const guint payload_offset[] = {
+ 0, 498
+};
+
+static const guint payload_len[] = {
+ 498, 5
+};
+
+
+static GstBuffer *original_buffer = NULL;
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-rtp"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-rtp"));
+
+
+static GstBuffer *
+_create_original_buffer (void)
+{
+ GstCaps *caps;
+
+ if (original_buffer != NULL)
+ return original_buffer;
+
+ original_buffer = gst_buffer_new ();
+ fail_unless (original_buffer != NULL);
+
+ gst_buffer_set_data (original_buffer, (guint8 *) payload, strlen (payload));
+ GST_BUFFER_TIMESTAMP (original_buffer) =
+ gst_clock_get_internal_time (gst_system_clock_obtain ());
+
+ caps = gst_caps_from_string (TEST_CAPS);
+ fail_unless (caps != NULL);
+ gst_buffer_set_caps (original_buffer, caps);
+ gst_caps_unref (caps);
+
+ return original_buffer;
+}
+
+static GstBufferList *
+_create_buffer_list (void)
+{
+ GstBufferList *list;
+ GstBufferListIterator *it;
+ GstBuffer *orig_buffer;
+ GstBuffer *buffer;
+
+ orig_buffer = _create_original_buffer ();
+ fail_if (orig_buffer == NULL);
+
+ list = gst_buffer_list_new ();
+ fail_if (list == NULL);
+
+ it = gst_buffer_list_iterate (list);
+ fail_if (it == NULL);
+
+ /*** First group, i.e. first packet. **/
+ gst_buffer_list_iterator_add_group (it);
+
+ /* Create buffer with RTP header and add it to the 1st group */
+ buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (buffer) = g_memdup (&rtp_header[0], rtp_header_len[0]);
+ GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);
+ GST_BUFFER_SIZE (buffer) = rtp_header_len[0];
+ gst_buffer_copy_metadata (buffer, orig_buffer, GST_BUFFER_COPY_ALL);
+ header_buffer[0] = buffer;
+ gst_buffer_list_iterator_add (it, buffer);
+
+ /* Create the payload buffer and add it to the 1st group
+ */
+ buffer =
+ gst_buffer_create_sub (orig_buffer, payload_offset[0], payload_len[0]);
+ fail_if (buffer == NULL);
+ gst_buffer_list_iterator_add (it, buffer);
+
+
+ /*** Second group, i.e. second packet. ***/
+
+ /* Create a new group to hold the rtp header and the payload */
+ gst_buffer_list_iterator_add_group (it);
+
+ /* Create buffer with RTP header and add it to the 2nd group */
+ buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (buffer) = g_memdup (&rtp_header[1], rtp_header_len[1]);
+ GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);
+ GST_BUFFER_SIZE (buffer) = rtp_header_len[1];
+ gst_buffer_copy_metadata (buffer, orig_buffer, GST_BUFFER_COPY_ALL);
+ header_buffer[1] = buffer;
+
+ /* Add the rtp header to the buffer list */
+ gst_buffer_list_iterator_add (it, buffer);
+
+ /* Create the payload buffer and add it to the 2d group
+ */
+ buffer =
+ gst_buffer_create_sub (orig_buffer, payload_offset[1], payload_len[1]);
+ fail_if (buffer == NULL);
+ gst_buffer_list_iterator_add (it, buffer);
+
+ gst_buffer_list_iterator_free (it);
+
+ return list;
+}
+
+
+static void
+_check_header (GstBuffer * buffer, guint index)
+{
+ guint8 *data;
+
+ fail_if (buffer == NULL);
+ fail_unless (index < 2);
+
+ fail_unless (GST_BUFFER_SIZE (buffer) == rtp_header_len[index]);
+
+ /* Can't do a memcmp() on the whole header, cause the SSRC (bytes 8-11) will
+ * most likely be changed in gstrtpbin.
+ */
+ fail_unless ((data = GST_BUFFER_DATA (buffer)) != NULL);
+ fail_unless_equals_uint64 (*(guint64 *) data, *(guint64 *) rtp_header[index]);
+ fail_unless (*(guint16 *) (data + 12) ==
+ *(guint16 *) (rtp_header[index] + 12));
+}
+
+
+static void
+_check_payload (GstBuffer * buffer, guint index)
+{
+ fail_if (buffer == NULL);
+ fail_unless (index < 2);
+
+ fail_unless (GST_BUFFER_SIZE (buffer) == payload_len[index]);
+ fail_if (GST_BUFFER_DATA (buffer) !=
+ (gpointer) (payload + payload_offset[index]));
+ fail_if (memcmp (GST_BUFFER_DATA (buffer), payload + payload_offset[index],
+ payload_len[index]));
+}
+
+
+static void
+_check_group (GstBufferListIterator * it, guint index, GstCaps * caps)
+{
+ GstBuffer *buffer;
+
+ fail_unless (it != NULL);
+ fail_unless (gst_buffer_list_iterator_n_buffers (it) == 2);
+ fail_unless (caps != NULL);
+
+ fail_unless ((buffer = gst_buffer_list_iterator_next (it)) != NULL);
+
+ fail_unless (GST_BUFFER_TIMESTAMP (buffer) ==
+ GST_BUFFER_TIMESTAMP (original_buffer));
+
+ fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (original_buffer),
+ GST_BUFFER_CAPS (buffer)));
+
+ _check_header (buffer, index);
+
+ fail_unless ((buffer = gst_buffer_list_iterator_next (it)) != NULL);
+ _check_payload (buffer, index);
+}
+
+
+static GstFlowReturn
+_sink_chain_list (GstPad * pad, GstBufferList * list)
+{
+ GstCaps *caps;
+ GstBufferListIterator *it;
+
+ caps = gst_caps_from_string (TEST_CAPS);
+ fail_unless (caps != NULL);
+
+ fail_unless (GST_IS_BUFFER_LIST (list));
+ fail_unless (gst_buffer_list_n_groups (list) == 2);
+
+ it = gst_buffer_list_iterate (list);
+ fail_if (it == NULL);
+
+ fail_unless (gst_buffer_list_iterator_next_group (it));
+ _check_group (it, 0, caps);
+
+ fail_unless (gst_buffer_list_iterator_next_group (it));
+ _check_group (it, 1, caps);
+
+ gst_caps_unref (caps);
+ gst_buffer_list_iterator_free (it);
+
+ gst_buffer_list_unref (list);
+
+ return GST_FLOW_OK;
+}
+
+
+static void
+_set_chain_functions (GstPad * pad)
+{
+ gst_pad_set_chain_list_function (pad, _sink_chain_list);
+}
+
+
+GST_START_TEST (test_bufferlist)
+{
+ GstElement *rtpbin;
+ GstPad *sinkpad;
+ GstPad *srcpad;
+ GstBufferList *list;
+
+ list = _create_buffer_list ();
+ fail_unless (list != NULL);
+
+ rtpbin = gst_check_setup_element ("gstrtpbin");
+
+ srcpad =
+ gst_check_setup_src_pad_by_name (rtpbin, &srctemplate, "send_rtp_sink_0");
+ fail_if (srcpad == NULL);
+ sinkpad =
+ gst_check_setup_sink_pad_by_name (rtpbin, &sinktemplate,
+ "send_rtp_src_0");
+ fail_if (sinkpad == NULL);
+
+ _set_chain_functions (sinkpad);
+
+ gst_pad_set_active (sinkpad, TRUE);
+ gst_element_set_state (rtpbin, GST_STATE_PLAYING);
+ fail_unless (gst_pad_push_list (srcpad, list) == GST_FLOW_OK);
+ gst_pad_set_active (sinkpad, FALSE);
+
+ gst_check_teardown_pad_by_name (rtpbin, "send_rtp_src_0");
+ gst_check_teardown_pad_by_name (rtpbin, "send_rtp_sink_0");
+ gst_check_teardown_element (rtpbin);
+}
+
+GST_END_TEST;
+
+
+
+static Suite *
+bufferlist_suite (void)
+{
+ Suite *s = suite_create ("BufferList");
+
+ TCase *tc_chain = tcase_create ("general");
+
+ /* time out after 30s. */
+ tcase_set_timeout (tc_chain, 10);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_bufferlist);
+
+ return s;
+}
+
+GST_CHECK_MAIN (bufferlist);
diff --git a/tests/check/elements/rtpjitterbuffer.c b/tests/check/elements/rtpjitterbuffer.c
new file mode 100644
index 0000000..a8eaa61
--- /dev/null
+++ b/tests/check/elements/rtpjitterbuffer.c
@@ -0,0 +1,341 @@
+/* GStreamer
+ *
+ * Copyright (C) 2009 Nokia Corporation and its subsidary(-ies)
+ * contact: <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+/* we also have a list of src buffers */
+static GList *inbuffers = NULL;
+static gint num_dropped = 0;
+
+#define RTP_CAPS_STRING \
+ "application/x-rtp, " \
+ "media = (string)audio, " \
+ "payload = (int) 0, " \
+ "clock-rate = (int) 8000, " \
+ "encoding-name = (string)PCMU"
+
+#define RTP_FRAME_SIZE 20
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-rtp")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("application/x-rtp, "
+ "clock-rate = (int) [ 1, 2147483647 ]")
+ );
+
+static void
+buffer_dropped (gpointer mem)
+{
+ if (mem) {
+ GST_DEBUG ("dropping buffer: data=%p", mem);
+ g_free (mem);
+ num_dropped++;
+ }
+}
+
+static GstElement *
+setup_jitterbuffer (gint num_buffers)
+{
+ GstElement *jitterbuffer;
+ GstClock *clock;
+ GstBuffer *buffer;
+ GstCaps *caps;
+ /* a 20 sample audio block (2,5 ms) generated with
+ * gst-launch audiotestsrc wave=silence blocksize=40 num-buffers=3 !
+ * "audio/x-raw-int,channels=1,rate=8000" ! mulawenc ! rtppcmupay !
+ * fakesink dump=1
+ */
+ guint8 in[] = { /* first 4 bytes are rtp-header, next 4 bytes are timestamp */
+ 0x80, 0x80, 0x1c, 0x24, 0x46, 0xcd, 0xb7, 0x11, 0x3c, 0x3a, 0x7c, 0x5b,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+ };
+ GstClockTime ts = G_GUINT64_CONSTANT (0);
+ GstClockTime tso = gst_util_uint64_scale (RTP_FRAME_SIZE, GST_SECOND, 8000);
+ /*guint latency = GST_TIME_AS_MSECONDS (num_buffers * tso); */
+ gint i;
+
+ GST_DEBUG ("setup_jitterbuffer");
+ jitterbuffer = gst_check_setup_element ("gstrtpjitterbuffer");
+ /* we need a clock here */
+ clock = gst_system_clock_obtain ();
+ gst_element_set_clock (jitterbuffer, clock);
+ gst_object_unref (clock);
+ /* setup latency */
+ /* latency would be 7 for 3 buffers here, default is 200
+ g_object_set (G_OBJECT (jitterbuffer), "latency", latency, NULL);
+ GST_INFO_OBJECT (jitterbuffer, "set latency to %u ms", latency);
+ */
+
+ mysrcpad = gst_check_setup_src_pad (jitterbuffer, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (jitterbuffer, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ /* create n buffers */
+ caps = gst_caps_from_string (RTP_CAPS_STRING);
+ for (i = 0; i < num_buffers; i++) {
+ buffer = gst_buffer_new_and_alloc (sizeof (in));
+ memcpy (GST_BUFFER_DATA (buffer), in, sizeof (in));
+ gst_buffer_set_caps (buffer, caps);
+ GST_BUFFER_TIMESTAMP (buffer) = ts;
+ GST_BUFFER_DURATION (buffer) = tso;
+ GST_BUFFER_FREE_FUNC (buffer) = buffer_dropped;
+ GST_DEBUG ("created buffer: %p, data=%p", buffer, GST_BUFFER_DATA (buffer));
+
+ if (!i)
+ GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
+
+ inbuffers = g_list_append (inbuffers, buffer);
+
+ /* hackish way to update the rtp header */
+ in[1] = 0x00;
+ in[3]++; /* seqnumber */
+ in[7] += RTP_FRAME_SIZE; /* inc. timestamp with framesize */
+ ts += tso;
+ }
+ gst_caps_unref (caps);
+ num_dropped = 0;
+
+ return jitterbuffer;
+}
+
+static GstStateChangeReturn
+start_jitterbuffer (GstElement * jitterbuffer)
+{
+ GstStateChangeReturn ret;
+ GstClockTime now;
+ GstClock *clock;
+
+ clock = gst_element_get_clock (jitterbuffer);
+ now = gst_clock_get_time (clock);
+ gst_object_unref (clock);
+
+ gst_element_set_base_time (jitterbuffer, now);
+ ret = gst_element_set_state (jitterbuffer, GST_STATE_PLAYING);
+
+ return ret;
+}
+
+static void
+cleanup_jitterbuffer (GstElement * jitterbuffer)
+{
+ GST_DEBUG ("cleanup_jitterbuffer");
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+
+ g_list_free (inbuffers);
+ inbuffers = NULL;
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (jitterbuffer);
+ gst_check_teardown_sink_pad (jitterbuffer);
+ gst_check_teardown_element (jitterbuffer);
+}
+
+static void
+check_jitterbuffer_results (GstElement * jitterbuffer, gint num_buffers)
+{
+ GstBuffer *buffer;
+ GList *node;
+ GstClockTime ts = G_GUINT64_CONSTANT (0);
+ GstClockTime tso = gst_util_uint64_scale (RTP_FRAME_SIZE, GST_SECOND, 8000);
+ guint8 *data;
+ guint16 prev_sn = 0, cur_sn;
+ guint32 prev_ts = 0, cur_ts;
+
+ /* sleep for twice the latency */
+ g_usleep (400 * 1000);
+
+ GST_INFO ("of %d buffer %d/%d received/dropped", num_buffers,
+ g_list_length (buffers), num_dropped);
+ /* if this fails, not all buffers have been processed */
+ fail_unless_equals_int ((g_list_length (buffers) + num_dropped), num_buffers);
+
+ /* check the buffer list */
+ fail_unless_equals_int (g_list_length (buffers), num_buffers);
+ for (node = buffers; node; node = g_list_next (node)) {
+ fail_if ((buffer = (GstBuffer *) node->data) == NULL);
+ fail_if (GST_BUFFER_TIMESTAMP (buffer) != ts);
+ data = GST_BUFFER_DATA (buffer);
+ cur_sn = ((guint16) data[2] << 8) | data[3];
+ cur_ts = ((guint32) data[4] << 24) | ((guint32) data[5] << 16) |
+ ((guint32) data[6] << 8) | data[7];
+
+ if (node != buffers) {
+ fail_unless (cur_sn > prev_sn);
+ fail_unless (cur_ts > prev_ts);
+
+ prev_sn = cur_sn;
+ prev_ts = cur_ts;
+ }
+ ts += tso;
+ }
+}
+
+GST_START_TEST (test_push_forward_seq)
+{
+ GstElement *jitterbuffer;
+ const guint num_buffers = 3;
+ GstBuffer *buffer;
+ GList *node;
+
+ jitterbuffer = setup_jitterbuffer (num_buffers);
+ fail_unless (start_jitterbuffer (jitterbuffer)
+ == GST_STATE_CHANGE_SUCCESS, "could not set to playing");
+
+ /* push buffers: 0,1,2, */
+ for (node = inbuffers; node; node = g_list_next (node)) {
+ buffer = (GstBuffer *) node->data;
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ }
+
+ /* check the buffer list */
+ check_jitterbuffer_results (jitterbuffer, num_buffers);
+
+ /* cleanup */
+ cleanup_jitterbuffer (jitterbuffer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_push_backward_seq)
+{
+ GstElement *jitterbuffer;
+ const guint num_buffers = 4;
+ GstBuffer *buffer;
+ GList *node;
+
+ jitterbuffer = setup_jitterbuffer (num_buffers);
+ fail_unless (start_jitterbuffer (jitterbuffer)
+ == GST_STATE_CHANGE_SUCCESS, "could not set to playing");
+
+ /* push buffers: 0,3,2,1 */
+ buffer = (GstBuffer *) inbuffers->data;
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ for (node = g_list_last (inbuffers); node != inbuffers;
+ node = g_list_previous (node)) {
+ buffer = (GstBuffer *) node->data;
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ }
+
+ /* check the buffer list */
+ check_jitterbuffer_results (jitterbuffer, num_buffers);
+
+ /* cleanup */
+ cleanup_jitterbuffer (jitterbuffer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_push_unordered)
+{
+ GstElement *jitterbuffer;
+ const guint num_buffers = 4;
+ GstBuffer *buffer;
+
+ jitterbuffer = setup_jitterbuffer (num_buffers);
+ fail_unless (start_jitterbuffer (jitterbuffer)
+ == GST_STATE_CHANGE_SUCCESS, "could not set to playing");
+
+ /* push buffers; 0,2,1,3 */
+ buffer = (GstBuffer *) inbuffers->data;
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ buffer = g_list_nth_data (inbuffers, 2);
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ buffer = g_list_nth_data (inbuffers, 1);
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ buffer = g_list_nth_data (inbuffers, 3);
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+
+ /* check the buffer list */
+ check_jitterbuffer_results (jitterbuffer, num_buffers);
+
+ /* cleanup */
+ cleanup_jitterbuffer (jitterbuffer);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_basetime)
+{
+ GstElement *jitterbuffer;
+ const guint num_buffers = 3;
+ GstBuffer *buffer;
+ GList *node;
+ GstClockTime tso = gst_util_uint64_scale (RTP_FRAME_SIZE, GST_SECOND, 8000);
+
+ jitterbuffer = setup_jitterbuffer (num_buffers);
+ fail_unless (start_jitterbuffer (jitterbuffer)
+ == GST_STATE_CHANGE_SUCCESS, "could not set to playing");
+
+ /* push buffers: 2,1,0 */
+ for (node = g_list_last (inbuffers); node; node = g_list_previous (node)) {
+ buffer = (GstBuffer *) node->data;
+ fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
+ }
+
+ /* sleep for twice the latency */
+ g_usleep (400 * 1000);
+
+ /* if this fails, not all buffers have been processed */
+ fail_unless_equals_int ((g_list_length (buffers) + num_dropped), num_buffers);
+
+ buffer = (GstBuffer *) buffers->data;
+ fail_unless (GST_BUFFER_TIMESTAMP (buffer) != (num_buffers * tso));
+
+ /* cleanup */
+ cleanup_jitterbuffer (jitterbuffer);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+rtpjitterbuffer_suite (void)
+{
+ Suite *s = suite_create ("rtpjitterbuffer");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_push_forward_seq);
+ tcase_add_test (tc_chain, test_push_backward_seq);
+ tcase_add_test (tc_chain, test_push_unordered);
+ tcase_add_test (tc_chain, test_basetime);
+
+ /* FIXME: test buffer lists */
+
+ return s;
+}
+
+GST_CHECK_MAIN (rtpjitterbuffer);
diff --git a/tests/check/elements/shapewipe.c b/tests/check/elements/shapewipe.c
new file mode 100644
index 0000000..d38f9ea
--- /dev/null
+++ b/tests/check/elements/shapewipe.c
@@ -0,0 +1,307 @@
+/* GStreamer
+ *
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *myvideosrcpad, *mymasksrcpad, *mysinkpad;
+
+
+#define SHAPEWIPE_VIDEO_CAPS_STRING \
+ "video/x-raw-yuv, " \
+ "format = (GstFourcc)AYUV, " \
+ "width = 400, " \
+ "height = 400, " \
+ "framerate = 0/1"
+
+#define SHAPEWIPE_MASK_CAPS_STRING \
+ "video/x-raw-gray, " \
+ "bpp = 8, " \
+ "depth = 8, " \
+ "width = 400, " \
+ "height = 400, " \
+ "framerate = 0/1"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SHAPEWIPE_VIDEO_CAPS_STRING)
+ );
+static GstStaticPadTemplate videosrctemplate =
+GST_STATIC_PAD_TEMPLATE ("videosrc",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SHAPEWIPE_VIDEO_CAPS_STRING)
+ );
+static GstStaticPadTemplate masksrctemplate =
+GST_STATIC_PAD_TEMPLATE ("masksrc",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SHAPEWIPE_MASK_CAPS_STRING)
+ );
+
+
+static GstBuffer *output = NULL;
+
+static GstFlowReturn
+on_chain (GstPad * pad, GstBuffer * buffer)
+{
+ g_return_val_if_fail (output == NULL, GST_FLOW_ERROR);
+
+ output = buffer;
+ return GST_FLOW_OK;
+}
+
+GST_START_TEST (test_general)
+{
+ GstElement *shapewipe;
+ GstPad *p;
+ GstCaps *caps;
+ GstBuffer *mask, *input;
+ guint i, j;
+ guint8 *data;
+
+ myvideosrcpad =
+ gst_pad_new_from_static_template (&videosrctemplate, "videosrc");
+ gst_pad_set_active (myvideosrcpad, TRUE);
+ caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING);
+ gst_pad_set_caps (myvideosrcpad, caps);
+ gst_caps_unref (caps);
+
+ mymasksrcpad = gst_pad_new_from_static_template (&masksrctemplate, "masksrc");
+ gst_pad_set_active (mymasksrcpad, TRUE);
+ caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING);
+ gst_pad_set_caps (mymasksrcpad, caps);
+ gst_caps_unref (caps);
+
+ mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+ gst_pad_set_chain_function (mysinkpad, on_chain);
+ gst_pad_set_active (mysinkpad, TRUE);
+ caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING);
+ gst_pad_set_caps (mysinkpad, caps);
+ gst_caps_unref (caps);
+
+ shapewipe = gst_element_factory_make ("shapewipe", NULL);
+ fail_unless (shapewipe != NULL);
+
+ p = gst_element_get_static_pad (shapewipe, "video_sink");
+ fail_unless (gst_pad_link (myvideosrcpad, p) == GST_PAD_LINK_OK);
+ gst_object_unref (p);
+ p = gst_element_get_static_pad (shapewipe, "mask_sink");
+ fail_unless (gst_pad_link (mymasksrcpad, p) == GST_PAD_LINK_OK);
+ gst_object_unref (p);
+ p = gst_element_get_static_pad (shapewipe, "src");
+ fail_unless (gst_pad_link (p, mysinkpad) == GST_PAD_LINK_OK);
+ gst_object_unref (p);
+
+ fail_unless (gst_element_set_state (shapewipe,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS);
+
+ mask = gst_buffer_new_and_alloc (400 * 400);
+ caps = gst_caps_from_string (SHAPEWIPE_MASK_CAPS_STRING);
+ gst_buffer_set_caps (mask, caps);
+ gst_caps_unref (caps);
+ data = GST_BUFFER_DATA (mask);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ if (i < 100 && j < 100)
+ data[0] = 0;
+ else if (i < 200 && j < 200)
+ data[0] = 85;
+ else if (i < 300 && j < 300)
+ data[0] = 170;
+ else
+ data[0] = 254;
+ data++;
+ }
+ }
+
+ fail_unless (gst_pad_push (mymasksrcpad, mask) == GST_FLOW_OK);
+
+ input = gst_buffer_new_and_alloc (400 * 400 * 4);
+ caps = gst_caps_from_string (SHAPEWIPE_VIDEO_CAPS_STRING);
+ gst_buffer_set_caps (input, caps);
+ gst_caps_unref (caps);
+ data = GST_BUFFER_DATA (input);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ /* This is green */
+ data[0] = 255; /* A */
+ data[1] = 173; /* Y */
+ data[2] = 42; /* U */
+ data[3] = 26; /* V */
+ data += 4;
+ }
+ }
+
+ g_object_set (G_OBJECT (shapewipe), "position", 0.0, NULL);
+ output = NULL;
+ fail_unless (gst_pad_push (myvideosrcpad,
+ gst_buffer_ref (input)) == GST_FLOW_OK);
+ fail_unless (output != NULL);
+ data = GST_BUFFER_DATA (output);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ fail_unless_equals_int (data[0], 255); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ data += 4;
+ }
+ }
+ gst_buffer_unref (output);
+ output = NULL;
+
+ g_object_set (G_OBJECT (shapewipe), "position", 0.1, NULL);
+ output = NULL;
+ fail_unless (gst_pad_push (myvideosrcpad,
+ gst_buffer_ref (input)) == GST_FLOW_OK);
+ fail_unless (output != NULL);
+ data = GST_BUFFER_DATA (output);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ if (i < 100 && j < 100) {
+ fail_unless_equals_int (data[0], 0); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ } else {
+ fail_unless_equals_int (data[0], 255); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ }
+ data += 4;
+ }
+ }
+ gst_buffer_unref (output);
+ output = NULL;
+
+ g_object_set (G_OBJECT (shapewipe), "position", 0.34, NULL);
+ output = NULL;
+ fail_unless (gst_pad_push (myvideosrcpad,
+ gst_buffer_ref (input)) == GST_FLOW_OK);
+ fail_unless (output != NULL);
+ data = GST_BUFFER_DATA (output);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ if (i < 200 && j < 200) {
+ fail_unless_equals_int (data[0], 0); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ } else {
+ fail_unless_equals_int (data[0], 255); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ }
+ data += 4;
+ }
+ }
+ gst_buffer_unref (output);
+ output = NULL;
+
+ g_object_set (G_OBJECT (shapewipe), "position", 0.67, NULL);
+ output = NULL;
+ fail_unless (gst_pad_push (myvideosrcpad,
+ gst_buffer_ref (input)) == GST_FLOW_OK);
+ fail_unless (output != NULL);
+ data = GST_BUFFER_DATA (output);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ if (i < 300 && j < 300) {
+ fail_unless_equals_int (data[0], 0); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ } else {
+ fail_unless_equals_int (data[0], 255); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ }
+ data += 4;
+ }
+ }
+ gst_buffer_unref (output);
+ output = NULL;
+
+ g_object_set (G_OBJECT (shapewipe), "position", 1.0, NULL);
+ output = NULL;
+ fail_unless (gst_pad_push (myvideosrcpad,
+ gst_buffer_ref (input)) == GST_FLOW_OK);
+ fail_unless (output != NULL);
+ data = GST_BUFFER_DATA (output);
+ for (i = 0; i < 400; i++) {
+ for (j = 0; j < 400; j++) {
+ fail_unless_equals_int (data[0], 0); /* A */
+ fail_unless_equals_int (data[1], 173); /* Y */
+ fail_unless_equals_int (data[2], 42); /* U */
+ fail_unless_equals_int (data[3], 26); /* V */
+ data += 4;
+ }
+ }
+ gst_buffer_unref (output);
+ output = NULL;
+
+ gst_buffer_unref (input);
+
+ fail_unless (gst_element_set_state (shapewipe,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ p = gst_element_get_static_pad (shapewipe, "video_sink");
+ fail_unless (gst_pad_unlink (myvideosrcpad, p));
+ gst_object_unref (p);
+ p = gst_element_get_static_pad (shapewipe, "mask_sink");
+ fail_unless (gst_pad_unlink (mymasksrcpad, p));
+ gst_object_unref (p);
+ p = gst_element_get_static_pad (shapewipe, "src");
+ fail_unless (gst_pad_unlink (p, mysinkpad));
+ gst_object_unref (p);
+
+ gst_object_unref (myvideosrcpad);
+ gst_object_unref (mymasksrcpad);
+ gst_object_unref (mysinkpad);
+ gst_object_unref (shapewipe);
+}
+
+GST_END_TEST;
+
+static Suite *
+shapewipe_suite (void)
+{
+ Suite *s = suite_create ("shapewipe");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_set_timeout (tc_chain, 180);
+ tcase_add_test (tc_chain, test_general);
+
+ return s;
+}
+
+GST_CHECK_MAIN (shapewipe);
diff --git a/tests/check/elements/souphttpsrc.c b/tests/check/elements/souphttpsrc.c
new file mode 100644
index 0000000..9fc8f7c
--- /dev/null
+++ b/tests/check/elements/souphttpsrc.c
@@ -0,0 +1,639 @@
+/* GStreamer unit tests for the souphttpsrc element
+ * Copyright (C) 2006-2007 Tim-Philipp Müller <tim centricular net>
+ * Copyright (C) 2008 Wouter Cloetens <wouter@mind.be>
+ * Copyright (C) 2001-2003, Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <libsoup/soup-address.h>
+#include <libsoup/soup-message.h>
+#include <libsoup/soup-misc.h>
+#include <libsoup/soup-server.h>
+#include <libsoup/soup-auth-domain.h>
+#include <libsoup/soup-auth-domain-basic.h>
+#include <libsoup/soup-auth-domain-digest.h>
+#include <gst/check/gstcheck.h>
+
+static guint http_port = 0, https_port = 0;
+
+gboolean redirect = TRUE;
+
+static const char **cookies = NULL;
+
+/* Variables for authentication tests */
+static const char *user_id = NULL;
+static const char *user_pw = NULL;
+static const char *good_user = "good_user";
+static const char *bad_user = "bad_user";
+static const char *good_pw = "good_pw";
+static const char *bad_pw = "bad_pw";
+static const char *realm = "SOUPHTTPSRC_REALM";
+static const char *basic_auth_path = "/basic_auth";
+static const char *digest_auth_path = "/digest_auth";
+
+static int run_server (guint * http_port, guint * https_port);
+static void stop_server (void);
+
+static void
+handoff_cb (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
+ GstBuffer ** p_outbuf)
+{
+ GST_LOG ("handoff, buf = %p", buf);
+ if (*p_outbuf == NULL)
+ *p_outbuf = gst_buffer_ref (buf);
+}
+
+static gboolean
+basic_auth_cb (SoupAuthDomain * domain, SoupMessage * msg,
+ const char *username, const char *password, gpointer user_data)
+{
+ /* There is only one good login for testing */
+ return (strcmp (username, good_user) == 0)
+ && (strcmp (password, good_pw) == 0);
+}
+
+
+static char *
+digest_auth_cb (SoupAuthDomain * domain, SoupMessage * msg,
+ const char *username, gpointer user_data)
+{
+ /* There is only one good login for testing */
+ if (strcmp (username, good_user) == 0)
+ return soup_auth_domain_digest_encode_password (good_user, realm, good_pw);
+ return NULL;
+}
+
+static int
+run_test (const char *format, ...)
+{
+ GstStateChangeReturn ret;
+
+ GstElement *pipe, *src, *sink;
+
+ GstBuffer *buf = NULL;
+
+ GstMessage *msg;
+
+ gchar *url;
+
+ va_list args;
+
+ int rc = -1;
+
+ pipe = gst_pipeline_new (NULL);
+
+ src = gst_element_factory_make ("souphttpsrc", NULL);
+ fail_unless (src != NULL);
+
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (sink != NULL);
+
+ gst_bin_add (GST_BIN (pipe), src);
+ gst_bin_add (GST_BIN (pipe), sink);
+ fail_unless (gst_element_link (src, sink));
+
+ if (http_port == 0) {
+ GST_DEBUG ("failed to start soup http server");
+ }
+ fail_unless (http_port != 0);
+ va_start (args, format);
+ g_vasprintf (&url, format, args);
+ va_end (args);
+ fail_unless (url != NULL);
+ g_object_set (src, "location", url, NULL);
+ g_free (url);
+
+ g_object_set (src, "automatic-redirect", redirect, NULL);
+ if (cookies != NULL)
+ g_object_set (src, "cookies", cookies, NULL);
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "preroll-handoff", G_CALLBACK (handoff_cb), &buf);
+
+ if (user_id != NULL)
+ g_object_set (src, "user-id", user_id, NULL);
+ if (user_pw != NULL)
+ g_object_set (src, "user-pw", user_pw, NULL);
+
+ ret = gst_element_set_state (pipe, GST_STATE_PAUSED);
+ if (ret != GST_STATE_CHANGE_ASYNC) {
+ GST_DEBUG ("failed to start up soup http src, ret = %d", ret);
+ goto done;
+ }
+
+ gst_element_set_state (pipe, GST_STATE_PLAYING);
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
+ GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ gchar *debug = NULL;
+
+ GError *err = NULL;
+
+ gst_message_parse_error (msg, &err, &debug);
+ GST_INFO ("error: %s", err->message);
+ if (g_str_has_suffix (err->message, "Not Found"))
+ rc = 404;
+ else if (g_str_has_suffix (err->message, "Forbidden"))
+ rc = 403;
+ else if (g_str_has_suffix (err->message, "Unauthorized"))
+ rc = 401;
+ else if (g_str_has_suffix (err->message, "Found"))
+ rc = 302;
+ GST_INFO ("debug: %s", debug);
+ g_error_free (err);
+ g_free (debug);
+ gst_message_unref (msg);
+ goto done;
+ }
+ gst_message_unref (msg);
+
+ /* don't wait for more than 10 seconds */
+ ret = gst_element_get_state (pipe, NULL, NULL, 10 * GST_SECOND);
+ GST_LOG ("ret = %u", ret);
+
+ if (buf == NULL) {
+ /* we want to test the buffer offset, nothing else; if there's a failure
+ * it might be for lots of reasons (no network connection, whatever), we're
+ * not interested in those */
+ GST_DEBUG ("didn't manage to get data within 10 seconds, skipping test");
+ goto done;
+ }
+
+ GST_DEBUG ("buffer offset = %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buf));
+
+ /* first buffer should have a 0 offset */
+ fail_unless (GST_BUFFER_OFFSET (buf) == 0);
+ gst_buffer_unref (buf);
+ rc = 0;
+
+done:
+
+ gst_element_set_state (pipe, GST_STATE_NULL);
+ gst_object_unref (pipe);
+ return rc;
+}
+
+GST_START_TEST (test_first_buffer_has_offset)
+{
+ fail_unless (run_test ("http://127.0.0.1:%u/", http_port) == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_not_found)
+{
+ fail_unless (run_test ("http://127.0.0.1:%u/404", http_port) == 404);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_forbidden)
+{
+ fail_unless (run_test ("http://127.0.0.1:%u/403", http_port) == 403);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_redirect_no)
+{
+ redirect = FALSE;
+ fail_unless (run_test ("http://127.0.0.1:%u/302", http_port) == 302);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_redirect_yes)
+{
+ redirect = TRUE;
+ fail_unless (run_test ("http://127.0.0.1:%u/302", http_port) == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_https)
+{
+ if (!https_port)
+ GST_INFO ("Failed to start an HTTPS server; let's just skip this test.");
+ else
+ fail_unless (run_test ("https://127.0.0.1:%u/", https_port) == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_cookies)
+{
+ static const char *biscotti[] = { "delacre=yummie", "koekje=lu", NULL };
+ int rc;
+
+ cookies = biscotti;
+ rc = run_test ("http://127.0.0.1:%u/", http_port);
+ cookies = NULL;
+ fail_unless (rc == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_good_user_basic_auth)
+{
+ int res;
+
+ user_id = good_user;
+ user_pw = good_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, basic_auth_path);
+ GST_DEBUG ("Basic Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_bad_user_basic_auth)
+{
+ int res;
+
+ user_id = bad_user;
+ user_pw = good_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, basic_auth_path);
+ GST_DEBUG ("Basic Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 401);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_bad_password_basic_auth)
+{
+ int res;
+
+ user_id = good_user;
+ user_pw = bad_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, basic_auth_path);
+ GST_DEBUG ("Basic Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 401);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_good_user_digest_auth)
+{
+ int res;
+
+ user_id = good_user;
+ user_pw = good_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, digest_auth_path);
+ GST_DEBUG ("Digest Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 0);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_bad_user_digest_auth)
+{
+ int res;
+
+ user_id = bad_user;
+ user_pw = good_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, digest_auth_path);
+ GST_DEBUG ("Digest Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 401);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_bad_password_digest_auth)
+{
+ int res;
+
+ user_id = good_user;
+ user_pw = bad_pw;
+ res = run_test ("http://127.0.0.1:%u%s", http_port, digest_auth_path);
+ GST_DEBUG ("Digest Auth user %s password %s res = %d", user_id, user_pw, res);
+ user_id = user_pw = NULL;
+ fail_unless (res == 401);
+}
+
+GST_END_TEST;
+
+static gboolean icy_caps = FALSE;
+
+static void
+got_buffer (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
+ gpointer user_data)
+{
+ GstStructure *s;
+
+ /* Caps can be anything if we don't except icy caps */
+ if (!icy_caps)
+ return;
+
+ /* Otherwise they _must_ be "application/x-icy" */
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL);
+ s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0);
+ fail_unless_equals_string (gst_structure_get_name (s), "application/x-icy");
+}
+
+GST_START_TEST (test_icy_stream)
+{
+ GstElement *pipe, *src, *sink;
+
+ GstMessage *msg;
+
+ pipe = gst_pipeline_new (NULL);
+
+ src = gst_element_factory_make ("souphttpsrc", NULL);
+ fail_unless (src != NULL);
+ g_object_set (src, "iradio-mode", TRUE, NULL);
+
+ sink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (sink != NULL);
+ g_object_set (sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (sink, "handoff", G_CALLBACK (got_buffer), NULL);
+
+ gst_bin_add (GST_BIN (pipe), src);
+ gst_bin_add (GST_BIN (pipe), sink);
+ fail_unless (gst_element_link (src, sink));
+
+ /* First try Virgin Radio Ogg stream, to see if there's connectivity and all
+ * (which is an attempt to work around the completely horrid error reporting
+ * and that we can't distinguish different types of failures here). */
+
+ g_object_set (src, "location", "http://ogg2.smgradio.com/vr32.ogg", NULL);
+ g_object_set (src, "num-buffers", 1, NULL);
+ icy_caps = FALSE;
+ gst_element_set_state (pipe, GST_STATE_PLAYING);
+
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
+ GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GST_INFO ("looks like there's no net connectivity or sgmradio.com is "
+ "down. In any case, let's just skip this test");
+ gst_message_unref (msg);
+ goto done;
+ }
+ gst_message_unref (msg);
+ msg = NULL;
+ gst_element_set_state (pipe, GST_STATE_NULL);
+
+ /* Now, if the ogg stream works, the mp3 shoutcast stream should work as
+ * well (time will tell if that's true) */
+
+ /* Virgin Radio 32kbps mp3 shoutcast stream */
+ g_object_set (src, "location", "http://mp3-vr-32.smgradio.com:80/", NULL);
+
+
+ /* EOS after the first buffer */
+ g_object_set (src, "num-buffers", 1, NULL);
+ icy_caps = TRUE;
+ gst_element_set_state (pipe, GST_STATE_PLAYING);
+ msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
+ GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
+ GST_DEBUG ("success, we're done here");
+ gst_message_unref (msg);
+ goto done;
+ }
+
+ {
+ GError *err = NULL;
+
+ gst_message_parse_error (msg, &err, NULL);
+ gst_message_unref (msg);
+ g_error ("Error with ICY mp3 shoutcast stream: %s", err->message);
+ g_error_free (err);
+ }
+
+done:
+ icy_caps = FALSE;
+
+ gst_element_set_state (pipe, GST_STATE_NULL);
+ gst_object_unref (pipe);
+}
+
+GST_END_TEST;
+
+static Suite *
+souphttpsrc_suite (void)
+{
+ Suite *s;
+
+ TCase *tc_chain, *tc_internet;
+
+ g_type_init ();
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+#endif
+
+ s = suite_create ("souphttpsrc");
+ tc_chain = tcase_create ("general");
+ tc_internet = tcase_create ("internet");
+
+ suite_add_tcase (s, tc_chain);
+ run_server (&http_port, &https_port);
+ atexit (stop_server);
+ tcase_add_test (tc_chain, test_first_buffer_has_offset);
+ tcase_add_test (tc_chain, test_redirect_yes);
+ tcase_add_test (tc_chain, test_redirect_no);
+ tcase_add_test (tc_chain, test_not_found);
+ tcase_add_test (tc_chain, test_forbidden);
+ tcase_add_test (tc_chain, test_cookies);
+ tcase_add_test (tc_chain, test_good_user_basic_auth);
+ tcase_add_test (tc_chain, test_bad_user_basic_auth);
+ tcase_add_test (tc_chain, test_bad_password_basic_auth);
+ tcase_add_test (tc_chain, test_good_user_digest_auth);
+ tcase_add_test (tc_chain, test_bad_user_digest_auth);
+ tcase_add_test (tc_chain, test_bad_password_digest_auth);
+ if (soup_ssl_supported)
+ tcase_add_test (tc_chain, test_https);
+
+ suite_add_tcase (s, tc_internet);
+ tcase_set_timeout (tc_internet, 250);
+ tcase_add_test (tc_internet, test_icy_stream);
+
+ return s;
+}
+
+GST_CHECK_MAIN (souphttpsrc);
+
+static void
+do_get (SoupMessage * msg, const char *path)
+{
+ char *uri;
+
+ int buflen = 4096;
+
+ SoupKnownStatusCode status = SOUP_STATUS_OK;
+
+ uri = soup_uri_to_string (soup_message_get_uri (msg), FALSE);
+ GST_DEBUG ("request: \"%s\"", uri);
+
+ if (!strcmp (path, "/301"))
+ status = SOUP_STATUS_MOVED_PERMANENTLY;
+ else if (!strcmp (path, "/302"))
+ status = SOUP_STATUS_MOVED_TEMPORARILY;
+ else if (!strcmp (path, "/307"))
+ status = SOUP_STATUS_TEMPORARY_REDIRECT;
+ else if (!strcmp (path, "/403"))
+ status = SOUP_STATUS_FORBIDDEN;
+ else if (!strcmp (path, "/404"))
+ status = SOUP_STATUS_NOT_FOUND;
+
+ if (SOUP_STATUS_IS_REDIRECTION (status)) {
+ char *redir_uri;
+
+ redir_uri = g_strdup_printf ("%s-redirected", uri);
+ soup_message_headers_append (msg->response_headers, "Location", redir_uri);
+ g_free (redir_uri);
+ }
+ if (status != SOUP_STATUS_OK)
+ goto leave;
+
+ if (msg->method == SOUP_METHOD_GET) {
+ char *buf;
+
+ buf = g_malloc (buflen);
+ memset (buf, 0, buflen);
+ soup_message_body_append (msg->response_body, SOUP_MEMORY_TAKE,
+ buf, buflen);
+ } else { /* msg->method == SOUP_METHOD_HEAD */
+
+ char *length;
+
+ /* We could just use the same code for both GET and
+ * HEAD. But we'll optimize and avoid the extra
+ * malloc.
+ */
+ length = g_strdup_printf ("%lu", (gulong) buflen);
+ soup_message_headers_append (msg->response_headers,
+ "Content-Length", length);
+ g_free (length);
+ }
+
+leave:
+ soup_message_set_status (msg, status);
+ g_free (uri);
+}
+
+static void
+print_header (const char *name, const char *value, gpointer data)
+{
+ GST_DEBUG ("header: %s: %s", name, value);
+}
+
+static void
+server_callback (SoupServer * server, SoupMessage * msg,
+ const char *path, GHashTable * query,
+ SoupClientContext * context, gpointer data)
+{
+ GST_DEBUG ("%s %s HTTP/1.%d", msg->method, path,
+ soup_message_get_http_version (msg));
+ soup_message_headers_foreach (msg->request_headers, print_header, NULL);
+ if (msg->request_body->length)
+ GST_DEBUG ("%s", msg->request_body->data);
+
+ if (msg->method == SOUP_METHOD_GET || msg->method == SOUP_METHOD_HEAD)
+ do_get (msg, path);
+ else
+ soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
+
+ GST_DEBUG (" -> %d %s", msg->status_code, msg->reason_phrase);
+}
+
+static SoupServer *server; /* NULL */
+static SoupServer *ssl_server; /* NULL */
+
+int
+run_server (guint * http_port, guint * https_port)
+{
+ guint port = SOUP_ADDRESS_ANY_PORT;
+ guint ssl_port = SOUP_ADDRESS_ANY_PORT;
+ const char *ssl_cert_file = GST_TEST_FILES_PATH "/test-cert.pem";
+ const char *ssl_key_file = GST_TEST_FILES_PATH "/test-key.pem";
+ static int server_running = 0;
+
+ SoupAuthDomain *domain = NULL;
+
+ if (server_running)
+ return 0;
+ server_running = 1;
+
+ *http_port = *https_port = 0;
+
+ server = soup_server_new (SOUP_SERVER_PORT, port, NULL);
+ if (!server) {
+ GST_DEBUG ("Unable to bind to server port %u", port);
+ return 1;
+ }
+ *http_port = soup_server_get_port (server);
+ GST_INFO ("HTTP server listening on port %u", *http_port);
+ soup_server_add_handler (server, NULL, server_callback, NULL, NULL);
+ domain = soup_auth_domain_basic_new (SOUP_AUTH_DOMAIN_REALM, realm,
+ SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, basic_auth_cb,
+ SOUP_AUTH_DOMAIN_ADD_PATH, basic_auth_path, NULL);
+ soup_server_add_auth_domain (server, domain);
+ g_object_unref (domain);
+ domain = soup_auth_domain_digest_new (SOUP_AUTH_DOMAIN_REALM, realm,
+ SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK, digest_auth_cb,
+ SOUP_AUTH_DOMAIN_ADD_PATH, digest_auth_path, NULL);
+ soup_server_add_auth_domain (server, domain);
+ g_object_unref (domain);
+ soup_server_run_async (server);
+
+ if (ssl_cert_file && ssl_key_file) {
+ ssl_server = soup_server_new (SOUP_SERVER_PORT, ssl_port,
+ SOUP_SERVER_SSL_CERT_FILE, ssl_cert_file,
+ SOUP_SERVER_SSL_KEY_FILE, ssl_key_file, NULL);
+
+ if (!ssl_server) {
+ GST_DEBUG ("Unable to bind to SSL server port %u", ssl_port);
+ return 1;
+ }
+ *https_port = soup_server_get_port (ssl_server);
+ GST_INFO ("HTTPS server listening on port %u", *https_port);
+ soup_server_add_handler (ssl_server, NULL, server_callback, NULL, NULL);
+ soup_server_run_async (ssl_server);
+ }
+
+ return 0;
+}
+
+static void
+stop_server (void)
+{
+ GST_INFO ("cleaning up");
+
+ if (server) {
+ g_object_unref (server);
+ server = NULL;
+ }
+ if (ssl_server) {
+ g_object_unref (ssl_server);
+ ssl_server = NULL;
+ }
+}
diff --git a/tests/check/elements/spectrum.c b/tests/check/elements/spectrum.c
new file mode 100644
index 0000000..0eed1dc
--- /dev/null
+++ b/tests/check/elements/spectrum.c
@@ -0,0 +1,570 @@
+/* GStreamer
+ *
+ * unit test for spectrum
+ *
+ * Copyright (C) <2007> Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define SPECT_CAPS_TEMPLATE_STRING \
+ "audio/x-raw-int, " \
+ " width = (int) 16, " \
+ " depth = (int) 16, " \
+ " signed = (boolean) true, " \
+ " endianness = (int) BYTE_ORDER, " \
+ " rate = (int) [ 1, MAX ], " \
+ " channels = (int) [ 1, MAX ]; " \
+ "audio/x-raw-int, " \
+ " width = (int) 32, " \
+ " depth = (int) 32, " \
+ " signed = (boolean) true, " \
+ " endianness = (int) BYTE_ORDER, " \
+ " rate = (int) [ 1, MAX ], " \
+ " channels = (int) [ 1, MAX ]; " \
+ "audio/x-raw-float, " \
+ " width = (int) { 32, 64 }, " \
+ " endianness = (int) BYTE_ORDER, " \
+ " rate = (int) [ 1, MAX ], " \
+ " channels = (int) [ 1, MAX ]"
+
+#define SPECT_CAPS_STRING_S16 \
+ "audio/x-raw-int, " \
+ "rate = (int) 44100, " \
+ "channels = (int) 1, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 16, " \
+ "depth = (int) 16, " \
+ "signed = (boolean) true"
+
+#define SPECT_CAPS_STRING_S32 \
+ "audio/x-raw-int, " \
+ "rate = (int) 44100, " \
+ "channels = (int) 1, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "width = (int) 32, " \
+ "depth = (int) 32, " \
+ "signed = (boolean) true"
+
+#define SPECT_CAPS_STRING_F32 \
+ "audio/x-raw-float, " \
+ " width = (int) 32, " \
+ " endianness = (int) BYTE_ORDER, " \
+ " rate = (int) 44100, " \
+ " channels = (int) 1"
+
+#define SPECT_CAPS_STRING_F64 \
+ "audio/x-raw-float, " \
+ " width = (int) 64, " \
+ " endianness = (int) BYTE_ORDER, " \
+ " rate = (int) 44100, " \
+ " channels = (int) 1"
+
+#define SPECT_BANDS 256
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SPECT_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (SPECT_CAPS_TEMPLATE_STRING)
+ );
+
+/* takes over reference for outcaps */
+static GstElement *
+setup_spectrum (void)
+{
+ GstElement *spectrum;
+
+ GST_DEBUG ("setup_spectrum");
+ spectrum = gst_check_setup_element ("spectrum");
+ mysrcpad = gst_check_setup_src_pad (spectrum, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (spectrum, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return spectrum;
+}
+
+static void
+cleanup_spectrum (GstElement * spectrum)
+{
+ GST_DEBUG ("cleanup_spectrum");
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (spectrum);
+ gst_check_teardown_sink_pad (spectrum);
+ gst_check_teardown_element (spectrum);
+
+ g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+
+GST_START_TEST (test_int16)
+{
+ GstElement *spectrum;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int i, j;
+ gint16 *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gfloat level;
+
+ spectrum = setup_spectrum ();
+ g_object_set (spectrum, "message", TRUE, "interval", GST_SECOND / 100,
+ "bands", SPECT_BANDS, "threshold", -80, NULL);
+
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a 1 sec buffer with an 11025 Hz sine wave */
+ inbuffer = gst_buffer_new_and_alloc (44100 * sizeof (gint16));
+ data = (gint16 *) GST_BUFFER_DATA (inbuffer);
+
+ for (j = 0; j < 44100; j += 4) {
+ *data = 0;
+ ++data;
+ *data = 32767;
+ ++data;
+ *data = 0;
+ ++data;
+ *data = -32767;
+ ++data;
+ }
+
+ caps = gst_caps_from_string (SPECT_CAPS_STRING_S16);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the spectrum message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (spectrum, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (spectrum));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "spectrum");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ list = gst_structure_get_value (structure, "magnitude");
+ for (i = 0; i < SPECT_BANDS; ++i) {
+ value = gst_value_list_get_value (list, i);
+ level = g_value_get_float (value);
+ GST_DEBUG ("band[%3d] is %.2f", i, level);
+ /* Only the bands in the middle should have a level above 60 */
+ fail_if ((i == SPECT_BANDS / 2 || i == SPECT_BANDS / 2 - 1)
+ && level < -20.0);
+ fail_if ((i != SPECT_BANDS / 2 && i != SPECT_BANDS / 2 - 1)
+ && level > -20.0);
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+
+ gst_element_set_bus (spectrum, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+ cleanup_spectrum (spectrum);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_int32)
+{
+ GstElement *spectrum;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int i, j;
+ gint32 *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gfloat level;
+
+ spectrum = setup_spectrum ();
+ g_object_set (spectrum, "message", TRUE, "interval", GST_SECOND / 100,
+ "bands", SPECT_BANDS, "threshold", -80, NULL);
+
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a 1 sec buffer with an 11025 Hz sine wave */
+ inbuffer = gst_buffer_new_and_alloc (44100 * sizeof (gint32));
+ data = (gint32 *) GST_BUFFER_DATA (inbuffer);
+ for (j = 0; j < 44100; j += 4) {
+ *data = 0;
+ ++data;
+ *data = 2147483647;
+ ++data;
+ *data = 0;
+ ++data;
+ *data = -2147483647;
+ ++data;
+ }
+ caps = gst_caps_from_string (SPECT_CAPS_STRING_S32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the spectrum message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (spectrum, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (spectrum));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "spectrum");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ list = gst_structure_get_value (structure, "magnitude");
+ for (i = 0; i < SPECT_BANDS; ++i) {
+ value = gst_value_list_get_value (list, i);
+ level = g_value_get_float (value);
+ GST_DEBUG ("band[%3d] is %.2f", i, level);
+ /* Only the bands in the middle should have a level above 60 */
+ fail_if ((i == SPECT_BANDS / 2 || i == SPECT_BANDS / 2 - 1)
+ && level < -20.0);
+ fail_if ((i != SPECT_BANDS / 2 && i != SPECT_BANDS / 2 - 1)
+ && level > -20.0);
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+
+ gst_element_set_bus (spectrum, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+ cleanup_spectrum (spectrum);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_float32)
+{
+ GstElement *spectrum;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int i, j;
+ gfloat *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gfloat level;
+
+ spectrum = setup_spectrum ();
+ g_object_set (spectrum, "message", TRUE, "interval", GST_SECOND / 100,
+ "bands", SPECT_BANDS, "threshold", -80, NULL);
+
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a 1 sec buffer with an 11025 Hz sine wave */
+ inbuffer = gst_buffer_new_and_alloc (44100 * sizeof (gfloat));
+ data = (gfloat *) GST_BUFFER_DATA (inbuffer);
+ for (j = 0; j < 44100; j += 4) {
+ *data = 0.0;
+ ++data;
+ *data = 1.0;
+ ++data;
+ *data = 0.0;
+ ++data;
+ *data = -1.0;
+ ++data;
+ }
+ caps = gst_caps_from_string (SPECT_CAPS_STRING_F32);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the spectrum message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (spectrum, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (spectrum));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "spectrum");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ list = gst_structure_get_value (structure, "magnitude");
+ for (i = 0; i < SPECT_BANDS; ++i) {
+ value = gst_value_list_get_value (list, i);
+ level = g_value_get_float (value);
+ GST_DEBUG ("band[%3d] is %.2f", i, level);
+ /* Only the bands in the middle should have a level above 60 */
+ fail_if ((i == SPECT_BANDS / 2 || i == SPECT_BANDS / 2 - 1)
+ && level < -20.0);
+ fail_if ((i != SPECT_BANDS / 2 && i != SPECT_BANDS / 2 - 1)
+ && level > -20.0);
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+
+ gst_element_set_bus (spectrum, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+ cleanup_spectrum (spectrum);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_float64)
+{
+ GstElement *spectrum;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ GstCaps *caps;
+ GstMessage *message;
+ const GstStructure *structure;
+ int i, j;
+ gdouble *data;
+ const GValue *list, *value;
+ GstClockTime endtime;
+ gfloat level;
+
+ spectrum = setup_spectrum ();
+ g_object_set (spectrum, "message", TRUE, "interval", GST_SECOND / 100,
+ "bands", SPECT_BANDS, "threshold", -80, NULL);
+
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* create a 1 sec buffer with an 11025 Hz sine wave */
+ inbuffer = gst_buffer_new_and_alloc (44100 * sizeof (gdouble));
+ data = (gdouble *) GST_BUFFER_DATA (inbuffer);
+ for (j = 0; j < 44100; j += 4) {
+ *data = 0.0;
+ ++data;
+ *data = 1.0;
+ ++data;
+ *data = 0.0;
+ ++data;
+ *data = -1.0;
+ ++data;
+ }
+ caps = gst_caps_from_string (SPECT_CAPS_STRING_F64);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+
+ /* create a bus to get the spectrum message on */
+ bus = gst_bus_new ();
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_element_set_bus (spectrum, bus);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+
+ /* pushing gives away my reference ... */
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ /* ... but it ends up being collected on the global buffer list */
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, -1);
+ ASSERT_OBJECT_REFCOUNT (message, "message", 1);
+
+ fail_unless (message != NULL);
+ fail_unless (GST_MESSAGE_SRC (message) == GST_OBJECT (spectrum));
+ fail_unless (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT);
+ structure = gst_message_get_structure (message);
+ fail_if (structure == NULL);
+ fail_unless_equals_string ((char *) gst_structure_get_name (structure),
+ "spectrum");
+ fail_unless (gst_structure_get_clock_time (structure, "endtime", &endtime));
+
+ list = gst_structure_get_value (structure, "magnitude");
+ for (i = 0; i < SPECT_BANDS; ++i) {
+ value = gst_value_list_get_value (list, i);
+ level = g_value_get_float (value);
+ GST_DEBUG ("band[%3d] is %.2f", i, level);
+ /* Only the bands in the middle should have a level above 60 */
+ fail_if ((i == SPECT_BANDS / 2 || i == SPECT_BANDS / 2 - 1)
+ && level < -20.0);
+ fail_if ((i != SPECT_BANDS / 2 && i != SPECT_BANDS / 2 - 1)
+ && level > -20.0);
+ }
+ fail_unless_equals_int (g_list_length (buffers), 1);
+ fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
+ fail_unless (inbuffer == outbuffer);
+
+ /* clean up */
+ /* flush current messages,and future state change messages */
+ gst_bus_set_flushing (bus, TRUE);
+
+ /* message has a ref to the element */
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 2);
+ gst_message_unref (message);
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+
+ gst_element_set_bus (spectrum, NULL);
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 1);
+ gst_object_unref (bus);
+ fail_unless (gst_element_set_state (spectrum,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
+ ASSERT_OBJECT_REFCOUNT (spectrum, "spectrum", 1);
+ cleanup_spectrum (spectrum);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+spectrum_suite (void)
+{
+ Suite *s = suite_create ("spectrum");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_int16);
+ tcase_add_test (tc_chain, test_int32);
+ tcase_add_test (tc_chain, test_float32);
+ tcase_add_test (tc_chain, test_float64);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = spectrum_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/sunaudio.c b/tests/check/elements/sunaudio.c
new file mode 100644
index 0000000..30b569a
--- /dev/null
+++ b/tests/check/elements/sunaudio.c
@@ -0,0 +1,95 @@
+/* GStreamer unit tests for the sun audio elements
+ *
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/interfaces/propertyprobe.h>
+#include <gst/interfaces/mixer.h>
+#include <gst/gst.h>
+
+GST_START_TEST (test_sun_audio_mixer_track)
+{
+ GstStateChangeReturn state_ret;
+ GstElement *mixer;
+ GList *tracks, *l;
+
+ mixer = gst_element_factory_make ("sunaudiomixer", "sunaudiomixer");
+ fail_unless (mixer != NULL, "Failed to create 'sunaudiomixer' element!");
+
+ state_ret = gst_element_set_state (mixer, GST_STATE_READY);
+ if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+ gst_object_unref (mixer);
+ return;
+ }
+
+ GST_LOG ("opened sunaudiomixer");
+ fail_unless (GST_IS_MIXER (mixer), "is not a GstMixer?!");
+
+ tracks = (GList *) gst_mixer_list_tracks (GST_MIXER (mixer));
+ for (l = tracks; l != NULL; l = l->next) {
+ GObjectClass *klass;
+ GstMixerTrack *track;
+ gchar *ulabel = NULL, *label = NULL;
+
+ track = GST_MIXER_TRACK (l->data);
+
+ g_object_get (track, "label", &label, NULL);
+ fail_unless (label == NULL || g_utf8_validate (label, -1, NULL));
+
+ /* FIXME: remove this check once we depend on -base >= 0.10.12.1 */
+ klass = G_OBJECT_GET_CLASS (track);
+ if (g_object_class_find_property (klass, "untranslated-label")) {
+ g_object_get (track, "untranslated-label", &ulabel, NULL);
+ }
+
+ if (ulabel != NULL) {
+ gchar *p;
+
+ for (p = ulabel; p != NULL && *p != '\0'; ++p) {
+ fail_unless (g_ascii_isprint (*p),
+ "untranslated label '%s' not printable ASCII", ulabel);
+ }
+ }
+ GST_DEBUG ("%s: %s", GST_STR_NULL (ulabel), GST_STR_NULL (label));
+ g_free (label);
+ g_free (ulabel);
+ }
+
+ fail_unless_equals_int (gst_element_set_state (mixer, GST_STATE_NULL),
+ GST_STATE_CHANGE_SUCCESS);
+
+ gst_object_unref (mixer);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+sunaudio_suite (void)
+{
+ Suite *s = suite_create ("sunaudio");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_sun_audio_mixer_track);
+
+ return s;
+}
+
+GST_CHECK_MAIN (sunaudio)
diff --git a/tests/check/elements/udpsink.c b/tests/check/elements/udpsink.c
new file mode 100644
index 0000000..9949ffc
--- /dev/null
+++ b/tests/check/elements/udpsink.c
@@ -0,0 +1,207 @@
+/* GStreamer RTP payloader unit tests
+ * Copyright (C) 2009 Axis Communications <dev-gstreamer@axis.com>
+ * @author Ognyan Tonchev <ognyan@axis.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <gst/check/gstcheck.h>
+#include <gst/base/gstbasesink.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS_ANY);
+
+#define RTP_HEADER_SIZE 12
+#define RTP_PAYLOAD_SIZE 1024
+
+/*
+ * Number of bytes received in the render function when using buffer lists
+ */
+static guint render_list_bytes_received;
+
+/*
+ * Render function for testing udpsink with buffer lists
+ */
+static GstFlowReturn
+udpsink_render (GstBaseSink * sink, GstBufferList * list)
+{
+ GstBufferListIterator *it;
+
+ fail_if (!list);
+
+ /*
+ * Count the size of the rtp header and the payload in the buffer list.
+ */
+
+ it = gst_buffer_list_iterate (list);
+
+ /* Loop through all groups */
+ while (gst_buffer_list_iterator_next_group (it)) {
+ GstBuffer *buf;
+ /* Loop through all buffers in the current group */
+ while ((buf = gst_buffer_list_iterator_next (it))) {
+ guint size;
+
+ size = GST_BUFFER_SIZE (buf);
+ GST_DEBUG ("rendered %u bytes", size);
+
+ render_list_bytes_received += size;
+ }
+ }
+
+ gst_buffer_list_iterator_free (it);
+
+ return GST_FLOW_OK;
+}
+
+static void
+_set_render_function (GstElement * bsink)
+{
+ GstBaseSinkClass *bsclass;
+ bsclass = GST_BASE_SINK_GET_CLASS ((GstBaseSink *) bsink);
+ /* Add callback function for the buffer list tests */
+ bsclass->render_list = udpsink_render;
+}
+
+static GstBufferList *
+_create_buffer_list (guint * data_size)
+{
+ GstBufferList *list;
+ GstBufferListIterator *it;
+ GstBuffer *rtp_buffer;
+ GstBuffer *data_buffer;
+
+ list = gst_buffer_list_new ();
+ it = gst_buffer_list_iterate (list);
+
+ /*** First group, i.e. first packet. **/
+
+ /* Create the RTP header buffer */
+ rtp_buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (rtp_buffer) = g_malloc (RTP_HEADER_SIZE);
+ GST_BUFFER_DATA (rtp_buffer) = GST_BUFFER_MALLOCDATA (rtp_buffer);
+ GST_BUFFER_SIZE (rtp_buffer) = RTP_HEADER_SIZE;
+ memset (GST_BUFFER_DATA (rtp_buffer), 0, RTP_HEADER_SIZE);
+
+ /* Create the buffer that holds the payload */
+ data_buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (data_buffer) = g_malloc (RTP_PAYLOAD_SIZE);
+ GST_BUFFER_DATA (data_buffer) = GST_BUFFER_MALLOCDATA (data_buffer);
+ GST_BUFFER_SIZE (data_buffer) = RTP_PAYLOAD_SIZE;
+ memset (GST_BUFFER_DATA (data_buffer), 0, RTP_PAYLOAD_SIZE);
+
+ /* Create a new group to hold the rtp header and the payload */
+ gst_buffer_list_iterator_add_group (it);
+ gst_buffer_list_iterator_add (it, rtp_buffer);
+ gst_buffer_list_iterator_add (it, data_buffer);
+
+ /*** Second group, i.e. second packet. ***/
+
+ /* Create the RTP header buffer */
+ rtp_buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (rtp_buffer) = g_malloc (RTP_HEADER_SIZE);
+ GST_BUFFER_DATA (rtp_buffer) = GST_BUFFER_MALLOCDATA (rtp_buffer);
+ GST_BUFFER_SIZE (rtp_buffer) = RTP_HEADER_SIZE;
+ memset (GST_BUFFER_DATA (rtp_buffer), 0, RTP_HEADER_SIZE);
+
+ /* Create the buffer that holds the payload */
+ data_buffer = gst_buffer_new ();
+ GST_BUFFER_MALLOCDATA (data_buffer) = g_malloc (RTP_PAYLOAD_SIZE);
+ GST_BUFFER_DATA (data_buffer) = GST_BUFFER_MALLOCDATA (data_buffer);
+ GST_BUFFER_SIZE (data_buffer) = RTP_PAYLOAD_SIZE;
+ memset (GST_BUFFER_DATA (data_buffer), 0, RTP_PAYLOAD_SIZE);
+
+ /* Create a new group to hold the rtp header and the payload */
+ gst_buffer_list_iterator_add_group (it);
+ gst_buffer_list_iterator_add (it, rtp_buffer);
+ gst_buffer_list_iterator_add (it, data_buffer);
+
+ /* Calculate the size of the data */
+ *data_size = 2 * RTP_HEADER_SIZE + 2 * RTP_PAYLOAD_SIZE;
+
+ gst_buffer_list_iterator_free (it);
+
+ return list;
+}
+
+static void
+udpsink_test (gboolean use_buffer_lists)
+{
+ GstElement *udpsink;
+ GstPad *srcpad;
+ GstBufferList *list;
+ guint data_size;
+
+ list = _create_buffer_list (&data_size);
+
+ udpsink = gst_check_setup_element ("udpsink");
+ if (use_buffer_lists)
+ _set_render_function (udpsink);
+
+ srcpad = gst_check_setup_src_pad_by_name (udpsink, &srctemplate, "sink");
+
+ gst_element_set_state (udpsink, GST_STATE_PLAYING);
+
+ gst_pad_push_event (srcpad, gst_event_new_new_segment_full (FALSE, 1.0, 1.0,
+ GST_FORMAT_TIME, 0, -1, 0));
+
+ gst_pad_push_list (srcpad, list);
+
+ gst_check_teardown_pad_by_name (udpsink, "sink");
+ gst_check_teardown_element (udpsink);
+
+ if (use_buffer_lists)
+ fail_unless_equals_int (data_size, render_list_bytes_received);
+}
+
+GST_START_TEST (test_udpsink)
+{
+ udpsink_test (FALSE);
+}
+
+GST_END_TEST;
+GST_START_TEST (test_udpsink_bufferlist)
+{
+ udpsink_test (TRUE);
+}
+
+GST_END_TEST;
+
+/*
+ * Creates the test suite.
+ *
+ * Returns: pointer to the test suite.
+ */
+static Suite *
+udpsink_suite (void)
+{
+ Suite *s = suite_create ("udpsink_test");
+
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* Set timeout to 60 seconds. */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_udpsink);
+ tcase_add_test (tc_chain, test_udpsink_bufferlist);
+ return s;
+}
+
+GST_CHECK_MAIN (udpsink)
diff --git a/tests/check/elements/videocrop.c b/tests/check/elements/videocrop.c
new file mode 100644
index 0000000..fc7c5dc
--- /dev/null
+++ b/tests/check/elements/videocrop.c
@@ -0,0 +1,816 @@
+/* GStreamer unit test for the videocrop element
+ * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_VALGRIND
+# include <valgrind/valgrind.h>
+#endif
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/base/gstbasetransform.h>
+
+/* return a list of caps where we only need to set
+ * width and height to get fixed caps */
+static GList *
+video_crop_get_test_caps (GstElement * videocrop)
+{
+ const GstCaps *allowed_caps;
+ GstPad *srcpad;
+ GList *list = NULL;
+ guint i;
+
+ srcpad = gst_element_get_static_pad (videocrop, "src");
+ fail_unless (srcpad != NULL);
+ allowed_caps = gst_pad_get_pad_template_caps (srcpad);
+ fail_unless (allowed_caps != NULL);
+
+ for (i = 0; i < gst_caps_get_size (allowed_caps); ++i) {
+ GstStructure *new_structure;
+ GstCaps *single_caps;
+
+ single_caps = gst_caps_new_empty ();
+ new_structure =
+ gst_structure_copy (gst_caps_get_structure (allowed_caps, i));
+ gst_structure_set (new_structure, "framerate", GST_TYPE_FRACTION,
+ 1, 1, NULL);
+ gst_structure_remove_field (new_structure, "width");
+ gst_structure_remove_field (new_structure, "height");
+ gst_caps_append_structure (single_caps, new_structure);
+
+ /* should be fixed without width/height */
+ fail_unless (gst_caps_is_fixed (single_caps));
+
+ list = g_list_prepend (list, single_caps);
+ }
+
+ gst_object_unref (srcpad);
+
+ return list;
+}
+
+GST_START_TEST (test_unit_sizes)
+{
+ GstBaseTransformClass *csp_klass, *vcrop_klass;
+ GstElement *videocrop, *csp;
+ GList *caps_list, *l;
+
+ videocrop = gst_element_factory_make ("videocrop", "videocrop");
+ fail_unless (videocrop != NULL, "Failed to create videocrop element");
+ vcrop_klass = GST_BASE_TRANSFORM_GET_CLASS (videocrop);
+
+ csp = gst_element_factory_make ("ffmpegcolorspace", "csp");
+ fail_unless (csp != NULL, "Failed to create ffmpegcolorspace element");
+ csp_klass = GST_BASE_TRANSFORM_GET_CLASS (csp);
+
+ caps_list = video_crop_get_test_caps (videocrop);
+
+ for (l = caps_list; l != NULL; l = l->next) {
+ const struct
+ {
+ gint width, height;
+ } sizes_to_try[] = {
+ {
+ 160, 120}, {
+ 161, 120}, {
+ 160, 121}, {
+ 161, 121}, {
+ 159, 120}, {
+ 160, 119}, {
+ 159, 119}, {
+ 159, 121}
+ };
+ GstStructure *s;
+ GstCaps *caps;
+ gint i;
+
+ caps = gst_caps_copy (GST_CAPS (l->data));
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (s != NULL);
+
+ for (i = 0; i < G_N_ELEMENTS (sizes_to_try); ++i) {
+ gchar *caps_str;
+ guint csp_size = 0;
+ guint vc_size = 0;
+
+ gst_structure_set (s, "width", G_TYPE_INT, sizes_to_try[i].width,
+ "height", G_TYPE_INT, sizes_to_try[i].height, NULL);
+
+ caps_str = gst_caps_to_string (caps);
+ GST_INFO ("Testing unit size for %s", caps_str);
+
+ /* skip if ffmpegcolorspace doesn't support these caps
+ * (only works with gst-plugins-base 0.10.9.1 or later) */
+ if (!csp_klass->get_unit_size ((GstBaseTransform *) csp, caps, &csp_size)) {
+ GST_INFO ("ffmpegcolorspace does not support format %s", caps_str);
+ g_free (caps_str);
+ continue;
+ }
+
+ fail_unless (vcrop_klass->get_unit_size ((GstBaseTransform *) videocrop,
+ caps, &vc_size));
+
+ fail_unless (vc_size == csp_size,
+ "videocrop and ffmpegcolorspace return different unit sizes for "
+ "caps %s: vc_size=%d, csp_size=%d", caps_str, vc_size, csp_size);
+
+ g_free (caps_str);
+ }
+
+ gst_caps_unref (caps);
+ }
+
+ g_list_foreach (caps_list, (GFunc) gst_caps_unref, NULL);
+ g_list_free (caps_list);
+
+ gst_object_unref (csp);
+ gst_object_unref (videocrop);
+}
+
+GST_END_TEST;
+
+typedef struct
+{
+ GstElement *pipeline;
+ GstElement *src;
+ GstElement *filter;
+ GstElement *crop;
+ GstElement *sink;
+ GstBuffer *last_buf;
+} GstVideoCropTestContext;
+
+static void
+handoff_cb (GstElement * sink, GstBuffer * buf, GstPad * pad,
+ GstBuffer ** p_buf)
+{
+ gst_buffer_replace (p_buf, buf);
+}
+
+static void
+videocrop_test_cropping_init_context (GstVideoCropTestContext * ctx)
+{
+ fail_unless (ctx != NULL);
+
+ ctx->pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (ctx->pipeline != NULL);
+ ctx->src = gst_element_factory_make ("videotestsrc", "src");
+ fail_unless (ctx->src != NULL, "Failed to create videotestsrc element");
+ ctx->filter = gst_element_factory_make ("capsfilter", "filter");
+ fail_unless (ctx->filter != NULL, "Failed to create capsfilter element");
+ ctx->crop = gst_element_factory_make ("videocrop", "crop");
+ fail_unless (ctx->crop != NULL, "Failed to create videocrop element");
+ ctx->sink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (ctx->sink != NULL, "Failed to create fakesink element");
+
+ gst_bin_add_many (GST_BIN (ctx->pipeline), ctx->src, ctx->filter,
+ ctx->crop, ctx->sink, NULL);
+ gst_element_link_many (ctx->src, ctx->filter, ctx->crop, ctx->sink, NULL);
+
+ /* set pattern to 'red' - for our purposes it doesn't matter anyway */
+ g_object_set (ctx->src, "pattern", 4, NULL);
+
+ g_object_set (ctx->sink, "signal-handoffs", TRUE, NULL);
+ g_signal_connect (ctx->sink, "preroll-handoff", G_CALLBACK (handoff_cb),
+ &ctx->last_buf);
+
+ ctx->last_buf = NULL;
+
+ GST_LOG ("context inited");
+}
+
+static void
+videocrop_test_cropping_deinit_context (GstVideoCropTestContext * ctx)
+{
+ GST_LOG ("deiniting context");
+
+ gst_element_set_state (ctx->pipeline, GST_STATE_NULL);
+ gst_object_unref (ctx->pipeline);
+ gst_buffer_replace (&ctx->last_buf, NULL);
+ memset (ctx, 0x00, sizeof (GstVideoCropTestContext));
+}
+
+typedef void (*GstVideoCropTestBufferFunc) (GstBuffer * buffer);
+
+static void
+videocrop_test_cropping (GstVideoCropTestContext * ctx, GstCaps * in_caps,
+ gint left, gint right, gint top, gint bottom,
+ GstVideoCropTestBufferFunc func)
+{
+ GST_LOG ("lrtb = %03u %03u %03u %03u, caps = %" GST_PTR_FORMAT, left, right,
+ top, bottom, in_caps);
+
+ g_object_set (ctx->filter, "caps", in_caps, NULL);
+
+ g_object_set (ctx->crop, "left", left, "right", right, "top", top,
+ "bottom", bottom, NULL);
+
+ /* this will fail if videotestsrc doesn't support our format; we need
+ * videotestsrc from -base CVS 0.10.9.1 with RGBA and AYUV support */
+ fail_unless (gst_element_set_state (ctx->pipeline,
+ GST_STATE_PAUSED) != GST_STATE_CHANGE_FAILURE);
+ fail_unless (gst_element_get_state (ctx->pipeline, NULL, NULL,
+ -1) == GST_STATE_CHANGE_SUCCESS);
+
+ if (func != NULL) {
+ func (ctx->last_buf);
+ }
+
+ gst_element_set_state (ctx->pipeline, GST_STATE_NULL);
+}
+
+static void
+check_1x1_buffer (GstBuffer * buf)
+{
+ GstStructure *s;
+
+ fail_unless (buf != NULL);
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL);
+
+ s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0);
+ if (gst_structure_has_name (s, "video/x-raw-yuv")) {
+ guint32 format = 0;
+
+ fail_unless (gst_structure_get_fourcc (s, "format", &format));
+
+ /* the exact values we check for come from videotestsrc */
+ switch (format) {
+ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[0], 81);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[8], 90);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[12], 240);
+ break;
+ case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[0], 81);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[8], 240);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[12], 90);
+ break;
+ case GST_MAKE_FOURCC ('Y', '8', '0', '0'):
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[0], 81);
+ /* no chroma planes */
+ break;
+ case GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'):
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[1], 81);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[2], 90);
+ fail_unless_equals_int (GST_BUFFER_DATA (buf)[3], 240);
+ /* no chroma planes */
+ break;
+ default:
+ GST_LOG ("not checking %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (format));
+ break;
+ }
+ } else if (gst_structure_has_name (s, "video/x-raw-rgb")) {
+ guint32 pixel;
+ gint rmask = 0, bmask = 0, gmask = 0, endianness = 0, bpp = 0;
+ gint rshift, gshift, bshift;
+
+ fail_unless (gst_structure_get_int (s, "red_mask", &rmask));
+ fail_unless (gst_structure_get_int (s, "blue_mask", &bmask));
+ fail_unless (gst_structure_get_int (s, "green_mask", &gmask));
+ fail_unless (gst_structure_get_int (s, "bpp", &bpp));
+ fail_unless (gst_structure_get_int (s, "endianness", &endianness));
+
+ fail_unless (rmask != 0);
+ fail_unless (gmask != 0);
+ fail_unless (bmask != 0);
+ fail_unless (bpp != 0);
+ fail_unless (endianness != 0);
+
+ rshift = g_bit_nth_lsf (rmask, -1);
+ gshift = g_bit_nth_lsf (gmask, -1);
+ bshift = g_bit_nth_lsf (bmask, -1);
+
+ switch (bpp) {
+ case 32:{
+ if (endianness == G_LITTLE_ENDIAN)
+ pixel = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf));
+ else
+ pixel = GST_READ_UINT32_BE (GST_BUFFER_DATA (buf));
+ break;
+ }
+ case 24:{
+ if (endianness == G_BIG_ENDIAN) {
+ pixel = (GST_READ_UINT8 (GST_BUFFER_DATA (buf)) << 16) |
+ (GST_READ_UINT8 (GST_BUFFER_DATA (buf) + 1) << 8) |
+ (GST_READ_UINT8 (GST_BUFFER_DATA (buf) + 2) << 0);
+ } else {
+ pixel = (GST_READ_UINT8 (GST_BUFFER_DATA (buf) + 2) << 16) |
+ (GST_READ_UINT8 (GST_BUFFER_DATA (buf) + 1) << 8) |
+ (GST_READ_UINT8 (GST_BUFFER_DATA (buf) + 0) << 0);
+ }
+ break;
+ }
+ default:{
+ GST_LOG ("not checking RGB-format buffer with %ubpp", bpp);
+ return;
+ }
+ }
+
+ fail_unless_equals_int ((pixel & rmask) >> rshift, 0xff);
+ fail_unless_equals_int ((pixel & gmask) >> gshift, 0x00);
+ fail_unless_equals_int ((pixel & bmask) >> bshift, 0x00);
+ }
+}
+
+GST_START_TEST (test_crop_to_1x1)
+{
+ GstVideoCropTestContext ctx;
+ GList *caps_list, *node;
+
+ videocrop_test_cropping_init_context (&ctx);
+
+ caps_list = video_crop_get_test_caps (ctx.crop);
+
+ for (node = caps_list; node != NULL; node = node->next) {
+ GstStructure *s;
+ GstCaps *caps;
+
+ caps = gst_caps_copy (GST_CAPS (node->data));
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (s != NULL);
+
+ if (g_strcmp0 (gst_structure_get_name (s), "video/x-raw-gray") == 0) {
+ /* videotestsrc does not support this format */
+ gst_caps_unref (caps);
+ continue;
+ }
+
+ GST_INFO ("testing format: %" GST_PTR_FORMAT, caps);
+
+ gst_structure_set (s, "width", G_TYPE_INT, 160,
+ "height", G_TYPE_INT, 160, NULL);
+
+ videocrop_test_cropping (&ctx, caps, 159, 0, 159, 0, check_1x1_buffer);
+ /* commented out because they don't really add anything useful check-wise:
+ videocrop_test_cropping (&ctx, caps, 0, 159, 0, 159, check_1x1_buffer);
+ videocrop_test_cropping (&ctx, caps, 159, 0, 0, 159, check_1x1_buffer);
+ videocrop_test_cropping (&ctx, caps, 0, 159, 159, 0, check_1x1_buffer);
+ */
+ gst_caps_unref (caps);
+ }
+ g_list_foreach (caps_list, (GFunc) gst_caps_unref, NULL);
+ g_list_free (caps_list);
+
+ videocrop_test_cropping_deinit_context (&ctx);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_cropping)
+{
+ GstVideoCropTestContext ctx;
+ struct
+ {
+ gint width, height;
+ } sizes_to_try[] = {
+ {
+ 160, 160}, {
+ 161, 160}, {
+ 160, 161}, {
+ 161, 161}, {
+ 159, 160}, {
+ 160, 159}, {
+ 159, 159}, {
+ 159, 161}
+ };
+ GList *caps_list, *node;
+ gint i;
+
+ videocrop_test_cropping_init_context (&ctx);
+
+ caps_list = video_crop_get_test_caps (ctx.crop);
+ node = g_list_nth (caps_list, __i__);
+
+ if (node != NULL) {
+ GstStructure *s;
+ GstCaps *caps;
+
+ caps = gst_caps_copy (GST_CAPS (node->data));
+ s = gst_caps_get_structure (caps, 0);
+ fail_unless (s != NULL);
+
+ /* videotestsrc does not support this format, so ignore it */
+ if (!g_str_equal (gst_structure_get_name (s), "video/x-raw-gray")) {
+ GST_INFO ("testing format: %" GST_PTR_FORMAT, caps);
+
+ for (i = 0; i < G_N_ELEMENTS (sizes_to_try); ++i) {
+ GstCaps *in_caps;
+
+ GST_INFO (" - %d x %d", sizes_to_try[i].width, sizes_to_try[i].height);
+
+ gst_structure_set (s, "width", G_TYPE_INT, sizes_to_try[i].width,
+ "height", G_TYPE_INT, sizes_to_try[i].height, NULL);
+ in_caps = gst_caps_copy (caps);
+
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 1, 0, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 1, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 1, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 0, 1, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 63, 0, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 63, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 63, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 0, 63, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 63, 0, 0, 1, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 63, 1, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 1, 63, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 1, 0, 0, 63, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 0, 0, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 32, 0, 0, 128, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 32, 128, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 0, 128, 32, 0, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 128, 0, 0, 32, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 1, 1, 1, 1, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 63, 63, 63, 63, NULL);
+ videocrop_test_cropping (&ctx, in_caps, 64, 64, 64, 64, NULL);
+
+ gst_caps_unref (in_caps);
+ }
+ }
+
+ gst_caps_unref (caps);
+ } else {
+ GST_INFO ("no caps #%d", __i__);
+ }
+ g_list_foreach (caps_list, (GFunc) gst_caps_unref, NULL);
+ g_list_free (caps_list);
+
+ videocrop_test_cropping_deinit_context (&ctx);
+}
+
+GST_END_TEST;
+
+
+static gboolean
+buffer_probe_cb (GstPad * pad, GstBuffer * buf, GstBuffer ** p_buf)
+{
+ gst_buffer_replace (p_buf, buf);
+ return TRUE; /* keep data */
+}
+
+GST_START_TEST (test_passthrough)
+{
+ GstStateChangeReturn state_ret;
+ GstVideoCropTestContext ctx;
+ GstPad *srcpad;
+ GstBuffer *gen_buf = NULL; /* buffer generated by videotestsrc */
+
+ videocrop_test_cropping_init_context (&ctx);
+
+ g_object_set (ctx.src, "num-buffers", 1, NULL);
+
+ srcpad = gst_element_get_static_pad (ctx.src, "src");
+ fail_unless (srcpad != NULL);
+ gst_pad_add_buffer_probe (srcpad, G_CALLBACK (buffer_probe_cb), &gen_buf);
+ gst_object_unref (srcpad);
+
+ g_object_set (ctx.crop, "left", 0, "right", 0, "top", 0, "bottom", 0, NULL);
+
+ state_ret = gst_element_set_state (ctx.pipeline, GST_STATE_PAUSED);
+ fail_unless (state_ret != GST_STATE_CHANGE_FAILURE,
+ "couldn't set pipeline to PAUSED state");
+
+ state_ret = gst_element_get_state (ctx.pipeline, NULL, NULL, -1);
+ fail_unless (state_ret == GST_STATE_CHANGE_SUCCESS,
+ "pipeline failed to go to PAUSED state");
+
+ fail_unless (gen_buf != NULL);
+ fail_unless (ctx.last_buf != NULL);
+
+ /* pass through should do nothing */
+ fail_unless (gen_buf == ctx.last_buf);
+
+ videocrop_test_cropping_deinit_context (&ctx);
+
+ fail_unless_equals_int (GST_MINI_OBJECT_REFCOUNT_VALUE (gen_buf), 1);
+ gst_buffer_unref (gen_buf);
+}
+
+GST_END_TEST;
+
+static gint
+notgst_value_list_get_nth_int (const GValue * list_val, guint n)
+{
+ const GValue *v;
+
+ fail_unless (GST_VALUE_HOLDS_LIST (list_val));
+ fail_unless (n < gst_value_list_get_size (list_val));
+
+ v = gst_value_list_get_value (list_val, n);
+ fail_unless (G_VALUE_HOLDS_INT (v));
+ return g_value_get_int (v);
+}
+
+GST_START_TEST (test_caps_transform)
+{
+ GstVideoCropTestContext ctx;
+ GstBaseTransformClass *klass;
+ GstBaseTransform *crop;
+ const GValue *w_val;
+ const GValue *h_val;
+ GstCaps *caps, *adj_caps;
+
+ videocrop_test_cropping_init_context (&ctx);
+
+ crop = GST_BASE_TRANSFORM (ctx.crop);
+ klass = GST_BASE_TRANSFORM_GET_CLASS (ctx.crop);
+ fail_unless (klass != NULL);
+
+ caps = gst_caps_new_simple ("video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),
+ "framerate", GST_TYPE_FRACTION, 1, 1,
+ "width", G_TYPE_INT, 200, "height", G_TYPE_INT, 100, NULL);
+
+ /* by default, it should be no cropping and hence passthrough */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_is_equal (adj_caps, caps));
+ gst_caps_unref (adj_caps);
+
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_is_equal (adj_caps, caps));
+ gst_caps_unref (adj_caps);
+
+ /* make sure that's still true after changing properties back and forth */
+ g_object_set (ctx.crop, "left", 1, "right", 3, "top", 5, "bottom", 7, NULL);
+ g_object_set (ctx.crop, "left", 0, "right", 0, "top", 0, "bottom", 0, NULL);
+
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_is_equal (adj_caps, caps));
+ gst_caps_unref (adj_caps);
+
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_is_equal (adj_caps, caps));
+ gst_caps_unref (adj_caps);
+
+ /* now check adjustments made ... */
+ g_object_set (ctx.crop, "left", 1, "right", 3, "top", 5, "bottom", 7, NULL);
+
+ /* ========= (1) fixed value ============================================= */
+
+ /* sink => source, source must be bigger if we crop stuff off */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (G_VALUE_HOLDS_INT (w_val));
+ fail_unless_equals_int (g_value_get_int (w_val), 200 + (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (G_VALUE_HOLDS_INT (h_val));
+ fail_unless_equals_int (g_value_get_int (h_val), 100 + (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* source => sink becomes smaller */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (G_VALUE_HOLDS_INT (w_val));
+ fail_unless_equals_int (g_value_get_int (w_val), 200 - (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (G_VALUE_HOLDS_INT (h_val));
+ fail_unless_equals_int (g_value_get_int (h_val), 100 - (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* ========= (2) range (simple adjustment) =============================== */
+
+ gst_structure_set (gst_caps_get_structure (caps, 0),
+ "width", GST_TYPE_INT_RANGE, 1000, 2000,
+ "height", GST_TYPE_INT_RANGE, 3000, 4000, NULL);
+
+ /* sink => source, source must be bigger if we crop stuff off */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (w_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (w_val), 1000 + (1 + 3));
+ fail_unless_equals_int (gst_value_get_int_range_max (w_val), 2000 + (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (h_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (h_val), 3000 + (5 + 7));
+ fail_unless_equals_int (gst_value_get_int_range_max (h_val), 4000 + (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* source => sink becomes smaller */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (w_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (w_val), 1000 - (1 + 3));
+ fail_unless_equals_int (gst_value_get_int_range_max (w_val), 2000 - (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (h_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (h_val), 3000 - (5 + 7));
+ fail_unless_equals_int (gst_value_get_int_range_max (h_val), 4000 - (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* ========= (3) range (adjustment at boundary) ========================== */
+
+ gst_structure_set (gst_caps_get_structure (caps, 0),
+ "width", GST_TYPE_INT_RANGE, 2, G_MAXINT,
+ "height", GST_TYPE_INT_RANGE, 2, G_MAXINT, NULL);
+
+ /* sink => source, source must be bigger if we crop stuff off */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (w_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (w_val), 2 + (1 + 3));
+ fail_unless_equals_int (gst_value_get_int_range_max (w_val), G_MAXINT);
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (h_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (h_val), 2 + (5 + 7));
+ fail_unless_equals_int (gst_value_get_int_range_max (h_val), G_MAXINT);
+ gst_caps_unref (adj_caps);
+
+ /* source => sink becomes smaller */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (w_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (w_val), 1);
+ fail_unless_equals_int (gst_value_get_int_range_max (w_val),
+ G_MAXINT - (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_INT_RANGE (h_val));
+ fail_unless_equals_int (gst_value_get_int_range_min (h_val), 1);
+ fail_unless_equals_int (gst_value_get_int_range_max (h_val),
+ G_MAXINT - (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* ========= (4) list of values ========================================== */
+
+ {
+ GValue list = { 0, };
+ GValue ival = { 0, };
+
+ g_value_init (&ival, G_TYPE_INT);
+ g_value_init (&list, GST_TYPE_LIST);
+ g_value_set_int (&ival, 2);
+ gst_value_list_append_value (&list, &ival);
+ g_value_set_int (&ival, G_MAXINT);
+ gst_value_list_append_value (&list, &ival);
+ gst_structure_set_value (gst_caps_get_structure (caps, 0), "width", &list);
+ g_value_unset (&list);
+ g_value_unset (&ival);
+
+ g_value_init (&ival, G_TYPE_INT);
+ g_value_init (&list, GST_TYPE_LIST);
+ g_value_set_int (&ival, 5);
+ gst_value_list_append_value (&list, &ival);
+ g_value_set_int (&ival, 1000);
+ gst_value_list_append_value (&list, &ival);
+ gst_structure_set_value (gst_caps_get_structure (caps, 0), "height", &list);
+ g_value_unset (&list);
+ g_value_unset (&ival);
+ }
+
+ /* sink => source, source must be bigger if we crop stuff off */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SRC, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_LIST (w_val));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (w_val, 0),
+ 2 + (1 + 3));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (w_val, 1), G_MAXINT);
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_LIST (h_val));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (h_val, 0),
+ 5 + (5 + 7));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (h_val, 1),
+ 1000 + (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ /* source => sink becomes smaller */
+ adj_caps = klass->transform_caps (crop, GST_PAD_SINK, caps);
+ fail_unless (adj_caps != NULL);
+ fail_unless (gst_caps_get_size (adj_caps) == 1);
+ w_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "width");
+ fail_unless (w_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_LIST (w_val));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (w_val, 0), 1);
+ fail_unless_equals_int (notgst_value_list_get_nth_int (w_val, 1),
+ G_MAXINT - (1 + 3));
+ h_val =
+ gst_structure_get_value (gst_caps_get_structure (adj_caps, 0), "height");
+ fail_unless (h_val != NULL);
+ fail_unless (GST_VALUE_HOLDS_LIST (h_val));
+ fail_unless_equals_int (notgst_value_list_get_nth_int (h_val, 0), 1);
+ fail_unless_equals_int (notgst_value_list_get_nth_int (h_val, 1),
+ 1000 - (5 + 7));
+ gst_caps_unref (adj_caps);
+
+ gst_caps_unref (caps);
+ videocrop_test_cropping_deinit_context (&ctx);
+}
+
+GST_END_TEST;
+
+static Suite *
+videocrop_suite (void)
+{
+ Suite *s = suite_create ("videocrop");
+ TCase *tc_chain = tcase_create ("general");
+
+#ifdef HAVE_VALGRIND
+ if (RUNNING_ON_VALGRIND) {
+ /* our tests take quite a long time, so increase
+ * timeout (~25 minutes on my 1.6GHz AMD K7) */
+ tcase_set_timeout (tc_chain, 30 * 60);
+ } else
+#endif
+ {
+ /* increase timeout, these tests take a long time (60 secs here) */
+ tcase_set_timeout (tc_chain, 2 * 60);
+ }
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_crop_to_1x1);
+ tcase_add_test (tc_chain, test_caps_transform);
+ tcase_add_test (tc_chain, test_passthrough);
+ tcase_add_test (tc_chain, test_unit_sizes);
+ tcase_add_loop_test (tc_chain, test_cropping, 0, 25);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = videocrop_suite ();
+ SRunner *sr = srunner_create (s);
+
+#ifdef HAVE_VALGRIND
+ if (RUNNING_ON_VALGRIND) {
+ /* otherwise valgrind errors out when liboil probes CPU extensions
+ * in oil_init() during which it causes SIGILLs etc. to be fired */
+ g_setenv ("OIL_CPU_FLAGS", "0", 0);
+ }
+#endif
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/videofilter.c b/tests/check/elements/videofilter.c
new file mode 100644
index 0000000..7389478
--- /dev/null
+++ b/tests/check/elements/videofilter.c
@@ -0,0 +1,237 @@
+/* GStreamer
+ *
+ * unit test for videofilter elements
+ *
+ * Copyright (C) <2006> Mark Nauwelaerts <manauw@skynet.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+#include <stdarg.h>
+
+#include <gst/video/video.h>
+#include <gst/check/gstcheck.h>
+
+gboolean have_eos = FALSE;
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+GstPad *mysrcpad, *mysinkpad;
+
+#define VIDEO_CAPS_TEMPLATE_STRING \
+ GST_VIDEO_CAPS_YUV ("I420") ";" \
+ GST_VIDEO_CAPS_YUV ("AYUV") ";" \
+ GST_VIDEO_CAPS_YUV ("YUY2") ";" \
+ GST_VIDEO_CAPS_YUV ("UYVY") ";" \
+ GST_VIDEO_CAPS_YUV ("YVYU") ";" \
+ GST_VIDEO_CAPS_xRGB
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_TEMPLATE_STRING)
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_TEMPLATE_STRING)
+ );
+
+/* takes over reference for outcaps */
+static GstElement *
+setup_filter (const gchar * name, const gchar * prop, va_list var_args)
+{
+ GstElement *element;
+
+ GST_DEBUG ("setup_element");
+ element = gst_check_setup_element (name);
+ g_object_set_valist (G_OBJECT (element), prop, var_args);
+ mysrcpad = gst_check_setup_src_pad (element, &srctemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ mysinkpad = gst_check_setup_sink_pad (element, &sinktemplate, NULL);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return element;
+}
+
+static void
+cleanup_filter (GstElement * filter)
+{
+ GST_DEBUG ("cleanup_element");
+
+ gst_check_teardown_src_pad (filter);
+ gst_check_teardown_sink_pad (filter);
+ gst_check_teardown_element (filter);
+}
+
+static void
+check_filter_caps (const gchar * name, GstCaps * caps, gint size,
+ gint num_buffers, const gchar * prop, va_list varargs)
+{
+ GstElement *filter;
+ GstBuffer *inbuffer, *outbuffer;
+ gint i;
+
+ filter = setup_filter (name, prop, varargs);
+ fail_unless (gst_element_set_state (filter,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ for (i = 0; i < num_buffers; ++i) {
+ inbuffer = gst_buffer_new_and_alloc (size);
+ /* makes valgrind's memcheck happier */
+ memset (GST_BUFFER_DATA (inbuffer), 0, GST_BUFFER_SIZE (inbuffer));
+ gst_buffer_set_caps (inbuffer, caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+ }
+
+ fail_unless (g_list_length (buffers) == num_buffers);
+
+ /* clean up buffers */
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+
+ switch (i) {
+ case 0:
+ fail_unless (GST_BUFFER_SIZE (outbuffer) == size);
+ /* no check on filter operation itself */
+ break;
+ default:
+ break;
+ }
+ buffers = g_list_remove (buffers, outbuffer);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ cleanup_filter (filter);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+static void
+check_filter (const gchar * name, gint num_buffers, const gchar * prop, ...)
+{
+ static const struct
+ {
+ const int width, height;
+ } resolutions[] = { {
+ 384, 288}, {
+ 385, 289}, {
+ 385, 385}};
+ gint i, n, r;
+ GstVideoFormat format;
+ gint size;
+ GstCaps *templ = gst_caps_from_string (VIDEO_CAPS_TEMPLATE_STRING);
+ va_list varargs;
+
+ n = gst_caps_get_size (templ);
+
+ for (i = 0; i < n; i++) {
+ GstStructure *s = gst_caps_get_structure (templ, i);
+ GstCaps *caps = gst_caps_new_empty ();
+
+ gst_caps_append_structure (caps, gst_structure_copy (s));
+
+ /* try various resolutions */
+ for (r = 0; r < G_N_ELEMENTS (resolutions); ++r) {
+ caps = gst_caps_make_writable (caps);
+ gst_caps_set_simple (caps, "width", G_TYPE_INT, resolutions[r].width,
+ "height", G_TYPE_INT, resolutions[r].height,
+ "framerate", GST_TYPE_FRACTION, 25, 1, NULL);
+
+ GST_DEBUG ("Testing with caps: %" GST_PTR_FORMAT, caps);
+ gst_video_format_parse_caps (caps, &format, NULL, NULL);
+ size = gst_video_format_get_size (format, resolutions[r].width,
+ resolutions[r].height);
+
+ va_start (varargs, prop);
+ check_filter_caps (name, caps, size, num_buffers, prop, varargs);
+ va_end (varargs);
+ }
+
+ gst_caps_unref (caps);
+ }
+
+ gst_caps_unref (templ);
+}
+
+GST_START_TEST (test_videobalance)
+{
+ check_filter ("videobalance", 2, NULL);
+ check_filter ("videobalance", 2, "saturation", 0.5, "hue", 0.8, NULL);
+}
+
+GST_END_TEST;
+
+
+GST_START_TEST (test_videoflip)
+{
+ /* these we can handle with the caps */
+ check_filter ("videoflip", 2, "method", 0, NULL);
+ check_filter ("videoflip", 2, "method", 2, NULL);
+ check_filter ("videoflip", 2, "method", 4, NULL);
+ check_filter ("videoflip", 2, "method", 5, NULL);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_gamma)
+{
+ check_filter ("gamma", 2, NULL);
+ check_filter ("gamma", 2, "gamma", 2.0, NULL);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+videofilter_suite (void)
+{
+ Suite *s = suite_create ("videofilter");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_videobalance);
+ tcase_add_test (tc_chain, test_videoflip);
+ tcase_add_test (tc_chain, test_gamma);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = videofilter_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/wavpackdec.c b/tests/check/elements/wavpackdec.c
new file mode 100644
index 0000000..0d17323
--- /dev/null
+++ b/tests/check/elements/wavpackdec.c
@@ -0,0 +1,257 @@
+/* GStreamer
+ *
+ * unit test for wavpackdec
+ *
+ * Copyright (c) 2006 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+guint8 test_frame[] = {
+ 0x77, 0x76, 0x70, 0x6B, /* "wvpk" */
+ 0x2E, 0x00, 0x00, 0x00, /* ckSize */
+ 0x04, 0x04, /* version */
+ 0x00, /* track_no */
+ 0x00, /* index_no */
+ 0x00, 0x64, 0x00, 0x00, /* total_samples */
+ 0x00, 0x00, 0x00, 0x00, /* block_index */
+ 0x00, 0x64, 0x00, 0x00, /* block_samples */
+ 0x05, 0x18, 0x80, 0x04, /* flags */
+ 0xFF, 0xAF, 0x80, 0x60, /* crc */
+ 0x02, 0x00, 0x03, 0x00, /* data */
+ 0x04, 0x00, 0x05, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x8A, 0x02,
+ 0x00, 0x00, 0xFF, 0x7F,
+ 0x00, 0xE4,
+};
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "width = (int) 32, "
+ "depth = (int) 16, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "signed = (boolean) true")
+ );
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-wavpack, "
+ "width = (int) 16, "
+ "channels = (int) 1, " "rate = (int) 44100, " "framed = (boolean) true")
+ );
+
+static GstElement *
+setup_wavpackdec (void)
+{
+ GstElement *wavpackdec;
+
+ GST_DEBUG ("setup_wavpackdec");
+ wavpackdec = gst_check_setup_element ("wavpackdec");
+ mysrcpad = gst_check_setup_src_pad (wavpackdec, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (wavpackdec, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return wavpackdec;
+}
+
+static void
+cleanup_wavpackdec (GstElement * wavpackdec)
+{
+ GST_DEBUG ("cleanup_wavpackdec");
+ gst_element_set_state (wavpackdec, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (wavpackdec);
+ gst_check_teardown_sink_pad (wavpackdec);
+ gst_check_teardown_element (wavpackdec);
+}
+
+GST_START_TEST (test_decode_frame)
+{
+ GstElement *wavpackdec;
+ GstBuffer *inbuffer, *outbuffer;
+ GstBus *bus;
+ int i;
+
+ wavpackdec = setup_wavpackdec ();
+
+ fail_unless (gst_element_set_state (wavpackdec,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ bus = gst_bus_new ();
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (test_frame));
+ memcpy (GST_BUFFER_DATA (inbuffer), test_frame, sizeof (test_frame));
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ gst_buffer_ref (inbuffer);
+
+ gst_element_set_bus (wavpackdec, bus);
+
+ /* should decode the buffer without problems */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_unref (inbuffer);
+
+ outbuffer = GST_BUFFER (buffers->data);
+
+ fail_if (outbuffer == NULL);
+ /* uncompressed data should be 102400 bytes */
+ fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), 102400);
+
+ /* and all 102400 bytes must be 0, i.e. silence */
+ for (i = 0; i < 102400; i++)
+ fail_unless_equals_int (GST_BUFFER_DATA (outbuffer)[i], 0);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_element_set_bus (wavpackdec, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+ cleanup_wavpackdec (wavpackdec);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_decode_frame_with_broken_header)
+{
+ GstElement *wavpackdec;
+ GstBuffer *inbuffer;
+ GstBus *bus;
+ GstMessage *message;
+
+ wavpackdec = setup_wavpackdec ();
+
+ fail_unless (gst_element_set_state (wavpackdec,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ bus = gst_bus_new ();
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (test_frame));
+ memcpy (GST_BUFFER_DATA (inbuffer), test_frame, sizeof (test_frame));
+ /* break header */
+ GST_BUFFER_DATA (inbuffer)[2] = 'e';
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ gst_buffer_ref (inbuffer);
+
+ gst_element_set_bus (wavpackdec, bus);
+
+ /* should fail gracefully */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_ERROR);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_unref (inbuffer);
+
+ fail_if ((message = gst_bus_pop (bus)) == NULL);
+ fail_unless_message_error (message, STREAM, DECODE);
+ gst_message_unref (message);
+
+ gst_element_set_bus (wavpackdec, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+ cleanup_wavpackdec (wavpackdec);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_decode_frame_with_incomplete_frame)
+{
+ GstElement *wavpackdec;
+ GstBuffer *inbuffer;
+ GstBus *bus;
+ GstMessage *message;
+
+ wavpackdec = setup_wavpackdec ();
+
+ fail_unless (gst_element_set_state (wavpackdec,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ bus = gst_bus_new ();
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (test_frame) - 2);
+ memcpy (GST_BUFFER_DATA (inbuffer), test_frame, sizeof (test_frame) - 2);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ gst_buffer_ref (inbuffer);
+
+ gst_element_set_bus (wavpackdec, bus);
+
+ /* should fail gracefully */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_ERROR);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_unref (inbuffer);
+
+ fail_if ((message = gst_bus_pop (bus)) == NULL);
+ fail_unless_message_error (message, STREAM, DECODE);
+ gst_message_unref (message);
+
+
+ gst_element_set_bus (wavpackdec, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+ cleanup_wavpackdec (wavpackdec);
+}
+
+GST_END_TEST;
+
+static Suite *
+wavpackdec_suite (void)
+{
+ Suite *s = suite_create ("wavpackdec");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_decode_frame);
+ tcase_add_test (tc_chain, test_decode_frame_with_broken_header);
+ tcase_add_test (tc_chain, test_decode_frame_with_incomplete_frame);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = wavpackdec_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/wavpackenc.c b/tests/check/elements/wavpackenc.c
new file mode 100644
index 0000000..153668a
--- /dev/null
+++ b/tests/check/elements/wavpackenc.c
@@ -0,0 +1,192 @@
+/* GStreamer
+ *
+ * unit test for wavpackenc
+ *
+ * Copyright (c) 2006 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+static GstBus *bus;
+
+#define RAW_CAPS_STRING "audio/x-raw-int, " \
+ "width = (int) 32, " \
+ "depth = (int) 16, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "endianness = (int) BYTE_ORDER, " \
+ "signed = (boolean) true"
+
+#define WAVPACK_CAPS_STRING "audio/x-wavpack, " \
+ "width = (int) 16, " \
+ "channels = (int) 1, " \
+ "rate = (int) 44100, " \
+ "framed = (boolean) true"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-wavpack, "
+ "width = (int) 16, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, " "framed = (boolean) true"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "width = (int) 32, "
+ "depth = (int) 16, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, "
+ "endianness = (int) BYTE_ORDER, " "signed = (boolean) true"));
+
+static GstElement *
+setup_wavpackenc (void)
+{
+ GstElement *wavpackenc;
+
+ GST_DEBUG ("setup_wavpackenc");
+ wavpackenc = gst_check_setup_element ("wavpackenc");
+ mysrcpad = gst_check_setup_src_pad (wavpackenc, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (wavpackenc, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ fail_unless (gst_element_set_state (wavpackenc,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+ bus = gst_bus_new ();
+
+ return wavpackenc;
+}
+
+static void
+cleanup_wavpackenc (GstElement * wavpackenc)
+{
+ GST_DEBUG ("cleanup_wavpackenc");
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_element_set_bus (wavpackenc, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+
+ gst_element_set_state (wavpackenc, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (wavpackenc);
+ gst_check_teardown_sink_pad (wavpackenc);
+ gst_check_teardown_element (wavpackenc);
+}
+
+GST_START_TEST (test_encode_silence)
+{
+ GstElement *wavpackenc;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ GstEvent *eos = gst_event_new_eos ();
+ int i, num_buffers;
+
+ wavpackenc = setup_wavpackenc ();
+
+ inbuffer = gst_buffer_new_and_alloc (1000);
+ for (i = 0; i < 1000; i++)
+ GST_BUFFER_DATA (inbuffer)[i] = 0;
+ caps = gst_caps_from_string (RAW_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_ref (inbuffer);
+
+ gst_element_set_bus (wavpackenc, bus);
+
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ gst_buffer_unref (inbuffer);
+
+ fail_if (gst_pad_push_event (mysrcpad, eos) != TRUE);
+
+ /* check first buffer */
+ outbuffer = GST_BUFFER (buffers->data);
+
+ fail_if (outbuffer == NULL);
+
+ fail_unless_equals_int (GST_BUFFER_TIMESTAMP (outbuffer), 0);
+ fail_unless_equals_int (GST_BUFFER_OFFSET (outbuffer), 0);
+ fail_unless_equals_int (GST_BUFFER_DURATION (outbuffer), 5668934);
+ fail_unless_equals_int (GST_BUFFER_OFFSET_END (outbuffer), 250);
+
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), "wvpk", 4) == 0,
+ "Failed to encode to valid Wavpack frames");
+
+ /* free all buffers */
+ num_buffers = g_list_length (buffers);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+
+ buffers = g_list_remove (buffers, outbuffer);
+
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_wavpackenc (wavpackenc);
+}
+
+GST_END_TEST;
+
+static Suite *
+wavpackenc_suite (void)
+{
+ Suite *s = suite_create ("wavpackenc");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_encode_silence);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = wavpackenc_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/wavpackparse.c b/tests/check/elements/wavpackparse.c
new file mode 100644
index 0000000..5083903
--- /dev/null
+++ b/tests/check/elements/wavpackparse.c
@@ -0,0 +1,293 @@
+/* GStreamer
+ *
+ * unit test for wavpackparse
+ *
+ * Copyright (c) 2006 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+static GstBus *bus;
+static GstElement *wavpackparse;
+
+/* Wavpack file with 2 frames of silence */
+guint8 test_file[] = {
+ 0x77, 0x76, 0x70, 0x6B, 0x62, 0x00, 0x00, 0x00, /* first frame */
+ 0x04, 0x04, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x00, /* include RIFF header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
+ 0x05, 0x18, 0x80, 0x04, 0xFF, 0xAF, 0x80, 0x60,
+ 0x21, 0x16, 0x52, 0x49, 0x46, 0x46, 0x24, 0x90,
+ 0x01, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D,
+ 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x44, 0xAC, 0x00, 0x00, 0x88, 0x58,
+ 0x01, 0x00, 0x02, 0x00, 0x10, 0x00, 0x64, 0x61,
+ 0x74, 0x61, 0x00, 0x90, 0x01, 0x00, 0x02, 0x00,
+ 0x03, 0x00, 0x04, 0x00, 0x05, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x65, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x8A, 0x02, 0x00, 0x00, 0xFF, 0x7F,
+ 0x00, 0xE4,
+ 0x77, 0x76, 0x70, 0x6B, 0x2E, 0x00, 0x00, 0x00, /* second frame */
+ 0x04, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
+ 0x05, 0x18, 0x80, 0x04, 0xFF, 0xAF, 0x80, 0x60,
+ 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x02,
+ 0x00, 0x00, 0xFF, 0x7F, 0x00, 0xE4,
+};
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-wavpack, "
+ "width = (int) 16, "
+ "channels = (int) 1, "
+ "rate = (int) 44100, " "framed = (boolean) TRUE"));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/x-wavpack"));
+
+static void
+wavpackparse_found_pad (GstElement * src, GstPad * pad, gpointer data)
+{
+ GstPad *srcpad;
+
+ mysinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
+ fail_if (mysinkpad == NULL, "Couldn't create sinkpad");
+ srcpad = gst_element_get_static_pad (wavpackparse, "src");
+ fail_if (srcpad == NULL, "Failed to get srcpad from wavpackparse");
+ gst_pad_set_chain_function (mysinkpad, gst_check_chain_func);
+ fail_unless (gst_pad_link (srcpad, mysinkpad) == GST_PAD_LINK_OK,
+ "Failed to link pads");
+ gst_pad_set_active (mysinkpad, TRUE);
+ gst_object_unref (srcpad);
+}
+
+static void
+setup_wavpackparse (void)
+{
+ GstPad *sinkpad;
+
+ GST_DEBUG ("setup_wavpackparse");
+
+ wavpackparse = gst_element_factory_make ("wavpackparse", "wavpackparse");
+ fail_if (wavpackparse == NULL, "Could not create wavpackparse");
+
+ mysrcpad = gst_pad_new_from_static_template (&srctemplate, "src");
+ fail_if (mysrcpad == NULL, "Could not create srcpad");
+
+ sinkpad = gst_element_get_static_pad (wavpackparse, "sink");
+ fail_if (sinkpad == NULL, "Failed to get sinkpad from wavpackparse");
+ fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Failed to link pads");
+ gst_object_unref (sinkpad);
+
+ g_signal_connect (wavpackparse, "pad-added",
+ G_CALLBACK (wavpackparse_found_pad), NULL);
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (wavpackparse, bus);
+
+ fail_unless (gst_element_set_state (wavpackparse,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+}
+
+static void
+cleanup_wavpackparse (void)
+{
+ GstPad *sinkpad, *srcpad;
+
+ GST_DEBUG ("cleanup_wavpackparse");
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_element_set_bus (wavpackparse, NULL);
+ gst_object_unref (GST_OBJECT (bus));
+
+ sinkpad = gst_element_get_static_pad (wavpackparse, "sink");
+ fail_if (sinkpad == NULL, "Failed to get sinkpad from wavpackparse");
+ fail_unless (gst_pad_unlink (mysrcpad, sinkpad), "Failed to unlink pads");
+ gst_pad_set_caps (mysrcpad, NULL);
+ gst_object_unref (sinkpad);
+ gst_object_unref (mysrcpad);
+
+ srcpad = gst_element_get_static_pad (wavpackparse, "src");
+ fail_if (srcpad == NULL, "Failed to get srcpad from wavpackparse");
+ fail_unless (gst_pad_unlink (srcpad, mysinkpad), "Failed to unlink pads");
+ gst_pad_set_caps (mysinkpad, NULL);
+ gst_object_unref (srcpad);
+ gst_object_unref (mysinkpad);
+
+ fail_unless (gst_element_set_state (wavpackparse, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_SUCCESS, "could not set to null");
+
+ gst_object_unref (wavpackparse);
+}
+
+GST_START_TEST (test_parsing_valid_frames)
+{
+ GstBuffer *inbuffer, *outbuffer;
+ int i, num_buffers;
+ GstFormat format = GST_FORMAT_DEFAULT;
+ gint64 pos;
+
+ setup_wavpackparse ();
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (test_file));
+ memcpy (GST_BUFFER_DATA (inbuffer), test_file, sizeof (test_file));
+ gst_buffer_ref (inbuffer);
+
+ /* should decode the buffer without problems */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ gst_buffer_unref (inbuffer);
+
+ num_buffers = g_list_length (buffers);
+ /* should get 2 buffers, each one complete wavpack frame */
+ fail_unless_equals_int (num_buffers, 2);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), "wvpk", 4) == 0,
+ "Buffer contains no Wavpack frame");
+ fail_unless_equals_int (GST_BUFFER_DURATION (outbuffer), 580498866);
+
+ switch (i) {
+ case 0:{
+ fail_unless_equals_int (GST_BUFFER_TIMESTAMP (outbuffer), 0);
+ fail_unless_equals_int (GST_BUFFER_OFFSET (outbuffer), 0);
+ fail_unless_equals_int (GST_BUFFER_OFFSET_END (outbuffer), 25600);
+ break;
+ }
+ case 1:{
+ fail_unless_equals_int (GST_BUFFER_TIMESTAMP (outbuffer), 580498866);
+ fail_unless_equals_int (GST_BUFFER_OFFSET (outbuffer), 25600);
+ fail_unless_equals_int (GST_BUFFER_OFFSET_END (outbuffer), 51200);
+ break;
+ }
+ }
+
+ buffers = g_list_remove (buffers, outbuffer);
+
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ fail_unless (gst_element_query_position (wavpackparse, &format, &pos),
+ "Position query failed");
+ fail_unless_equals_int (pos, 51200);
+ fail_unless (gst_element_query_duration (wavpackparse, &format, NULL),
+ "Duration query failed");
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_wavpackparse ();
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_parsing_invalid_first_header)
+{
+ GstBuffer *inbuffer, *outbuffer;
+ int i, num_buffers;
+
+ setup_wavpackparse ();
+
+ inbuffer = gst_buffer_new_and_alloc (sizeof (test_file));
+ memcpy (GST_BUFFER_DATA (inbuffer), test_file, sizeof (test_file));
+ GST_BUFFER_DATA (inbuffer)[0] = 'k';
+ gst_buffer_ref (inbuffer);
+
+ /* should decode the buffer without problems */
+ fail_unless_equals_int (gst_pad_push (mysrcpad, inbuffer), GST_FLOW_OK);
+ gst_buffer_unref (inbuffer);
+
+ num_buffers = g_list_length (buffers);
+
+ /* should get 1 buffers, the second non-broken one */
+ fail_unless_equals_int (num_buffers, 1);
+
+ for (i = 0; i < num_buffers; ++i) {
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+
+ fail_unless (memcmp (GST_BUFFER_DATA (outbuffer), "wvpk", 4) == 0,
+ "Buffer contains no Wavpack frame");
+ fail_unless_equals_int (GST_BUFFER_DURATION (outbuffer), 580498866);
+
+ switch (i) {
+ case 0:{
+ fail_unless_equals_int (GST_BUFFER_TIMESTAMP (outbuffer), 580498866);
+ fail_unless_equals_int (GST_BUFFER_OFFSET (outbuffer), 25600);
+ break;
+ }
+ }
+
+ buffers = g_list_remove (buffers, outbuffer);
+
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ g_list_free (buffers);
+ buffers = NULL;
+
+ cleanup_wavpackparse ();
+}
+
+GST_END_TEST;
+
+
+static Suite *
+wavpackparse_suite (void)
+{
+ Suite *s = suite_create ("wavpackparse");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_parsing_valid_frames);
+ tcase_add_test (tc_chain, test_parsing_invalid_first_header);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = wavpackparse_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/elements/y4menc.c b/tests/check/elements/y4menc.c
new file mode 100644
index 0000000..3b7c9b4
--- /dev/null
+++ b/tests/check/elements/y4menc.c
@@ -0,0 +1,179 @@
+/* GStreamer
+ *
+ * unit test for y4menc
+ *
+ * Copyright (C) <2006> Mark Nauwelaerts <manauw@skynet.be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+/* For ease of programming we use globals to keep refs for our floating
+ * src and sink pads we create; otherwise we always have to do get_pad,
+ * get_peer, and then remove references in every test function */
+static GstPad *mysrcpad, *mysinkpad;
+
+#define VIDEO_CAPS_STRING "video/x-raw-yuv, " \
+ "format = (fourcc) I420, "\
+ "width = (int) 384, " \
+ "height = (int) 288, " \
+ "framerate = (fraction) 25/1, " \
+ "pixel-aspect-ratio = (fraction) 1/1"
+
+#define Y4M_CAPS_STRING "application/x-yuv4mpeg, " \
+ "y4mversion = (int) 2"
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (Y4M_CAPS_STRING));
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS (VIDEO_CAPS_STRING));
+
+
+static GstElement *
+setup_y4menc (void)
+{
+ GstElement *y4menc;
+
+ GST_DEBUG ("setup_y4menc");
+ y4menc = gst_check_setup_element ("y4menc");
+ mysrcpad = gst_check_setup_src_pad (y4menc, &srctemplate, NULL);
+ mysinkpad = gst_check_setup_sink_pad (y4menc, &sinktemplate, NULL);
+ gst_pad_set_active (mysrcpad, TRUE);
+ gst_pad_set_active (mysinkpad, TRUE);
+
+ return y4menc;
+}
+
+static void
+cleanup_y4menc (GstElement * y4menc)
+{
+ GST_DEBUG ("cleanup_y4menc");
+ gst_element_set_state (y4menc, GST_STATE_NULL);
+
+ gst_pad_set_active (mysrcpad, FALSE);
+ gst_pad_set_active (mysinkpad, FALSE);
+ gst_check_teardown_src_pad (y4menc);
+ gst_check_teardown_sink_pad (y4menc);
+ gst_check_teardown_element (y4menc);
+}
+
+GST_START_TEST (test_y4m)
+{
+ GstElement *y4menc;
+ GstBuffer *inbuffer, *outbuffer;
+ GstCaps *caps;
+ int i, num_buffers, size;
+ const gchar *data0 = "YUV4MPEG2 W384 H288 Ip F25:1 A1:1\n";
+ const gchar *data1 = "YUV4MPEG2 C420 W384 H288 Ip F25:1 A1:1\n";
+ const gchar *data2 = "FRAME\n";
+
+ y4menc = setup_y4menc ();
+ fail_unless (gst_element_set_state (y4menc,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
+ "could not set to playing");
+
+ /* corresponds to I420 buffer for the size mentioned in the caps */
+ size = 384 * 288 * 3 / 2;
+ inbuffer = gst_buffer_new_and_alloc (size);
+ /* makes valgrind's memcheck happier */
+ memset (GST_BUFFER_DATA (inbuffer), 0, GST_BUFFER_SIZE (inbuffer));
+ caps = gst_caps_from_string (VIDEO_CAPS_STRING);
+ gst_buffer_set_caps (inbuffer, caps);
+ gst_caps_unref (caps);
+ GST_BUFFER_TIMESTAMP (inbuffer) = 0;
+ ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1);
+ fail_unless (gst_pad_push (mysrcpad, inbuffer) == GST_FLOW_OK);
+
+ num_buffers = g_list_length (buffers);
+ fail_unless (num_buffers == 1);
+
+ /* clean up buffers */
+ for (i = 0; i < num_buffers; ++i) {
+ gchar *data;
+
+ outbuffer = GST_BUFFER (buffers->data);
+ fail_if (outbuffer == NULL);
+
+ switch (i) {
+ case 0:
+ fail_unless (GST_BUFFER_SIZE (outbuffer) > size);
+ fail_unless (memcmp (data0, GST_BUFFER_DATA (outbuffer),
+ strlen (data0)) == 0 ||
+ memcmp (data1, GST_BUFFER_DATA (outbuffer), strlen (data1)) == 0);
+ /* so we know there is a newline */
+ data = (gchar *) GST_BUFFER_DATA (outbuffer);
+ data = strchr (data, '\n');
+ fail_unless (data != NULL);
+ data++;
+ fail_unless (memcmp (data2, data, strlen (data2)) == 0);
+ data += strlen (data2);
+ /* remainder must be frame data */
+ fail_unless ((data - (gchar *) GST_BUFFER_DATA (outbuffer)) + size ==
+ GST_BUFFER_SIZE (outbuffer));
+ break;
+ default:
+ break;
+ }
+ buffers = g_list_remove (buffers, outbuffer);
+
+ ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
+ gst_buffer_unref (outbuffer);
+ outbuffer = NULL;
+ }
+
+ cleanup_y4menc (y4menc);
+ g_list_free (buffers);
+ buffers = NULL;
+}
+
+GST_END_TEST;
+
+static Suite *
+y4menc_suite (void)
+{
+ Suite *s = suite_create ("y4menc");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_y4m);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = y4menc_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/generic/index.c b/tests/check/generic/index.c
new file mode 100644
index 0000000..e733c6d
--- /dev/null
+++ b/tests/check/generic/index.c
@@ -0,0 +1,140 @@
+/* GStreamer
+ * unit test for index setting on all elements
+ * Copyright (C) 2005 Thomas Vander Stichele <thomas at apestaart dot org>
+ * Copyright (C) 2011 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/check/gstcheck.h>
+
+static GList *elements = NULL;
+
+static void
+setup (void)
+{
+ GList *features, *f;
+ GList *plugins, *p;
+ gchar **ignorelist = NULL;
+ const gchar *INDEX_IGNORE_ELEMENTS = NULL;
+
+ GST_DEBUG ("getting elements for package %s", PACKAGE);
+ INDEX_IGNORE_ELEMENTS = g_getenv ("GST_INDEX_IGNORE_ELEMENTS");
+ if (!g_getenv ("GST_NO_INDEX_IGNORE_ELEMENTS") && INDEX_IGNORE_ELEMENTS) {
+ GST_DEBUG ("Will ignore element factories: '%s'", INDEX_IGNORE_ELEMENTS);
+ ignorelist = g_strsplit (INDEX_IGNORE_ELEMENTS, " ", 0);
+ }
+
+ plugins = gst_registry_get_plugin_list (gst_registry_get_default ());
+
+ for (p = plugins; p; p = p->next) {
+ GstPlugin *plugin = p->data;
+
+ if (strcmp (gst_plugin_get_source (plugin), PACKAGE) != 0)
+ continue;
+
+ features =
+ gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+ gst_plugin_get_name (plugin));
+
+ for (f = features; f; f = f->next) {
+ GstPluginFeature *feature = f->data;
+ const gchar *name = gst_plugin_feature_get_name (feature);
+ gboolean ignore = FALSE;
+
+ if (!GST_IS_ELEMENT_FACTORY (feature))
+ continue;
+
+ if (ignorelist) {
+ gchar **s;
+
+ for (s = ignorelist; s && *s; ++s) {
+ if (g_str_has_prefix (name, *s)) {
+ GST_DEBUG ("ignoring element %s", name);
+ ignore = TRUE;
+ }
+ }
+ if (ignore)
+ continue;
+ }
+
+ GST_DEBUG ("adding element %s", name);
+ elements = g_list_prepend (elements, (gpointer) g_strdup (name));
+ }
+ gst_plugin_feature_list_free (features);
+ }
+ gst_plugin_list_free (plugins);
+ g_strfreev (ignorelist);
+}
+
+static void
+teardown (void)
+{
+ GList *e;
+
+ for (e = elements; e; e = e->next) {
+ g_free (e->data);
+ }
+ g_list_free (elements);
+ elements = NULL;
+}
+
+GST_START_TEST (test_set_index)
+{
+ GstElement *element;
+ GstIndex *idx;
+ GList *e;
+
+ idx = gst_index_factory_make ("memindex");
+ if (idx == NULL)
+ return;
+
+ gst_object_ref_sink (idx);
+
+ for (e = elements; e; e = e->next) {
+ const gchar *name = e->data;
+
+ GST_INFO ("testing element %s", name);
+ element = gst_element_factory_make (name, name);
+ fail_if (element == NULL, "Could not make element from factory %s", name);
+
+ gst_element_set_index (element, idx);
+ gst_object_unref (element);
+ }
+
+ gst_object_unref (idx);
+}
+
+GST_END_TEST;
+
+static Suite *
+index_suite (void)
+{
+ Suite *s = suite_create ("index");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_checked_fixture (tc_chain, setup, teardown);
+ tcase_add_test (tc_chain, test_set_index);
+
+ return s;
+}
+
+GST_CHECK_MAIN (index);
diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c
new file mode 100644
index 0000000..0f6d1da
--- /dev/null
+++ b/tests/check/generic/states.c
@@ -0,0 +1,222 @@
+/* GStreamer
+ *
+ * unit test for state changes on all elements
+ *
+ * Copyright (C) <2005> Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+
+static GList *elements = NULL;
+
+static void
+setup (void)
+{
+ GList *features, *f;
+ GList *plugins, *p;
+ gchar **ignorelist = NULL;
+ const gchar *STATE_IGNORE_ELEMENTS = NULL;
+
+ GST_DEBUG ("getting elements for package %s", PACKAGE);
+ STATE_IGNORE_ELEMENTS = g_getenv ("GST_STATE_IGNORE_ELEMENTS");
+ if (!g_getenv ("GST_NO_STATE_IGNORE_ELEMENTS") && STATE_IGNORE_ELEMENTS) {
+ GST_DEBUG ("Will ignore element factories: '%s'", STATE_IGNORE_ELEMENTS);
+ ignorelist = g_strsplit (STATE_IGNORE_ELEMENTS, " ", 0);
+ }
+
+ plugins = gst_registry_get_plugin_list (gst_registry_get_default ());
+
+ for (p = plugins; p; p = p->next) {
+ GstPlugin *plugin = p->data;
+
+ if (strcmp (gst_plugin_get_source (plugin), PACKAGE) != 0)
+ continue;
+
+ features =
+ gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
+ gst_plugin_get_name (plugin));
+
+ for (f = features; f; f = f->next) {
+ GstPluginFeature *feature = f->data;
+ const gchar *name = gst_plugin_feature_get_name (feature);
+ gboolean ignore = FALSE;
+
+ if (!GST_IS_ELEMENT_FACTORY (feature))
+ continue;
+
+ if (ignorelist) {
+ gchar **s;
+
+ for (s = ignorelist; s && *s; ++s) {
+ if (g_str_has_prefix (name, *s)) {
+ GST_DEBUG ("ignoring element %s", name);
+ ignore = TRUE;
+ }
+ }
+ if (ignore)
+ continue;
+ }
+
+ GST_DEBUG ("adding element %s", name);
+ elements = g_list_prepend (elements, (gpointer) g_strdup (name));
+ }
+ gst_plugin_feature_list_free (features);
+ }
+ gst_plugin_list_free (plugins);
+ g_strfreev (ignorelist);
+}
+
+static void
+teardown (void)
+{
+ GList *e;
+
+ for (e = elements; e; e = e->next) {
+ g_free (e->data);
+ }
+ g_list_free (elements);
+ elements = NULL;
+}
+
+
+GST_START_TEST (test_state_changes_up_and_down_seq)
+{
+ GstElement *element;
+ GList *e;
+
+ for (e = elements; e; e = e->next) {
+ const gchar *name = e->data;
+
+ GST_INFO ("testing element %s", name);
+ element = gst_element_factory_make (name, name);
+ fail_if (element == NULL, "Could not make element from factory %s", name);
+
+ if (GST_IS_PIPELINE (element)) {
+ GST_DEBUG ("element %s is a pipeline", name);
+ }
+
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_NULL);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (element));
+ }
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_state_changes_up_seq)
+{
+ GstElement *element;
+ GList *e;
+
+ for (e = elements; e; e = e->next) {
+ const gchar *name = e->data;
+
+ GST_INFO ("testing element %s", name);
+ element = gst_element_factory_make (name, name);
+ fail_if (element == NULL, "Could not make element from factory %s", name);
+
+ if (GST_IS_PIPELINE (element)) {
+ GST_DEBUG ("element %s is a pipeline", name);
+ }
+
+ gst_element_set_state (element, GST_STATE_READY);
+
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+
+ gst_element_set_state (element, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (element));
+ }
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_state_changes_down_seq)
+{
+ GstElement *element;
+ GList *e;
+
+ for (e = elements; e; e = e->next) {
+ const gchar *name = e->data;
+
+ GST_INFO ("testing element %s", name);
+ element = gst_element_factory_make (name, name);
+ fail_if (element == NULL, "Could not make element from factory %s", name);
+
+ if (GST_IS_PIPELINE (element)) {
+ GST_DEBUG ("element %s is a pipeline", name);
+ }
+
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_PLAYING);
+
+ gst_element_set_state (element, GST_STATE_PAUSED);
+ gst_element_set_state (element, GST_STATE_READY);
+ gst_element_set_state (element, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (element));
+ }
+}
+
+GST_END_TEST;
+
+
+static Suite *
+states_suite (void)
+{
+ Suite *s = suite_create ("states");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_checked_fixture (tc_chain, setup, teardown);
+ tcase_add_test (tc_chain, test_state_changes_up_and_down_seq);
+ tcase_add_test (tc_chain, test_state_changes_up_seq);
+ tcase_add_test (tc_chain, test_state_changes_down_seq);
+
+ return s;
+}
+
+GST_CHECK_MAIN (states);
diff --git a/tests/check/gst-plugins-good.supp b/tests/check/gst-plugins-good.supp
new file mode 100644
index 0000000..3e987e6
--- /dev/null
+++ b/tests/check/gst-plugins-good.supp
@@ -0,0 +1,127 @@
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_finish_decompress
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_consume_input
+ fun:jpeg_read_header
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ fun:jpeg_fill_bit_buffer
+ fun:jpeg_huff_decode
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_read_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ fun:jpeg_fill_bit_buffer
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_read_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_consume_input
+ fun:jpeg_read_header
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_finish_compress
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_finish_compress
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_finish_compress
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_write_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_write_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_write_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jpeg_write_raw_data
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jinit_compress_master
+ fun:jpeg_start_compress
+}
+
+{
+ <several valgrind warnings as found with libjpeg 6b on Debian>
+ Memcheck:Cond
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ obj:/usr/lib/libjpeg.so.*
+ fun:jinit_compress_master
+ fun:jpeg_start_compress
+}
diff --git a/tests/check/pipelines/effectv.c b/tests/check/pipelines/effectv.c
new file mode 100644
index 0000000..1e8d96f
--- /dev/null
+++ b/tests/check/pipelines/effectv.c
@@ -0,0 +1,146 @@
+/* GStreamer
+ *
+ * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <string.h>
+
+typedef struct
+{
+ GMainLoop *loop;
+ gboolean eos;
+} OnMessageUserData;
+
+static void
+on_message_cb (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ OnMessageUserData *d = user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ case GST_MESSAGE_WARNING:
+ g_assert_not_reached ();
+ break;
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (d->loop);
+ d->eos = TRUE;
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+run_test (const gchar * pipeline_string)
+{
+ GstElement *pipeline;
+ GstBus *bus;
+ GMainLoop *loop;
+ OnMessageUserData omud = { NULL, };
+ GstStateChangeReturn ret;
+
+ GST_DEBUG ("Testing pipeline '%s'", pipeline_string);
+
+ pipeline = gst_parse_launch (pipeline_string, NULL);
+ fail_unless (pipeline != NULL);
+ g_object_set (G_OBJECT (pipeline), "async-handling", TRUE, NULL);
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ gst_bus_add_signal_watch (bus);
+
+ omud.loop = loop;
+ omud.eos = FALSE;
+
+ g_signal_connect (bus, "message", (GCallback) on_message_cb, &omud);
+
+ gst_object_unref (bus);
+
+ ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS
+ || ret == GST_STATE_CHANGE_ASYNC);
+
+ g_main_loop_run (loop);
+
+ fail_unless (gst_element_set_state (pipeline,
+ GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS);
+
+ fail_unless (omud.eos == TRUE);
+
+ gst_object_unref (pipeline);
+ g_main_loop_unref (loop);
+}
+
+#define CREATE_TEST(element) \
+GST_START_TEST (test_##element) \
+{ \
+ gchar *pipeline; \
+ \
+ pipeline = g_strdup_printf ("videotestsrc num-buffers=100 ! " \
+ "ffmpegcolorspace ! " \
+ " %s ! " \
+ " fakesink", #element); \
+ \
+ run_test (pipeline); \
+ g_free (pipeline); \
+} \
+\
+GST_END_TEST;
+
+CREATE_TEST (agingtv);
+CREATE_TEST (dicetv);
+CREATE_TEST (edgetv);
+CREATE_TEST (optv);
+CREATE_TEST (quarktv);
+CREATE_TEST (radioactv);
+CREATE_TEST (revtv);
+CREATE_TEST (rippletv);
+CREATE_TEST (shagadelictv);
+CREATE_TEST (streaktv);
+CREATE_TEST (vertigotv);
+CREATE_TEST (warptv);
+
+static Suite *
+effectv_suite (void)
+{
+ Suite *s = suite_create ("effectv");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_set_timeout (tc_chain, 180);
+
+ tcase_add_test (tc_chain, test_agingtv);
+ tcase_add_test (tc_chain, test_dicetv);
+ tcase_add_test (tc_chain, test_edgetv);
+ tcase_add_test (tc_chain, test_optv);
+ tcase_add_test (tc_chain, test_quarktv);
+ tcase_add_test (tc_chain, test_radioactv);
+ tcase_add_test (tc_chain, test_revtv);
+ tcase_add_test (tc_chain, test_rippletv);
+ tcase_add_test (tc_chain, test_shagadelictv);
+ tcase_add_test (tc_chain, test_streaktv);
+ tcase_add_test (tc_chain, test_vertigotv);
+ tcase_add_test (tc_chain, test_warptv);
+
+ return s;
+}
+
+GST_CHECK_MAIN (effectv);
diff --git a/tests/check/pipelines/flacdec.c b/tests/check/pipelines/flacdec.c
new file mode 100644
index 0000000..ce8546e
--- /dev/null
+++ b/tests/check/pipelines/flacdec.c
@@ -0,0 +1,247 @@
+/* GStreamer
+ * Copyright (C) 2009 Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <glib/gstdio.h>
+
+static guint16
+buffer_get_first_sample (GstBuffer * buf)
+{
+ GstStructure *s;
+ gint w, d, c, r, e;
+
+ fail_unless (buf != NULL, "NULL buffer");
+ fail_unless (GST_BUFFER_CAPS (buf) != NULL, "buffer without caps");
+
+ /* log buffer details */
+ GST_DEBUG ("buffer with size=%u, caps=%" GST_PTR_FORMAT,
+ GST_BUFFER_SIZE (buf), GST_BUFFER_CAPS (buf));
+ GST_MEMDUMP ("buffer data from decoder", GST_BUFFER_DATA (buf),
+ GST_BUFFER_SIZE (buf));
+
+ /* make sure it's the format we expect */
+ s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0);
+ fail_unless_equals_string (gst_structure_get_name (s), "audio/x-raw-int");
+ fail_unless (gst_structure_get_int (s, "width", &w));
+ fail_unless_equals_int (w, 16);
+ fail_unless (gst_structure_get_int (s, "depth", &d));
+ fail_unless_equals_int (d, 16);
+ fail_unless (gst_structure_get_int (s, "rate", &r));
+ fail_unless_equals_int (r, 44100);
+ fail_unless (gst_structure_get_int (s, "channels", &c));
+ fail_unless_equals_int (c, 1);
+ fail_unless (gst_structure_get_int (s, "endianness", &e));
+ if (e == G_BIG_ENDIAN)
+ return GST_READ_UINT16_BE (GST_BUFFER_DATA (buf));
+ else
+ return GST_READ_UINT16_LE (GST_BUFFER_DATA (buf));
+}
+
+GST_START_TEST (test_decode)
+{
+ GstElement *pipeline;
+ GstElement *appsink;
+ GstBuffer *buffer = NULL;
+ guint16 first_sample = 0;
+ guint size = 0;
+ gchar *path =
+ g_build_filename (GST_TEST_FILES_PATH, "audiotestsrc.flac", NULL);
+ gchar *pipe_desc =
+ g_strdup_printf ("filesrc location=\"%s\" ! flacdec ! appsink name=sink",
+ path);
+
+ pipeline = gst_parse_launch (pipe_desc, NULL);
+ fail_unless (pipeline != NULL);
+
+ g_free (path);
+ g_free (pipe_desc);
+
+ appsink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
+ fail_unless (appsink != NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ do {
+ g_signal_emit_by_name (appsink, "pull-buffer", &buffer);
+ if (buffer == NULL)
+ break;
+ if (first_sample == 0)
+ first_sample = buffer_get_first_sample (buffer);
+ GST_DEBUG ("buffer: %d\n", buffer->size);
+ GST_DEBUG ("buffer: %04x\n", buffer_get_first_sample (buffer));
+ size += buffer->size;
+
+ gst_buffer_unref (buffer);
+ buffer = NULL;
+ }
+ while (TRUE);
+
+ /* audiotestsrc with samplesperbuffer 1024 and 10 num-buffers */
+ fail_unless_equals_int (size, 20480);
+ fail_unless_equals_int (first_sample, 0x066a);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ g_object_unref (pipeline);
+ g_object_unref (appsink);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_decode_seek_full)
+{
+ GstElement *pipeline;
+ GstElement *appsink;
+ GstEvent *event;
+ GstBuffer *buffer = NULL;
+ guint16 first_sample = 0;
+ guint size = 0;
+ gchar *path =
+ g_build_filename (GST_TEST_FILES_PATH, "audiotestsrc.flac", NULL);
+ gchar *pipe_desc =
+ g_strdup_printf ("filesrc location=\"%s\" ! flacdec ! appsink name=sink",
+ path);
+
+ pipeline = gst_parse_launch (pipe_desc, NULL);
+ fail_unless (pipeline != NULL);
+
+ g_free (pipe_desc);
+ g_free (path);
+
+ appsink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
+ fail_unless (appsink != NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+
+ /* do a seek that should give us the complete output */
+ event = gst_event_new_seek (1.0, GST_FORMAT_DEFAULT, GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 20480);
+ fail_unless (gst_element_send_event (appsink, event));
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ do {
+ g_signal_emit_by_name (appsink, "pull-buffer", &buffer);
+ if (buffer == NULL)
+ break;
+ if (first_sample == 0)
+ first_sample = buffer_get_first_sample (buffer);
+ size += buffer->size;
+
+ gst_buffer_unref (buffer);
+ buffer = NULL;
+ }
+ while (TRUE);
+
+ /* file was generated with audiotestsrc
+ * with 1024 samplesperbuffer and 10 num-buffers in 16 bit audio */
+ fail_unless_equals_int (size, 20480);
+ fail_unless_equals_int (first_sample, 0x066a);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_object_unref (pipeline);
+ g_object_unref (appsink);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_decode_seek_partial)
+{
+ GstElement *pipeline;
+ GstElement *appsink;
+ GstEvent *event;
+ GstBuffer *buffer = NULL;
+ guint size = 0;
+ guint16 first_sample = 0;
+ gchar *path =
+ g_build_filename (GST_TEST_FILES_PATH, "audiotestsrc.flac", NULL);
+ gchar *pipe_desc =
+ g_strdup_printf ("filesrc location=\"%s\" ! flacdec ! appsink name=sink",
+ path);
+
+ pipeline = gst_parse_launch (pipe_desc, NULL);
+ fail_unless (pipeline != NULL);
+
+ g_free (path);
+ g_free (pipe_desc);
+
+ appsink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
+ fail_unless (appsink != NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+
+ /* do a partial seek to get the first 1024 samples or 2048 bytes */
+ event = gst_event_new_seek (1.0, GST_FORMAT_DEFAULT, GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 1024);
+ GST_DEBUG ("seeking");
+ fail_unless (gst_element_send_event (appsink, event));
+ GST_DEBUG ("seeked");
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ do {
+ GST_DEBUG ("pulling buffer");
+ g_signal_emit_by_name (appsink, "pull-buffer", &buffer);
+ GST_DEBUG ("pulled buffer %p", buffer);
+ if (buffer == NULL)
+ break;
+ if (first_sample == 0) {
+ fail_unless_equals_int (GST_BUFFER_OFFSET (buffer), 0L);
+ first_sample = buffer_get_first_sample (buffer);
+ }
+ size += buffer->size;
+
+ gst_buffer_unref (buffer);
+ buffer = NULL;
+ }
+ while (TRUE);
+
+ fail_unless_equals_int (size, 2048);
+ fail_unless_equals_int (first_sample, 0x066a);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_object_unref (pipeline);
+ g_object_unref (appsink);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+flacdec_suite (void)
+{
+ Suite *s = suite_create ("flacdec");
+
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* time out after 60s, not the default 3 */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_decode);
+ tcase_add_test (tc_chain, test_decode_seek_full);
+ tcase_add_test (tc_chain, test_decode_seek_partial);
+
+ return s;
+}
+
+GST_CHECK_MAIN (flacdec);
diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c
new file mode 100644
index 0000000..c1c12ed
--- /dev/null
+++ b/tests/check/pipelines/simple-launch-lines.c
@@ -0,0 +1,284 @@
+/* GStreamer
+ * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
+ *
+ * simple_launch_lines.c: Unit test for simple pipelines
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+#ifndef GST_DISABLE_PARSE
+
+static GstElement *
+setup_pipeline (const gchar * pipe_descr)
+{
+ GstElement *pipeline;
+
+ pipeline = gst_parse_launch (pipe_descr, NULL);
+ g_return_val_if_fail (GST_IS_PIPELINE (pipeline), NULL);
+ return pipeline;
+}
+
+/*
+ * run_pipeline:
+ * @pipe: the pipeline to run
+ * @desc: the description for use in messages
+ * @events: is a mask of expected events
+ * @tevent: is the expected terminal event.
+ *
+ * the poll call will time out after half a second.
+ */
+static void
+run_pipeline (GstElement * pipe, const gchar * descr,
+ GstMessageType events, GstMessageType tevent, GstState target_state)
+{
+ GstBus *bus;
+ GstMessage *message;
+ GstMessageType revent;
+ GstStateChangeReturn ret;
+
+ g_assert (pipe);
+ bus = gst_element_get_bus (pipe);
+ g_assert (bus);
+
+ fail_if (gst_element_set_state (pipe, target_state) ==
+ GST_STATE_CHANGE_FAILURE, "Could not set pipeline %s to playing", descr);
+ ret = gst_element_get_state (pipe, NULL, NULL, 10 * GST_SECOND);
+ if (ret == GST_STATE_CHANGE_ASYNC) {
+ g_critical ("Pipeline '%s' failed to go to PAUSED fast enough", descr);
+ goto done;
+ } else if ((ret != GST_STATE_CHANGE_SUCCESS)
+ && (ret != GST_STATE_CHANGE_NO_PREROLL)) {
+ g_critical ("Pipeline '%s' failed to go into PAUSED state (%s)", descr,
+ gst_element_state_change_return_get_name (ret));
+ goto done;
+ }
+
+ while (1) {
+ message = gst_bus_poll (bus, GST_MESSAGE_ANY, GST_SECOND / 2);
+
+ /* always have to pop the message before getting back into poll */
+ if (message) {
+ revent = GST_MESSAGE_TYPE (message);
+ gst_message_unref (message);
+ } else {
+ revent = GST_MESSAGE_UNKNOWN;
+ }
+
+ if (revent == tevent) {
+ break;
+ } else if (revent == GST_MESSAGE_UNKNOWN) {
+ g_critical ("Unexpected timeout in gst_bus_poll, looking for %d: %s",
+ tevent, descr);
+ break;
+ } else if (revent & events) {
+ continue;
+ }
+ g_critical
+ ("Unexpected message received of type %d, '%s', looking for %d: %s",
+ revent, gst_message_type_get_name (revent), tevent, descr);
+ }
+
+done:
+ fail_if (gst_element_set_state (pipe, GST_STATE_NULL) ==
+ GST_STATE_CHANGE_FAILURE, "Could not set pipeline %s to NULL", descr);
+ gst_element_get_state (pipe, NULL, NULL, GST_CLOCK_TIME_NONE);
+ gst_object_unref (pipe);
+
+ gst_bus_set_flushing (bus, TRUE);
+ gst_object_unref (bus);
+}
+
+GST_START_TEST (test_rtp_payloaders)
+{
+ const gchar *s;
+
+ /* FIXME: going to playing would be nice, but thet leads to lot of failure */
+ GstState target_state = GST_STATE_PAUSED;
+
+ /* we use is-live here to avoid preroll */
+#define PIPELINE_STRING(bufcount, bufsize, pl, dpl) "fakesrc is-live=true num-buffers=" bufcount " filltype=2 sizetype=2 sizemax=" bufsize " ! " pl " ! " dpl " ! fakesink"
+#define DEFAULT_BUFCOUNT "5"
+#define DEFAULT_BUFSIZE "16"
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpilbcpay",
+ "rtpilbcdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpgsmpay",
+ "rtpgsmdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ /* This one needs a bit different buffer size than others or it doesn't work. */
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, "52", "rtpamrpay", "rtpamrdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtppcmapay",
+ "rtppcmadepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtppcmupay",
+ "rtppcmudepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpmpapay",
+ "rtpmpadepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtph263ppay",
+ "rtph263pdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtph263pay",
+ "rtph263depay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtph264pay",
+ "rtph264depay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpL16pay",
+ "rtpL16depay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpmp2tpay",
+ "rtpmp2tdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpmp4vpay",
+ "rtpmp4vdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpmp4gpay",
+ "rtpmp4gdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ /* Cannot be tested with fakesrc becouse speex payloader requires a valid header?! */
+ /*
+ s = PIPELINE_STRING(DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpspeexpay", "rtpspeexdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+ */
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtptheorapay",
+ "rtptheoradepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = PIPELINE_STRING (DEFAULT_BUFCOUNT, DEFAULT_BUFSIZE, "rtpvorbispay",
+ "rtpvorbisdepay");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ /*s = FAKESRC " ! ! rtpac3depay ! " FAKESINK */
+ /*s = FAKESRC " ! ! asteriskh263 ! " FAKESINK; */
+ /*s = FAKESRC " ! ! rtpmpvdepay ! " FAKESINK; */
+ /*s = FAKESRC " ! ! rtpmp4adepay ! " FAKESINK; */
+ /*s = FAKESRC " ! ! rtpsv3vdepay ! " FAKESINK; */
+}
+
+GST_END_TEST
+GST_START_TEST (test_video_encoders_decoders)
+{
+ const gchar *s;
+ GstState target_state = GST_STATE_PLAYING;
+
+ /* no is-live on the source because we actually want to preroll since
+ * run_pipeline only goes into PAUSED */
+#define ENC_DEC_PIPELINE_STRING(bufcount, enc, dec) "videotestsrc num-buffers=" bufcount " ! " enc " ! " dec " ! fakesink"
+#define DEFAULT_BUFCOUNT "5"
+
+ s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "jpegenc", "jpegdec");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "pngenc", "pngdec");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+
+ s = ENC_DEC_PIPELINE_STRING (DEFAULT_BUFCOUNT, "smokeenc", "smokedec");
+ run_pipeline (setup_pipeline (s), s,
+ GST_MESSAGE_ANY & ~(GST_MESSAGE_ERROR | GST_MESSAGE_WARNING),
+ GST_MESSAGE_UNKNOWN, target_state);
+}
+
+GST_END_TEST
+#endif /* #ifndef GST_DISABLE_PARSE */
+static Suite *
+simple_launch_lines_suite (void)
+{
+ Suite *s = suite_create ("Pipelines");
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* time out after 60s, not the default 3 */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+#ifndef GST_DISABLE_PARSE
+ tcase_add_test (tc_chain, test_rtp_payloaders);
+ tcase_add_test (tc_chain, test_video_encoders_decoders);
+#endif
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = simple_launch_lines_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/pipelines/tagschecking.c b/tests/check/pipelines/tagschecking.c
new file mode 100644
index 0000000..d851b3f
--- /dev/null
+++ b/tests/check/pipelines/tagschecking.c
@@ -0,0 +1,354 @@
+/* GStreamer
+ * Copyright (C) 2008 Nokia Corporation. (contact <stefan.kost@nokia.com>)
+ * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+
+static GstTagList *received_tags = NULL;
+
+static gboolean
+bus_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ GMainLoop *loop = (GMainLoop *) data;
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+
+ gchar *debug;
+
+ gst_message_parse_error (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ g_error_free (gerror);
+ g_free (debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_TAG:{
+ if (received_tags == NULL) {
+ gst_message_parse_tag (message, &received_tags);
+ } else {
+ GstTagList *tl = NULL, *ntl = NULL;
+
+ gst_message_parse_tag (message, &tl);
+ if (tl) {
+ ntl = gst_tag_list_merge (received_tags, tl, GST_TAG_MERGE_PREPEND);
+ if (ntl) {
+ GST_LOG ("taglists merged: %" GST_PTR_FORMAT, ntl);
+ gst_tag_list_free (received_tags);
+ received_tags = ntl;
+ }
+ gst_tag_list_free (tl);
+ }
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+/*
+ * Creates a pipeline in the form:
+ * fakesrc num-buffers=1 ! caps ! muxer ! filesink location=file
+ *
+ * And sets the tags in tag_str into the muxer via tagsetter.
+ */
+static void
+test_mux_tags (const gchar * tag_str, const gchar * caps,
+ const gchar * muxer, const gchar * file)
+{
+ GstElement *pipeline;
+ GstBus *bus;
+ GMainLoop *loop;
+ GstTagList *sent_tags;
+ GstElement *mux;
+ GstTagSetter *setter;
+ gchar *launch_str;
+ guint bus_watch = 0;
+
+ GST_DEBUG ("testing xmp muxing on : %s", muxer);
+
+ launch_str = g_strdup_printf ("fakesrc num-buffers=1 ! %s ! %s name=mux ! "
+ "filesink location=%s name=sink", caps, muxer, file);
+ pipeline = gst_parse_launch (launch_str, NULL);
+ g_free (launch_str);
+ fail_unless (pipeline != NULL);
+
+ mux = gst_bin_get_by_name (GST_BIN (pipeline), "mux");
+ fail_unless (mux != NULL);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ gst_element_set_state (pipeline, GST_STATE_READY);
+
+ setter = GST_TAG_SETTER (mux);
+ fail_unless (setter != NULL);
+ sent_tags = gst_structure_from_string (tag_str, NULL);
+ fail_unless (sent_tags != NULL);
+ gst_tag_setter_merge_tags (setter, sent_tags, GST_TAG_MERGE_REPLACE);
+ gst_tag_list_free (sent_tags);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ g_main_loop_run (loop);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_main_loop_unref (loop);
+ g_object_unref (mux);
+ g_object_unref (pipeline);
+ g_source_remove (bus_watch);
+}
+
+/*
+ * Makes a pipeline in the form:
+ * filesrc location=file ! demuxer ! fakesink
+ *
+ * And gets the tags that are posted on the bus to compare
+ * with the tags in 'tag_str'
+ */
+static void
+test_demux_tags (const gchar * tag_str, const gchar * demuxer,
+ const gchar * file)
+{
+ GstElement *pipeline;
+ GstBus *bus;
+ GMainLoop *loop;
+ GstTagList *sent_tags;
+ gint i, j, n_recv, n_sent;
+ const gchar *name_sent, *name_recv;
+ const GValue *value_sent, *value_recv;
+ gboolean found;
+ gint comparison;
+ GstElement *demux;
+ gchar *launch_str;
+ guint bus_watch = 0;
+
+ GST_DEBUG ("testing tags : %s", tag_str);
+
+ if (received_tags) {
+ gst_tag_list_free (received_tags);
+ received_tags = NULL;
+ }
+
+ launch_str = g_strdup_printf ("filesrc location=%s ! %s name=demux ! "
+ "fakesink", file, demuxer);
+ pipeline = gst_parse_launch (launch_str, NULL);
+ g_free (launch_str);
+ fail_unless (pipeline != NULL);
+
+ demux = gst_bin_get_by_name (GST_BIN (pipeline), "demux");
+ fail_unless (demux != NULL);
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ sent_tags = gst_structure_from_string (tag_str, NULL);
+ fail_unless (sent_tags != NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ g_main_loop_run (loop);
+
+ GST_DEBUG ("mainloop done : %p", received_tags);
+
+ /* verify tags */
+ fail_unless (received_tags != NULL);
+ n_recv = gst_structure_n_fields (received_tags);
+ n_sent = gst_structure_n_fields (sent_tags);
+ fail_unless (n_recv >= n_sent);
+ /* FIXME: compare taglits values */
+ for (i = 0; i < n_sent; i++) {
+ name_sent = gst_structure_nth_field_name (sent_tags, i);
+ value_sent = gst_structure_get_value (sent_tags, name_sent);
+ found = FALSE;
+ for (j = 0; j < n_recv; j++) {
+ name_recv = gst_structure_nth_field_name (received_tags, j);
+ if (!strcmp (name_sent, name_recv)) {
+ value_recv = gst_structure_get_value (received_tags, name_recv);
+ comparison = gst_value_compare (value_sent, value_recv);
+ if (comparison != GST_VALUE_EQUAL) {
+ gchar *vs = g_strdup_value_contents (value_sent);
+ gchar *vr = g_strdup_value_contents (value_recv);
+ GST_DEBUG ("sent = %s:'%s', recv = %s:'%s'",
+ G_VALUE_TYPE_NAME (value_sent), vs,
+ G_VALUE_TYPE_NAME (value_recv), vr);
+ g_free (vs);
+ g_free (vr);
+ }
+ fail_unless (comparison == GST_VALUE_EQUAL,
+ "tag item %s has been received with different type or value",
+ name_sent);
+ found = TRUE;
+ break;
+ }
+ }
+ fail_unless (found, "tag item %s is lost", name_sent);
+ }
+
+ gst_tag_list_free (received_tags);
+ received_tags = NULL;
+ gst_tag_list_free (sent_tags);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_main_loop_unref (loop);
+ g_object_unref (demux);
+ g_object_unref (pipeline);
+ g_source_remove (bus_watch);
+}
+
+/*
+ * Tests if the muxer/demuxer pair can serialize the tags in 'tag_str'
+ * to a file and recover them correctly.
+ *
+ * 'caps' are used to assure the muxer accepts the fake buffer fakesrc
+ * will send to it.
+ */
+static void
+test_tags (const gchar * tag_str, const gchar * caps, const gchar * muxer,
+ const gchar * demuxer)
+{
+ gchar *tmpfile;
+ gchar *tmp;
+
+ tmp = g_strdup_printf ("%s%d", "gst-check-xmp-test-", g_random_int ());
+ tmpfile = g_build_filename (g_get_tmp_dir (), tmp, NULL);
+ g_free (tmp);
+
+ GST_DEBUG ("testing tags : %s", tag_str);
+ test_mux_tags (tag_str, caps, muxer, tmpfile);
+ test_demux_tags (tag_str, demuxer, tmpfile);
+ g_free (tmpfile);
+}
+
+#define H264_CAPS "video/x-h264, width=(int)320, height=(int)240," \
+ " framerate=(fraction)30/1, codec_data=(buffer)" \
+ "01401592ffe10017674d401592540a0fd8088000000300" \
+ "8000001e478b175001000468ee3c80, stream-format=(string)avc"
+
+#define COMMON_TAGS \
+ "taglist,title=test_title," \
+ "artist=test_artist," \
+ "keywords=\"key1,key2\"," \
+ "description=test_desc"
+
+GST_START_TEST (test_common_tags)
+{
+ if (!gst_default_registry_check_feature_version ("qtdemux", 0, 10, 23)) {
+ GST_INFO ("Skipping test, qtdemux either not available or too old");
+ return;
+ }
+ test_tags (COMMON_TAGS, H264_CAPS, "qtmux", "qtdemux");
+ test_tags (COMMON_TAGS, H264_CAPS, "mp4mux", "qtdemux");
+ test_tags (COMMON_TAGS, H264_CAPS, "gppmux", "qtdemux");
+}
+
+GST_END_TEST;
+
+#define GEO_LOCATION_TAGS \
+ "taglist,geo-location-country=Brazil," \
+ "geo-location-city=\"Campina Grande\"," \
+ "geo-location-sublocation=Bodocongo," \
+ "geo-location-latitude=-12.125," \
+ "geo-location-longitude=56.75," \
+ "geo-location-elevation=327.5"
+
+GST_START_TEST (test_geo_location_tags)
+{
+ if (!gst_default_registry_check_feature_version ("qtdemux", 0, 10, 23)) {
+ GST_INFO ("Skipping test, qtdemux either not available or too old");
+ return;
+ }
+ test_tags (GEO_LOCATION_TAGS, H264_CAPS, "qtmux", "qtdemux");
+ test_tags (GEO_LOCATION_TAGS, H264_CAPS, "mp4mux", "qtdemux");
+ test_tags (GEO_LOCATION_TAGS, H264_CAPS, "gppmux", "qtdemux");
+}
+
+GST_END_TEST;
+
+
+#define USER_TAGS \
+ "taglist,user-rating=(uint)85"
+
+GST_START_TEST (test_user_tags)
+{
+ if (!gst_default_registry_check_feature_version ("qtdemux", 0, 10, 23)) {
+ GST_INFO ("Skipping test, qtdemux either not available or too old");
+ return;
+ }
+
+ test_tags (USER_TAGS, H264_CAPS, "qtmux", "qtdemux");
+ test_tags (USER_TAGS, H264_CAPS, "mp4mux", "qtdemux");
+ test_tags (USER_TAGS, H264_CAPS, "gppmux", "qtdemux");
+}
+
+GST_END_TEST;
+
+static Suite *
+metadata_suite (void)
+{
+ Suite *s = suite_create ("tagschecking");
+
+ TCase *tc_chain = tcase_create ("general");
+
+ /* time out after 60s, not the default 3 */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_common_tags);
+ tcase_add_test (tc_chain, test_geo_location_tags);
+ tcase_add_test (tc_chain, test_user_tags);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+
+ Suite *s = metadata_suite ();
+
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/check/pipelines/wavenc.c b/tests/check/pipelines/wavenc.c
new file mode 100644
index 0000000..c5344a7
--- /dev/null
+++ b/tests/check/pipelines/wavenc.c
@@ -0,0 +1,201 @@
+/* GStreamer
+ *
+ * unit test for wavenc
+ *
+ * Copyright (C) <2010> Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/audio/multichannel.h>
+
+static gboolean
+bus_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ GMainLoop *loop = (GMainLoop *) data;
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_error (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+/*
+ * gst-launch \
+ * audiotestsrc freq=440 num-buffers=100 ! interleave name=i ! audioconvert ! wavenc ! filesink location=/tmp/mc.wav \
+ * audiotestsrc freq=880 num-buffers=100 ! i.
+ * ...
+ *
+ * http://www.microsoft.com/whdc/device/audio/multichaud.mspx
+ */
+
+static void
+make_n_channel_wav (const gint channels, const GValueArray * arr)
+{
+ GstElement *pipeline;
+ GstElement **audiotestsrc, *interleave, *wavenc, *conv, *fakesink;
+ GstBus *bus;
+ GMainLoop *loop;
+ guint i;
+ guint bus_watch = 0;
+
+ audiotestsrc = g_new0 (GstElement *, channels);
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ interleave = gst_element_factory_make ("interleave", NULL);
+ fail_unless (interleave != NULL);
+ g_object_set (interleave, "channel-positions", arr, NULL);
+ gst_bin_add (GST_BIN (pipeline), interleave);
+
+ if (G_BYTE_ORDER == G_BIG_ENDIAN) {
+ /* we're not here to test orc; audioconvert misbehaves on ppc32 */
+ g_setenv ("ORC_CODE", "backup", 1);
+ conv = gst_element_factory_make ("audioconvert", NULL);
+ } else {
+ conv = gst_element_factory_make ("identity", NULL);
+ }
+ fail_unless (conv != NULL);
+ gst_bin_add (GST_BIN (pipeline), conv);
+ fail_unless (gst_element_link (interleave, conv));
+
+ wavenc = gst_element_factory_make ("wavenc", NULL);
+ fail_unless (wavenc != NULL);
+ gst_bin_add (GST_BIN (pipeline), wavenc);
+ fail_unless (gst_element_link (conv, wavenc));
+
+ fakesink = gst_element_factory_make ("fakesink", NULL);
+ fail_unless (fakesink != NULL);
+ gst_bin_add (GST_BIN (pipeline), fakesink);
+ fail_unless (gst_element_link (wavenc, fakesink));
+
+ for (i = 0; i < channels; i++) {
+ audiotestsrc[i] = gst_element_factory_make ("audiotestsrc", NULL);
+ fail_unless (audiotestsrc[i] != NULL);
+ g_object_set (G_OBJECT (audiotestsrc[i]), "wave", 0, "freq", 440.0 * i,
+ "num-buffers", 100, NULL);
+ gst_bin_add (GST_BIN (pipeline), audiotestsrc[i]);
+ fail_unless (gst_element_link (audiotestsrc[i], interleave));
+ }
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ g_main_loop_run (loop);
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+ g_free (audiotestsrc);
+
+ g_main_loop_unref (loop);
+ g_source_remove (bus_watch);
+}
+
+GST_START_TEST (test_encode_stereo)
+{
+ GValueArray *arr;
+ GValue val = { 0, };
+
+ arr = g_value_array_new (2);
+ g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT);
+ g_value_array_append (arr, &val);
+ g_value_unset (&val);
+
+ make_n_channel_wav (2, arr);
+ g_value_array_free (arr);
+}
+
+GST_END_TEST;
+
+#if 0
+GST_START_TEST (test_encode_multichannel)
+{
+ GValueArray *arr;
+ GValue val = { 0, };
+
+ arr = g_value_array_new (6);
+ g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_LFE);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT);
+ g_value_array_append (arr, &val);
+ g_value_reset (&val);
+ g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT);
+ g_value_array_append (arr, &val);
+ g_value_unset (&val);
+
+ make_n_channel_wav (6);
+}
+
+GST_END_TEST;
+#endif
+
+static Suite *
+wavenc_suite (void)
+{
+ Suite *s = suite_create ("wavenc");
+ TCase *tc_chain = tcase_create ("general");
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_encode_stereo);
+ /* FIXME: improve wavenc
+ tcase_add_test (tc_chain, test_encode_multichannel);
+ */
+
+ return s;
+}
+
+GST_CHECK_MAIN (wavenc);
diff --git a/tests/check/pipelines/wavpack.c b/tests/check/pipelines/wavpack.c
new file mode 100644
index 0000000..6a166b2
--- /dev/null
+++ b/tests/check/pipelines/wavpack.c
@@ -0,0 +1,217 @@
+/* GStreamer
+ * Copyright (C) 2008 Sebastian Dröge <slomo@circular-chaos.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/check/gstcheck.h>
+#include <gst/base/gstadapter.h>
+
+static gboolean
+bus_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ GMainLoop *loop = (GMainLoop *) data;
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_error (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_ELEMENT:
+ {
+ const GstStructure *s = gst_message_get_structure (message);
+
+ const gchar *name = gst_structure_get_name (s);
+
+ fail_unless (strcmp (name, "imperfect-timestamp") != 0);
+ fail_unless (strcmp (name, "imperfect-offset") != 0);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static gboolean had_first_buffer = FALSE;
+
+static void
+identity_handoff (GstElement * object, GstBuffer * buffer, gpointer user_data)
+{
+ GstAdapter *adapter = GST_ADAPTER (user_data);
+
+ gst_adapter_push (adapter, gst_buffer_ref (buffer));
+}
+
+static void
+fakesink_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
+ gpointer user_data)
+{
+ GstAdapter *adapter = GST_ADAPTER (user_data);
+
+ /* Don't allow the second buffer with offset=0 as it's the decoded
+ * rewrite of the first
+ */
+ if (had_first_buffer == FALSE && GST_BUFFER_OFFSET (buffer) == 0)
+ had_first_buffer = TRUE;
+ else if (GST_BUFFER_OFFSET (buffer) == 0)
+ return;
+
+ gst_adapter_push (adapter, gst_buffer_ref (buffer));
+}
+
+GST_START_TEST (test_encode_decode)
+{
+ GstElement *pipeline;
+ GstElement *audiotestsrc, *identity1, *wavpackenc, *identity2, *wavpackdec,
+ *identity3, *fakesink;
+ GstAdapter *srcadapter, *sinkadapter;
+ GstBus *bus;
+ GMainLoop *loop;
+ GstBuffer *in, *out;
+ guint bus_watch = 0;
+
+ srcadapter = gst_adapter_new ();
+ fail_unless (srcadapter != NULL);
+ sinkadapter = gst_adapter_new ();
+ fail_unless (sinkadapter != NULL);
+
+ pipeline = gst_pipeline_new ("pipeline");
+ fail_unless (pipeline != NULL);
+
+ audiotestsrc = gst_element_factory_make ("audiotestsrc", "src");
+ fail_unless (audiotestsrc != NULL);
+ g_object_set (G_OBJECT (audiotestsrc), "wave", 0, "freq", 440.0,
+ "num-buffers", 2000, NULL);
+
+ identity1 = gst_element_factory_make ("identity", "identity1");
+ fail_unless (identity1 != NULL);
+ g_object_set (G_OBJECT (identity1), "signal-handoffs", TRUE, NULL);
+ g_signal_connect (G_OBJECT (identity1), "handoff",
+ G_CALLBACK (identity_handoff), srcadapter);
+
+ wavpackenc = gst_element_factory_make ("wavpackenc", "enc");
+ fail_unless (wavpackenc != NULL);
+
+ identity2 = gst_element_factory_make ("identity", "identity2");
+ fail_unless (identity2 != NULL);
+ g_object_set (G_OBJECT (identity2), "check-imperfect-timestamp", TRUE,
+ "check-imperfect-offset", TRUE, NULL);
+
+ wavpackdec = gst_element_factory_make ("wavpackdec", "dec");
+ fail_unless (wavpackdec != NULL);
+
+ identity3 = gst_element_factory_make ("identity", "identity3");
+ fail_unless (identity3 != NULL);
+ g_object_set (G_OBJECT (identity3), "check-imperfect-timestamp", TRUE,
+ "check-imperfect-offset", TRUE, NULL);
+
+ fakesink = gst_element_factory_make ("fakesink", "sink");
+ fail_unless (fakesink != NULL);
+ g_object_set (G_OBJECT (fakesink), "signal-handoffs", TRUE, NULL);
+ g_signal_connect (G_OBJECT (fakesink), "handoff",
+ G_CALLBACK (fakesink_handoff), sinkadapter);
+
+ gst_bin_add_many (GST_BIN (pipeline), audiotestsrc, identity1, wavpackenc,
+ identity2, wavpackdec, identity3, fakesink, NULL);
+
+ fail_unless (gst_element_link_many (audiotestsrc, identity1, wavpackenc,
+ identity2, wavpackdec, identity3, fakesink, NULL));
+
+ loop = g_main_loop_new (NULL, TRUE);
+ fail_unless (loop != NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ fail_unless (bus != NULL);
+ bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
+ gst_object_unref (bus);
+
+ had_first_buffer = FALSE;
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ g_main_loop_run (loop);
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ fail_unless (had_first_buffer == TRUE);
+ fail_unless (gst_adapter_available (srcadapter) > 0);
+ fail_unless (gst_adapter_available (sinkadapter) > 0);
+ fail_unless_equals_int (gst_adapter_available (srcadapter),
+ gst_adapter_available (sinkadapter));
+
+ in = gst_adapter_take_buffer (srcadapter, gst_adapter_available (srcadapter));
+ fail_unless (in != NULL);
+ out =
+ gst_adapter_take_buffer (sinkadapter,
+ gst_adapter_available (sinkadapter));
+ fail_unless (out != NULL);
+
+ fail_unless_equals_int (GST_BUFFER_SIZE (in), GST_BUFFER_SIZE (out));
+ fail_unless (memcmp (GST_BUFFER_DATA (in), GST_BUFFER_DATA (out),
+ GST_BUFFER_SIZE (in)) == 0);
+
+ gst_buffer_unref (in);
+ gst_buffer_unref (out);
+ g_object_unref (pipeline);
+ g_main_loop_unref (loop);
+ g_object_unref (srcadapter);
+ g_object_unref (sinkadapter);
+ g_source_remove (bus_watch);
+}
+
+GST_END_TEST;
+
+static Suite *
+wavpack_suite (void)
+{
+ Suite *s = suite_create ("Wavpack");
+ TCase *tc_chain = tcase_create ("linear");
+
+ /* time out after 60s, not the default 3 */
+ tcase_set_timeout (tc_chain, 60);
+
+ suite_add_tcase (s, tc_chain);
+ tcase_add_test (tc_chain, test_encode_decode);
+
+ return s;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nf;
+ Suite *s = wavpack_suite ();
+ SRunner *sr = srunner_create (s);
+
+ gst_check_init (&argc, &argv);
+
+ srunner_run_all (sr, CK_NORMAL);
+ nf = srunner_ntests_failed (sr);
+ srunner_free (sr);
+
+ return nf;
+}
diff --git a/tests/examples/Makefile.am b/tests/examples/Makefile.am
new file mode 100644
index 0000000..50a9725
--- /dev/null
+++ b/tests/examples/Makefile.am
@@ -0,0 +1,19 @@
+if USE_JACK
+JACK_DIR=jack
+else
+JACK_DIR=
+endif
+
+if USE_CAIRO_GOBJECT
+CAIRO_DIR=cairo
+else
+CAIRO_DIR=
+endif
+
+SUBDIRS = audiofx equalizer $(JACK_DIR) level pulse \
+ rtp shapewipe spectrum v4l2 $(CAIRO_DIR)
+
+DIST_SUBDIRS = audiofx equalizer jack level pulse \
+ rtp shapewipe spectrum v4l2 cairo
+
+include $(top_srcdir)/common/parallel-subdirs.mak
diff --git a/tests/examples/Makefile.in b/tests/examples/Makefile.in
new file mode 100644
index 0000000..5f9ce74
--- /dev/null
+++ b/tests/examples/Makefile.in
@@ -0,0 +1,831 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+# include this at the end of $MODULE/ext/Makefile.am to force make to
+# build subdirectories in parallel when make -jN is used. We will end up
+# descending into all subdirectories a second time, but only after the first
+# (parallel) run has finished, so it should go right through the second time.
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/common/parallel-subdirs.mak
+subdir = tests/examples
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@USE_JACK_FALSE@JACK_DIR =
+@USE_JACK_TRUE@JACK_DIR = jack
+@USE_CAIRO_GOBJECT_FALSE@CAIRO_DIR =
+@USE_CAIRO_GOBJECT_TRUE@CAIRO_DIR = cairo
+SUBDIRS = audiofx equalizer $(JACK_DIR) level pulse \
+ rtp shapewipe spectrum v4l2 $(CAIRO_DIR)
+
+DIST_SUBDIRS = audiofx equalizer jack level pulse \
+ rtp shapewipe spectrum v4l2 cairo
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/parallel-subdirs.mak $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/common/parallel-subdirs.mak:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+.PHONY: independent-subdirs $(SUBDIRS)
+
+independent-subdirs: $(SUBDIRS)
+
+$(SUBDIRS):
+ $(MAKE) -C $@
+
+all-recursive: independent-subdirs
+
+# 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/examples/audiofx/Makefile.am b/tests/examples/audiofx/Makefile.am
new file mode 100644
index 0000000..efcf785
--- /dev/null
+++ b/tests/examples/audiofx/Makefile.am
@@ -0,0 +1,7 @@
+noinst_PROGRAMS = firfilter-example iirfilter-example
+
+firfilter_example_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+firfilter_example_LDADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstfft-@GST_MAJORMINOR@ $(LIBM)
+
+iirfilter_example_CFLAGS = $(GST_CFLAGS)
+iirfilter_example_LDADD = $(GST_LIBS) $(LIBM)
diff --git a/tests/examples/audiofx/Makefile.in b/tests/examples/audiofx/Makefile.in
new file mode 100644
index 0000000..d55ae51
--- /dev/null
+++ b/tests/examples/audiofx/Makefile.in
@@ -0,0 +1,783 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = firfilter-example$(EXEEXT) \
+ iirfilter-example$(EXEEXT)
+subdir = tests/examples/audiofx
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+firfilter_example_SOURCES = firfilter-example.c
+firfilter_example_OBJECTS = \
+ firfilter_example-firfilter-example.$(OBJEXT)
+am__DEPENDENCIES_1 =
+firfilter_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+firfilter_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(firfilter_example_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+iirfilter_example_SOURCES = iirfilter-example.c
+iirfilter_example_OBJECTS = \
+ iirfilter_example-iirfilter-example.$(OBJEXT)
+iirfilter_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+iirfilter_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(iirfilter_example_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = firfilter-example.c iirfilter-example.c
+DIST_SOURCES = firfilter-example.c iirfilter-example.c
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+firfilter_example_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+firfilter_example_LDADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstfft-@GST_MAJORMINOR@ $(LIBM)
+iirfilter_example_CFLAGS = $(GST_CFLAGS)
+iirfilter_example_LDADD = $(GST_LIBS) $(LIBM)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/audiofx/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/audiofx/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+firfilter-example$(EXEEXT): $(firfilter_example_OBJECTS) $(firfilter_example_DEPENDENCIES) $(EXTRA_firfilter_example_DEPENDENCIES)
+ @rm -f firfilter-example$(EXEEXT)
+ $(AM_V_CCLD)$(firfilter_example_LINK) $(firfilter_example_OBJECTS) $(firfilter_example_LDADD) $(LIBS)
+iirfilter-example$(EXEEXT): $(iirfilter_example_OBJECTS) $(iirfilter_example_DEPENDENCIES) $(EXTRA_iirfilter_example_DEPENDENCIES)
+ @rm -f iirfilter-example$(EXEEXT)
+ $(AM_V_CCLD)$(iirfilter_example_LINK) $(iirfilter_example_OBJECTS) $(iirfilter_example_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/firfilter_example-firfilter-example.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iirfilter_example-iirfilter-example.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+firfilter_example-firfilter-example.o: firfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(firfilter_example_CFLAGS) $(CFLAGS) -MT firfilter_example-firfilter-example.o -MD -MP -MF $(DEPDIR)/firfilter_example-firfilter-example.Tpo -c -o firfilter_example-firfilter-example.o `test -f 'firfilter-example.c' || echo '$(srcdir)/'`firfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/firfilter_example-firfilter-example.Tpo $(DEPDIR)/firfilter_example-firfilter-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='firfilter-example.c' object='firfilter_example-firfilter-example.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(firfilter_example_CFLAGS) $(CFLAGS) -c -o firfilter_example-firfilter-example.o `test -f 'firfilter-example.c' || echo '$(srcdir)/'`firfilter-example.c
+
+firfilter_example-firfilter-example.obj: firfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(firfilter_example_CFLAGS) $(CFLAGS) -MT firfilter_example-firfilter-example.obj -MD -MP -MF $(DEPDIR)/firfilter_example-firfilter-example.Tpo -c -o firfilter_example-firfilter-example.obj `if test -f 'firfilter-example.c'; then $(CYGPATH_W) 'firfilter-example.c'; else $(CYGPATH_W) '$(srcdir)/firfilter-example.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/firfilter_example-firfilter-example.Tpo $(DEPDIR)/firfilter_example-firfilter-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='firfilter-example.c' object='firfilter_example-firfilter-example.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(firfilter_example_CFLAGS) $(CFLAGS) -c -o firfilter_example-firfilter-example.obj `if test -f 'firfilter-example.c'; then $(CYGPATH_W) 'firfilter-example.c'; else $(CYGPATH_W) '$(srcdir)/firfilter-example.c'; fi`
+
+iirfilter_example-iirfilter-example.o: iirfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iirfilter_example_CFLAGS) $(CFLAGS) -MT iirfilter_example-iirfilter-example.o -MD -MP -MF $(DEPDIR)/iirfilter_example-iirfilter-example.Tpo -c -o iirfilter_example-iirfilter-example.o `test -f 'iirfilter-example.c' || echo '$(srcdir)/'`iirfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iirfilter_example-iirfilter-example.Tpo $(DEPDIR)/iirfilter_example-iirfilter-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iirfilter-example.c' object='iirfilter_example-iirfilter-example.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iirfilter_example_CFLAGS) $(CFLAGS) -c -o iirfilter_example-iirfilter-example.o `test -f 'iirfilter-example.c' || echo '$(srcdir)/'`iirfilter-example.c
+
+iirfilter_example-iirfilter-example.obj: iirfilter-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iirfilter_example_CFLAGS) $(CFLAGS) -MT iirfilter_example-iirfilter-example.obj -MD -MP -MF $(DEPDIR)/iirfilter_example-iirfilter-example.Tpo -c -o iirfilter_example-iirfilter-example.obj `if test -f 'iirfilter-example.c'; then $(CYGPATH_W) 'iirfilter-example.c'; else $(CYGPATH_W) '$(srcdir)/iirfilter-example.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/iirfilter_example-iirfilter-example.Tpo $(DEPDIR)/iirfilter_example-iirfilter-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iirfilter-example.c' object='iirfilter_example-iirfilter-example.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(iirfilter_example_CFLAGS) $(CFLAGS) -c -o iirfilter_example-iirfilter-example.obj `if test -f 'iirfilter-example.c'; then $(CYGPATH_W) 'iirfilter-example.c'; else $(CYGPATH_W) '$(srcdir)/iirfilter-example.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/audiofx/firfilter-example.c b/tests/examples/audiofx/firfilter-example.c
new file mode 100644
index 0000000..b344e74
--- /dev/null
+++ b/tests/examples/audiofx/firfilter-example.c
@@ -0,0 +1,161 @@
+/* GStreamer
+ * Copyright (C) 2009 Sebastian Droege <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* This small sample application creates a bandpass FIR filter
+ * by transforming the frequency response to the filter kernel.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+#include <gst/fft/gstfftf64.h>
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ g_error ("Got ERROR");
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ g_warning ("Got WARNING");
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+ GValueArray *va;
+ GValue v = { 0, };
+ GstFFTF64 *fft;
+ GstFFTF64Complex frequency_response[17];
+ gdouble tmp[32];
+ gdouble filter_kernel[32];
+ guint i;
+
+ /* Create the frequency response: zero outside
+ * a small frequency band */
+ for (i = 0; i < 17; i++) {
+ if (i < 5 || i > 11)
+ frequency_response[i].r = 0.0;
+ else
+ frequency_response[i].r = 1.0;
+
+ frequency_response[i].i = 0.0;
+ }
+
+ /* Calculate the inverse FT of the frequency response */
+ fft = gst_fft_f64_new (32, TRUE);
+ gst_fft_f64_inverse_fft (fft, frequency_response, tmp);
+ gst_fft_f64_free (fft);
+
+ /* Shift the inverse FT of the frequency response by 16,
+ * i.e. the half of the kernel length to get the
+ * impulse response. See http://www.dspguide.com/ch17/1.htm
+ * for more information.
+ */
+ for (i = 0; i < 32; i++)
+ filter_kernel[i] = tmp[(i + 16) % 32];
+
+ /* Apply the hamming window to the impulse response to get
+ * a better result than given from the rectangular window
+ */
+ for (i = 0; i < 32; i++)
+ filter_kernel[i] *= (0.54 - 0.46 * cos (2 * G_PI * i / 32));
+
+ va = g_value_array_new (1);
+
+ g_value_init (&v, G_TYPE_DOUBLE);
+ for (i = 0; i < 32; i++) {
+ g_value_set_double (&v, filter_kernel[i]);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ }
+ g_object_set (G_OBJECT (element), "kernel", va, NULL);
+ /* Latency is 1/2 of the kernel length for this method of
+ * calculating a filter kernel from the frequency response
+ */
+ g_object_set (G_OBJECT (element), "latency", (gint64) (32 / 2), NULL);
+ g_value_array_free (va);
+}
+
+gint
+main (gint argc, gchar * argv[])
+{
+ GstElement *pipeline, *src, *filter, *conv, *sink;
+ GstBus *bus;
+ GMainLoop *loop;
+
+ gst_init (NULL, NULL);
+
+ pipeline = gst_element_factory_make ("pipeline", NULL);
+
+ src = gst_element_factory_make ("audiotestsrc", NULL);
+ g_object_set (G_OBJECT (src), "wave", 5, NULL);
+
+ filter = gst_element_factory_make ("audiofirfilter", NULL);
+ g_signal_connect (G_OBJECT (filter), "rate-changed",
+ G_CALLBACK (on_rate_changed), NULL);
+
+ conv = gst_element_factory_make ("audioconvert", NULL);
+
+ sink = gst_element_factory_make ("autoaudiosink", NULL);
+ g_return_val_if_fail (sink != NULL, -1);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, conv, sink, NULL);
+ if (!gst_element_link_many (src, filter, conv, sink, NULL)) {
+ g_error ("Failed to link elements");
+ return -2;
+ }
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ if (gst_element_set_state (pipeline,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+ g_error ("Failed to go into PLAYING state");
+ return -3;
+ }
+
+ g_main_loop_run (loop);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_main_loop_unref (loop);
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/examples/audiofx/iirfilter-example.c b/tests/examples/audiofx/iirfilter-example.c
new file mode 100644
index 0000000..7fac2ac
--- /dev/null
+++ b/tests/examples/audiofx/iirfilter-example.c
@@ -0,0 +1,137 @@
+/* GStreamer
+ * Copyright (C) 2009 Sebastian Droege <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* This small sample application creates a lowpass IIR filter
+ * and applies it to white noise.
+ * See http://www.dspguide.com/ch19/2.htm for a description
+ * of the IIR filter that is used.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+
+/* Cutoff of 4000 Hz */
+#define CUTOFF (4000.0)
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:
+ g_error ("Got ERROR");
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_WARNING:
+ g_warning ("Got WARNING");
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+static void
+on_rate_changed (GstElement * element, gint rate, gpointer user_data)
+{
+ GValueArray *va;
+ GValue v = { 0, };
+ gdouble x;
+
+ if (rate / 2.0 > CUTOFF)
+ x = exp (-2.0 * G_PI * (CUTOFF / rate));
+ else
+ x = 0.0;
+
+ va = g_value_array_new (1);
+
+ g_value_init (&v, G_TYPE_DOUBLE);
+ g_value_set_double (&v, 1.0 - x);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_object_set (G_OBJECT (element), "a", va, NULL);
+ g_value_array_free (va);
+
+ va = g_value_array_new (1);
+ g_value_set_double (&v, x);
+ g_value_array_append (va, &v);
+ g_value_reset (&v);
+ g_object_set (G_OBJECT (element), "b", va, NULL);
+ g_value_array_free (va);
+}
+
+gint
+main (gint argc, gchar * argv[])
+{
+ GstElement *pipeline, *src, *filter, *conv, *sink;
+ GstBus *bus;
+ GMainLoop *loop;
+
+ gst_init (NULL, NULL);
+
+ pipeline = gst_element_factory_make ("pipeline", NULL);
+
+ src = gst_element_factory_make ("audiotestsrc", NULL);
+ g_object_set (G_OBJECT (src), "wave", 5, NULL);
+
+ filter = gst_element_factory_make ("audioiirfilter", NULL);
+ g_signal_connect (G_OBJECT (filter), "rate-changed",
+ G_CALLBACK (on_rate_changed), NULL);
+
+ conv = gst_element_factory_make ("audioconvert", NULL);
+
+ sink = gst_element_factory_make ("autoaudiosink", NULL);
+ g_return_val_if_fail (sink != NULL, -1);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter, conv, sink, NULL);
+ if (!gst_element_link_many (src, filter, conv, sink, NULL)) {
+ g_error ("Failed to link elements");
+ return -2;
+ }
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ if (gst_element_set_state (pipeline,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+ g_error ("Failed to go into PLAYING state");
+ return -3;
+ }
+
+ g_main_loop_run (loop);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_main_loop_unref (loop);
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/examples/cairo/Makefile.am b/tests/examples/cairo/Makefile.am
new file mode 100644
index 0000000..3a5eb58
--- /dev/null
+++ b/tests/examples/cairo/Makefile.am
@@ -0,0 +1,7 @@
+if USE_CAIRO_GOBJECT
+noinst_PROGRAMS = cairo_overlay
+endif
+
+cairo_overlay_SOURCES = cairo_overlay.c
+cairo_overlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(CAIRO_CFLAGS)
+cairo_overlay_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_LIBS) $(CAIRO_LIBS)
diff --git a/tests/examples/cairo/Makefile.in b/tests/examples/cairo/Makefile.in
new file mode 100644
index 0000000..aad215c
--- /dev/null
+++ b/tests/examples/cairo/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@USE_CAIRO_GOBJECT_TRUE@noinst_PROGRAMS = cairo_overlay$(EXEEXT)
+subdir = tests/examples/cairo
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_cairo_overlay_OBJECTS = cairo_overlay-cairo_overlay.$(OBJEXT)
+cairo_overlay_OBJECTS = $(am_cairo_overlay_OBJECTS)
+am__DEPENDENCIES_1 =
+cairo_overlay_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+cairo_overlay_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cairo_overlay_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(cairo_overlay_SOURCES)
+DIST_SOURCES = $(cairo_overlay_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+cairo_overlay_SOURCES = cairo_overlay.c
+cairo_overlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(CAIRO_CFLAGS)
+cairo_overlay_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_LIBS) $(CAIRO_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/cairo/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/cairo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+cairo_overlay$(EXEEXT): $(cairo_overlay_OBJECTS) $(cairo_overlay_DEPENDENCIES) $(EXTRA_cairo_overlay_DEPENDENCIES)
+ @rm -f cairo_overlay$(EXEEXT)
+ $(AM_V_CCLD)$(cairo_overlay_LINK) $(cairo_overlay_OBJECTS) $(cairo_overlay_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo_overlay-cairo_overlay.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+cairo_overlay-cairo_overlay.o: cairo_overlay.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_overlay_CFLAGS) $(CFLAGS) -MT cairo_overlay-cairo_overlay.o -MD -MP -MF $(DEPDIR)/cairo_overlay-cairo_overlay.Tpo -c -o cairo_overlay-cairo_overlay.o `test -f 'cairo_overlay.c' || echo '$(srcdir)/'`cairo_overlay.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cairo_overlay-cairo_overlay.Tpo $(DEPDIR)/cairo_overlay-cairo_overlay.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cairo_overlay.c' object='cairo_overlay-cairo_overlay.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_overlay_CFLAGS) $(CFLAGS) -c -o cairo_overlay-cairo_overlay.o `test -f 'cairo_overlay.c' || echo '$(srcdir)/'`cairo_overlay.c
+
+cairo_overlay-cairo_overlay.obj: cairo_overlay.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_overlay_CFLAGS) $(CFLAGS) -MT cairo_overlay-cairo_overlay.obj -MD -MP -MF $(DEPDIR)/cairo_overlay-cairo_overlay.Tpo -c -o cairo_overlay-cairo_overlay.obj `if test -f 'cairo_overlay.c'; then $(CYGPATH_W) 'cairo_overlay.c'; else $(CYGPATH_W) '$(srcdir)/cairo_overlay.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cairo_overlay-cairo_overlay.Tpo $(DEPDIR)/cairo_overlay-cairo_overlay.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cairo_overlay.c' object='cairo_overlay-cairo_overlay.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cairo_overlay_CFLAGS) $(CFLAGS) -c -o cairo_overlay-cairo_overlay.obj `if test -f 'cairo_overlay.c'; then $(CYGPATH_W) 'cairo_overlay.c'; else $(CYGPATH_W) '$(srcdir)/cairo_overlay.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/cairo/cairo_overlay.c b/tests/examples/cairo/cairo_overlay.c
new file mode 100644
index 0000000..cae4c13
--- /dev/null
+++ b/tests/examples/cairo/cairo_overlay.c
@@ -0,0 +1,172 @@
+/* GStreamer
+ * Copyright (C) 2011 Jon Nordby <jononor@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Example showing usage of the cairooverlay element
+ */
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+#include <cairo.h>
+#include <cairo-gobject.h>
+
+#include <glib.h>
+
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:{
+ GError *err = NULL;
+ gchar *debug;
+
+ gst_message_parse_error (message, &err, &debug);
+ g_critical ("Got ERROR: %s (%s)", err->message, GST_STR_NULL (debug));
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_WARNING:{
+ GError *err = NULL;
+ gchar *debug;
+
+ gst_message_parse_warning (message, &err, &debug);
+ g_warning ("Got WARNING: %s (%s)", err->message, GST_STR_NULL (debug));
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+/* Datastructure to share the state we are interested in between
+ * prepare and render function. */
+typedef struct
+{
+ gboolean valid;
+ int width;
+ int height;
+} CairoOverlayState;
+
+/* Store the information from the caps that we are interested in. */
+static void
+prepare_overlay (GstElement * overlay, GstCaps * caps, gpointer user_data)
+{
+ CairoOverlayState *state = (CairoOverlayState *) user_data;
+
+ gst_video_format_parse_caps (caps, NULL, &state->width, &state->height);
+ state->valid = TRUE;
+}
+
+/* Draw the overlay.
+ * This function draws a cute "beating" heart. */
+static void
+draw_overlay (GstElement * overlay, cairo_t * cr, guint64 timestamp,
+ guint64 duration, gpointer user_data)
+{
+ CairoOverlayState *s = (CairoOverlayState *) user_data;
+ double scale;
+
+ if (!s->valid)
+ return;
+
+ scale = 2 * (((timestamp / (int) 1e7) % 70) + 30) / 100.0;
+ cairo_translate (cr, s->width / 2, (s->height / 2) - 30);
+ cairo_scale (cr, scale, scale);
+
+ cairo_move_to (cr, 0, 0);
+ cairo_curve_to (cr, 0, -30, -50, -30, -50, 0);
+ cairo_curve_to (cr, -50, 30, 0, 35, 0, 60);
+ cairo_curve_to (cr, 0, 35, 50, 30, 50, 0);
+ cairo_curve_to (cr, 50, -30, 0, -30, 0, 0);
+ cairo_set_source_rgba (cr, 0.9, 0.0, 0.1, 0.7);
+ cairo_fill (cr);
+}
+
+static GstElement *
+setup_gst_pipeline (CairoOverlayState * overlay_state)
+{
+ GstElement *pipeline;
+ GstElement *cairo_overlay;
+ GstElement *source, *adaptor1, *adaptor2, *sink;
+
+ pipeline = gst_pipeline_new ("cairo-overlay-example");
+
+ /* Adaptors needed because cairooverlay only supports ARGB data */
+ source = gst_element_factory_make ("videotestsrc", "source");
+ adaptor1 = gst_element_factory_make ("ffmpegcolorspace", "adaptor1");
+ cairo_overlay = gst_element_factory_make ("cairooverlay", "overlay");
+ adaptor2 = gst_element_factory_make ("ffmpegcolorspace", "adaptor2");
+ sink = gst_element_factory_make ("autovideosink", "sink");
+
+ /* If failing, the element could not be created */
+ g_assert (cairo_overlay);
+
+ /* Hook up the neccesary signals for cairooverlay */
+ g_signal_connect (cairo_overlay, "draw",
+ G_CALLBACK (draw_overlay), overlay_state);
+ g_signal_connect (cairo_overlay, "caps-changed",
+ G_CALLBACK (prepare_overlay), overlay_state);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, adaptor1,
+ cairo_overlay, adaptor2, sink, NULL);
+
+ if (!gst_element_link_many (source, adaptor1,
+ cairo_overlay, adaptor2, sink, NULL)) {
+ g_warning ("Failed to link elements!");
+ }
+
+ return pipeline;
+}
+
+int
+main (int argc, char **argv)
+{
+ GMainLoop *loop;
+ GstElement *pipeline;
+ GstBus *bus;
+ CairoOverlayState overlay_state = { FALSE, 0, 0 };
+
+ gst_init (&argc, &argv);
+ loop = g_main_loop_new (NULL, FALSE);
+
+ pipeline = setup_gst_pipeline (&overlay_state);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ g_main_loop_run (loop);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/examples/equalizer/Makefile.am b/tests/examples/equalizer/Makefile.am
new file mode 100644
index 0000000..07f2b25
--- /dev/null
+++ b/tests/examples/equalizer/Makefile.am
@@ -0,0 +1,8 @@
+if HAVE_GTK
+noinst_PROGRAMS = demo
+endif
+
+demo_SOURCES = demo.c
+demo_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+
diff --git a/tests/examples/equalizer/Makefile.in b/tests/examples/equalizer/Makefile.in
new file mode 100644
index 0000000..de371a2
--- /dev/null
+++ b/tests/examples/equalizer/Makefile.in
@@ -0,0 +1,752 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_GTK_TRUE@noinst_PROGRAMS = demo$(EXEEXT)
+subdir = tests/examples/equalizer
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_demo_OBJECTS = demo-demo.$(OBJEXT)
+demo_OBJECTS = $(am_demo_OBJECTS)
+am__DEPENDENCIES_1 =
+demo_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+demo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(demo_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(demo_SOURCES)
+DIST_SOURCES = $(demo_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+demo_SOURCES = demo.c
+demo_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/equalizer/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/equalizer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+demo$(EXEEXT): $(demo_OBJECTS) $(demo_DEPENDENCIES) $(EXTRA_demo_DEPENDENCIES)
+ @rm -f demo$(EXEEXT)
+ $(AM_V_CCLD)$(demo_LINK) $(demo_OBJECTS) $(demo_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo-demo.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+demo-demo.o: demo.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_CFLAGS) $(CFLAGS) -MT demo-demo.o -MD -MP -MF $(DEPDIR)/demo-demo.Tpo -c -o demo-demo.o `test -f 'demo.c' || echo '$(srcdir)/'`demo.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo-demo.Tpo $(DEPDIR)/demo-demo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo.c' object='demo-demo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_CFLAGS) $(CFLAGS) -c -o demo-demo.o `test -f 'demo.c' || echo '$(srcdir)/'`demo.c
+
+demo-demo.obj: demo.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_CFLAGS) $(CFLAGS) -MT demo-demo.obj -MD -MP -MF $(DEPDIR)/demo-demo.Tpo -c -o demo-demo.obj `if test -f 'demo.c'; then $(CYGPATH_W) 'demo.c'; else $(CYGPATH_W) '$(srcdir)/demo.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo-demo.Tpo $(DEPDIR)/demo-demo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo.c' object='demo-demo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_CFLAGS) $(CFLAGS) -c -o demo-demo.obj `if test -f 'demo.c'; then $(CYGPATH_W) 'demo.c'; else $(CYGPATH_W) '$(srcdir)/demo.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/equalizer/demo.c b/tests/examples/equalizer/demo.c
new file mode 100644
index 0000000..a446f2a
--- /dev/null
+++ b/tests/examples/equalizer/demo.c
@@ -0,0 +1,254 @@
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+#define NBANDS 10
+
+static GtkWidget *drawingarea = NULL;
+static guint spect_height = 128;
+static guint spect_bands = 256;
+static gfloat height_scale = 2.0;
+
+static void
+on_window_destroy (GObject * object, gpointer user_data)
+{
+ drawingarea = NULL;
+ gtk_main_quit ();
+}
+
+static gboolean
+on_configure_event (GtkWidget * widget, GdkEventConfigure * event,
+ gpointer user_data)
+{
+ GstElement *spectrum = GST_ELEMENT (user_data);
+
+ /*GST_INFO ("%d x %d", event->width, event->height); */
+ spect_height = event->height;
+ height_scale = event->height / 64.0;
+ spect_bands = event->width;
+
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, NULL);
+ return FALSE;
+}
+
+/* control gains */
+static void
+on_gain_changed (GtkRange * range, gpointer user_data)
+{
+ GstObject *band = GST_OBJECT (user_data);
+ gdouble value = gtk_range_get_value (range);
+
+ g_object_set (band, "gain", value, NULL);
+}
+
+/* control bandwidths */
+static void
+on_bandwidth_changed (GtkRange * range, gpointer user_data)
+{
+ GstObject *band = GST_OBJECT (user_data);
+ gdouble value = gtk_range_get_value (range);
+
+ g_object_set (band, "bandwidth", value, NULL);
+}
+
+/* control frequency */
+static void
+on_freq_changed (GtkRange * range, gpointer user_data)
+{
+ GstObject *band = GST_OBJECT (user_data);
+ gdouble value = gtk_range_get_value (range);
+
+ /* hbox */
+ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (range));
+
+ /* frame */
+ GtkWidget *parent_parent = gtk_widget_get_parent (parent);
+ gchar *label = g_strdup_printf ("%d Hz", (int) (value + 0.5));
+
+ gtk_frame_set_label (GTK_FRAME (parent_parent), label);
+ g_free (label);
+
+ g_object_set (band, "freq", value, NULL);
+}
+
+/* draw frequency spectrum as a bunch of bars */
+static void
+draw_spectrum (gfloat * data)
+{
+ gint i;
+ GdkRectangle rect = { 0, 0, spect_bands, spect_height };
+ cairo_t *cr;
+
+ if (!drawingarea)
+ return;
+
+ gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
+ cr = gdk_cairo_create (gtk_widget_get_window (drawingarea));
+
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_rectangle (cr, 0, 0, spect_bands, spect_height);
+ cairo_fill (cr);
+ for (i = 0; i < spect_bands; i++) {
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
+ cairo_fill (cr);
+ }
+ cairo_destroy (cr);
+
+ gdk_window_end_paint (gtk_widget_get_window (drawingarea));
+}
+
+/* receive spectral data from element message */
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ if (message->type == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+ const gchar *name = gst_structure_get_name (s);
+
+ if (strcmp (name, "spectrum") == 0) {
+ gfloat *spect = g_new (gfloat, spect_bands);
+ const GValue *list;
+ const GValue *value;
+ guint i;
+
+ list = gst_structure_get_value (s, "magnitude");
+ for (i = 0; i < spect_bands; ++i) {
+ value = gst_value_list_get_value (list, i);
+ spect[i] = height_scale * g_value_get_float (value);
+ }
+ draw_spectrum (spect);
+ g_free (spect);
+ }
+ }
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *bin;
+ GstElement *src, *capsfilter, *equalizer, *spectrum, *audioconvert, *sink;
+ GstCaps *caps;
+ GstBus *bus;
+ GtkWidget *appwindow, *vbox, *hbox, *widget;
+ int i;
+
+ gst_init (&argc, &argv);
+ gtk_init (&argc, &argv);
+
+ bin = gst_pipeline_new ("bin");
+
+ /* White noise */
+ src = gst_element_factory_make ("audiotestsrc", "src");
+ g_object_set (G_OBJECT (src), "wave", 5, "volume", 0.8, NULL);
+
+ /* Force float32 samples */
+ capsfilter = gst_element_factory_make ("capsfilter", "capsfilter");
+ caps =
+ gst_caps_new_simple ("audio/x-raw-float", "width", G_TYPE_INT, 32, NULL);
+ g_object_set (capsfilter, "caps", caps, NULL);
+
+ equalizer = gst_element_factory_make ("equalizer-nbands", "equalizer");
+ g_object_set (G_OBJECT (equalizer), "num-bands", NBANDS, NULL);
+
+ spectrum = gst_element_factory_make ("spectrum", "spectrum");
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
+ "message", TRUE, "interval", 500 * GST_MSECOND, NULL);
+
+ audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+
+ sink = gst_element_factory_make ("autoaudiosink", "sink");
+
+ gst_bin_add_many (GST_BIN (bin), src, capsfilter, equalizer, spectrum,
+ audioconvert, sink, NULL);
+ if (!gst_element_link_many (src, capsfilter, equalizer, spectrum,
+ audioconvert, sink, NULL)) {
+ fprintf (stderr, "can't link elements\n");
+ exit (1);
+ }
+
+ bus = gst_element_get_bus (bin);
+ gst_bus_add_watch (bus, message_handler, NULL);
+ gst_object_unref (bus);
+
+ appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (G_OBJECT (appwindow), "destroy",
+ G_CALLBACK (on_window_destroy), NULL);
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ drawingarea = gtk_drawing_area_new ();
+ gtk_widget_set_size_request (drawingarea, spect_bands, spect_height);
+ g_signal_connect (G_OBJECT (drawingarea), "configure-event",
+ G_CALLBACK (on_configure_event), (gpointer) spectrum);
+ gtk_box_pack_start (GTK_BOX (vbox), drawingarea, TRUE, TRUE, 0);
+
+ hbox = gtk_hbox_new (FALSE, 20);
+
+ for (i = 0; i < NBANDS; i++) {
+ GstObject *band;
+ gdouble freq;
+ gdouble bw;
+ gdouble gain;
+ gchar *label;
+ GtkWidget *frame, *scales_hbox;
+
+ band = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
+ g_assert (band != NULL);
+ g_object_get (G_OBJECT (band), "freq", &freq, NULL);
+ g_object_get (G_OBJECT (band), "bandwidth", &bw, NULL);
+ g_object_get (G_OBJECT (band), "gain", &gain, NULL);
+
+ label = g_strdup_printf ("%d Hz", (int) (freq + 0.5));
+ frame = gtk_frame_new (label);
+ g_free (label);
+
+ scales_hbox = gtk_hbox_new (FALSE, 6);
+
+ widget = gtk_vscale_new_with_range (-24.0, 12.0, 0.5);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
+ gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
+ gtk_range_set_value (GTK_RANGE (widget), gain);
+ gtk_widget_set_size_request (widget, 25, 150);
+ g_signal_connect (G_OBJECT (widget), "value-changed",
+ G_CALLBACK (on_gain_changed), (gpointer) band);
+ gtk_box_pack_start (GTK_BOX (scales_hbox), widget, FALSE, FALSE, 0);
+
+ widget = gtk_vscale_new_with_range (0.0, 20000.0, 5.0);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
+ gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
+ gtk_range_set_value (GTK_RANGE (widget), bw);
+ gtk_widget_set_size_request (widget, 25, 150);
+ g_signal_connect (G_OBJECT (widget), "value-changed",
+ G_CALLBACK (on_bandwidth_changed), (gpointer) band);
+ gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0);
+
+ widget = gtk_vscale_new_with_range (20.0, 20000.0, 5.0);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
+ gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
+ gtk_range_set_value (GTK_RANGE (widget), freq);
+ gtk_widget_set_size_request (widget, 25, 150);
+ g_signal_connect (G_OBJECT (widget), "value-changed",
+ G_CALLBACK (on_freq_changed), (gpointer) band);
+ gtk_box_pack_start (GTK_BOX (scales_hbox), widget, TRUE, TRUE, 0);
+
+ gtk_container_add (GTK_CONTAINER (frame), scales_hbox);
+
+ gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
+ }
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+
+ gtk_container_add (GTK_CONTAINER (appwindow), vbox);
+ gtk_widget_show_all (appwindow);
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ gtk_main ();
+ gst_element_set_state (bin, GST_STATE_NULL);
+
+ gst_object_unref (bin);
+
+ return 0;
+}
diff --git a/tests/examples/jack/Makefile.am b/tests/examples/jack/Makefile.am
new file mode 100644
index 0000000..ad61cbd
--- /dev/null
+++ b/tests/examples/jack/Makefile.am
@@ -0,0 +1,12 @@
+if HAVE_GTK
+GTK_EXAMPLES=jack_client
+else
+GTK_EXAMPLES=
+endif
+
+noinst_PROGRAMS = $(GTK_EXAMPLES)
+
+jack_client_SOURCES = jack_client.c
+jack_client_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) $(JACK_CFLAGS)
+jack_client_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) $(JACK_LIBS)
+
diff --git a/tests/examples/jack/Makefile.in b/tests/examples/jack/Makefile.in
new file mode 100644
index 0000000..bf112c0
--- /dev/null
+++ b/tests/examples/jack/Makefile.in
@@ -0,0 +1,753 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = $(am__EXEEXT_1)
+subdir = tests/examples/jack
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_GTK_TRUE@am__EXEEXT_1 = jack_client$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_jack_client_OBJECTS = jack_client-jack_client.$(OBJEXT)
+jack_client_OBJECTS = $(am_jack_client_OBJECTS)
+jack_client_LDADD = $(LDADD)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+jack_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(jack_client_CFLAGS) \
+ $(CFLAGS) $(jack_client_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(jack_client_SOURCES)
+DIST_SOURCES = $(jack_client_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@HAVE_GTK_FALSE@GTK_EXAMPLES =
+@HAVE_GTK_TRUE@GTK_EXAMPLES = jack_client
+jack_client_SOURCES = jack_client.c
+jack_client_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) $(JACK_CFLAGS)
+jack_client_LDFLAGS = $(GST_LIBS) $(GTK_LIBS) $(JACK_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/jack/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/jack/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+jack_client$(EXEEXT): $(jack_client_OBJECTS) $(jack_client_DEPENDENCIES) $(EXTRA_jack_client_DEPENDENCIES)
+ @rm -f jack_client$(EXEEXT)
+ $(AM_V_CCLD)$(jack_client_LINK) $(jack_client_OBJECTS) $(jack_client_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jack_client-jack_client.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+jack_client-jack_client.o: jack_client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jack_client_CFLAGS) $(CFLAGS) -MT jack_client-jack_client.o -MD -MP -MF $(DEPDIR)/jack_client-jack_client.Tpo -c -o jack_client-jack_client.o `test -f 'jack_client.c' || echo '$(srcdir)/'`jack_client.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/jack_client-jack_client.Tpo $(DEPDIR)/jack_client-jack_client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='jack_client.c' object='jack_client-jack_client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jack_client_CFLAGS) $(CFLAGS) -c -o jack_client-jack_client.o `test -f 'jack_client.c' || echo '$(srcdir)/'`jack_client.c
+
+jack_client-jack_client.obj: jack_client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jack_client_CFLAGS) $(CFLAGS) -MT jack_client-jack_client.obj -MD -MP -MF $(DEPDIR)/jack_client-jack_client.Tpo -c -o jack_client-jack_client.obj `if test -f 'jack_client.c'; then $(CYGPATH_W) 'jack_client.c'; else $(CYGPATH_W) '$(srcdir)/jack_client.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/jack_client-jack_client.Tpo $(DEPDIR)/jack_client-jack_client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='jack_client.c' object='jack_client-jack_client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jack_client_CFLAGS) $(CFLAGS) -c -o jack_client-jack_client.obj `if test -f 'jack_client.c'; then $(CYGPATH_W) 'jack_client.c'; else $(CYGPATH_W) '$(srcdir)/jack_client.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/jack/jack_client.c b/tests/examples/jack/jack_client.c
new file mode 100644
index 0000000..99599ab
--- /dev/null
+++ b/tests/examples/jack/jack_client.c
@@ -0,0 +1,79 @@
+/* This app demonstrates the creation and use of a jack client in conjunction
+ * with the jack plugins. This way, an application can control the jack client
+ * directly.
+ */
+
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+#include <jack/jack.h>
+
+static gboolean
+quit_cb (gpointer data)
+{
+ gtk_main_quit ();
+ return FALSE;
+}
+
+int
+main (int argc, char **argv)
+{
+ jack_client_t *src_client, *sink_client;
+ jack_status_t status;
+ GstElement *pipeline, *src, *sink;
+ GstStateChangeReturn ret;
+
+ gst_init (&argc, &argv);
+
+ /* create jack clients */
+ src_client = jack_client_open ("src_client", JackNoStartServer, &status);
+ if (src_client == NULL) {
+ if (status & JackServerFailed)
+ g_print ("JACK server not running\n");
+ else
+ g_print ("jack_client_open() failed, status = 0x%2.0x\n", status);
+ return 1;
+ }
+
+ sink_client = jack_client_open ("sink_client", JackNoStartServer, &status);
+ if (sink_client == NULL) {
+ if (status & JackServerFailed)
+ g_print ("JACK server not running\n");
+ else
+ g_print ("jack_client_open() failed, status = 0x%2.0x\n", status);
+ return 1;
+ }
+
+ /* create gst elements */
+ pipeline = gst_pipeline_new ("my_pipeline");
+
+ src = gst_element_factory_make ("jackaudiosrc", NULL);
+ sink = gst_element_factory_make ("jackaudiosink", NULL);
+
+ g_object_set (src, "client", src_client, NULL);
+ g_object_set (sink, "client", sink_client, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
+
+ /* link everything together */
+ if (!gst_element_link (src, sink)) {
+ g_print ("Failed to link elements!\n");
+ return 1;
+ }
+
+ /* run */
+ ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ if (ret == GST_STATE_CHANGE_FAILURE) {
+ g_print ("Failed to start up pipeline!\n");
+ return 1;
+ }
+
+ /* quit after 5 seconds */
+ g_timeout_add (5000, (GSourceFunc) quit_cb, NULL);
+ gtk_main ();
+
+ /* clean up */
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/examples/level/Makefile.am b/tests/examples/level/Makefile.am
new file mode 100644
index 0000000..67ca719
--- /dev/null
+++ b/tests/examples/level/Makefile.am
@@ -0,0 +1,4 @@
+noinst_PROGRAMS = level-example
+level_example_CFLAGS = $(GST_CFLAGS)
+level_example_LDADD = $(GST_LIBS) $(LIBM)
+
diff --git a/tests/examples/level/Makefile.in b/tests/examples/level/Makefile.in
new file mode 100644
index 0000000..3ec0a10
--- /dev/null
+++ b/tests/examples/level/Makefile.in
@@ -0,0 +1,751 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = level-example$(EXEEXT)
+subdir = tests/examples/level
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+level_example_SOURCES = level-example.c
+level_example_OBJECTS = level_example-level-example.$(OBJEXT)
+am__DEPENDENCIES_1 =
+level_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+level_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(level_example_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = level-example.c
+DIST_SOURCES = level-example.c
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+level_example_CFLAGS = $(GST_CFLAGS)
+level_example_LDADD = $(GST_LIBS) $(LIBM)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/level/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/level/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+level-example$(EXEEXT): $(level_example_OBJECTS) $(level_example_DEPENDENCIES) $(EXTRA_level_example_DEPENDENCIES)
+ @rm -f level-example$(EXEEXT)
+ $(AM_V_CCLD)$(level_example_LINK) $(level_example_OBJECTS) $(level_example_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/level_example-level-example.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+level_example-level-example.o: level-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(level_example_CFLAGS) $(CFLAGS) -MT level_example-level-example.o -MD -MP -MF $(DEPDIR)/level_example-level-example.Tpo -c -o level_example-level-example.o `test -f 'level-example.c' || echo '$(srcdir)/'`level-example.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/level_example-level-example.Tpo $(DEPDIR)/level_example-level-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='level-example.c' object='level_example-level-example.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(level_example_CFLAGS) $(CFLAGS) -c -o level_example-level-example.o `test -f 'level-example.c' || echo '$(srcdir)/'`level-example.c
+
+level_example-level-example.obj: level-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(level_example_CFLAGS) $(CFLAGS) -MT level_example-level-example.obj -MD -MP -MF $(DEPDIR)/level_example-level-example.Tpo -c -o level_example-level-example.obj `if test -f 'level-example.c'; then $(CYGPATH_W) 'level-example.c'; else $(CYGPATH_W) '$(srcdir)/level-example.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/level_example-level-example.Tpo $(DEPDIR)/level_example-level-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='level-example.c' object='level_example-level-example.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(level_example_CFLAGS) $(CFLAGS) -c -o level_example-level-example.obj `if test -f 'level-example.c'; then $(CYGPATH_W) 'level-example.c'; else $(CYGPATH_W) '$(srcdir)/level-example.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/level/level-example.c b/tests/examples/level/level-example.c
new file mode 100644
index 0000000..a85d751
--- /dev/null
+++ b/tests/examples/level/level-example.c
@@ -0,0 +1,129 @@
+/* GStreamer
+ * Copyright (C) 2000,2001,2002,2003,2005
+ * Thomas Vander Stichele <thomas at apestaart dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+
+ if (message->type == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+ const gchar *name = gst_structure_get_name (s);
+
+ if (strcmp (name, "level") == 0) {
+ gint channels;
+ GstClockTime endtime;
+ gdouble rms_dB, peak_dB, decay_dB;
+ gdouble rms;
+ const GValue *list;
+ const GValue *value;
+
+ gint i;
+
+ if (!gst_structure_get_clock_time (s, "endtime", &endtime))
+ g_warning ("Could not parse endtime");
+ /* we can get the number of channels as the length of any of the value
+ * lists */
+ list = gst_structure_get_value (s, "rms");
+ channels = gst_value_list_get_size (list);
+
+ g_print ("endtime: %" GST_TIME_FORMAT ", channels: %d\n",
+ GST_TIME_ARGS (endtime), channels);
+ for (i = 0; i < channels; ++i) {
+ g_print ("channel %d\n", i);
+ list = gst_structure_get_value (s, "rms");
+ value = gst_value_list_get_value (list, i);
+ rms_dB = g_value_get_double (value);
+ list = gst_structure_get_value (s, "peak");
+ value = gst_value_list_get_value (list, i);
+ peak_dB = g_value_get_double (value);
+ list = gst_structure_get_value (s, "decay");
+ value = gst_value_list_get_value (list, i);
+ decay_dB = g_value_get_double (value);
+ g_print (" RMS: %f dB, peak: %f dB, decay: %f dB\n",
+ rms_dB, peak_dB, decay_dB);
+
+ /* converting from dB to normal gives us a value between 0.0 and 1.0 */
+ rms = pow (10, rms_dB / 20);
+ g_print (" normalized rms value: %f\n", rms);
+ }
+ }
+ }
+ /* we handled the message we want, and ignored the ones we didn't want.
+ * so the core can unref the message for us */
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *audiotestsrc, *audioconvert, *level, *fakesink;
+ GstElement *pipeline;
+ GstCaps *caps;
+ GstBus *bus;
+ guint watch_id;
+ GMainLoop *loop;
+
+ gst_init (&argc, &argv);
+
+ caps = gst_caps_from_string ("audio/x-raw-int,channels=2");
+
+ pipeline = gst_pipeline_new (NULL);
+ g_assert (pipeline);
+ audiotestsrc = gst_element_factory_make ("audiotestsrc", NULL);
+ g_assert (audiotestsrc);
+ audioconvert = gst_element_factory_make ("audioconvert", NULL);
+ g_assert (audioconvert);
+ level = gst_element_factory_make ("level", NULL);
+ g_assert (level);
+ fakesink = gst_element_factory_make ("fakesink", NULL);
+ g_assert (fakesink);
+
+ gst_bin_add_many (GST_BIN (pipeline), audiotestsrc, audioconvert, level,
+ fakesink, NULL);
+ if (!gst_element_link (audiotestsrc, audioconvert))
+ g_error ("Failed to link audiotestsrc and audioconvert");
+ if (!gst_element_link_filtered (audioconvert, level, caps))
+ g_error ("Failed to link audioconvert and level");
+ if (!gst_element_link (level, fakesink))
+ g_error ("Failed to link level and fakesink");
+
+ /* make sure we'll get messages */
+ g_object_set (G_OBJECT (level), "message", TRUE, NULL);
+ /* run synced and not as fast as we can */
+ g_object_set (G_OBJECT (fakesink), "sync", TRUE, NULL);
+
+ bus = gst_element_get_bus (pipeline);
+ watch_id = gst_bus_add_watch (bus, message_handler, NULL);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ /* we need to run a GLib main loop to get the messages */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ g_source_remove (watch_id);
+ g_main_loop_unref (loop);
+ return 0;
+}
diff --git a/tests/examples/pulse/Makefile.am b/tests/examples/pulse/Makefile.am
new file mode 100644
index 0000000..5d35e61
--- /dev/null
+++ b/tests/examples/pulse/Makefile.am
@@ -0,0 +1,5 @@
+noinst_PROGRAMS = pulse
+pulse_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+pulse_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+
+
diff --git a/tests/examples/pulse/Makefile.in b/tests/examples/pulse/Makefile.in
new file mode 100644
index 0000000..da82e6e
--- /dev/null
+++ b/tests/examples/pulse/Makefile.in
@@ -0,0 +1,751 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = pulse$(EXEEXT)
+subdir = tests/examples/pulse
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+pulse_SOURCES = pulse.c
+pulse_OBJECTS = pulse-pulse.$(OBJEXT)
+am__DEPENDENCIES_1 =
+pulse_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+pulse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(pulse_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = pulse.c
+DIST_SOURCES = pulse.c
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+pulse_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+pulse_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/pulse/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/pulse/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+pulse$(EXEEXT): $(pulse_OBJECTS) $(pulse_DEPENDENCIES) $(EXTRA_pulse_DEPENDENCIES)
+ @rm -f pulse$(EXEEXT)
+ $(AM_V_CCLD)$(pulse_LINK) $(pulse_OBJECTS) $(pulse_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pulse-pulse.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+pulse-pulse.o: pulse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pulse_CFLAGS) $(CFLAGS) -MT pulse-pulse.o -MD -MP -MF $(DEPDIR)/pulse-pulse.Tpo -c -o pulse-pulse.o `test -f 'pulse.c' || echo '$(srcdir)/'`pulse.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pulse-pulse.Tpo $(DEPDIR)/pulse-pulse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pulse.c' object='pulse-pulse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pulse_CFLAGS) $(CFLAGS) -c -o pulse-pulse.o `test -f 'pulse.c' || echo '$(srcdir)/'`pulse.c
+
+pulse-pulse.obj: pulse.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pulse_CFLAGS) $(CFLAGS) -MT pulse-pulse.obj -MD -MP -MF $(DEPDIR)/pulse-pulse.Tpo -c -o pulse-pulse.obj `if test -f 'pulse.c'; then $(CYGPATH_W) 'pulse.c'; else $(CYGPATH_W) '$(srcdir)/pulse.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pulse-pulse.Tpo $(DEPDIR)/pulse-pulse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pulse.c' object='pulse-pulse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pulse_CFLAGS) $(CFLAGS) -c -o pulse-pulse.obj `if test -f 'pulse.c'; then $(CYGPATH_W) 'pulse.c'; else $(CYGPATH_W) '$(srcdir)/pulse.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/pulse/pulse.c b/tests/examples/pulse/pulse.c
new file mode 100644
index 0000000..54c1a87
--- /dev/null
+++ b/tests/examples/pulse/pulse.c
@@ -0,0 +1,70 @@
+/* GStreamer
+ * Copyright (C) 2010 Wim Taymans <wim.taymans at gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/gst.h>
+
+#include <gst/interfaces/propertyprobe.h>
+
+static void
+test_element (const gchar * name)
+{
+ GstElement *element;
+ GstPropertyProbe *probe = NULL;
+ const GParamSpec *pspec = NULL;
+ GValueArray *array = NULL;
+ guint i;
+
+ g_print ("testing element %s\n", name);
+ element = gst_element_factory_make (name, NULL);
+ g_assert (element);
+
+ gst_element_set_state (element, GST_STATE_READY);
+ probe = GST_PROPERTY_PROBE (element);
+ pspec = gst_property_probe_get_property (probe, "device");
+
+ array = gst_property_probe_probe_and_get_values (probe, pspec);
+ g_assert (array);
+
+ for (i = 0; i < array->n_values; i++) {
+ GValue *device = NULL;
+ gchar *name = NULL;
+
+ device = g_value_array_get_nth (array, i);
+ g_object_set_property (G_OBJECT (element), "device", device);
+ g_object_get (G_OBJECT (element), "device-name", &name, NULL);
+
+ g_print ("device: %s (%s)\n", g_value_get_string (device),
+ GST_STR_NULL (name));
+ }
+ g_value_array_free (array);
+
+ gst_element_set_state (element, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (element));
+}
+
+int
+main (int argc, char *argv[])
+{
+ gst_init (&argc, &argv);
+
+ test_element ("pulsesink");
+ test_element ("pulsesrc");
+
+ return 0;
+}
diff --git a/tests/examples/rtp/Makefile.am b/tests/examples/rtp/Makefile.am
new file mode 100644
index 0000000..f636e81
--- /dev/null
+++ b/tests/examples/rtp/Makefile.am
@@ -0,0 +1,22 @@
+noinst_PROGRAMS = server-alsasrc-PCMA client-PCMA
+
+server_alsasrc_PCMA_SOURCES = server-alsasrc-PCMA.c
+server_alsasrc_PCMA_CFLAGS = $(GST_CFLAGS)
+server_alsasrc_PCMA_LDADD = $(GST_LIBS) $(LIBM)
+
+client_PCMA_SOURCES = client-PCMA.c
+client_PCMA_CFLAGS = $(GST_CFLAGS)
+client_PCMA_LDADD = $(GST_LIBS) $(LIBM)
+
+noinst_SCRIPTS=client-H263p-AMR.sh \
+ client-H263p-PCMA.sh \
+ client-H264-PCMA.sh \
+ client-PCMA.sh \
+ server-alsasrc-PCMA.sh \
+ server-v4l2-H263p-alsasrc-AMR.sh \
+ server-v4l2-H264-alsasrc-PCMA.sh \
+ server-VTS-H263p-ATS-PCMA.sh
+
+EXTRA_DIST= $(noinst_SCRIPTS) \
+ client-H263p-PCMA.sdp \
+ client-H264-PCMA.sdp
diff --git a/tests/examples/rtp/Makefile.in b/tests/examples/rtp/Makefile.in
new file mode 100644
index 0000000..56e5948
--- /dev/null
+++ b/tests/examples/rtp/Makefile.in
@@ -0,0 +1,796 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = server-alsasrc-PCMA$(EXEEXT) client-PCMA$(EXEEXT)
+subdir = tests/examples/rtp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_client_PCMA_OBJECTS = client_PCMA-client-PCMA.$(OBJEXT)
+client_PCMA_OBJECTS = $(am_client_PCMA_OBJECTS)
+am__DEPENDENCIES_1 =
+client_PCMA_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+client_PCMA_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(client_PCMA_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_server_alsasrc_PCMA_OBJECTS = \
+ server_alsasrc_PCMA-server-alsasrc-PCMA.$(OBJEXT)
+server_alsasrc_PCMA_OBJECTS = $(am_server_alsasrc_PCMA_OBJECTS)
+server_alsasrc_PCMA_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+server_alsasrc_PCMA_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(server_alsasrc_PCMA_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SCRIPTS = $(noinst_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(client_PCMA_SOURCES) $(server_alsasrc_PCMA_SOURCES)
+DIST_SOURCES = $(client_PCMA_SOURCES) $(server_alsasrc_PCMA_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+server_alsasrc_PCMA_SOURCES = server-alsasrc-PCMA.c
+server_alsasrc_PCMA_CFLAGS = $(GST_CFLAGS)
+server_alsasrc_PCMA_LDADD = $(GST_LIBS) $(LIBM)
+client_PCMA_SOURCES = client-PCMA.c
+client_PCMA_CFLAGS = $(GST_CFLAGS)
+client_PCMA_LDADD = $(GST_LIBS) $(LIBM)
+noinst_SCRIPTS = client-H263p-AMR.sh \
+ client-H263p-PCMA.sh \
+ client-H264-PCMA.sh \
+ client-PCMA.sh \
+ server-alsasrc-PCMA.sh \
+ server-v4l2-H263p-alsasrc-AMR.sh \
+ server-v4l2-H264-alsasrc-PCMA.sh \
+ server-VTS-H263p-ATS-PCMA.sh
+
+EXTRA_DIST = $(noinst_SCRIPTS) \
+ client-H263p-PCMA.sdp \
+ client-H264-PCMA.sdp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/rtp/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/rtp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+client-PCMA$(EXEEXT): $(client_PCMA_OBJECTS) $(client_PCMA_DEPENDENCIES) $(EXTRA_client_PCMA_DEPENDENCIES)
+ @rm -f client-PCMA$(EXEEXT)
+ $(AM_V_CCLD)$(client_PCMA_LINK) $(client_PCMA_OBJECTS) $(client_PCMA_LDADD) $(LIBS)
+server-alsasrc-PCMA$(EXEEXT): $(server_alsasrc_PCMA_OBJECTS) $(server_alsasrc_PCMA_DEPENDENCIES) $(EXTRA_server_alsasrc_PCMA_DEPENDENCIES)
+ @rm -f server-alsasrc-PCMA$(EXEEXT)
+ $(AM_V_CCLD)$(server_alsasrc_PCMA_LINK) $(server_alsasrc_PCMA_OBJECTS) $(server_alsasrc_PCMA_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_PCMA-client-PCMA.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+client_PCMA-client-PCMA.o: client-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_PCMA_CFLAGS) $(CFLAGS) -MT client_PCMA-client-PCMA.o -MD -MP -MF $(DEPDIR)/client_PCMA-client-PCMA.Tpo -c -o client_PCMA-client-PCMA.o `test -f 'client-PCMA.c' || echo '$(srcdir)/'`client-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/client_PCMA-client-PCMA.Tpo $(DEPDIR)/client_PCMA-client-PCMA.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='client-PCMA.c' object='client_PCMA-client-PCMA.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_PCMA_CFLAGS) $(CFLAGS) -c -o client_PCMA-client-PCMA.o `test -f 'client-PCMA.c' || echo '$(srcdir)/'`client-PCMA.c
+
+client_PCMA-client-PCMA.obj: client-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_PCMA_CFLAGS) $(CFLAGS) -MT client_PCMA-client-PCMA.obj -MD -MP -MF $(DEPDIR)/client_PCMA-client-PCMA.Tpo -c -o client_PCMA-client-PCMA.obj `if test -f 'client-PCMA.c'; then $(CYGPATH_W) 'client-PCMA.c'; else $(CYGPATH_W) '$(srcdir)/client-PCMA.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/client_PCMA-client-PCMA.Tpo $(DEPDIR)/client_PCMA-client-PCMA.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='client-PCMA.c' object='client_PCMA-client-PCMA.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_PCMA_CFLAGS) $(CFLAGS) -c -o client_PCMA-client-PCMA.obj `if test -f 'client-PCMA.c'; then $(CYGPATH_W) 'client-PCMA.c'; else $(CYGPATH_W) '$(srcdir)/client-PCMA.c'; fi`
+
+server_alsasrc_PCMA-server-alsasrc-PCMA.o: server-alsasrc-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(server_alsasrc_PCMA_CFLAGS) $(CFLAGS) -MT server_alsasrc_PCMA-server-alsasrc-PCMA.o -MD -MP -MF $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Tpo -c -o server_alsasrc_PCMA-server-alsasrc-PCMA.o `test -f 'server-alsasrc-PCMA.c' || echo '$(srcdir)/'`server-alsasrc-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Tpo $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='server-alsasrc-PCMA.c' object='server_alsasrc_PCMA-server-alsasrc-PCMA.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(server_alsasrc_PCMA_CFLAGS) $(CFLAGS) -c -o server_alsasrc_PCMA-server-alsasrc-PCMA.o `test -f 'server-alsasrc-PCMA.c' || echo '$(srcdir)/'`server-alsasrc-PCMA.c
+
+server_alsasrc_PCMA-server-alsasrc-PCMA.obj: server-alsasrc-PCMA.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(server_alsasrc_PCMA_CFLAGS) $(CFLAGS) -MT server_alsasrc_PCMA-server-alsasrc-PCMA.obj -MD -MP -MF $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Tpo -c -o server_alsasrc_PCMA-server-alsasrc-PCMA.obj `if test -f 'server-alsasrc-PCMA.c'; then $(CYGPATH_W) 'server-alsasrc-PCMA.c'; else $(CYGPATH_W) '$(srcdir)/server-alsasrc-PCMA.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Tpo $(DEPDIR)/server_alsasrc_PCMA-server-alsasrc-PCMA.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='server-alsasrc-PCMA.c' object='server_alsasrc_PCMA-server-alsasrc-PCMA.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(server_alsasrc_PCMA_CFLAGS) $(CFLAGS) -c -o server_alsasrc_PCMA-server-alsasrc-PCMA.obj `if test -f 'server-alsasrc-PCMA.c'; then $(CYGPATH_W) 'server-alsasrc-PCMA.c'; else $(CYGPATH_W) '$(srcdir)/server-alsasrc-PCMA.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/rtp/client-H263p-AMR.sh b/tests/examples/rtp/client-H263p-AMR.sh
new file mode 100755
index 0000000..bb0b795
--- /dev/null
+++ b/tests/examples/rtp/client-H263p-AMR.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# A simple RTP receiver
+#
+
+VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
+AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)AMR,encoding-params=(string)1,octet-align=(string)1"
+
+VIDEO_DEC="rtph263pdepay ! ffdec_h263"
+AUDIO_DEC="rtpamrdepay ! amrnbdec"
+
+VIDEO_SINK="ffmpegcolorspace ! autovideosink"
+AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink"
+
+gst-launch -v gstrtpbin name=rtpbin latency=100 \
+ udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
+ rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \
+ udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
+ rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
+ udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
+ rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \
+ udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
+ rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false
diff --git a/tests/examples/rtp/client-H263p-PCMA.sdp b/tests/examples/rtp/client-H263p-PCMA.sdp
new file mode 100644
index 0000000..8d2264f
--- /dev/null
+++ b/tests/examples/rtp/client-H263p-PCMA.sdp
@@ -0,0 +1,12 @@
+v=0
+o=- 1188340656180883 1 IN IP4 127.0.0.1
+s=Session streamed by GStreamer
+i=server.sh
+t=0 0
+a=tool:GStreamer
+a=type:broadcast
+m=video 5000 RTP/AVP 96
+c=IN IP4 127.0.0.1
+a=rtpmap:96 H263-1998/90000
+m=audio 5002 RTP/AVP 8
+c=IN IP4 127.0.0.1
diff --git a/tests/examples/rtp/client-H263p-PCMA.sh b/tests/examples/rtp/client-H263p-PCMA.sh
new file mode 100755
index 0000000..9db0d7e
--- /dev/null
+++ b/tests/examples/rtp/client-H263p-PCMA.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# A simple RTP receiver
+#
+
+VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
+AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
+
+#DEST=192.168.1.126
+DEST=localhost
+
+VIDEO_DEC="rtph263pdepay ! ffdec_h263"
+AUDIO_DEC="rtppcmadepay ! alawdec"
+
+VIDEO_SINK="ffmpegcolorspace ! autovideosink"
+AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink"
+
+LATENCY=100
+
+gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \
+ udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
+ rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \
+ udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
+ rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=false async=false \
+ udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
+ rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \
+ udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
+ rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5007 sync=false async=false
diff --git a/tests/examples/rtp/client-H264-PCMA.sdp b/tests/examples/rtp/client-H264-PCMA.sdp
new file mode 100644
index 0000000..85aa75f
--- /dev/null
+++ b/tests/examples/rtp/client-H264-PCMA.sdp
@@ -0,0 +1,12 @@
+v=0
+o=- 1188340656180883 1 IN IP4 127.0.0.1
+s=Session streamed by GStreamer
+i=server.sh
+t=0 0
+a=tool:GStreamer
+a=type:broadcast
+m=video 5000 RTP/AVP 96
+c=IN IP4 127.0.0.1
+a=rtpmap:96 H264/90000
+m=audio 5002 RTP/AVP 8
+c=IN IP4 127.0.0.1
diff --git a/tests/examples/rtp/client-H264-PCMA.sh b/tests/examples/rtp/client-H264-PCMA.sh
new file mode 100755
index 0000000..7b104ab
--- /dev/null
+++ b/tests/examples/rtp/client-H264-PCMA.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# A simple RTP receiver
+#
+# receives H264 encoded RTP video on port 5000, RTCP is received on port 5001.
+# the receiver RTCP reports are sent to port 5005
+# receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003.
+# the receiver RTCP reports are sent to port 5007
+#
+# .-------. .----------. .---------. .-------. .-----------.
+# RTP |udpsrc | | rtpbin | |h264depay| |h264dec| |xvimagesink|
+# port=5000 | src->recv_rtp recv_rtp->sink src->sink src->sink |
+# '-------' | | '---------' '-------' '-----------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5005
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5001 | src->recv_rtcp |
+# '-------' | |
+# | |
+# .-------. | | .---------. .-------. .-------------.
+# RTP |udpsrc | | rtpbin | |pcmadepay| |alawdec| |autoaudiosink|
+# port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink |
+# '-------' | | '---------' '-------' '-------------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5007
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5003 | src->recv_rtcp |
+# '-------' '----------'
+
+# the destination machine to send RTCP to. This is the address of the sender and
+# is used to send back the RTCP reports of this receiver. If the data is sent
+# from another machine, change this address.
+DEST=127.0.0.1
+
+# this adjusts the latency in the receiver
+LATENCY=200
+
+# the caps of the sender RTP stream. This is usually negotiated out of band with
+# SDP or RTSP. normally these caps will also include SPS and PPS but we don't
+# have a mechanism to get this from the sender with a -launch line.
+VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
+AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
+
+VIDEO_DEC="rtph264depay ! ffdec_h264"
+AUDIO_DEC="rtppcmadepay ! alawdec"
+
+VIDEO_SINK="ffmpegcolorspace ! autovideosink"
+AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink"
+
+gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \
+ udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
+ rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \
+ udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
+ rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false async=false \
+ udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
+ rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \
+ udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
+ rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false
diff --git a/tests/examples/rtp/client-PCMA.c b/tests/examples/rtp/client-PCMA.c
new file mode 100644
index 0000000..885b826
--- /dev/null
+++ b/tests/examples/rtp/client-PCMA.c
@@ -0,0 +1,237 @@
+/* GStreamer
+ * Copyright (C) 2009 Wim Taymans <wim.taymans@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+
+/*
+ * A simple RTP receiver
+ *
+ * receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003.
+ * the receiver RTCP reports are sent to port 5007
+ *
+ * .-------. .----------. .---------. .-------. .--------.
+ * RTP |udpsrc | | rtpbin | |pcmadepay| |alawdec| |alsasink|
+ * port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink |
+ * '-------' | | '---------' '-------' '--------'
+ * | |
+ * | | .-------.
+ * | | |udpsink| RTCP
+ * | send_rtcp->sink | port=5007
+ * .-------. | | '-------' sync=false
+ * RTCP |udpsrc | | | async=false
+ * port=5003 | src->recv_rtcp |
+ * '-------' '----------'
+ */
+
+/* the caps of the sender RTP stream. This is usually negotiated out of band with
+ * SDP or RTSP. */
+#define AUDIO_CAPS "application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
+
+#define AUDIO_DEPAY "rtppcmadepay"
+#define AUDIO_DEC "alawdec"
+#define AUDIO_SINK "autoaudiosink"
+
+/* the destination machine to send RTCP to. This is the address of the sender and
+ * is used to send back the RTCP reports of this receiver. If the data is sent
+ * from another machine, change this address. */
+#define DEST_HOST "127.0.0.1"
+
+/* print the stats of a source */
+static void
+print_source_stats (GObject * source)
+{
+ GstStructure *stats;
+ gchar *str;
+
+ g_return_if_fail (source != NULL);
+
+ /* get the source stats */
+ g_object_get (source, "stats", &stats, NULL);
+
+ /* simply dump the stats structure */
+ str = gst_structure_to_string (stats);
+ g_print ("source stats: %s\n", str);
+
+ gst_structure_free (stats);
+ g_free (str);
+}
+
+/* will be called when gstrtpbin signals on-ssrc-active. It means that an RTCP
+ * packet was received from another source. */
+static void
+on_ssrc_active_cb (GstElement * rtpbin, guint sessid, guint ssrc,
+ GstElement * depay)
+{
+ GObject *session, *isrc, *osrc;
+
+ g_print ("got RTCP from session %u, SSRC %u\n", sessid, ssrc);
+
+ /* get the right session */
+ g_signal_emit_by_name (rtpbin, "get-internal-session", sessid, &session);
+
+ /* get the internal source (the SSRC allocated to us, the receiver */
+ g_object_get (session, "internal-source", &isrc, NULL);
+ print_source_stats (isrc);
+
+ /* get the remote source that sent us RTCP */
+ g_signal_emit_by_name (session, "get-source-by-ssrc", ssrc, &osrc);
+ print_source_stats (osrc);
+}
+
+/* will be called when rtpbin has validated a payload that we can depayload */
+static void
+pad_added_cb (GstElement * rtpbin, GstPad * new_pad, GstElement * depay)
+{
+ GstPad *sinkpad;
+ GstPadLinkReturn lres;
+
+ g_print ("new payload on pad: %s\n", GST_PAD_NAME (new_pad));
+
+ sinkpad = gst_element_get_static_pad (depay, "sink");
+ g_assert (sinkpad);
+
+ lres = gst_pad_link (new_pad, sinkpad);
+ g_assert (lres == GST_PAD_LINK_OK);
+ gst_object_unref (sinkpad);
+}
+
+/* build a pipeline equivalent to:
+ *
+ * gst-launch -v gstrtpbin name=rtpbin \
+ * udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0 \
+ * rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \
+ * udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 \
+ * rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false
+ */
+int
+main (int argc, char *argv[])
+{
+ GstElement *rtpbin, *rtpsrc, *rtcpsrc, *rtcpsink;
+ GstElement *audiodepay, *audiodec, *audiores, *audioconv, *audiosink;
+ GstElement *pipeline;
+ GMainLoop *loop;
+ GstCaps *caps;
+ gboolean res;
+ GstPadLinkReturn lres;
+ GstPad *srcpad, *sinkpad;
+
+ /* always init first */
+ gst_init (&argc, &argv);
+
+ /* the pipeline to hold everything */
+ pipeline = gst_pipeline_new (NULL);
+ g_assert (pipeline);
+
+ /* the udp src and source we will use for RTP and RTCP */
+ rtpsrc = gst_element_factory_make ("udpsrc", "rtpsrc");
+ g_assert (rtpsrc);
+ g_object_set (rtpsrc, "port", 5002, NULL);
+ /* we need to set caps on the udpsrc for the RTP data */
+ caps = gst_caps_from_string (AUDIO_CAPS);
+ g_object_set (rtpsrc, "caps", caps, NULL);
+ gst_caps_unref (caps);
+
+ rtcpsrc = gst_element_factory_make ("udpsrc", "rtcpsrc");
+ g_assert (rtcpsrc);
+ g_object_set (rtcpsrc, "port", 5003, NULL);
+
+ rtcpsink = gst_element_factory_make ("udpsink", "rtcpsink");
+ g_assert (rtcpsink);
+ g_object_set (rtcpsink, "port", 5007, "host", DEST_HOST, NULL);
+ /* no need for synchronisation or preroll on the RTCP sink */
+ g_object_set (rtcpsink, "async", FALSE, "sync", FALSE, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), rtpsrc, rtcpsrc, rtcpsink, NULL);
+
+ /* the depayloading and decoding */
+ audiodepay = gst_element_factory_make (AUDIO_DEPAY, "audiodepay");
+ g_assert (audiodepay);
+ audiodec = gst_element_factory_make (AUDIO_DEC, "audiodec");
+ g_assert (audiodec);
+ /* the audio playback and format conversion */
+ audioconv = gst_element_factory_make ("audioconvert", "audioconv");
+ g_assert (audioconv);
+ audiores = gst_element_factory_make ("audioresample", "audiores");
+ g_assert (audiores);
+ audiosink = gst_element_factory_make (AUDIO_SINK, "audiosink");
+ g_assert (audiosink);
+
+ /* add depayloading and playback to the pipeline and link */
+ gst_bin_add_many (GST_BIN (pipeline), audiodepay, audiodec, audioconv,
+ audiores, audiosink, NULL);
+
+ res = gst_element_link_many (audiodepay, audiodec, audioconv, audiores,
+ audiosink, NULL);
+ g_assert (res == TRUE);
+
+ /* the rtpbin element */
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+ g_assert (rtpbin);
+
+ gst_bin_add (GST_BIN (pipeline), rtpbin);
+
+ /* now link all to the rtpbin, start by getting an RTP sinkpad for session 0 */
+ srcpad = gst_element_get_static_pad (rtpsrc, "src");
+ sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
+ lres = gst_pad_link (srcpad, sinkpad);
+ g_assert (lres == GST_PAD_LINK_OK);
+ gst_object_unref (srcpad);
+
+ /* get an RTCP sinkpad in session 0 */
+ srcpad = gst_element_get_static_pad (rtcpsrc, "src");
+ sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_0");
+ lres = gst_pad_link (srcpad, sinkpad);
+ g_assert (lres == GST_PAD_LINK_OK);
+ gst_object_unref (srcpad);
+ gst_object_unref (sinkpad);
+
+ /* get an RTCP srcpad for sending RTCP back to the sender */
+ srcpad = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
+ sinkpad = gst_element_get_static_pad (rtcpsink, "sink");
+ lres = gst_pad_link (srcpad, sinkpad);
+ g_assert (lres == GST_PAD_LINK_OK);
+ gst_object_unref (sinkpad);
+
+ /* the RTP pad that we have to connect to the depayloader will be created
+ * dynamically so we connect to the pad-added signal, pass the depayloader as
+ * user_data so that we can link to it. */
+ g_signal_connect (rtpbin, "pad-added", G_CALLBACK (pad_added_cb), audiodepay);
+
+ /* give some stats when we receive RTCP */
+ g_signal_connect (rtpbin, "on-ssrc-active", G_CALLBACK (on_ssrc_active_cb),
+ audiodepay);
+
+ /* set the pipeline to playing */
+ g_print ("starting receiver pipeline\n");
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ /* we need to run a GLib main loop to get the messages */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ g_print ("stopping receiver pipeline\n");
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/examples/rtp/client-PCMA.sh b/tests/examples/rtp/client-PCMA.sh
new file mode 100755
index 0000000..aad6502
--- /dev/null
+++ b/tests/examples/rtp/client-PCMA.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# A simple RTP receiver
+#
+# receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003.
+# the receiver RTCP reports are sent to port 5007
+#
+# .-------. .----------. .---------. .-------. .-------------.
+# RTP |udpsrc | | rtpbin | |pcmadepay| |alawdec| |autoaudiosink|
+# port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink |
+# '-------' | | '---------' '-------' '-------------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5007
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5003 | src->recv_rtcp |
+# '-------' '----------'
+
+
+# the caps of the sender RTP stream. This is usually negotiated out of band with
+# SDP or RTSP.
+AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
+
+AUDIO_DEC="rtppcmadepay ! alawdec"
+
+AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink"
+
+# the destination machine to send RTCP to. This is the address of the sender and
+# is used to send back the RTCP reports of this receiver. If the data is sent
+# from another machine, change this address.
+DEST=127.0.0.1
+
+gst-launch -v gstrtpbin name=rtpbin \
+ udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0 \
+ rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \
+ udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 \
+ rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false
diff --git a/tests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh b/tests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh
new file mode 100755
index 0000000..ff2614d
--- /dev/null
+++ b/tests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# A simple RTP server
+#
+
+VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
+
+gst-launch -v gstrtpbin name=rtpbin \
+ videotestsrc ! $VCAPS ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
+ rtpbin.send_rtp_src_0 ! udpsink port=5000 \
+ rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
+ udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
+ audiotestsrc samplesperbuffer=1000 ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_1 \
+ rtpbin.send_rtp_src_1 ! udpsink port=5002 \
+ rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
+ udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
diff --git a/tests/examples/rtp/server-alsasrc-PCMA.c b/tests/examples/rtp/server-alsasrc-PCMA.c
new file mode 100644
index 0000000..d61ec30
--- /dev/null
+++ b/tests/examples/rtp/server-alsasrc-PCMA.c
@@ -0,0 +1,221 @@
+/* GStreamer
+ * Copyright (C) 2009 Wim Taymans <wim.taymans@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include <gst/gst.h>
+
+/*
+ * A simple RTP server
+ * sends the output of alsasrc as alaw encoded RTP on port 5002, RTCP is sent on
+ * port 5003. The destination is 127.0.0.1.
+ * the receiver RTCP reports are received on port 5007
+ *
+ * .-------. .-------. .-------. .----------. .-------.
+ * |alsasrc| |alawenc| |pcmapay| | rtpbin | |udpsink| RTP
+ * | src->sink src->sink src->send_rtp send_rtp->sink | port=5002
+ * '-------' '-------' '-------' | | '-------'
+ * | |
+ * | | .-------.
+ * | | |udpsink| RTCP
+ * | send_rtcp->sink | port=5003
+ * .-------. | | '-------' sync=false
+ * RTCP |udpsrc | | | async=false
+ * port=5007 | src->recv_rtcp |
+ * '-------' '----------'
+ */
+
+/* change this to send the RTP data and RTCP to another host */
+#define DEST_HOST "127.0.0.1"
+
+/* #define AUDIO_SRC "alsasrc" */
+#define AUDIO_SRC "audiotestsrc"
+
+/* the encoder and payloader elements */
+#define AUDIO_ENC "alawenc"
+#define AUDIO_PAY "rtppcmapay"
+
+/* print the stats of a source */
+static void
+print_source_stats (GObject * source)
+{
+ GstStructure *stats;
+ gchar *str;
+
+ /* get the source stats */
+ g_object_get (source, "stats", &stats, NULL);
+
+ /* simply dump the stats structure */
+ str = gst_structure_to_string (stats);
+ g_print ("source stats: %s\n", str);
+
+ gst_structure_free (stats);
+ g_free (str);
+}
+
+/* this function is called every second and dumps the RTP manager stats */
+static gboolean
+print_stats (GstElement * rtpbin)
+{
+ GObject *session;
+ GValueArray *arr;
+ GValue *val;
+ guint i;
+
+ g_print ("***********************************\n");
+
+ /* get session 0 */
+ g_signal_emit_by_name (rtpbin, "get-internal-session", 0, &session);
+
+ /* print all the sources in the session, this includes the internal source */
+ g_object_get (session, "sources", &arr, NULL);
+
+ for (i = 0; i < arr->n_values; i++) {
+ GObject *source;
+
+ val = g_value_array_get_nth (arr, i);
+ source = g_value_get_object (val);
+
+ print_source_stats (source);
+ }
+ g_value_array_free (arr);
+
+ g_object_unref (session);
+
+ return TRUE;
+}
+
+/* build a pipeline equivalent to:
+ *
+ * gst-launch -v gstrtpbin name=rtpbin \
+ * $AUDIO_SRC ! audioconvert ! audioresample ! $AUDIO_ENC ! $AUDIO_PAY ! rtpbin.send_rtp_sink_0 \
+ * rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST \
+ * rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \
+ * udpsrc port=5007 ! rtpbin.recv_rtcp_sink_0
+ */
+int
+main (int argc, char *argv[])
+{
+ GstElement *audiosrc, *audioconv, *audiores, *audioenc, *audiopay;
+ GstElement *rtpbin, *rtpsink, *rtcpsink, *rtcpsrc;
+ GstElement *pipeline;
+ GMainLoop *loop;
+ GstPad *srcpad, *sinkpad;
+
+ /* always init first */
+ gst_init (&argc, &argv);
+
+ /* the pipeline to hold everything */
+ pipeline = gst_pipeline_new (NULL);
+ g_assert (pipeline);
+
+ /* the audio capture and format conversion */
+ audiosrc = gst_element_factory_make (AUDIO_SRC, "audiosrc");
+ g_assert (audiosrc);
+ audioconv = gst_element_factory_make ("audioconvert", "audioconv");
+ g_assert (audioconv);
+ audiores = gst_element_factory_make ("audioresample", "audiores");
+ g_assert (audiores);
+ /* the encoding and payloading */
+ audioenc = gst_element_factory_make (AUDIO_ENC, "audioenc");
+ g_assert (audioenc);
+ audiopay = gst_element_factory_make (AUDIO_PAY, "audiopay");
+ g_assert (audiopay);
+
+ /* add capture and payloading to the pipeline and link */
+ gst_bin_add_many (GST_BIN (pipeline), audiosrc, audioconv, audiores,
+ audioenc, audiopay, NULL);
+
+ if (!gst_element_link_many (audiosrc, audioconv, audiores, audioenc,
+ audiopay, NULL)) {
+ g_error ("Failed to link audiosrc, audioconv, audioresample, "
+ "audio encoder and audio payloader");
+ }
+
+ /* the rtpbin element */
+ rtpbin = gst_element_factory_make ("gstrtpbin", "rtpbin");
+ g_assert (rtpbin);
+
+ gst_bin_add (GST_BIN (pipeline), rtpbin);
+
+ /* the udp sinks and source we will use for RTP and RTCP */
+ rtpsink = gst_element_factory_make ("udpsink", "rtpsink");
+ g_assert (rtpsink);
+ g_object_set (rtpsink, "port", 5002, "host", DEST_HOST, NULL);
+
+ rtcpsink = gst_element_factory_make ("udpsink", "rtcpsink");
+ g_assert (rtcpsink);
+ g_object_set (rtcpsink, "port", 5003, "host", DEST_HOST, NULL);
+ /* no need for synchronisation or preroll on the RTCP sink */
+ g_object_set (rtcpsink, "async", FALSE, "sync", FALSE, NULL);
+
+ rtcpsrc = gst_element_factory_make ("udpsrc", "rtcpsrc");
+ g_assert (rtcpsrc);
+ g_object_set (rtcpsrc, "port", 5007, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), rtpsink, rtcpsink, rtcpsrc, NULL);
+
+ /* now link all to the rtpbin, start by getting an RTP sinkpad for session 0 */
+ sinkpad = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0");
+ srcpad = gst_element_get_static_pad (audiopay, "src");
+ if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
+ g_error ("Failed to link audio payloader to rtpbin");
+ gst_object_unref (srcpad);
+
+ /* get the RTP srcpad that was created when we requested the sinkpad above and
+ * link it to the rtpsink sinkpad*/
+ srcpad = gst_element_get_static_pad (rtpbin, "send_rtp_src_0");
+ sinkpad = gst_element_get_static_pad (rtpsink, "sink");
+ if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
+ g_error ("Failed to link rtpbin to rtpsink");
+ gst_object_unref (srcpad);
+ gst_object_unref (sinkpad);
+
+ /* get an RTCP srcpad for sending RTCP to the receiver */
+ srcpad = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
+ sinkpad = gst_element_get_static_pad (rtcpsink, "sink");
+ if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
+ g_error ("Failed to link rtpbin to rtcpsink");
+ gst_object_unref (sinkpad);
+
+ /* we also want to receive RTCP, request an RTCP sinkpad for session 0 and
+ * link it to the srcpad of the udpsrc for RTCP */
+ srcpad = gst_element_get_static_pad (rtcpsrc, "src");
+ sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_0");
+ if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
+ g_error ("Failed to link rtcpsrc to rtpbin");
+ gst_object_unref (srcpad);
+
+ /* set the pipeline to playing */
+ g_print ("starting sender pipeline\n");
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ /* print stats every second */
+ g_timeout_add (1000, (GSourceFunc) print_stats, rtpbin);
+
+ /* we need to run a GLib main loop to get the messages */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ g_print ("stopping sender pipeline\n");
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ return 0;
+}
diff --git a/tests/examples/rtp/server-alsasrc-PCMA.sh b/tests/examples/rtp/server-alsasrc-PCMA.sh
new file mode 100755
index 0000000..5340434
--- /dev/null
+++ b/tests/examples/rtp/server-alsasrc-PCMA.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# A simple RTP server
+# sends the output of autoaudiosrc as alaw encoded RTP on port 5002, RTCP is sent on
+# port 5003. The destination is 127.0.0.1.
+# the receiver RTCP reports are received on port 5007
+#
+# .--------. .-------. .-------. .----------. .-------.
+# |audiosrc| |alawenc| |pcmapay| | rtpbin | |udpsink| RTP
+# | src->sink src->sink src->send_rtp send_rtp->sink | port=5002
+# '--------' '-------' '-------' | | '-------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5003
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5007 | src->recv_rtcp |
+# '-------' '----------'
+
+# change this to send the RTP data and RTCP to another host
+DEST=127.0.0.1
+
+#AELEM=autoaudiosrc
+AELEM=audiotestsrc
+
+# PCMA encode from an the source
+ASOURCE="$AELEM ! audioconvert"
+AENC="alawenc ! rtppcmapay"
+
+gst-launch -v gstrtpbin name=rtpbin \
+ $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_0 \
+ rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST \
+ rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \
+ udpsrc port=5007 ! rtpbin.recv_rtcp_sink_0
diff --git a/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh b/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh
new file mode 100755
index 0000000..d8c13a7
--- /dev/null
+++ b/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# A simple RTP server
+#
+
+# change these to change the server sync. This causes the server to send the
+# packets largly out-of-sync, the client should use the RTCP SR packets to
+# restore proper lip-sync between the streams.
+AOFFSET=0
+VOFFSET=0
+
+VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
+
+#DEST=192.168.1.126
+DEST=localhost
+
+gst-launch -v gstrtpbin name=rtpbin \
+ v4l2src ! videorate ! ffmpegcolorspace ! $VCAPS ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
+ rtpbin.send_rtp_src_0 ! queue ! udpsink host=$DEST port=5000 ts-offset=$AOFFSET \
+ rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5001 sync=false async=false \
+ udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
+ autoaudiosrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
+ rtpbin.send_rtp_src_1 ! queue ! udpsink host=$DEST port=5002 ts-offset=$VOFFSET \
+ rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5003 sync=false async=false \
+ udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
diff --git a/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh b/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
new file mode 100755
index 0000000..8dc4d70
--- /dev/null
+++ b/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+#
+# A simple RTP server
+# sends the output of v4l2src as h264 encoded RTP on port 5000, RTCP is sent on
+# port 5001. The destination is 127.0.0.1.
+# the video receiver RTCP reports are received on port 5005
+# sends the output of autoaudiosrc as alaw encoded RTP on port 5002, RTCP is sent on
+# port 5003. The destination is 127.0.0.1.
+# the receiver RTCP reports are received on port 5007
+#
+# .-------. .-------. .-------. .----------. .-------.
+# |v4lssrc| |h264enc| |h264pay| | rtpbin | |udpsink| RTP
+# | src->sink src->sink src->send_rtp send_rtp->sink | port=5000
+# '-------' '-------' '-------' | | '-------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5001
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5005 | src->recv_rtcp |
+# '-------' | |
+# | |
+# .--------. .-------. .-------. | | .-------.
+# |audiosrc| |alawenc| |pcmapay| | rtpbin | |udpsink| RTP
+# | src->sink src->sink src->send_rtp send_rtp->sink | port=5002
+# '--------' '-------' '-------' | | '-------'
+# | |
+# | | .-------.
+# | | |udpsink| RTCP
+# | send_rtcp->sink | port=5003
+# .-------. | | '-------' sync=false
+# RTCP |udpsrc | | | async=false
+# port=5007 | src->recv_rtcp |
+# '-------' '----------'
+#
+# ideally we should transport the properties on the RTP udpsink pads to the
+# receiver in order to transmit the SPS and PPS earlier.
+
+# change this to send the RTP data and RTCP to another host
+DEST=127.0.0.1
+
+# tuning parameters to make the sender send the streams out of sync. Can be used
+# ot test the client RTCP synchronisation.
+#VOFFSET=900000000
+VOFFSET=0
+AOFFSET=0
+
+# H264 encode from the source
+VELEM="v4l2src"
+#VELEM="videotestsrc is-live=1"
+VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
+VSOURCE="$VELEM ! queue ! videorate ! ffmpegcolorspace ! $VCAPS"
+VENC="x264enc tune=zerolatency byte-stream=true bitrate=300 ! rtph264pay"
+
+VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
+VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false name=vrtcpsink"
+VRTCPSRC="udpsrc port=5005 name=vrtpsrc"
+
+# PCMA encode from the source
+AELEM="autoaudiosrc"
+#AELEM="audiotestsrc is-live=1"
+ASOURCE="$AELEM ! queue ! audioresample ! audioconvert"
+AENC="alawenc ! rtppcmapay"
+
+ARTPSINK="udpsink port=5002 host=$DEST ts-offset=$AOFFSET name=artpsink"
+ARTCPSINK="udpsink port=5003 host=$DEST sync=false async=false name=artcpsink"
+ARTCPSRC="udpsrc port=5007 name=artpsrc"
+
+gst-launch -v gstrtpbin name=rtpbin \
+ $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \
+ rtpbin.send_rtp_src_0 ! $VRTPSINK \
+ rtpbin.send_rtcp_src_0 ! $VRTCPSINK \
+ $VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \
+ $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \
+ rtpbin.send_rtp_src_1 ! $ARTPSINK \
+ rtpbin.send_rtcp_src_1 ! $ARTCPSINK \
+ $ARTCPSRC ! rtpbin.recv_rtcp_sink_1
diff --git a/tests/examples/shapewipe/Makefile.am b/tests/examples/shapewipe/Makefile.am
new file mode 100644
index 0000000..e0e9217
--- /dev/null
+++ b/tests/examples/shapewipe/Makefile.am
@@ -0,0 +1,8 @@
+noinst_PROGRAMS = shapewipe-example
+
+shapewipe_example_SOURCES = shapewipe-example.c
+shapewipe_example_CFLAGS = $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
+shapewipe_example_LDADD = $(GST_CONTROLLER_LIBS) $(GST_LIBS)
+
+noinst_HEADERS =
+
diff --git a/tests/examples/shapewipe/Makefile.in b/tests/examples/shapewipe/Makefile.in
new file mode 100644
index 0000000..f403d6f
--- /dev/null
+++ b/tests/examples/shapewipe/Makefile.in
@@ -0,0 +1,758 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = shapewipe-example$(EXEEXT)
+subdir = tests/examples/shapewipe
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_shapewipe_example_OBJECTS = \
+ shapewipe_example-shapewipe-example.$(OBJEXT)
+shapewipe_example_OBJECTS = $(am_shapewipe_example_OBJECTS)
+am__DEPENDENCIES_1 =
+shapewipe_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+shapewipe_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(shapewipe_example_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(shapewipe_example_SOURCES)
+DIST_SOURCES = $(shapewipe_example_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+shapewipe_example_SOURCES = shapewipe-example.c
+shapewipe_example_CFLAGS = $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
+shapewipe_example_LDADD = $(GST_CONTROLLER_LIBS) $(GST_LIBS)
+noinst_HEADERS =
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/shapewipe/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/shapewipe/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+shapewipe-example$(EXEEXT): $(shapewipe_example_OBJECTS) $(shapewipe_example_DEPENDENCIES) $(EXTRA_shapewipe_example_DEPENDENCIES)
+ @rm -f shapewipe-example$(EXEEXT)
+ $(AM_V_CCLD)$(shapewipe_example_LINK) $(shapewipe_example_OBJECTS) $(shapewipe_example_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shapewipe_example-shapewipe-example.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+shapewipe_example-shapewipe-example.o: shapewipe-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapewipe_example_CFLAGS) $(CFLAGS) -MT shapewipe_example-shapewipe-example.o -MD -MP -MF $(DEPDIR)/shapewipe_example-shapewipe-example.Tpo -c -o shapewipe_example-shapewipe-example.o `test -f 'shapewipe-example.c' || echo '$(srcdir)/'`shapewipe-example.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shapewipe_example-shapewipe-example.Tpo $(DEPDIR)/shapewipe_example-shapewipe-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shapewipe-example.c' object='shapewipe_example-shapewipe-example.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapewipe_example_CFLAGS) $(CFLAGS) -c -o shapewipe_example-shapewipe-example.o `test -f 'shapewipe-example.c' || echo '$(srcdir)/'`shapewipe-example.c
+
+shapewipe_example-shapewipe-example.obj: shapewipe-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapewipe_example_CFLAGS) $(CFLAGS) -MT shapewipe_example-shapewipe-example.obj -MD -MP -MF $(DEPDIR)/shapewipe_example-shapewipe-example.Tpo -c -o shapewipe_example-shapewipe-example.obj `if test -f 'shapewipe-example.c'; then $(CYGPATH_W) 'shapewipe-example.c'; else $(CYGPATH_W) '$(srcdir)/shapewipe-example.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shapewipe_example-shapewipe-example.Tpo $(DEPDIR)/shapewipe_example-shapewipe-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shapewipe-example.c' object='shapewipe_example-shapewipe-example.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(shapewipe_example_CFLAGS) $(CFLAGS) -c -o shapewipe_example-shapewipe-example.obj `if test -f 'shapewipe-example.c'; then $(CYGPATH_W) 'shapewipe-example.c'; else $(CYGPATH_W) '$(srcdir)/shapewipe-example.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/shapewipe/shapewipe-example.c b/tests/examples/shapewipe/shapewipe-example.c
new file mode 100644
index 0000000..e3b49fe
--- /dev/null
+++ b/tests/examples/shapewipe/shapewipe-example.c
@@ -0,0 +1,147 @@
+/* GStreamer
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gst/gst.h>
+#include <gst/controller/gstcontroller.h>
+#include <gst/controller/gstlfocontrolsource.h>
+
+#include <stdlib.h>
+
+static gboolean
+on_message (GstBus * bus, GstMessage * message, gpointer user_data)
+{
+ GMainLoop *loop = (GMainLoop *) user_data;
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:{
+ GError *err = NULL;
+ gchar *debug = NULL;
+
+ g_warning ("Got ERROR");
+ gst_message_parse_error (message, &err, &debug);
+ g_warning ("%s: %s", err->message, debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_WARNING:{
+ GError *err = NULL;
+ gchar *debug = NULL;
+
+ g_warning ("Got WARNING");
+ gst_message_parse_error (message, &err, &debug);
+ g_warning ("%s: %s", err->message, debug);
+ g_main_loop_quit (loop);
+ break;
+ }
+ case GST_MESSAGE_EOS:
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+ GstElement *pipeline;
+ GstElement *shapewipe;
+ GstController *ctrl;
+ GstLFOControlSource *csource;
+ GValue val = { 0, };
+ GMainLoop *loop;
+ GstBus *bus;
+ gchar *pipeline_string;
+ gfloat border = 0.05;
+
+ if (argc < 2) {
+ g_print ("Usage: shapewipe mask.png <border>\n");
+ return -1;
+ }
+
+ gst_init (&argc, &argv);
+ gst_controller_init (&argc, &argv);
+
+ if (argc > 2) {
+ border = atof (argv[2]);
+ }
+
+ pipeline_string =
+ g_strdup_printf
+ ("videotestsrc ! video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480 ! shapewipe name=shape border=%f ! videomixer name=mixer ! ffmpegcolorspace ! autovideosink filesrc location=%s ! typefind ! decodebin2 ! ffmpegcolorspace ! videoscale ! queue ! shape.mask_sink videotestsrc pattern=snow ! video/x-raw-yuv,format=(fourcc)AYUV,width=640,height=480 ! queue ! mixer.",
+ border, argv[1]);
+
+ pipeline = gst_parse_launch (pipeline_string, NULL);
+ g_free (pipeline_string);
+
+ if (pipeline == NULL) {
+ g_print ("Failed to create pipeline\n");
+ return -2;
+ }
+
+ shapewipe = gst_bin_get_by_name (GST_BIN (pipeline), "shape");
+
+ if (!(ctrl = gst_controller_new (G_OBJECT (shapewipe), "position", NULL))) {
+ g_print ("can't control shapewipe element\n");
+ return -3;
+ }
+
+ csource = gst_lfo_control_source_new ();
+
+ gst_controller_set_control_source (ctrl, "position",
+ GST_CONTROL_SOURCE (csource));
+
+ g_value_init (&val, G_TYPE_FLOAT);
+ g_value_set_float (&val, 0.5);
+ g_object_set (G_OBJECT (csource), "amplitude", &val, NULL);
+ g_value_set_float (&val, 0.5);
+ g_object_set (G_OBJECT (csource), "offset", &val, NULL);
+ g_value_unset (&val);
+
+ g_object_set (G_OBJECT (csource), "frequency", 0.25, NULL);
+ g_object_set (G_OBJECT (csource), "timeshift", 500 * GST_MSECOND, NULL);
+
+ g_object_unref (csource);
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), loop);
+ gst_object_unref (GST_OBJECT (bus));
+
+ if (gst_element_set_state (pipeline,
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
+ g_error ("Failed to go into PLAYING state");
+ return -4;
+ }
+
+ g_main_loop_run (loop);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ g_main_loop_unref (loop);
+
+ g_object_unref (G_OBJECT (ctrl));
+ gst_object_unref (G_OBJECT (pipeline));
+
+ return 0;
+}
diff --git a/tests/examples/spectrum/Makefile.am b/tests/examples/spectrum/Makefile.am
new file mode 100644
index 0000000..8bb89da
--- /dev/null
+++ b/tests/examples/spectrum/Makefile.am
@@ -0,0 +1,16 @@
+if HAVE_GTK
+noinst_PROGRAMS = demo-osssrc demo-audiotest spectrum-example
+endif
+
+demo_osssrc_SOURCES = demo-osssrc.c
+demo_osssrc_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_osssrc_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+
+demo_audiotest_SOURCES = demo-audiotest.c
+demo_audiotest_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_audiotest_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+
+spectrum_example_SOURCES = spectrum-example.c
+spectrum_example_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+spectrum_example_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+
diff --git a/tests/examples/spectrum/Makefile.in b/tests/examples/spectrum/Makefile.in
new file mode 100644
index 0000000..c535310
--- /dev/null
+++ b/tests/examples/spectrum/Makefile.in
@@ -0,0 +1,815 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_GTK_TRUE@noinst_PROGRAMS = demo-osssrc$(EXEEXT) \
+@HAVE_GTK_TRUE@ demo-audiotest$(EXEEXT) \
+@HAVE_GTK_TRUE@ spectrum-example$(EXEEXT)
+subdir = tests/examples/spectrum
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_demo_audiotest_OBJECTS = demo_audiotest-demo-audiotest.$(OBJEXT)
+demo_audiotest_OBJECTS = $(am_demo_audiotest_OBJECTS)
+am__DEPENDENCIES_1 =
+demo_audiotest_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+demo_audiotest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(demo_audiotest_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+am_demo_osssrc_OBJECTS = demo_osssrc-demo-osssrc.$(OBJEXT)
+demo_osssrc_OBJECTS = $(am_demo_osssrc_OBJECTS)
+demo_osssrc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+demo_osssrc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(demo_osssrc_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_spectrum_example_OBJECTS = \
+ spectrum_example-spectrum-example.$(OBJEXT)
+spectrum_example_OBJECTS = $(am_spectrum_example_OBJECTS)
+spectrum_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+spectrum_example_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(spectrum_example_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(demo_audiotest_SOURCES) $(demo_osssrc_SOURCES) \
+ $(spectrum_example_SOURCES)
+DIST_SOURCES = $(demo_audiotest_SOURCES) $(demo_osssrc_SOURCES) \
+ $(spectrum_example_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+demo_osssrc_SOURCES = demo-osssrc.c
+demo_osssrc_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_osssrc_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+demo_audiotest_SOURCES = demo-audiotest.c
+demo_audiotest_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+demo_audiotest_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+spectrum_example_SOURCES = spectrum-example.c
+spectrum_example_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GTK_CFLAGS)
+spectrum_example_LDADD = $(GST_BASE_LIBS) $(GST_LIBS) $(GTK_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/spectrum/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/spectrum/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+demo-audiotest$(EXEEXT): $(demo_audiotest_OBJECTS) $(demo_audiotest_DEPENDENCIES) $(EXTRA_demo_audiotest_DEPENDENCIES)
+ @rm -f demo-audiotest$(EXEEXT)
+ $(AM_V_CCLD)$(demo_audiotest_LINK) $(demo_audiotest_OBJECTS) $(demo_audiotest_LDADD) $(LIBS)
+demo-osssrc$(EXEEXT): $(demo_osssrc_OBJECTS) $(demo_osssrc_DEPENDENCIES) $(EXTRA_demo_osssrc_DEPENDENCIES)
+ @rm -f demo-osssrc$(EXEEXT)
+ $(AM_V_CCLD)$(demo_osssrc_LINK) $(demo_osssrc_OBJECTS) $(demo_osssrc_LDADD) $(LIBS)
+spectrum-example$(EXEEXT): $(spectrum_example_OBJECTS) $(spectrum_example_DEPENDENCIES) $(EXTRA_spectrum_example_DEPENDENCIES)
+ @rm -f spectrum-example$(EXEEXT)
+ $(AM_V_CCLD)$(spectrum_example_LINK) $(spectrum_example_OBJECTS) $(spectrum_example_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo_audiotest-demo-audiotest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo_osssrc-demo-osssrc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrum_example-spectrum-example.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+demo_audiotest-demo-audiotest.o: demo-audiotest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_audiotest_CFLAGS) $(CFLAGS) -MT demo_audiotest-demo-audiotest.o -MD -MP -MF $(DEPDIR)/demo_audiotest-demo-audiotest.Tpo -c -o demo_audiotest-demo-audiotest.o `test -f 'demo-audiotest.c' || echo '$(srcdir)/'`demo-audiotest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo_audiotest-demo-audiotest.Tpo $(DEPDIR)/demo_audiotest-demo-audiotest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo-audiotest.c' object='demo_audiotest-demo-audiotest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_audiotest_CFLAGS) $(CFLAGS) -c -o demo_audiotest-demo-audiotest.o `test -f 'demo-audiotest.c' || echo '$(srcdir)/'`demo-audiotest.c
+
+demo_audiotest-demo-audiotest.obj: demo-audiotest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_audiotest_CFLAGS) $(CFLAGS) -MT demo_audiotest-demo-audiotest.obj -MD -MP -MF $(DEPDIR)/demo_audiotest-demo-audiotest.Tpo -c -o demo_audiotest-demo-audiotest.obj `if test -f 'demo-audiotest.c'; then $(CYGPATH_W) 'demo-audiotest.c'; else $(CYGPATH_W) '$(srcdir)/demo-audiotest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo_audiotest-demo-audiotest.Tpo $(DEPDIR)/demo_audiotest-demo-audiotest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo-audiotest.c' object='demo_audiotest-demo-audiotest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_audiotest_CFLAGS) $(CFLAGS) -c -o demo_audiotest-demo-audiotest.obj `if test -f 'demo-audiotest.c'; then $(CYGPATH_W) 'demo-audiotest.c'; else $(CYGPATH_W) '$(srcdir)/demo-audiotest.c'; fi`
+
+demo_osssrc-demo-osssrc.o: demo-osssrc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_osssrc_CFLAGS) $(CFLAGS) -MT demo_osssrc-demo-osssrc.o -MD -MP -MF $(DEPDIR)/demo_osssrc-demo-osssrc.Tpo -c -o demo_osssrc-demo-osssrc.o `test -f 'demo-osssrc.c' || echo '$(srcdir)/'`demo-osssrc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo_osssrc-demo-osssrc.Tpo $(DEPDIR)/demo_osssrc-demo-osssrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo-osssrc.c' object='demo_osssrc-demo-osssrc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_osssrc_CFLAGS) $(CFLAGS) -c -o demo_osssrc-demo-osssrc.o `test -f 'demo-osssrc.c' || echo '$(srcdir)/'`demo-osssrc.c
+
+demo_osssrc-demo-osssrc.obj: demo-osssrc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_osssrc_CFLAGS) $(CFLAGS) -MT demo_osssrc-demo-osssrc.obj -MD -MP -MF $(DEPDIR)/demo_osssrc-demo-osssrc.Tpo -c -o demo_osssrc-demo-osssrc.obj `if test -f 'demo-osssrc.c'; then $(CYGPATH_W) 'demo-osssrc.c'; else $(CYGPATH_W) '$(srcdir)/demo-osssrc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/demo_osssrc-demo-osssrc.Tpo $(DEPDIR)/demo_osssrc-demo-osssrc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='demo-osssrc.c' object='demo_osssrc-demo-osssrc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(demo_osssrc_CFLAGS) $(CFLAGS) -c -o demo_osssrc-demo-osssrc.obj `if test -f 'demo-osssrc.c'; then $(CYGPATH_W) 'demo-osssrc.c'; else $(CYGPATH_W) '$(srcdir)/demo-osssrc.c'; fi`
+
+spectrum_example-spectrum-example.o: spectrum-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spectrum_example_CFLAGS) $(CFLAGS) -MT spectrum_example-spectrum-example.o -MD -MP -MF $(DEPDIR)/spectrum_example-spectrum-example.Tpo -c -o spectrum_example-spectrum-example.o `test -f 'spectrum-example.c' || echo '$(srcdir)/'`spectrum-example.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spectrum_example-spectrum-example.Tpo $(DEPDIR)/spectrum_example-spectrum-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spectrum-example.c' object='spectrum_example-spectrum-example.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spectrum_example_CFLAGS) $(CFLAGS) -c -o spectrum_example-spectrum-example.o `test -f 'spectrum-example.c' || echo '$(srcdir)/'`spectrum-example.c
+
+spectrum_example-spectrum-example.obj: spectrum-example.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spectrum_example_CFLAGS) $(CFLAGS) -MT spectrum_example-spectrum-example.obj -MD -MP -MF $(DEPDIR)/spectrum_example-spectrum-example.Tpo -c -o spectrum_example-spectrum-example.obj `if test -f 'spectrum-example.c'; then $(CYGPATH_W) 'spectrum-example.c'; else $(CYGPATH_W) '$(srcdir)/spectrum-example.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spectrum_example-spectrum-example.Tpo $(DEPDIR)/spectrum_example-spectrum-example.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spectrum-example.c' object='spectrum_example-spectrum-example.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(spectrum_example_CFLAGS) $(CFLAGS) -c -o spectrum_example-spectrum-example.obj `if test -f 'spectrum-example.c'; then $(CYGPATH_W) 'spectrum-example.c'; else $(CYGPATH_W) '$(srcdir)/spectrum-example.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/spectrum/demo-audiotest.c b/tests/examples/spectrum/demo-audiotest.c
new file mode 100644
index 0000000..f9d1058
--- /dev/null
+++ b/tests/examples/spectrum/demo-audiotest.c
@@ -0,0 +1,233 @@
+/* GStreamer
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/* TODO: add wave selection */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+#ifndef DEFAULT_AUDIOSINK
+#define DEFAULT_AUDIOSINK "autoaudiosink"
+#endif
+
+static guint spect_height = 64;
+static guint spect_bands = 256;
+static gfloat height_scale = 1.0;
+
+static GtkWidget *drawingarea = NULL;
+static GstClock *sync_clock = NULL;
+
+static void
+on_window_destroy (GObject * object, gpointer user_data)
+{
+ drawingarea = NULL;
+ gtk_main_quit ();
+}
+
+/* control audiotestsrc frequency */
+static void
+on_frequency_changed (GtkRange * range, gpointer user_data)
+{
+ GstElement *machine = GST_ELEMENT (user_data);
+ gdouble value = gtk_range_get_value (range);
+
+ g_object_set (machine, "freq", value, NULL);
+}
+
+static gboolean
+on_configure_event (GtkWidget * widget, GdkEventConfigure * event,
+ gpointer user_data)
+{
+ GstElement *spectrum = GST_ELEMENT (user_data);
+
+ /*GST_INFO ("%d x %d", event->width, event->height); */
+ spect_height = event->height;
+ height_scale = event->height / 64.0;
+ spect_bands = event->width;
+
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, NULL);
+ return FALSE;
+}
+
+/* draw frequency spectrum as a bunch of bars */
+static void
+draw_spectrum (gfloat * data)
+{
+ gint i;
+ GdkRectangle rect = { 0, 0, spect_bands, spect_height };
+ cairo_t *cr;
+
+ if (!drawingarea)
+ return;
+
+ gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
+ cr = gdk_cairo_create (gtk_widget_get_window (drawingarea));
+
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_rectangle (cr, 0, 0, spect_bands, spect_height);
+ cairo_fill (cr);
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ for (i = 0; i < spect_bands; i++) {
+ cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
+ cairo_fill (cr);
+ }
+ cairo_destroy (cr);
+
+ gdk_window_end_paint (gtk_widget_get_window (drawingarea));
+}
+
+/* process delayed message */
+static gboolean
+delayed_idle_spectrum_update (gpointer user_data)
+{
+ draw_spectrum ((gfloat *) user_data);
+ g_free (user_data);
+ return (FALSE);
+}
+
+static gboolean
+delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
+ GstClockID id, gpointer user_data)
+{
+ if (GST_CLOCK_TIME_IS_VALID (time))
+ g_idle_add (delayed_idle_spectrum_update, user_data);
+ else
+ g_free (user_data);
+ return (TRUE);
+}
+
+/* receive spectral data from element message */
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ if (message->type == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+ const gchar *name = gst_structure_get_name (s);
+
+ if (strcmp (name, "spectrum") == 0) {
+ GstElement *spectrum = GST_ELEMENT (GST_MESSAGE_SRC (message));
+ GstClockTime timestamp, duration;
+ GstClockTime waittime = GST_CLOCK_TIME_NONE;
+
+ if (gst_structure_get_clock_time (s, "running-time", &timestamp) &&
+ gst_structure_get_clock_time (s, "duration", &duration)) {
+ /* wait for middle of buffer */
+ waittime = timestamp + duration / 2;
+ } else if (gst_structure_get_clock_time (s, "endtime", &timestamp)) {
+ waittime = timestamp;
+ }
+ if (GST_CLOCK_TIME_IS_VALID (waittime)) {
+ GstClockID clock_id;
+ GstClockTime basetime = gst_element_get_base_time (spectrum);
+ gfloat *spect = g_new (gfloat, spect_bands);
+ const GValue *list;
+ const GValue *value;
+ guint i;
+
+ list = gst_structure_get_value (s, "magnitude");
+ for (i = 0; i < spect_bands; ++i) {
+ value = gst_value_list_get_value (list, i);
+ spect[i] = height_scale * g_value_get_float (value);
+ }
+
+ clock_id =
+ gst_clock_new_single_shot_id (sync_clock, waittime + basetime);
+ gst_clock_id_wait_async (clock_id, delayed_spectrum_update,
+ (gpointer) spect);
+ gst_clock_id_unref (clock_id);
+ }
+ }
+ }
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *bin;
+ GstElement *src, *spectrum, *audioconvert, *sink;
+ GstBus *bus;
+ GtkWidget *appwindow, *vbox, *widget;
+
+ gst_init (&argc, &argv);
+ gtk_init (&argc, &argv);
+
+ bin = gst_pipeline_new ("bin");
+
+ src = gst_element_factory_make ("audiotestsrc", "src");
+ g_object_set (G_OBJECT (src), "wave", 0, NULL);
+
+ spectrum = gst_element_factory_make ("spectrum", "spectrum");
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
+ "message", TRUE, NULL);
+
+ audioconvert = gst_element_factory_make ("audioconvert", "audioconvert");
+
+ sink = gst_element_factory_make (DEFAULT_AUDIOSINK, "sink");
+
+ gst_bin_add_many (GST_BIN (bin), src, spectrum, audioconvert, sink, NULL);
+ if (!gst_element_link_many (src, spectrum, audioconvert, sink, NULL)) {
+ fprintf (stderr, "can't link elements\n");
+ exit (1);
+ }
+
+ bus = gst_element_get_bus (bin);
+ gst_bus_add_watch (bus, message_handler, NULL);
+ gst_object_unref (bus);
+
+ sync_clock = gst_pipeline_get_clock (GST_PIPELINE (bin));
+
+ appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (G_OBJECT (appwindow), "destroy",
+ G_CALLBACK (on_window_destroy), NULL);
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ widget = gtk_hscale_new_with_range (50.0, 20000.0, 10);
+ gtk_scale_set_draw_value (GTK_SCALE (widget), TRUE);
+ gtk_scale_set_value_pos (GTK_SCALE (widget), GTK_POS_TOP);
+ gtk_range_set_value (GTK_RANGE (widget), 440.0);
+ g_signal_connect (G_OBJECT (widget), "value-changed",
+ G_CALLBACK (on_frequency_changed), (gpointer) src);
+ gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+
+ drawingarea = gtk_drawing_area_new ();
+ gtk_widget_set_size_request (drawingarea, spect_bands, spect_height);
+ g_signal_connect (G_OBJECT (drawingarea), "configure-event",
+ G_CALLBACK (on_configure_event), (gpointer) spectrum);
+ gtk_box_pack_start (GTK_BOX (vbox), drawingarea, TRUE, TRUE, 0);
+
+ gtk_container_add (GTK_CONTAINER (appwindow), vbox);
+ gtk_widget_show_all (appwindow);
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ gtk_main ();
+ gst_element_set_state (bin, GST_STATE_NULL);
+
+ gst_object_unref (sync_clock);
+ gst_object_unref (bin);
+
+ return 0;
+}
diff --git a/tests/examples/spectrum/demo-osssrc.c b/tests/examples/spectrum/demo-osssrc.c
new file mode 100644
index 0000000..f8fee78
--- /dev/null
+++ b/tests/examples/spectrum/demo-osssrc.c
@@ -0,0 +1,208 @@
+/* GStreamer
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+#ifndef DEFAULT_AUDIOSRC
+#define DEFAULT_AUDIOSRC "alsasrc"
+#endif
+
+static guint spect_height = 64;
+static guint spect_bands = 256;
+static gfloat height_scale = 1.0;
+
+static GtkWidget *drawingarea = NULL;
+static GstClock *sync_clock = NULL;
+
+static void
+on_window_destroy (GObject * object, gpointer user_data)
+{
+ drawingarea = NULL;
+ gtk_main_quit ();
+}
+
+static gboolean
+on_configure_event (GtkWidget * widget, GdkEventConfigure * event,
+ gpointer user_data)
+{
+ GstElement *spectrum = GST_ELEMENT (user_data);
+
+ /*GST_INFO ("%d x %d", event->width, event->height); */
+ spect_height = event->height;
+ height_scale = event->height / 64.0;
+ spect_bands = event->width;
+
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, NULL);
+ return FALSE;
+}
+
+/* draw frequency spectrum as a bunch of bars */
+static void
+draw_spectrum (gfloat * data)
+{
+ gint i;
+ GdkRectangle rect = { 0, 0, spect_bands, spect_height };
+ cairo_t *cr;
+
+ if (!drawingarea)
+ return;
+
+ gdk_window_begin_paint_rect (gtk_widget_get_window (drawingarea), &rect);
+ cr = gdk_cairo_create (gtk_widget_get_window (drawingarea));
+
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_rectangle (cr, 0, 0, spect_bands, spect_height);
+ cairo_fill (cr);
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ for (i = 0; i < spect_bands; i++) {
+ cairo_rectangle (cr, i, -data[i], 1, spect_height + data[i]);
+ cairo_fill (cr);
+ }
+ cairo_destroy (cr);
+
+ gdk_window_end_paint (gtk_widget_get_window (drawingarea));
+}
+
+/* process delayed message */
+static gboolean
+delayed_idle_spectrum_update (gpointer user_data)
+{
+ draw_spectrum ((gfloat *) user_data);
+ g_free (user_data);
+ return (FALSE);
+}
+
+static gboolean
+delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
+ GstClockID id, gpointer user_data)
+{
+ if (GST_CLOCK_TIME_IS_VALID (time))
+ g_idle_add (delayed_idle_spectrum_update, user_data);
+ else
+ g_free (user_data);
+ return (TRUE);
+}
+
+/* receive spectral data from element message */
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ if (message->type == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+ const gchar *name = gst_structure_get_name (s);
+
+ if (strcmp (name, "spectrum") == 0) {
+ GstElement *spectrum = GST_ELEMENT (GST_MESSAGE_SRC (message));
+ GstClockTime timestamp, duration;
+ GstClockTime waittime = GST_CLOCK_TIME_NONE;
+
+ if (gst_structure_get_clock_time (s, "running-time", &timestamp) &&
+ gst_structure_get_clock_time (s, "duration", &duration)) {
+ /* wait for middle of buffer */
+ waittime = timestamp + duration / 2;
+ } else if (gst_structure_get_clock_time (s, "endtime", &timestamp)) {
+ waittime = timestamp;
+ }
+ if (GST_CLOCK_TIME_IS_VALID (waittime)) {
+ GstClockID clock_id;
+ GstClockTime basetime = gst_element_get_base_time (spectrum);
+ gfloat *spect = g_new (gfloat, spect_bands);
+ const GValue *list;
+ const GValue *value;
+ guint i;
+
+ list = gst_structure_get_value (s, "magnitude");
+ for (i = 0; i < spect_bands; ++i) {
+ value = gst_value_list_get_value (list, i);
+ spect[i] = height_scale * g_value_get_float (value);
+ }
+
+ clock_id =
+ gst_clock_new_single_shot_id (sync_clock, waittime + basetime);
+ gst_clock_id_wait_async (clock_id, delayed_spectrum_update,
+ (gpointer) spect);
+ gst_clock_id_unref (clock_id);
+ }
+ }
+ }
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *bin;
+ GstElement *src, *spectrum, *sink;
+ GstBus *bus;
+ GtkWidget *appwindow;
+
+ gst_init (&argc, &argv);
+ gtk_init (&argc, &argv);
+
+ bin = gst_pipeline_new ("bin");
+
+ src = gst_element_factory_make (DEFAULT_AUDIOSRC, "src");
+
+ spectrum = gst_element_factory_make ("spectrum", "spectrum");
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
+ "message", TRUE, NULL);
+
+ sink = gst_element_factory_make ("fakesink", "sink");
+
+ gst_bin_add_many (GST_BIN (bin), src, spectrum, sink, NULL);
+ if (!gst_element_link_many (src, spectrum, sink, NULL)) {
+ fprintf (stderr, "can't link elements\n");
+ exit (1);
+ }
+
+ bus = gst_element_get_bus (bin);
+ gst_bus_add_watch (bus, message_handler, NULL);
+ gst_object_unref (bus);
+
+ sync_clock = gst_pipeline_get_clock (GST_PIPELINE (bin));
+
+ appwindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (G_OBJECT (appwindow), "destroy",
+ G_CALLBACK (on_window_destroy), NULL);
+
+ drawingarea = gtk_drawing_area_new ();
+ gtk_widget_set_size_request (drawingarea, spect_bands, spect_height);
+ g_signal_connect (G_OBJECT (drawingarea), "configure-event",
+ G_CALLBACK (on_configure_event), (gpointer) spectrum);
+ gtk_container_add (GTK_CONTAINER (appwindow), drawingarea);
+ gtk_widget_show_all (appwindow);
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ gtk_main ();
+ gst_element_set_state (bin, GST_STATE_NULL);
+
+ gst_object_unref (sync_clock);
+ gst_object_unref (bin);
+
+ return 0;
+}
diff --git a/tests/examples/spectrum/spectrum-example.c b/tests/examples/spectrum/spectrum-example.c
new file mode 100644
index 0000000..b552921
--- /dev/null
+++ b/tests/examples/spectrum/spectrum-example.c
@@ -0,0 +1,124 @@
+/* GStreamer
+ * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
+ * Copyright (C) 2008 Jan Schmidt <jan.schmidt@sun.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+
+static guint spect_bands = 20;
+
+#define AUDIOFREQ 32000
+
+/* receive spectral data from element message */
+static gboolean
+message_handler (GstBus * bus, GstMessage * message, gpointer data)
+{
+ if (message->type == GST_MESSAGE_ELEMENT) {
+ const GstStructure *s = gst_message_get_structure (message);
+ const gchar *name = gst_structure_get_name (s);
+ GstClockTime endtime;
+
+ if (strcmp (name, "spectrum") == 0) {
+ const GValue *magnitudes;
+ const GValue *phases;
+ const GValue *mag, *phase;
+ gdouble freq;
+ guint i;
+
+ if (!gst_structure_get_clock_time (s, "endtime", &endtime))
+ endtime = GST_CLOCK_TIME_NONE;
+
+ g_print ("New spectrum message, endtime %" GST_TIME_FORMAT "\n",
+ GST_TIME_ARGS (endtime));
+
+ magnitudes = gst_structure_get_value (s, "magnitude");
+ phases = gst_structure_get_value (s, "phase");
+
+ for (i = 0; i < spect_bands; ++i) {
+ freq = (gdouble) ((AUDIOFREQ / 2) * i + AUDIOFREQ / 4) / spect_bands;
+ mag = gst_value_list_get_value (magnitudes, i);
+ phase = gst_value_list_get_value (phases, i);
+
+ if (mag != NULL && phase != NULL) {
+ g_print ("band %d (freq %g): magnitude %f dB phase %f\n", i, freq,
+ g_value_get_float (mag), g_value_get_float (phase));
+ }
+ }
+ g_print ("\n");
+ }
+ }
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *bin;
+ GstElement *src, *audioconvert, *spectrum, *sink;
+ GstBus *bus;
+ GstCaps *caps;
+ GMainLoop *loop;
+
+ gst_init (&argc, &argv);
+
+ bin = gst_pipeline_new ("bin");
+
+ src = gst_element_factory_make ("audiotestsrc", "src");
+ g_object_set (G_OBJECT (src), "wave", 0, "freq", 6000.0, NULL);
+ audioconvert = gst_element_factory_make ("audioconvert", NULL);
+ g_assert (audioconvert);
+
+ spectrum = gst_element_factory_make ("spectrum", "spectrum");
+ g_object_set (G_OBJECT (spectrum), "bands", spect_bands, "threshold", -80,
+ "message", TRUE, "message-phase", TRUE, NULL);
+
+ sink = gst_element_factory_make ("fakesink", "sink");
+ g_object_set (G_OBJECT (sink), "sync", TRUE, NULL);
+
+ gst_bin_add_many (GST_BIN (bin), src, audioconvert, spectrum, sink, NULL);
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "rate", G_TYPE_INT, AUDIOFREQ, NULL);
+
+ if (!gst_element_link (src, audioconvert) ||
+ !gst_element_link_filtered (audioconvert, spectrum, caps) ||
+ !gst_element_link (spectrum, sink)) {
+ fprintf (stderr, "can't link elements\n");
+ exit (1);
+ }
+ gst_caps_unref (caps);
+
+ bus = gst_element_get_bus (bin);
+ gst_bus_add_watch (bus, message_handler, NULL);
+ gst_object_unref (bus);
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ /* we need to run a GLib main loop to get the messages */
+ loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_run (loop);
+
+ gst_element_set_state (bin, GST_STATE_NULL);
+
+ gst_object_unref (bin);
+
+ return 0;
+}
diff --git a/tests/examples/v4l2/Makefile.am b/tests/examples/v4l2/Makefile.am
new file mode 100644
index 0000000..4fdb7e3
--- /dev/null
+++ b/tests/examples/v4l2/Makefile.am
@@ -0,0 +1,10 @@
+noinst_PROGRAMS = probe camctrl
+
+camctrl_SOURCES = camctrl.c
+camctrl_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
+camctrl_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS)
+
+probe_SOURCES = probe.c
+probe_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+
diff --git a/tests/examples/v4l2/Makefile.in b/tests/examples/v4l2/Makefile.in
new file mode 100644
index 0000000..cd89368
--- /dev/null
+++ b/tests/examples/v4l2/Makefile.in
@@ -0,0 +1,780 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = probe$(EXEEXT) camctrl$(EXEEXT)
+subdir = tests/examples/v4l2
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_camctrl_OBJECTS = camctrl-camctrl.$(OBJEXT)
+camctrl_OBJECTS = $(am_camctrl_OBJECTS)
+am__DEPENDENCIES_1 =
+camctrl_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+camctrl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(camctrl_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_probe_OBJECTS = probe-probe.$(OBJEXT)
+probe_OBJECTS = $(am_probe_OBJECTS)
+probe_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+probe_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(probe_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(camctrl_SOURCES) $(probe_SOURCES)
+DIST_SOURCES = $(camctrl_SOURCES) $(probe_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+camctrl_SOURCES = camctrl.c
+camctrl_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS)
+camctrl_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS)
+probe_SOURCES = probe.c
+probe_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/examples/v4l2/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/examples/v4l2/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+camctrl$(EXEEXT): $(camctrl_OBJECTS) $(camctrl_DEPENDENCIES) $(EXTRA_camctrl_DEPENDENCIES)
+ @rm -f camctrl$(EXEEXT)
+ $(AM_V_CCLD)$(camctrl_LINK) $(camctrl_OBJECTS) $(camctrl_LDADD) $(LIBS)
+probe$(EXEEXT): $(probe_OBJECTS) $(probe_DEPENDENCIES) $(EXTRA_probe_DEPENDENCIES)
+ @rm -f probe$(EXEEXT)
+ $(AM_V_CCLD)$(probe_LINK) $(probe_OBJECTS) $(probe_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camctrl-camctrl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/probe-probe.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+camctrl-camctrl.o: camctrl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(camctrl_CFLAGS) $(CFLAGS) -MT camctrl-camctrl.o -MD -MP -MF $(DEPDIR)/camctrl-camctrl.Tpo -c -o camctrl-camctrl.o `test -f 'camctrl.c' || echo '$(srcdir)/'`camctrl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/camctrl-camctrl.Tpo $(DEPDIR)/camctrl-camctrl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='camctrl.c' object='camctrl-camctrl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(camctrl_CFLAGS) $(CFLAGS) -c -o camctrl-camctrl.o `test -f 'camctrl.c' || echo '$(srcdir)/'`camctrl.c
+
+camctrl-camctrl.obj: camctrl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(camctrl_CFLAGS) $(CFLAGS) -MT camctrl-camctrl.obj -MD -MP -MF $(DEPDIR)/camctrl-camctrl.Tpo -c -o camctrl-camctrl.obj `if test -f 'camctrl.c'; then $(CYGPATH_W) 'camctrl.c'; else $(CYGPATH_W) '$(srcdir)/camctrl.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/camctrl-camctrl.Tpo $(DEPDIR)/camctrl-camctrl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='camctrl.c' object='camctrl-camctrl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(camctrl_CFLAGS) $(CFLAGS) -c -o camctrl-camctrl.obj `if test -f 'camctrl.c'; then $(CYGPATH_W) 'camctrl.c'; else $(CYGPATH_W) '$(srcdir)/camctrl.c'; fi`
+
+probe-probe.o: probe.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(probe_CFLAGS) $(CFLAGS) -MT probe-probe.o -MD -MP -MF $(DEPDIR)/probe-probe.Tpo -c -o probe-probe.o `test -f 'probe.c' || echo '$(srcdir)/'`probe.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/probe-probe.Tpo $(DEPDIR)/probe-probe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='probe.c' object='probe-probe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(probe_CFLAGS) $(CFLAGS) -c -o probe-probe.o `test -f 'probe.c' || echo '$(srcdir)/'`probe.c
+
+probe-probe.obj: probe.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(probe_CFLAGS) $(CFLAGS) -MT probe-probe.obj -MD -MP -MF $(DEPDIR)/probe-probe.Tpo -c -o probe-probe.obj `if test -f 'probe.c'; then $(CYGPATH_W) 'probe.c'; else $(CYGPATH_W) '$(srcdir)/probe.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/probe-probe.Tpo $(DEPDIR)/probe-probe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='probe.c' object='probe-probe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(probe_CFLAGS) $(CFLAGS) -c -o probe-probe.obj `if test -f 'probe.c'; then $(CYGPATH_W) 'probe.c'; else $(CYGPATH_W) '$(srcdir)/probe.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/examples/v4l2/camctrl.c b/tests/examples/v4l2/camctrl.c
new file mode 100644
index 0000000..3c7262a
--- /dev/null
+++ b/tests/examples/v4l2/camctrl.c
@@ -0,0 +1,213 @@
+/* GStreamer
+ * Copyright (C) 2010 Stefan Kost <stefan.kost@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/* demo for using gstcontroler with camera capture for e.g. bracketing
+ *
+ * gcc `pkg-config --cflags --libs gstreamer-0.10 gstreamer-controller-0.10` camctrl.c -o camctrl
+ *
+ * TODO:
+ * - handle stream status and switch capture thread to SCHED_RR/FIFO
+ * - the queue-size controls the controler offset
+ * - right now we work with 1 queued picture and thus active settings for next
+ * frame
+ * - we want some feedback about how precisely a program can be realized
+ * - we might want to adjust the framerate to handle hardware limmits
+ * - we e.g. can't change resolution per frame right now
+ */
+
+#include <gst/gst.h>
+#include <gst/controller/gstcontroller.h>
+#include <gst/controller/gstinterpolationcontrolsource.h>
+
+static void
+event_loop (GstElement * bin)
+{
+ GstBus *bus;
+ GstMessage *message = NULL;
+
+ bus = gst_element_get_bus (GST_ELEMENT (bin));
+
+ while (TRUE) {
+ message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ gst_message_unref (message);
+ return;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_error (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ return;
+ }
+ default:
+ gst_message_unref (message);
+ break;
+ }
+ }
+}
+
+static void
+set_program (GstController * ctrl, GstStructure * prog)
+{
+ const GstStructure *s;
+ GstInterpolationControlSource *cs;
+ GstClockTime ts, dur;
+ GValue val = { 0, };
+ gint v;
+ const GValue *frame;
+ GHashTable *css;
+ gint i, j;
+ const gchar *name;
+
+ css = g_hash_table_new (g_str_hash, g_str_equal);
+
+ g_value_init (&val, G_TYPE_INT);
+
+ ts = 0;
+ dur = gst_util_uint64_scale_int (GST_SECOND, 1, 15);
+
+ /* loop over each image in prog */
+ for (i = 0; i < gst_structure_n_fields (prog); i++) {
+ GST_DEBUG ("ctrl on %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
+
+ frame =
+ gst_structure_get_value (prog, gst_structure_nth_field_name (prog, i));
+ s = gst_value_get_structure (frame);
+ for (j = 0; j < gst_structure_n_fields (s); j++) {
+ name = gst_structure_nth_field_name (s, j);
+ cs = g_hash_table_lookup (css, name);
+ if (!cs) {
+ cs = gst_interpolation_control_source_new ();
+ gst_controller_set_control_source (ctrl, name, GST_CONTROL_SOURCE (cs));
+ gst_interpolation_control_source_set_interpolation_mode (cs,
+ GST_INTERPOLATE_NONE);
+ g_hash_table_insert (css, (gpointer) name, cs);
+ g_object_unref (cs);
+ }
+ gst_structure_get_int (s, name, &v);
+ g_value_set_int (&val, v);
+ gst_interpolation_control_source_set (cs, ts, &val);
+ GST_DEBUG (" %s = %d", name, v);
+ }
+ ts += dur;
+ }
+
+ g_value_unset (&val);
+
+ g_hash_table_unref (css);
+}
+
+gint
+main (gint argc, gchar ** argv)
+{
+ GstElement *bin;
+ GstElement *src, *fmt, *enc, *sink;
+ GstCaps *caps;
+ GstController *ctrl;
+ GstStructure *prog;
+
+ /* init gstreamer */
+ gst_init (&argc, &argv);
+ gst_controller_init (&argc, &argv);
+
+ /* create a new bin to hold the elements */
+ bin = gst_pipeline_new ("camera");
+
+ /* create elements */
+ if (!(sink = gst_element_factory_make ("multifilesink", NULL))) {
+ GST_WARNING ("Can't create element \"multifilesink\"");
+ return -1;
+ }
+ g_object_set (sink, "location", "image%02d.jpg", NULL);
+
+ if (!(enc = gst_element_factory_make ("jpegenc", NULL))) {
+ GST_WARNING ("Can't create element \"jpegenc\"");
+ return -1;
+ }
+
+ if (!(fmt = gst_element_factory_make ("capsfilter", NULL))) {
+ GST_WARNING ("Can't create element \"capsfilter\"");
+ return -1;
+ }
+ caps =
+ gst_caps_from_string
+ ("video/x-raw-yuv, width=640, height=480, framerate=(fraction)15/1");
+ g_object_set (fmt, "caps", caps, NULL);
+
+ if (!(src = gst_element_factory_make ("v4l2src", NULL))) {
+ GST_WARNING ("Can't create element \"v4l2src\"");
+ return -1;
+ }
+ g_object_set (src, "queue-size", 1, NULL);
+
+ /* add objects to the main bin */
+ gst_bin_add_many (GST_BIN (bin), src, fmt, enc, sink, NULL);
+
+ /* link elements */
+ if (!gst_element_link_many (src, fmt, enc, sink, NULL)) {
+ GST_WARNING ("Can't link elements");
+ return -1;
+ }
+
+ /* get the controller */
+ if (!(ctrl = gst_controller_new (G_OBJECT (src), "brightness", "contrast",
+ "saturation", NULL))) {
+ GST_WARNING ("can't control source element");
+ return -1;
+ }
+
+ /* programm a pattern of events */
+#if 0
+ prog = gst_structure_from_string ("program"
+ ", image00=(structure)\"image\\,contrast\\=0\\;\""
+ ", image01=(structure)\"image\\,contrast\\=79\\;\""
+ ", image02=(structure)\"image\\,contrast\\=255\\;\""
+ ", image03=(structure)\"image\\,contrast\\=15\\;\";", NULL);
+#endif
+#if 1
+ prog = gst_structure_from_string ("program"
+ ", image00=(structure)\"image\\,brightness\\=255\\,contrast\\=0\\;\""
+ ", image01=(structure)\"image\\,brightness\\=127\\,contrast\\=79\\;\""
+ ", image02=(structure)\"image\\,brightness\\=64\\,contrast\\=255\\;\""
+ ", image03=(structure)\"image\\,brightness\\=0\\,contrast\\=15\\;\";",
+ NULL);
+#endif
+ set_program (ctrl, prog);
+ g_object_set (src, "num-buffers", gst_structure_n_fields (prog), NULL);
+
+ /* prepare playback */
+ gst_element_set_state (bin, GST_STATE_PAUSED);
+
+ /* play and wait */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ /* mainloop and wait for eos */
+ event_loop (bin);
+
+ /* stop and cleanup */
+ gst_element_set_state (bin, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (bin));
+ return 0;
+}
diff --git a/tests/examples/v4l2/probe.c b/tests/examples/v4l2/probe.c
new file mode 100644
index 0000000..169288a
--- /dev/null
+++ b/tests/examples/v4l2/probe.c
@@ -0,0 +1,85 @@
+/* GStreamer
+ * Copyright (C) 2009 Filippo Argiolas <filippo.argiolas@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <gst/gst.h>
+#include <gst/interfaces/propertyprobe.h>
+
+int
+main (int argc, char *argv[])
+{
+ GstElement *src, *sink;
+ GstElement *bin;
+ GstPropertyProbe *probe = NULL;
+ const GParamSpec *pspec = NULL;
+ GValueArray *array = NULL;
+ gint i, ret;
+ GValue *value;
+ const gchar *device;
+ gchar *name;
+ guint flags;
+
+ gst_init (&argc, &argv);
+
+ bin = gst_pipeline_new ("pipeline");
+ g_assert (bin);
+
+ src = gst_element_factory_make ("v4l2src", "v4l2_source");
+ g_assert (src);
+ sink = gst_element_factory_make ("fakesink", "fake_sink");
+ g_assert (sink);
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many (GST_BIN (bin), src, sink, NULL);
+ /* link the elements */
+ gst_element_link_many (src, sink, NULL);
+
+ /* probe devices */
+ g_print ("Probing devices with propertyprobe...\n");
+ probe = GST_PROPERTY_PROBE (src);
+ pspec = gst_property_probe_get_property (probe, "device");
+ array = gst_property_probe_probe_and_get_values (probe, pspec);
+
+ if (!array) {
+ g_print ("No device found\n");
+ exit (1);
+ }
+
+ for (i = 0; i < array->n_values; i++) {
+ value = g_value_array_get_nth (array, i);
+ device = g_value_get_string (value);
+ g_print ("Device: %s\n", device);
+ g_object_set_property (G_OBJECT (src), "device", value);
+ gst_element_set_state (bin, GST_STATE_READY);
+ ret = gst_element_get_state (bin, NULL, NULL, 10 * GST_SECOND);
+ if (ret != GST_STATE_CHANGE_SUCCESS) {
+ g_print ("Couldn't set STATE_READY\n");
+ continue;
+ }
+ g_object_get (G_OBJECT (src), "device-name", &name, NULL);
+ g_print ("Name: %s\n", name);
+ g_free (name);
+ g_object_get (G_OBJECT (src), "flags", &flags, NULL);
+ g_print ("Flags: 0x%08X\n", flags);
+ gst_element_set_state (bin, GST_STATE_NULL);
+ g_print ("\n");
+ }
+
+ exit (0);
+}
diff --git a/tests/files/Makefile.am b/tests/files/Makefile.am
new file mode 100644
index 0000000..ae08e1a
--- /dev/null
+++ b/tests/files/Makefile.am
@@ -0,0 +1,13 @@
+
+EXTRA_DIST = \
+ audiotestsrc.flac \
+ id3-407349-1.tag \
+ id3-407349-2.tag \
+ id3-447000-wcop.tag \
+ id3-577468-unsynced-tag.tag \
+ id3-588148-unsynced-v24.tag \
+ pcm16sine.flv \
+ pinknoise-vorbis.mkv \
+ test-cert.pem \
+ test-key.pem
+
diff --git a/tests/files/Makefile.in b/tests/files/Makefile.in
new file mode 100644
index 0000000..c80640f
--- /dev/null
+++ b/tests/files/Makefile.in
@@ -0,0 +1,616 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/files
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ audiotestsrc.flac \
+ id3-407349-1.tag \
+ id3-407349-2.tag \
+ id3-447000-wcop.tag \
+ id3-577468-unsynced-tag.tag \
+ id3-588148-unsynced-v24.tag \
+ pcm16sine.flv \
+ pinknoise-vorbis.mkv \
+ test-cert.pem \
+ test-key.pem
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/files/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/files/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# 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/files/audiotestsrc.flac b/tests/files/audiotestsrc.flac
new file mode 100644
index 0000000..2f12c3f
--- /dev/null
+++ b/tests/files/audiotestsrc.flac
Binary files differ
diff --git a/tests/files/id3-407349-1.tag b/tests/files/id3-407349-1.tag
new file mode 100644
index 0000000..47a2763
--- /dev/null
+++ b/tests/files/id3-407349-1.tag
Binary files differ
diff --git a/tests/files/id3-407349-2.tag b/tests/files/id3-407349-2.tag
new file mode 100644
index 0000000..d44a9a1
--- /dev/null
+++ b/tests/files/id3-407349-2.tag
Binary files differ
diff --git a/tests/files/id3-447000-wcop.tag b/tests/files/id3-447000-wcop.tag
new file mode 100644
index 0000000..0f81c26
--- /dev/null
+++ b/tests/files/id3-447000-wcop.tag
Binary files differ
diff --git a/tests/files/id3-577468-unsynced-tag.tag b/tests/files/id3-577468-unsynced-tag.tag
new file mode 100644
index 0000000..a5880e8
--- /dev/null
+++ b/tests/files/id3-577468-unsynced-tag.tag
Binary files differ
diff --git a/tests/files/id3-588148-unsynced-v24.tag b/tests/files/id3-588148-unsynced-v24.tag
new file mode 100644
index 0000000..099d930
--- /dev/null
+++ b/tests/files/id3-588148-unsynced-v24.tag
Binary files differ
diff --git a/tests/files/pcm16sine.flv b/tests/files/pcm16sine.flv
new file mode 100644
index 0000000..2925a2a
--- /dev/null
+++ b/tests/files/pcm16sine.flv
Binary files differ
diff --git a/tests/files/pinknoise-vorbis.mkv b/tests/files/pinknoise-vorbis.mkv
new file mode 100644
index 0000000..f83006c
--- /dev/null
+++ b/tests/files/pinknoise-vorbis.mkv
Binary files differ
diff --git a/tests/files/test-cert.pem b/tests/files/test-cert.pem
new file mode 100644
index 0000000..a6b6608
--- /dev/null
+++ b/tests/files/test-cert.pem
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDjzCCAvigAwIBAgIBADANBgkqhkiG9w0BAQQFADCBkjELMAkGA1UEBhMCVVMx
+FjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjEPMA0GA1UE
+ChMGWGltaWFuMRUwEwYDVQQLEwxTb3VwIEtpdGNoZW4xEjAQBgNVBAMTCWxvY2Fs
+aG9zdDEeMBwGCSqGSIb3DQEJARYPc291cEB4aW1pYW4uY29tMB4XDTAzMDkyMzE4
+Mzc0MVoXDTEzMDkyMzE4Mzc0MVowgZIxCzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1N
+YXNzYWNodXNldHRzMQ8wDQYDVQQHEwZCb3N0b24xDzANBgNVBAoTBlhpbWlhbjEV
+MBMGA1UECxMMU291cCBLaXRjaGVuMRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkq
+hkiG9w0BCQEWD3NvdXBAeGltaWFuLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
+gYkCgYEAwzT/WxfdXqb2hbyjQav3FtN7tLxj3UbZKCKDYlizBsNLxb9exfebhV4h
+CoAcaSNvLUnk3tAXnk+BDsIC1V4SbwqHYR17PnO3YZ8fkNwh5RGZwNx+zafdfFyu
++3Sh+mE03bljpDlTsgPL8CiFCd68MPRnuHoKt5iTpSyLC6Df0qcCAwEAAaOB8jCB
+7zAdBgNVHQ4EFgQU9A9omrgBK5Kkl6FRxrgJU2voj4Uwgb8GA1UdIwSBtzCBtIAU
+9A9omrgBK5Kkl6FRxrgJU2voj4WhgZikgZUwgZIxCzAJBgNVBAYTAlVTMRYwFAYD
+VQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZCb3N0b24xDzANBgNVBAoTBlhp
+bWlhbjEVMBMGA1UECxMMU291cCBLaXRjaGVuMRIwEAYDVQQDEwlsb2NhbGhvc3Qx
+HjAcBgkqhkiG9w0BCQEWD3NvdXBAeGltaWFuLmNvbYIBADAMBgNVHRMEBTADAQH/
+MA0GCSqGSIb3DQEBBAUAA4GBAGCV56N7bEDNdE76T8i68gS00NIVVosVQjS39Ojd
+ED+rvq0YYvuc2UXlzAonuCJfwFc73g4wSIjS0xijF5rnugZ+aay0LNv2y+Rf34CQ
+RNswrwurFjlxgTOO+Wx2IM64mAnBfj43M8uKEZFqAiGKrZZ0xIqyUMlku0FgXDH2
+Jvpg
+-----END CERTIFICATE-----
diff --git a/tests/files/test-key.pem b/tests/files/test-key.pem
new file mode 100644
index 0000000..9bea9bf
--- /dev/null
+++ b/tests/files/test-key.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQDDNP9bF91epvaFvKNBq/cW03u0vGPdRtkoIoNiWLMGw0vFv17F
+95uFXiEKgBxpI28tSeTe0BeeT4EOwgLVXhJvCodhHXs+c7dhnx+Q3CHlEZnA3H7N
+p918XK77dKH6YTTduWOkOVOyA8vwKIUJ3rww9Ge4egq3mJOlLIsLoN/SpwIDAQAB
+AoGAOGAi6zzuKrrPcXo0L/ApEQeMr3rE4I/ogUXOaeWx9l8KkBafmU7UNGUl57Fu
+AxM/tXWkypCQcaEGZau0Q8jCS5wKgynNi72F4OzBqgjgW4vvtrjfC1LagnCd2ZMX
+V5XVECjO/sEDg0hJeOsXlKbECAgvHMU3dSCGO7DmuG9tIxkCQQDsth1VvVjOdfp6
+klOfYzbAM1p9HIcNPJMeuBFqq//UHX4aPqh/6G6W06TOTN+bjZBmitG9yjV958t2
+rPxl64f7AkEA0x0WOLm5S0LNsv7zwjXuTcj+NCHL36b3dK90oxX8Gq69PANL/EJY
+ItpHNLgzzo4DRmQy8q0WZlC9HYk1YljERQJAEN7+AkFnlfeErb3GJgMNQO+oEGi7
+G29o0PSvkRnHNxgPB9HVcqBfWXKmOWnzOgQB+b0FK/DAlUOzFbdImf8KhwJAFLty
+hzeV/tIcqUtoXNY3BOSMMkpvXxNikc75QVrTWzt10gLw32EUjreo7oB4dfx0TeFh
+L3vYC0w6hkAHQhU9kQJAPSEQ+Bqzlk6BrQNrNFEVzi1Rwpz7LOzhOjuYW6bsiAdX
+axA4r6Xh25x08ZU7cqX7gwVLHL6pgrEKuUs0Nc5Klg==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/icles/Makefile.am b/tests/icles/Makefile.am
new file mode 100644
index 0000000..5b1eb22
--- /dev/null
+++ b/tests/icles/Makefile.am
@@ -0,0 +1,59 @@
+if HAVE_GTK
+GTK_TESTS = gdkpixbufsink-test
+gdkpixbufsink_test_SOURCES = gdkpixbufsink-test.c
+gdkpixbufsink_test_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
+gdkpixbufsink_test_LDADD = $(GST_LIBS) $(GTK_LIBS)
+else
+GTK_TESTS =
+endif
+
+if USE_GST_V4L2
+V4L2_TESTS = v4l2src-test
+
+v4l2src_test_SOURCES = v4l2src-test.c
+v4l2src_test_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+v4l2src_test_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_LIBS)
+
+else
+V4L2_TESTS =
+endif
+
+if USE_OSS4
+OSS4_TESTS=test-oss4
+
+test_oss4_SOURCES = test-oss4.c
+test_oss4_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+test_oss4_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_LIBS)
+test_oss4_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+else
+OSS4_TESTS=
+endif
+
+if USE_X
+X_TESTS = ximagesrc-test
+
+ximagesrc_test_SOURCES = ximagesrc-test.c
+ximagesrc_test_CFLAGS = $(GST_CFLAGS)
+ximagesrc_test_LDADD = $(GST_LIBS)
+else
+X_TESTS =
+endif
+
+equalizer_test_SOURCES = equalizer-test.c
+equalizer_test_CFLAGS = $(GST_CFLAGS)
+equalizer_test_LDADD = $(GST_LIBS)
+
+videocrop_test_SOURCES = videocrop-test.c
+videocrop_test_CFLAGS = $(GST_CFLAGS)
+videocrop_test_LDADD = $(GST_LIBS)
+
+videobox_test_SOURCES = videobox-test.c
+videobox_test_CFLAGS = $(GST_CFLAGS)
+videobox_test_LDADD = $(GST_LIBS)
+
+videocrop2_test_SOURCES = videocrop2-test.c
+videocrop2_test_CFLAGS = $(GST_CFLAGS)
+videocrop2_test_LDADD = $(GST_LIBS)
+
+noinst_PROGRAMS = $(GTK_TESTS) $(OSS4_TESTS) $(V4L2_TESTS) $(X_TESTS) equalizer-test videocrop-test videobox-test videocrop2-test
+
diff --git a/tests/icles/Makefile.in b/tests/icles/Makefile.in
new file mode 100644
index 0000000..22c3d08
--- /dev/null
+++ b/tests/icles/Makefile.in
@@ -0,0 +1,978 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+ $(am__EXEEXT_4) equalizer-test$(EXEEXT) \
+ videocrop-test$(EXEEXT) videobox-test$(EXEEXT) \
+ videocrop2-test$(EXEEXT)
+subdir = tests/icles
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+ $(top_srcdir)/common/m4/as-auto-alt.m4 \
+ $(top_srcdir)/common/m4/as-compiler-flag.m4 \
+ $(top_srcdir)/common/m4/as-gcc-inline-assembly.m4 \
+ $(top_srcdir)/common/m4/as-objc.m4 \
+ $(top_srcdir)/common/m4/as-python.m4 \
+ $(top_srcdir)/common/m4/as-scrub-include.m4 \
+ $(top_srcdir)/common/m4/as-version.m4 \
+ $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+ $(top_srcdir)/common/m4/gst-arch.m4 \
+ $(top_srcdir)/common/m4/gst-args.m4 \
+ $(top_srcdir)/common/m4/gst-check.m4 \
+ $(top_srcdir)/common/m4/gst-default.m4 \
+ $(top_srcdir)/common/m4/gst-dowhile.m4 \
+ $(top_srcdir)/common/m4/gst-error.m4 \
+ $(top_srcdir)/common/m4/gst-feature.m4 \
+ $(top_srcdir)/common/m4/gst-gettext.m4 \
+ $(top_srcdir)/common/m4/gst-glib2.m4 \
+ $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+ $(top_srcdir)/common/m4/gst-platform.m4 \
+ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+ $(top_srcdir)/common/m4/gst-plugindir.m4 \
+ $(top_srcdir)/common/m4/gst-x11.m4 \
+ $(top_srcdir)/common/m4/gst.m4 \
+ $(top_srcdir)/common/m4/gtk-doc.m4 \
+ $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/m4/aalib.m4 $(top_srcdir)/m4/esd.m4 \
+ $(top_srcdir)/m4/gconf-2.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_GTK_TRUE@am__EXEEXT_1 = gdkpixbufsink-test$(EXEEXT)
+@USE_OSS4_TRUE@am__EXEEXT_2 = test-oss4$(EXEEXT)
+@USE_GST_V4L2_TRUE@am__EXEEXT_3 = v4l2src-test$(EXEEXT)
+@USE_X_TRUE@am__EXEEXT_4 = ximagesrc-test$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_equalizer_test_OBJECTS = equalizer_test-equalizer-test.$(OBJEXT)
+equalizer_test_OBJECTS = $(am_equalizer_test_OBJECTS)
+am__DEPENDENCIES_1 =
+equalizer_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+equalizer_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(equalizer_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+am__gdkpixbufsink_test_SOURCES_DIST = gdkpixbufsink-test.c
+@HAVE_GTK_TRUE@am_gdkpixbufsink_test_OBJECTS = gdkpixbufsink_test-gdkpixbufsink-test.$(OBJEXT)
+gdkpixbufsink_test_OBJECTS = $(am_gdkpixbufsink_test_OBJECTS)
+@HAVE_GTK_TRUE@gdkpixbufsink_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+gdkpixbufsink_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+am__test_oss4_SOURCES_DIST = test-oss4.c
+@USE_OSS4_TRUE@am_test_oss4_OBJECTS = test_oss4-test-oss4.$(OBJEXT)
+test_oss4_OBJECTS = $(am_test_oss4_OBJECTS)
+@USE_OSS4_TRUE@test_oss4_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@USE_OSS4_TRUE@ $(am__DEPENDENCIES_1)
+test_oss4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_oss4_CFLAGS) \
+ $(CFLAGS) $(test_oss4_LDFLAGS) $(LDFLAGS) -o $@
+am__v4l2src_test_SOURCES_DIST = v4l2src-test.c
+@USE_GST_V4L2_TRUE@am_v4l2src_test_OBJECTS = \
+@USE_GST_V4L2_TRUE@ v4l2src_test-v4l2src-test.$(OBJEXT)
+v4l2src_test_OBJECTS = $(am_v4l2src_test_OBJECTS)
+@USE_GST_V4L2_TRUE@v4l2src_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@USE_GST_V4L2_TRUE@ $(am__DEPENDENCIES_1)
+v4l2src_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(v4l2src_test_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_videobox_test_OBJECTS = videobox_test-videobox-test.$(OBJEXT)
+videobox_test_OBJECTS = $(am_videobox_test_OBJECTS)
+videobox_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+videobox_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(videobox_test_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_videocrop_test_OBJECTS = videocrop_test-videocrop-test.$(OBJEXT)
+videocrop_test_OBJECTS = $(am_videocrop_test_OBJECTS)
+videocrop_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+videocrop_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(videocrop_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+am_videocrop2_test_OBJECTS = \
+ videocrop2_test-videocrop2-test.$(OBJEXT)
+videocrop2_test_OBJECTS = $(am_videocrop2_test_OBJECTS)
+videocrop2_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+videocrop2_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(videocrop2_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am__ximagesrc_test_SOURCES_DIST = ximagesrc-test.c
+@USE_X_TRUE@am_ximagesrc_test_OBJECTS = \
+@USE_X_TRUE@ ximagesrc_test-ximagesrc-test.$(OBJEXT)
+ximagesrc_test_OBJECTS = $(am_ximagesrc_test_OBJECTS)
+@USE_X_TRUE@ximagesrc_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ximagesrc_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(ximagesrc_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(equalizer_test_SOURCES) $(gdkpixbufsink_test_SOURCES) \
+ $(test_oss4_SOURCES) $(v4l2src_test_SOURCES) \
+ $(videobox_test_SOURCES) $(videocrop_test_SOURCES) \
+ $(videocrop2_test_SOURCES) $(ximagesrc_test_SOURCES)
+DIST_SOURCES = $(equalizer_test_SOURCES) \
+ $(am__gdkpixbufsink_test_SOURCES_DIST) \
+ $(am__test_oss4_SOURCES_DIST) $(am__v4l2src_test_SOURCES_DIST) \
+ $(videobox_test_SOURCES) $(videocrop_test_SOURCES) \
+ $(videocrop2_test_SOURCES) $(am__ximagesrc_test_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+AALIB_CFLAGS = @AALIB_CFLAGS@
+AALIB_CONFIG = @AALIB_CONFIG@
+AALIB_LIBS = @AALIB_LIBS@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+ANNODEX_CFLAGS = @ANNODEX_CFLAGS@
+ANNODEX_LIBS = @ANNODEX_LIBS@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BZ2_LIBS = @BZ2_LIBS@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_GOBJECT_CFLAGS = @CAIRO_GOBJECT_CFLAGS@
+CAIRO_GOBJECT_LIBS = @CAIRO_GOBJECT_LIBS@
+CAIRO_LIBS = @CAIRO_LIBS@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECTSOUND_CFLAGS = @DIRECTSOUND_CFLAGS@
+DIRECTSOUND_LDFLAGS = @DIRECTSOUND_LDFLAGS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DV1394_CFLAGS = @DV1394_CFLAGS@
+DV1394_LIBS = @DV1394_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_CONFIG = @ESD_CONFIG@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLAC_CFLAGS = @FLAC_CFLAGS@
+FLAC_LIBS = @FLAC_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
+GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_GDP_CFLAGS = @GST_GDP_CFLAGS@
+GST_GDP_LIBS = @GST_GDP_LIBS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_MAJORMINOR = @GST_MAJORMINOR@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_X11_CFLAGS = @GTK_X11_CFLAGS@
+GTK_X11_LIBS = @GTK_X11_LIBS@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HAVE_AVC1394 = @HAVE_AVC1394@
+HAVE_BZ2 = @HAVE_BZ2@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_GCONFTOOL = @HAVE_GCONFTOOL@
+HAVE_ROM1394 = @HAVE_ROM1394@
+HAVE_SPEEX = @HAVE_SPEEX@
+HAVE_X = @HAVE_X@
+HAVE_XSHM = @HAVE_XSHM@
+HAVE_ZLIB = @HAVE_ZLIB@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+JACK_0_120_1_CFLAGS = @JACK_0_120_1_CFLAGS@
+JACK_0_120_1_LIBS = @JACK_0_120_1_LIBS@
+JACK_1_9_7_CFLAGS = @JACK_1_9_7_CFLAGS@
+JACK_1_9_7_LIBS = @JACK_1_9_7_LIBS@
+JACK_CFLAGS = @JACK_CFLAGS@
+JACK_LIBS = @JACK_LIBS@
+JPEG_LIBS = @JPEG_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCACA_CFLAGS = @LIBCACA_CFLAGS@
+LIBCACA_LIBS = @LIBCACA_LIBS@
+LIBDV_CFLAGS = @LIBDV_CFLAGS@
+LIBDV_LIBS = @LIBDV_LIBS@
+LIBICONV = @LIBICONV@
+LIBIEC61883_CFLAGS = @LIBIEC61883_CFLAGS@
+LIBIEC61883_LIBS = @LIBIEC61883_LIBS@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBV4L2_CFLAGS = @LIBV4L2_CFLAGS@
+LIBV4L2_LIBS = @LIBV4L2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJC_LDFLAGS = @OBJC_LDFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PULSE_0_9_20_CFLAGS = @PULSE_0_9_20_CFLAGS@
+PULSE_0_9_20_LIBS = @PULSE_0_9_20_LIBS@
+PULSE_1_0_CFLAGS = @PULSE_1_0_CFLAGS@
+PULSE_1_0_LIBS = @PULSE_1_0_LIBS@
+PULSE_CFLAGS = @PULSE_CFLAGS@
+PULSE_LIBS = @PULSE_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RAW1394_CFLAGS = @RAW1394_CFLAGS@
+RAW1394_LIBS = @RAW1394_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHOUT2_CFLAGS = @SHOUT2_CFLAGS@
+SHOUT2_LIBS = @SHOUT2_LIBS@
+SOUP_CFLAGS = @SOUP_CFLAGS@
+SOUP_LIBS = @SOUP_LIBS@
+SPEEX_CFLAGS = @SPEEX_CFLAGS@
+SPEEX_LIBS = @SPEEX_LIBS@
+STRIP = @STRIP@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_CXXFLAGS = @TAGLIB_CXXFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WAVPACK_CFLAGS = @WAVPACK_CFLAGS@
+WAVPACK_LIBS = @WAVPACK_LIBS@
+WIN32_LIBS = @WIN32_LIBS@
+XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
+XDAMAGE_LIBS = @XDAMAGE_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+XFIXES_LIBS = @XFIXES_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XSHM_LIBS = @XSHM_LIBS@
+XVIDEO_LIBS = @XVIDEO_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@HAVE_GTK_FALSE@GTK_TESTS =
+@HAVE_GTK_TRUE@GTK_TESTS = gdkpixbufsink-test
+@HAVE_GTK_TRUE@gdkpixbufsink_test_SOURCES = gdkpixbufsink-test.c
+@HAVE_GTK_TRUE@gdkpixbufsink_test_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
+@HAVE_GTK_TRUE@gdkpixbufsink_test_LDADD = $(GST_LIBS) $(GTK_LIBS)
+@USE_GST_V4L2_FALSE@V4L2_TESTS =
+@USE_GST_V4L2_TRUE@V4L2_TESTS = v4l2src-test
+@USE_GST_V4L2_TRUE@v4l2src_test_SOURCES = v4l2src-test.c
+@USE_GST_V4L2_TRUE@v4l2src_test_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+@USE_GST_V4L2_TRUE@v4l2src_test_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_LIBS)
+@USE_OSS4_FALSE@OSS4_TESTS =
+@USE_OSS4_TRUE@OSS4_TESTS = test-oss4
+@USE_OSS4_TRUE@test_oss4_SOURCES = test-oss4.c
+@USE_OSS4_TRUE@test_oss4_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+@USE_OSS4_TRUE@test_oss4_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_LIBS)
+@USE_OSS4_TRUE@test_oss4_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+@USE_X_FALSE@X_TESTS =
+@USE_X_TRUE@X_TESTS = ximagesrc-test
+@USE_X_TRUE@ximagesrc_test_SOURCES = ximagesrc-test.c
+@USE_X_TRUE@ximagesrc_test_CFLAGS = $(GST_CFLAGS)
+@USE_X_TRUE@ximagesrc_test_LDADD = $(GST_LIBS)
+equalizer_test_SOURCES = equalizer-test.c
+equalizer_test_CFLAGS = $(GST_CFLAGS)
+equalizer_test_LDADD = $(GST_LIBS)
+videocrop_test_SOURCES = videocrop-test.c
+videocrop_test_CFLAGS = $(GST_CFLAGS)
+videocrop_test_LDADD = $(GST_LIBS)
+videobox_test_SOURCES = videobox-test.c
+videobox_test_CFLAGS = $(GST_CFLAGS)
+videobox_test_LDADD = $(GST_LIBS)
+videocrop2_test_SOURCES = videocrop2-test.c
+videocrop2_test_CFLAGS = $(GST_CFLAGS)
+videocrop2_test_LDADD = $(GST_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/icles/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/icles/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+equalizer-test$(EXEEXT): $(equalizer_test_OBJECTS) $(equalizer_test_DEPENDENCIES) $(EXTRA_equalizer_test_DEPENDENCIES)
+ @rm -f equalizer-test$(EXEEXT)
+ $(AM_V_CCLD)$(equalizer_test_LINK) $(equalizer_test_OBJECTS) $(equalizer_test_LDADD) $(LIBS)
+gdkpixbufsink-test$(EXEEXT): $(gdkpixbufsink_test_OBJECTS) $(gdkpixbufsink_test_DEPENDENCIES) $(EXTRA_gdkpixbufsink_test_DEPENDENCIES)
+ @rm -f gdkpixbufsink-test$(EXEEXT)
+ $(AM_V_CCLD)$(gdkpixbufsink_test_LINK) $(gdkpixbufsink_test_OBJECTS) $(gdkpixbufsink_test_LDADD) $(LIBS)
+test-oss4$(EXEEXT): $(test_oss4_OBJECTS) $(test_oss4_DEPENDENCIES) $(EXTRA_test_oss4_DEPENDENCIES)
+ @rm -f test-oss4$(EXEEXT)
+ $(AM_V_CCLD)$(test_oss4_LINK) $(test_oss4_OBJECTS) $(test_oss4_LDADD) $(LIBS)
+v4l2src-test$(EXEEXT): $(v4l2src_test_OBJECTS) $(v4l2src_test_DEPENDENCIES) $(EXTRA_v4l2src_test_DEPENDENCIES)
+ @rm -f v4l2src-test$(EXEEXT)
+ $(AM_V_CCLD)$(v4l2src_test_LINK) $(v4l2src_test_OBJECTS) $(v4l2src_test_LDADD) $(LIBS)
+videobox-test$(EXEEXT): $(videobox_test_OBJECTS) $(videobox_test_DEPENDENCIES) $(EXTRA_videobox_test_DEPENDENCIES)
+ @rm -f videobox-test$(EXEEXT)
+ $(AM_V_CCLD)$(videobox_test_LINK) $(videobox_test_OBJECTS) $(videobox_test_LDADD) $(LIBS)
+videocrop-test$(EXEEXT): $(videocrop_test_OBJECTS) $(videocrop_test_DEPENDENCIES) $(EXTRA_videocrop_test_DEPENDENCIES)
+ @rm -f videocrop-test$(EXEEXT)
+ $(AM_V_CCLD)$(videocrop_test_LINK) $(videocrop_test_OBJECTS) $(videocrop_test_LDADD) $(LIBS)
+videocrop2-test$(EXEEXT): $(videocrop2_test_OBJECTS) $(videocrop2_test_DEPENDENCIES) $(EXTRA_videocrop2_test_DEPENDENCIES)
+ @rm -f videocrop2-test$(EXEEXT)
+ $(AM_V_CCLD)$(videocrop2_test_LINK) $(videocrop2_test_OBJECTS) $(videocrop2_test_LDADD) $(LIBS)
+ximagesrc-test$(EXEEXT): $(ximagesrc_test_OBJECTS) $(ximagesrc_test_DEPENDENCIES) $(EXTRA_ximagesrc_test_DEPENDENCIES)
+ @rm -f ximagesrc-test$(EXEEXT)
+ $(AM_V_CCLD)$(ximagesrc_test_LINK) $(ximagesrc_test_OBJECTS) $(ximagesrc_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalizer_test-equalizer-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_oss4-test-oss4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l2src_test-v4l2src-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videobox_test-videobox-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videocrop2_test-videocrop2-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/videocrop_test-videocrop-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ximagesrc_test-ximagesrc-test.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+equalizer_test-equalizer-test.o: equalizer-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(equalizer_test_CFLAGS) $(CFLAGS) -MT equalizer_test-equalizer-test.o -MD -MP -MF $(DEPDIR)/equalizer_test-equalizer-test.Tpo -c -o equalizer_test-equalizer-test.o `test -f 'equalizer-test.c' || echo '$(srcdir)/'`equalizer-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/equalizer_test-equalizer-test.Tpo $(DEPDIR)/equalizer_test-equalizer-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='equalizer-test.c' object='equalizer_test-equalizer-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(equalizer_test_CFLAGS) $(CFLAGS) -c -o equalizer_test-equalizer-test.o `test -f 'equalizer-test.c' || echo '$(srcdir)/'`equalizer-test.c
+
+equalizer_test-equalizer-test.obj: equalizer-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(equalizer_test_CFLAGS) $(CFLAGS) -MT equalizer_test-equalizer-test.obj -MD -MP -MF $(DEPDIR)/equalizer_test-equalizer-test.Tpo -c -o equalizer_test-equalizer-test.obj `if test -f 'equalizer-test.c'; then $(CYGPATH_W) 'equalizer-test.c'; else $(CYGPATH_W) '$(srcdir)/equalizer-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/equalizer_test-equalizer-test.Tpo $(DEPDIR)/equalizer_test-equalizer-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='equalizer-test.c' object='equalizer_test-equalizer-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(equalizer_test_CFLAGS) $(CFLAGS) -c -o equalizer_test-equalizer-test.obj `if test -f 'equalizer-test.c'; then $(CYGPATH_W) 'equalizer-test.c'; else $(CYGPATH_W) '$(srcdir)/equalizer-test.c'; fi`
+
+gdkpixbufsink_test-gdkpixbufsink-test.o: gdkpixbufsink-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -MT gdkpixbufsink_test-gdkpixbufsink-test.o -MD -MP -MF $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo -c -o gdkpixbufsink_test-gdkpixbufsink-test.o `test -f 'gdkpixbufsink-test.c' || echo '$(srcdir)/'`gdkpixbufsink-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gdkpixbufsink-test.c' object='gdkpixbufsink_test-gdkpixbufsink-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -c -o gdkpixbufsink_test-gdkpixbufsink-test.o `test -f 'gdkpixbufsink-test.c' || echo '$(srcdir)/'`gdkpixbufsink-test.c
+
+gdkpixbufsink_test-gdkpixbufsink-test.obj: gdkpixbufsink-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -MT gdkpixbufsink_test-gdkpixbufsink-test.obj -MD -MP -MF $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo -c -o gdkpixbufsink_test-gdkpixbufsink-test.obj `if test -f 'gdkpixbufsink-test.c'; then $(CYGPATH_W) 'gdkpixbufsink-test.c'; else $(CYGPATH_W) '$(srcdir)/gdkpixbufsink-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Tpo $(DEPDIR)/gdkpixbufsink_test-gdkpixbufsink-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gdkpixbufsink-test.c' object='gdkpixbufsink_test-gdkpixbufsink-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gdkpixbufsink_test_CFLAGS) $(CFLAGS) -c -o gdkpixbufsink_test-gdkpixbufsink-test.obj `if test -f 'gdkpixbufsink-test.c'; then $(CYGPATH_W) 'gdkpixbufsink-test.c'; else $(CYGPATH_W) '$(srcdir)/gdkpixbufsink-test.c'; fi`
+
+test_oss4-test-oss4.o: test-oss4.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_oss4_CFLAGS) $(CFLAGS) -MT test_oss4-test-oss4.o -MD -MP -MF $(DEPDIR)/test_oss4-test-oss4.Tpo -c -o test_oss4-test-oss4.o `test -f 'test-oss4.c' || echo '$(srcdir)/'`test-oss4.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_oss4-test-oss4.Tpo $(DEPDIR)/test_oss4-test-oss4.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-oss4.c' object='test_oss4-test-oss4.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_oss4_CFLAGS) $(CFLAGS) -c -o test_oss4-test-oss4.o `test -f 'test-oss4.c' || echo '$(srcdir)/'`test-oss4.c
+
+test_oss4-test-oss4.obj: test-oss4.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_oss4_CFLAGS) $(CFLAGS) -MT test_oss4-test-oss4.obj -MD -MP -MF $(DEPDIR)/test_oss4-test-oss4.Tpo -c -o test_oss4-test-oss4.obj `if test -f 'test-oss4.c'; then $(CYGPATH_W) 'test-oss4.c'; else $(CYGPATH_W) '$(srcdir)/test-oss4.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_oss4-test-oss4.Tpo $(DEPDIR)/test_oss4-test-oss4.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-oss4.c' object='test_oss4-test-oss4.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_oss4_CFLAGS) $(CFLAGS) -c -o test_oss4-test-oss4.obj `if test -f 'test-oss4.c'; then $(CYGPATH_W) 'test-oss4.c'; else $(CYGPATH_W) '$(srcdir)/test-oss4.c'; fi`
+
+v4l2src_test-v4l2src-test.o: v4l2src-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(v4l2src_test_CFLAGS) $(CFLAGS) -MT v4l2src_test-v4l2src-test.o -MD -MP -MF $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo -c -o v4l2src_test-v4l2src-test.o `test -f 'v4l2src-test.c' || echo '$(srcdir)/'`v4l2src-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo $(DEPDIR)/v4l2src_test-v4l2src-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2src-test.c' object='v4l2src_test-v4l2src-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(v4l2src_test_CFLAGS) $(CFLAGS) -c -o v4l2src_test-v4l2src-test.o `test -f 'v4l2src-test.c' || echo '$(srcdir)/'`v4l2src-test.c
+
+v4l2src_test-v4l2src-test.obj: v4l2src-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(v4l2src_test_CFLAGS) $(CFLAGS) -MT v4l2src_test-v4l2src-test.obj -MD -MP -MF $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo -c -o v4l2src_test-v4l2src-test.obj `if test -f 'v4l2src-test.c'; then $(CYGPATH_W) 'v4l2src-test.c'; else $(CYGPATH_W) '$(srcdir)/v4l2src-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/v4l2src_test-v4l2src-test.Tpo $(DEPDIR)/v4l2src_test-v4l2src-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2src-test.c' object='v4l2src_test-v4l2src-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(v4l2src_test_CFLAGS) $(CFLAGS) -c -o v4l2src_test-v4l2src-test.obj `if test -f 'v4l2src-test.c'; then $(CYGPATH_W) 'v4l2src-test.c'; else $(CYGPATH_W) '$(srcdir)/v4l2src-test.c'; fi`
+
+videobox_test-videobox-test.o: videobox-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videobox_test_CFLAGS) $(CFLAGS) -MT videobox_test-videobox-test.o -MD -MP -MF $(DEPDIR)/videobox_test-videobox-test.Tpo -c -o videobox_test-videobox-test.o `test -f 'videobox-test.c' || echo '$(srcdir)/'`videobox-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videobox_test-videobox-test.Tpo $(DEPDIR)/videobox_test-videobox-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videobox-test.c' object='videobox_test-videobox-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videobox_test_CFLAGS) $(CFLAGS) -c -o videobox_test-videobox-test.o `test -f 'videobox-test.c' || echo '$(srcdir)/'`videobox-test.c
+
+videobox_test-videobox-test.obj: videobox-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videobox_test_CFLAGS) $(CFLAGS) -MT videobox_test-videobox-test.obj -MD -MP -MF $(DEPDIR)/videobox_test-videobox-test.Tpo -c -o videobox_test-videobox-test.obj `if test -f 'videobox-test.c'; then $(CYGPATH_W) 'videobox-test.c'; else $(CYGPATH_W) '$(srcdir)/videobox-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videobox_test-videobox-test.Tpo $(DEPDIR)/videobox_test-videobox-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videobox-test.c' object='videobox_test-videobox-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videobox_test_CFLAGS) $(CFLAGS) -c -o videobox_test-videobox-test.obj `if test -f 'videobox-test.c'; then $(CYGPATH_W) 'videobox-test.c'; else $(CYGPATH_W) '$(srcdir)/videobox-test.c'; fi`
+
+videocrop_test-videocrop-test.o: videocrop-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop_test_CFLAGS) $(CFLAGS) -MT videocrop_test-videocrop-test.o -MD -MP -MF $(DEPDIR)/videocrop_test-videocrop-test.Tpo -c -o videocrop_test-videocrop-test.o `test -f 'videocrop-test.c' || echo '$(srcdir)/'`videocrop-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videocrop_test-videocrop-test.Tpo $(DEPDIR)/videocrop_test-videocrop-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videocrop-test.c' object='videocrop_test-videocrop-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop_test_CFLAGS) $(CFLAGS) -c -o videocrop_test-videocrop-test.o `test -f 'videocrop-test.c' || echo '$(srcdir)/'`videocrop-test.c
+
+videocrop_test-videocrop-test.obj: videocrop-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop_test_CFLAGS) $(CFLAGS) -MT videocrop_test-videocrop-test.obj -MD -MP -MF $(DEPDIR)/videocrop_test-videocrop-test.Tpo -c -o videocrop_test-videocrop-test.obj `if test -f 'videocrop-test.c'; then $(CYGPATH_W) 'videocrop-test.c'; else $(CYGPATH_W) '$(srcdir)/videocrop-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videocrop_test-videocrop-test.Tpo $(DEPDIR)/videocrop_test-videocrop-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videocrop-test.c' object='videocrop_test-videocrop-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop_test_CFLAGS) $(CFLAGS) -c -o videocrop_test-videocrop-test.obj `if test -f 'videocrop-test.c'; then $(CYGPATH_W) 'videocrop-test.c'; else $(CYGPATH_W) '$(srcdir)/videocrop-test.c'; fi`
+
+videocrop2_test-videocrop2-test.o: videocrop2-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop2_test_CFLAGS) $(CFLAGS) -MT videocrop2_test-videocrop2-test.o -MD -MP -MF $(DEPDIR)/videocrop2_test-videocrop2-test.Tpo -c -o videocrop2_test-videocrop2-test.o `test -f 'videocrop2-test.c' || echo '$(srcdir)/'`videocrop2-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videocrop2_test-videocrop2-test.Tpo $(DEPDIR)/videocrop2_test-videocrop2-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videocrop2-test.c' object='videocrop2_test-videocrop2-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop2_test_CFLAGS) $(CFLAGS) -c -o videocrop2_test-videocrop2-test.o `test -f 'videocrop2-test.c' || echo '$(srcdir)/'`videocrop2-test.c
+
+videocrop2_test-videocrop2-test.obj: videocrop2-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop2_test_CFLAGS) $(CFLAGS) -MT videocrop2_test-videocrop2-test.obj -MD -MP -MF $(DEPDIR)/videocrop2_test-videocrop2-test.Tpo -c -o videocrop2_test-videocrop2-test.obj `if test -f 'videocrop2-test.c'; then $(CYGPATH_W) 'videocrop2-test.c'; else $(CYGPATH_W) '$(srcdir)/videocrop2-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/videocrop2_test-videocrop2-test.Tpo $(DEPDIR)/videocrop2_test-videocrop2-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videocrop2-test.c' object='videocrop2_test-videocrop2-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(videocrop2_test_CFLAGS) $(CFLAGS) -c -o videocrop2_test-videocrop2-test.obj `if test -f 'videocrop2-test.c'; then $(CYGPATH_W) 'videocrop2-test.c'; else $(CYGPATH_W) '$(srcdir)/videocrop2-test.c'; fi`
+
+ximagesrc_test-ximagesrc-test.o: ximagesrc-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ximagesrc_test_CFLAGS) $(CFLAGS) -MT ximagesrc_test-ximagesrc-test.o -MD -MP -MF $(DEPDIR)/ximagesrc_test-ximagesrc-test.Tpo -c -o ximagesrc_test-ximagesrc-test.o `test -f 'ximagesrc-test.c' || echo '$(srcdir)/'`ximagesrc-test.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ximagesrc_test-ximagesrc-test.Tpo $(DEPDIR)/ximagesrc_test-ximagesrc-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ximagesrc-test.c' object='ximagesrc_test-ximagesrc-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ximagesrc_test_CFLAGS) $(CFLAGS) -c -o ximagesrc_test-ximagesrc-test.o `test -f 'ximagesrc-test.c' || echo '$(srcdir)/'`ximagesrc-test.c
+
+ximagesrc_test-ximagesrc-test.obj: ximagesrc-test.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ximagesrc_test_CFLAGS) $(CFLAGS) -MT ximagesrc_test-ximagesrc-test.obj -MD -MP -MF $(DEPDIR)/ximagesrc_test-ximagesrc-test.Tpo -c -o ximagesrc_test-ximagesrc-test.obj `if test -f 'ximagesrc-test.c'; then $(CYGPATH_W) 'ximagesrc-test.c'; else $(CYGPATH_W) '$(srcdir)/ximagesrc-test.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ximagesrc_test-ximagesrc-test.Tpo $(DEPDIR)/ximagesrc_test-ximagesrc-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ximagesrc-test.c' object='ximagesrc_test-ximagesrc-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ximagesrc_test_CFLAGS) $(CFLAGS) -c -o ximagesrc_test-ximagesrc-test.obj `if test -f 'ximagesrc-test.c'; then $(CYGPATH_W) 'ximagesrc-test.c'; else $(CYGPATH_W) '$(srcdir)/ximagesrc-test.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# 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/icles/equalizer-test.c b/tests/icles/equalizer-test.c
new file mode 100644
index 0000000..fc6d527
--- /dev/null
+++ b/tests/icles/equalizer-test.c
@@ -0,0 +1,291 @@
+/* GStreamer test for the equalizer element
+ * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Will tests the equalizer by fading all bands in and out one by one and
+ * finaly all together.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include <stdlib.h>
+#include <math.h>
+
+GST_DEBUG_CATEGORY_STATIC (equalizer_test_debug);
+#define GST_CAT_DEFAULT equalizer_test_debug
+
+static GstBus *pipeline_bus;
+
+static gboolean
+check_bus (GstClockTime max_wait_time)
+{
+ GstMessage *msg;
+
+ msg = gst_bus_poll (pipeline_bus, GST_MESSAGE_ERROR | GST_MESSAGE_EOS,
+ max_wait_time);
+
+ if (msg == NULL)
+ return FALSE;
+
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err = NULL;
+ gchar *debug = NULL;
+
+ g_assert (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR);
+ gst_message_parse_error (msg, &err, &debug);
+ GST_ERROR ("ERROR: %s [%s]", err->message, debug);
+ g_print ("\n===========> ERROR: %s\n%s\n\n", err->message, debug);
+ g_error_free (err);
+ g_free (debug);
+ }
+
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS) {
+ g_print ("\n === EOS ===\n\n");
+ }
+
+ gst_message_unref (msg);
+ return TRUE;
+}
+
+// fix below
+
+static void
+equalizer_set_band_value (GstElement * eq, guint band, gdouble val)
+{
+ GstObject *child;
+
+ child = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (eq), band);
+ g_object_set (child, "gain", val, NULL);
+ gst_object_unref (child);
+ g_print ("Band %2d: %.2f\n", band, val);
+}
+
+static void
+equalizer_set_all_band_values (GstElement * eq, guint num, gdouble val)
+{
+ gint i;
+ GstObject *child;
+
+ for (i = 0; i < num; i++) {
+ child = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (eq), i);
+ g_object_set (child, "gain", val, NULL);
+ gst_object_unref (child);
+ }
+ g_print ("All bands: %.2f\n", val);
+}
+
+// fix above
+
+static gboolean
+equalizer_set_band_value_and_wait (GstElement * eq, guint band, gdouble val)
+{
+ equalizer_set_band_value (eq, band, val);
+ return check_bus (100 * GST_MSECOND);
+}
+
+static gboolean
+equalizer_set_all_band_values_and_wait (GstElement * eq, guint num, gdouble val)
+{
+ equalizer_set_all_band_values (eq, num, val);
+ return check_bus (100 * GST_MSECOND);
+}
+
+static void
+do_slider_fiddling (GstElement * playbin, GstElement * eq)
+{
+ gboolean stop;
+ guint num_bands, i;
+ gdouble d, step = 0.5;
+
+ stop = FALSE;
+
+ g_object_get (eq, "num-bands", &num_bands, NULL);
+
+ g_print ("%u bands.\n", num_bands);
+
+ while (!stop) {
+ for (i = 0; !stop && i < num_bands; ++i) {
+ d = -24.0;
+ while (!stop && d <= 12.0) {
+ stop = equalizer_set_band_value_and_wait (eq, i, d);
+ d += step;
+ }
+ d = 12.0;
+ while (!stop && d >= -24.0) {
+ stop = equalizer_set_band_value_and_wait (eq, i, d);
+ d -= step;
+ }
+ d = -24.0;
+ while (!stop && d <= 12.0) {
+ stop = equalizer_set_band_value_and_wait (eq, i, d);
+ d += step;
+ }
+ }
+
+ d = 0.0;
+ while (!stop && d <= 12.0) {
+ stop = equalizer_set_all_band_values_and_wait (eq, num_bands, d);
+ d += step;
+ }
+ d = 12.0;
+ while (!stop && d >= -24.0) {
+ stop = equalizer_set_all_band_values_and_wait (eq, num_bands, d);
+ d -= step;
+ }
+ d = -24.0;
+ while (!stop && d <= 0.0) {
+ stop = equalizer_set_all_band_values_and_wait (eq, num_bands, d);
+ d += step;
+ }
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ gchar *opt_audiosink_str = NULL;
+ gchar **filenames = NULL;
+ const GOptionEntry test_goptions[] = {
+ {"audiosink", '\0', 0, G_OPTION_ARG_STRING, &opt_audiosink_str,
+ "audiosink to use (default: autoaudiosink)", NULL},
+ {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
+ {NULL, '\0', 0, 0, NULL, NULL, NULL}
+ };
+ GOptionContext *ctx;
+ GError *opt_err = NULL;
+
+ GstStateChangeReturn ret;
+ GstElement *playbin, *sink, *bin, *eq, *auconv;
+ GstPad *eq_sinkpad;
+ gchar *uri;
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+#endif
+
+ /* command line option parsing */
+ ctx = g_option_context_new ("FILENAME");
+ g_option_context_add_group (ctx, gst_init_get_option_group ());
+ g_option_context_add_main_entries (ctx, test_goptions, NULL);
+
+ if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) {
+ g_error ("Error parsing command line options: %s", opt_err->message);
+ return -1;
+ }
+
+ GST_DEBUG_CATEGORY_INIT (equalizer_test_debug, "equalizertest", 0, "eqtest");
+
+ if (filenames == NULL || *filenames == NULL) {
+ g_printerr ("Please specify a file to play back\n");
+ return -1;
+ }
+
+ playbin = gst_element_factory_make ("playbin", "playbin");
+ if (playbin == NULL) {
+ g_error ("Couldn't create 'playbin' element");
+ return -1;
+ }
+
+ if (opt_audiosink_str) {
+ g_print ("Trying audiosink '%s' ...", opt_audiosink_str);
+ sink = gst_element_factory_make (opt_audiosink_str, "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ } else {
+ sink = NULL;
+ }
+ if (sink == NULL) {
+ g_print ("Trying audiosink '%s' ...", "autoaudiosink");
+ sink = gst_element_factory_make ("autoaudiosink", "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+ if (sink == NULL) {
+ g_print ("Trying audiosink '%s' ...", "alsasink");
+ sink = gst_element_factory_make ("alsasink", "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+ if (sink == NULL) {
+ g_print ("Trying audiosink '%s' ...", "osssink");
+ sink = gst_element_factory_make ("osssink", "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+
+ g_assert (sink != NULL);
+
+ bin = gst_bin_new ("ausinkbin");
+ g_assert (bin != NULL);
+
+ eq = gst_element_factory_make ("equalizer-nbands", "equalizer");
+ g_assert (eq != NULL);
+
+ auconv = gst_element_factory_make ("audioconvert", "eqauconv");
+ g_assert (auconv != NULL);
+
+ gst_bin_add_many (GST_BIN (bin), eq, auconv, sink, NULL);
+
+ if (!gst_element_link (eq, auconv))
+ g_error ("Failed to link equalizer to audioconvert");
+
+ if (!gst_element_link (auconv, sink))
+ g_error ("Failed to link audioconvert to audio sink");
+
+ eq_sinkpad = gst_element_get_static_pad (eq, "sink");
+ g_assert (eq_sinkpad != NULL);
+
+ gst_element_add_pad (bin, gst_ghost_pad_new (NULL, eq_sinkpad));
+ gst_object_unref (eq_sinkpad);
+
+ g_object_set (playbin, "audio-sink", bin, NULL);
+
+ /* won't work: uri = gst_uri_construct ("file", filenames[0]); */
+ uri = g_strdup_printf ("file://%s", filenames[0]);
+ g_object_set (playbin, "uri", uri, NULL);
+ g_free (uri);
+
+ pipeline_bus = GST_ELEMENT_BUS (playbin);
+
+ ret = gst_element_set_state (playbin, GST_STATE_PLAYING);
+ if (ret == GST_STATE_CHANGE_FAILURE) {
+ g_printerr ("Failed to set playbin to PLAYING\n");
+ check_bus (1 * GST_SECOND);
+ return -1;
+ }
+
+ ret = gst_element_get_state (playbin, NULL, NULL, 5 * GST_SECOND);
+ if (ret == GST_STATE_CHANGE_ASYNC) {
+ g_printerr ("Failed to go to PLAYING in 5 seconds, bailing out\n");
+ return -1;
+ } else if (ret != GST_STATE_CHANGE_SUCCESS) {
+ g_printerr ("State change to PLAYING failed\n");
+ check_bus (1 * GST_SECOND);
+ return -1;
+ }
+
+ g_print ("Playing ...\n");
+ do_slider_fiddling (playbin, eq);
+
+ gst_element_set_state (playbin, GST_STATE_NULL);
+ gst_object_unref (playbin);
+
+ return 0;
+}
diff --git a/tests/icles/gdkpixbufsink-test.c b/tests/icles/gdkpixbufsink-test.c
new file mode 100644
index 0000000..425e470
--- /dev/null
+++ b/tests/icles/gdkpixbufsink-test.c
@@ -0,0 +1,360 @@
+/* GStreamer interactive test for the gdkpixbufsink element
+ * Copyright (C) 2008 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+typedef struct
+{
+ GstElement *pipe;
+ GstElement *sink;
+ gboolean got_video;
+
+ GtkWidget *win;
+ GtkWidget *img;
+ GtkWidget *slider;
+ GtkWidget *accurate_cb;
+
+ gboolean accurate; /* whether to try accurate seeks */
+
+ gint64 cur_pos;
+ gboolean prerolled;
+} AppInfo;
+
+static void seek_to (AppInfo * info, gdouble percent);
+
+static GstElement *
+create_element (const gchar * factory_name)
+{
+ GstElement *element;
+
+ element = gst_element_factory_make (factory_name, NULL);
+
+ if (element == NULL)
+ g_error ("Failed to create '%s' element", factory_name);
+
+ return element;
+}
+
+static void
+new_decoded_pad (GstElement * dec, GstPad * new_pad, gboolean last,
+ AppInfo * info)
+{
+ const gchar *sname;
+ GstElement *csp, *scale, *filter;
+ GstStructure *s;
+ GstCaps *caps;
+ GstPad *sinkpad;
+
+ /* already found a video stream? */
+ if (info->got_video)
+ return;
+
+ /* FIXME: is this racy or does decodebin2 make sure caps are always
+ * negotiated at this point? */
+ caps = gst_pad_get_caps (new_pad);
+ g_return_if_fail (caps != NULL);
+
+ s = gst_caps_get_structure (caps, 0);
+ sname = gst_structure_get_name (s);
+ if (!g_str_has_prefix (sname, "video/x-raw-"))
+ goto not_video;
+
+ csp = create_element ("ffmpegcolorspace");
+ scale = create_element ("videoscale");
+ filter = create_element ("capsfilter");
+ info->sink = create_element ("gdkpixbufsink");
+ g_object_set (info->sink, "qos", FALSE, "max-lateness", (gint64) - 1, NULL);
+
+ gst_bin_add_many (GST_BIN (info->pipe), csp, scale, filter, info->sink, NULL);
+
+ sinkpad = gst_element_get_static_pad (csp, "sink");
+ if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad)))
+ g_error ("Can't link new decoded pad to ffmpegcolorspace's sink pad");
+ gst_object_unref (sinkpad);
+
+ if (!gst_element_link (csp, scale))
+ g_error ("Can't link ffmpegcolorspace to videoscale");
+ if (!gst_element_link (scale, filter))
+ g_error ("Can't link videoscale to capsfilter");
+ if (!gst_element_link (filter, info->sink))
+ g_error ("Can't link capsfilter to gdkpixbufsink");
+
+ gst_element_set_state (info->sink, GST_STATE_PAUSED);
+ gst_element_set_state (filter, GST_STATE_PAUSED);
+ gst_element_set_state (scale, GST_STATE_PAUSED);
+ gst_element_set_state (csp, GST_STATE_PAUSED);
+
+ info->got_video = TRUE;
+ return;
+
+not_video:
+ {
+ if (last) {
+ g_error ("This file does not contain a video track, or you do not have "
+ "the necessary decoder(s) installed");
+ }
+ }
+}
+
+static void
+bus_message_cb (GstBus * bus, GstMessage * msg, AppInfo * info)
+{
+ switch (GST_MESSAGE_TYPE (msg)) {
+ case GST_MESSAGE_ASYNC_DONE:{
+ GstFormat fmt = GST_FORMAT_TIME;
+
+ /* only interested in async-done messages from the top-level pipeline */
+ if (msg->src != GST_OBJECT_CAST (info->pipe))
+ break;
+
+ if (!info->prerolled) {
+ /* make slider visible if it's not visible already */
+ gtk_widget_show (info->slider);
+
+ /* initial frame is often black, so seek to beginning plus a bit */
+ seek_to (info, 0.001);
+ info->prerolled = TRUE;
+ }
+
+ /* update position */
+ if (!gst_element_query_position (info->pipe, &fmt, &info->cur_pos))
+ info->cur_pos = -1;
+ break;
+ }
+ case GST_MESSAGE_ELEMENT:{
+ const GValue *val;
+ GdkPixbuf *pixbuf = NULL;
+
+ /* only interested in element messages from our gdkpixbufsink */
+ if (msg->src != GST_OBJECT_CAST (info->sink))
+ break;
+
+ /* only interested in these two messages */
+ if (!gst_structure_has_name (msg->structure, "preroll-pixbuf") &&
+ !gst_structure_has_name (msg->structure, "pixbuf")) {
+ break;
+ }
+
+ g_print ("pixbuf\n");
+ val = gst_structure_get_value (msg->structure, "pixbuf");
+ g_return_if_fail (val != NULL);
+
+ pixbuf = GDK_PIXBUF (g_value_dup_object (val));
+ gtk_image_set_from_pixbuf (GTK_IMAGE (info->img), pixbuf);
+ g_object_unref (pixbuf);
+ break;
+ }
+ case GST_MESSAGE_ERROR:{
+ GError *err = NULL;
+ gchar *dbg = NULL;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ g_error ("Error: %s\n%s\n", err->message, (dbg) ? dbg : "");
+ g_error_free (err);
+ g_free (dbg);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+static gboolean
+create_pipeline (AppInfo * info, const gchar * filename)
+{
+ GstElement *src, *dec;
+ GstBus *bus;
+
+ info->pipe = gst_pipeline_new ("pipeline");
+ src = create_element ("filesrc");
+ g_object_set (src, "location", filename, NULL);
+
+ dec = create_element ("decodebin2");
+
+ gst_bin_add_many (GST_BIN (info->pipe), src, dec, NULL);
+ if (!gst_element_link (src, dec))
+ g_error ("Can't link filesrc to decodebin2");
+
+ g_signal_connect (dec, "new-decoded-pad", G_CALLBACK (new_decoded_pad), info);
+
+ /* set up bus */
+ bus = gst_element_get_bus (info->pipe);
+ gst_bus_add_signal_watch (bus);
+ g_signal_connect (bus, "message", G_CALLBACK (bus_message_cb), info);
+ gst_object_unref (bus);
+
+ return TRUE;
+}
+
+static void
+seek_to (AppInfo * info, gdouble percent)
+{
+ GstSeekFlags seek_flags;
+ GstFormat fmt = GST_FORMAT_TIME;
+ gint64 seek_pos, dur = -1;
+
+ if (!gst_element_query_duration (info->pipe, &fmt, &dur) || dur <= 0) {
+ g_printerr ("Could not query duration\n");
+ return;
+ }
+
+ seek_pos = gst_gdouble_to_guint64 (gst_guint64_to_gdouble (dur) * percent);
+ g_print ("Seeking to %" GST_TIME_FORMAT ", accurate: %d\n",
+ GST_TIME_ARGS (seek_pos), info->accurate);
+
+ seek_flags = GST_SEEK_FLAG_FLUSH;
+
+ if (info->accurate)
+ seek_flags |= GST_SEEK_FLAG_ACCURATE;
+ else
+ seek_flags |= GST_SEEK_FLAG_KEY_UNIT;
+
+ if (!gst_element_seek_simple (info->pipe, GST_FORMAT_TIME, seek_flags,
+ seek_pos)) {
+ g_printerr ("Seek failed.\n");
+ return;
+ }
+}
+
+static void
+slider_cb (GtkRange * range, AppInfo * info)
+{
+ gdouble val;
+
+ val = gtk_range_get_value (range);
+ seek_to (info, val);
+}
+
+static gchar *
+slider_format_value_cb (GtkScale * scale, gdouble value, AppInfo * info)
+{
+ gchar s[64];
+
+ if (info->cur_pos < 0)
+ return g_strdup_printf ("%0.1g%%", value * 100.0);
+
+ g_snprintf (s, 64, "%" GST_TIME_FORMAT, GST_TIME_ARGS (info->cur_pos));
+ s[10] = '\0';
+ return g_strdup (s);
+}
+
+static void
+accurate_toggled_cb (GtkToggleButton * toggle, AppInfo * info)
+{
+ info->accurate = gtk_toggle_button_get_active (toggle);
+}
+
+static void
+run_gui (const gchar * filename)
+{
+ GtkWidget *vbox, *hbox;
+ AppInfo *info;
+
+ info = g_new0 (AppInfo, 1);
+
+ /* create pipeline */
+ if (!create_pipeline (info, filename))
+ goto done;
+
+ /* create window */
+ info->win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (info->win, "delete-event", G_CALLBACK (gtk_main_quit),
+ NULL);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
+ gtk_container_add (GTK_CONTAINER (info->win), vbox);
+
+ info->img = gtk_image_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), info->img, FALSE, FALSE, 6);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 6);
+
+ info->accurate_cb = gtk_check_button_new_with_label ("accurate seek "
+ "(might not work reliably with all demuxers)");
+ gtk_box_pack_start (GTK_BOX (hbox), info->accurate_cb, FALSE, FALSE, 6);
+ g_signal_connect (info->accurate_cb, "toggled",
+ G_CALLBACK (accurate_toggled_cb), info);
+
+ info->slider = gtk_hscale_new_with_range (0.0, 1.0, 0.001);
+ gtk_box_pack_start (GTK_BOX (vbox), info->slider, FALSE, FALSE, 6);
+ g_signal_connect (info->slider, "value-changed",
+ G_CALLBACK (slider_cb), info);
+ g_signal_connect (info->slider, "format-value",
+ G_CALLBACK (slider_format_value_cb), info);
+
+ /* and go! */
+ gst_element_set_state (info->pipe, GST_STATE_PAUSED);
+
+ gtk_widget_show_all (info->win);
+ gtk_widget_hide (info->slider); /* hide until we're prerolled */
+ gtk_main ();
+
+done:
+
+ g_free (info);
+}
+
+static gchar **filenames = NULL;
+
+int
+main (int argc, char **argv)
+{
+ static const GOptionEntry test_goptions[] = {
+ {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
+ {NULL, '\0', 0, 0, NULL, NULL, NULL}
+ };
+ GOptionContext *ctx;
+ GError *opt_err = NULL;
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+#endif
+
+ gtk_init (&argc, &argv);
+
+ /* command line option parsing */
+ ctx = g_option_context_new (" VIDEOFILE");
+ g_option_context_add_group (ctx, gst_init_get_option_group ());
+ g_option_context_add_main_entries (ctx, test_goptions, NULL);
+
+ if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) {
+ g_error ("Error parsing command line options: %s", opt_err->message);
+ return -1;
+ }
+
+ if (filenames == NULL || filenames[0] == NULL || filenames[0][0] == '\0') {
+ g_printerr ("Please specify a path to a video file\n\n");
+ return -1;
+ }
+
+ run_gui (filenames[0]);
+
+ g_free (filenames);
+ g_option_context_free (ctx);
+
+ return 0;
+}
diff --git a/tests/icles/test-oss4.c b/tests/icles/test-oss4.c
new file mode 100644
index 0000000..233e891
--- /dev/null
+++ b/tests/icles/test-oss4.c
@@ -0,0 +1,255 @@
+/* GStreamer OSS4 audio tests
+ * Copyright (C) 2007-2008 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
+#include <gst/gst.h>
+#include <gst/interfaces/propertyprobe.h>
+#include <gst/interfaces/mixer.h>
+
+static gboolean opt_show_mixer_messages = FALSE;
+
+#define WAIT_TIME 60.0 /* in seconds */
+
+static void
+show_mixer_messages (GstElement * element)
+{
+ GstMessage *msg;
+ GstBus *bus;
+ GTimer *t;
+
+ t = g_timer_new ();
+
+ bus = gst_bus_new ();
+ gst_element_set_bus (element, bus);
+
+ g_print ("\nShowing mixer messages for %u seconds ...\n", (guint) WAIT_TIME);
+
+ while (g_timer_elapsed (t, NULL) < WAIT_TIME) {
+ gdouble remaining = WAIT_TIME - g_timer_elapsed (t, NULL);
+ gint64 maxwait =
+ GST_SECOND * gst_util_gdouble_to_guint64 (MAX (0.0, remaining));
+ gchar *s = NULL;
+
+ msg = gst_bus_timed_pop (bus, maxwait);
+ if (!msg)
+ break;
+
+ if (msg->structure)
+ s = gst_structure_to_string (msg->structure);
+ g_print ("%s message: %s\n", GST_MESSAGE_TYPE_NAME (msg), s);
+ gst_message_unref (msg);
+ g_free (s);
+ }
+
+ gst_element_set_bus (element, NULL);
+ gst_object_unref (bus);
+ g_timer_destroy (t);
+}
+
+static void
+probe_mixer_tracks (GstElement * element)
+{
+ const GList *tracks, *t;
+ GstMixer *mixer;
+ guint count;
+
+ if (!GST_IS_MIXER (element))
+ return;
+
+ mixer = GST_MIXER (element);
+ tracks = gst_mixer_list_tracks (mixer);
+ count = g_list_length ((GList *) tracks);
+ g_print (" %d mixer tracks%c\n", count, (count == 0) ? '.' : ':');
+
+ for (t = tracks; t != NULL; t = t->next) {
+ GstMixerTrack *track;
+ gchar *label = NULL;
+ guint flags = 0;
+
+ track = GST_MIXER_TRACK (t->data);
+ g_object_get (track, "label", &label, "flags", &flags, NULL);
+
+ if (GST_IS_MIXER_OPTIONS (track)) {
+ GString *s;
+ GList *vals, *v;
+
+ vals = gst_mixer_options_get_values (GST_MIXER_OPTIONS (track));
+ s = g_string_new ("options: ");
+ for (v = vals; v != NULL; v = v->next) {
+ if (v->prev != NULL)
+ g_string_append (s, ", ");
+ g_string_append (s, (const gchar *) v->data);
+ }
+
+ g_print (" [%s] flags=0x%08x, %s\n", label, flags, s->str);
+ g_string_free (s, TRUE);
+ } else if (track->num_channels == 0) {
+ g_print (" [%s] flags=0x%08x, switch\n", label, flags);
+ } else if (track->num_channels > 0) {
+ g_print (" [%s] flags=0x%08x, slider (%d channels)\n", label, flags,
+ track->num_channels);
+ } else {
+ g_print (" [%s] flags=0x%08x, UNKNOWN TYPE\n", label, flags);
+ }
+
+ g_free (label);
+ }
+
+ /* for testing the mixer watch thread / auto-notifications */
+ if (strstr (GST_ELEMENT_NAME (element), "mixer") != NULL &&
+ opt_show_mixer_messages) {
+ show_mixer_messages (element);
+ }
+}
+
+static void
+probe_pad (GstElement * element, const gchar * pad_name)
+{
+ GstCaps *caps = NULL;
+ GstPad *pad;
+ guint i;
+
+ pad = gst_element_get_static_pad (element, pad_name);
+ if (pad == NULL)
+ return;
+
+ caps = gst_pad_get_caps (pad);
+ g_return_if_fail (caps != NULL);
+
+ for (i = 0; i < gst_caps_get_size (caps); ++i) {
+ gchar *s;
+
+ s = gst_structure_to_string (gst_caps_get_structure (caps, i));
+ g_print (" %4s[%d]: %s\n", GST_PAD_NAME (pad), i, s);
+ g_free (s);
+ }
+ gst_caps_unref (caps);
+ gst_object_unref (pad);
+}
+
+static void
+probe_details (GstElement * element)
+{
+ GstStateChangeReturn ret;
+
+ ret = gst_element_set_state (element, GST_STATE_READY);
+ if (ret == GST_STATE_CHANGE_FAILURE) {
+ g_print ("Could not set element %s to READY.", GST_ELEMENT_NAME (element));
+ return;
+ }
+
+ probe_pad (element, "sink");
+ probe_pad (element, "src");
+
+ probe_mixer_tracks (element);
+
+ gst_element_set_state (element, GST_STATE_NULL);
+}
+
+static void
+probe_element (const gchar * name)
+{
+ GstPropertyProbe *probe;
+ GValueArray *arr;
+ GstElement *element;
+ gchar *devname = NULL;
+ gint i;
+
+ element = gst_element_factory_make (name, name);
+
+ /* make sure we don't deadlock on GST_ELEMENT_ERROR or do other silly things
+ * if we try to query the "device-name" property when the device isn't open */
+ g_object_set (element, "device", "/dev/does/not/exist", NULL);
+ g_object_get (element, "device-name", &devname, NULL);
+ GST_LOG ("devname: '%s'", GST_STR_NULL (devname));
+ g_assert (devname == NULL || *devname == '\0');
+
+ /* and now for real */
+
+ probe = GST_PROPERTY_PROBE (element);
+ arr = gst_property_probe_probe_and_get_values_name (probe, "device");
+
+ for (i = 0; arr != NULL && i < arr->n_values; ++i) {
+ GValue *val;
+ gchar *dev_name = NULL;
+
+ g_print ("\n");
+ /* we assume the element supports getting the device-name in NULL state */
+ val = g_value_array_get_nth (arr, i);
+ g_object_set (element, "device", g_value_get_string (val), NULL);
+ g_object_get (element, "device-name", &dev_name, NULL);
+ g_print ("%-10s device[%d] = %s (%s)\n", GST_OBJECT_NAME (element),
+ i, g_value_get_string (val), dev_name);
+ if (strstr (dev_name, "/usb")) {
+ g_print ("\n\nWARNING: going to probe USB audio device. OSS4 USB support"
+ " is still\npretty shaky, so bad things may happen (e.g. kernel "
+ "lockup).\nPress Control-C NOW if you don't want to continue. "
+ "(waiting 5secs)\n\n");
+ g_usleep (5 * G_USEC_PER_SEC);
+ }
+ g_free (dev_name);
+
+ probe_details (element);
+ }
+
+ if (arr) {
+ g_value_array_free (arr);
+ }
+
+ gst_object_unref (element);
+}
+
+int
+main (int argc, char **argv)
+{
+ GOptionEntry options[] = {
+ {"show-mixer-messages", 'm', 0, G_OPTION_ARG_NONE, &opt_show_mixer_messages,
+ "For mixer elements, wait 60 seconds and show any mixer messages "
+ "(for debugging auto-notifications)", NULL},
+ {NULL,}
+ };
+ GOptionContext *ctx;
+ GError *err = NULL;
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+#endif
+
+ ctx = g_option_context_new ("");
+ g_option_context_add_main_entries (ctx, options, NULL);
+ g_option_context_add_group (ctx, gst_init_get_option_group ());
+ if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
+ g_print ("Error initializing: %s\n", err->message);
+ exit (1);
+ }
+ g_option_context_free (ctx);
+
+ probe_element ("oss4sink");
+ probe_element ("oss4src");
+ probe_element ("oss4mixer");
+
+ return 0;
+}
diff --git a/tests/icles/v4l2src-test.c b/tests/icles/v4l2src-test.c
new file mode 100644
index 0000000..dbcaef0
--- /dev/null
+++ b/tests/icles/v4l2src-test.c
@@ -0,0 +1,517 @@
+/* GStreamer
+ *
+ * Copyright (C) 2006 Edgard Lima <edgard dot lima at indt dot org dot br>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+#include <gst/gst.h>
+#include <gst/interfaces/tuner.h>
+#include <gst/interfaces/colorbalance.h>
+#include <gst/interfaces/videoorientation.h>
+
+GstElement *pipeline, *source, *sink;
+GMainLoop *loop;
+volatile int exit_read = 0;
+
+static void
+print_options (void)
+{
+ printf ("\nf - to change the fequency\n");
+ printf ("i - to change the input\n");
+ printf ("n - to change the norm\n");
+ printf ("c - list color balance\n");
+ printf ("v - change video orientarion\n");
+ printf ("e - to exit\n");
+}
+
+static void
+run_options (char opt)
+{
+ int res;
+
+ switch (opt) {
+ case 'f':
+ {
+ GstTuner *tuner = GST_TUNER (source);
+ GstTunerChannel *channel;
+ guint freq;
+
+ channel = gst_tuner_get_channel (tuner);
+
+ freq = gst_tuner_get_frequency (tuner, channel);
+
+ printf ("\ntype the new frequency (current = %u) (-1 to cancel): ", freq);
+ res = scanf ("%u", &freq);
+ if (res != 1 || freq != -1)
+ gst_tuner_set_frequency (tuner, channel, freq);
+ }
+ break;
+ case 'n':
+ {
+ GstTuner *tuner = GST_TUNER (source);
+ const GList *item, *list;
+ const GstTunerNorm *current_norm;
+ GstTunerNorm *norm = NULL;
+ gint index, next_norm;
+
+
+ list = gst_tuner_list_norms (tuner);
+
+ current_norm = gst_tuner_get_norm (tuner);
+
+ printf ("\nlist of norms:\n");
+ for (item = list, index = 0; item != NULL; item = item->next, ++index) {
+ norm = item->data;
+ if (current_norm == norm) {
+ printf (" * %u - %s\n", index, norm->label);
+ } else {
+ printf (" %u - %s\n", index, norm->label);
+ }
+ }
+ printf ("\ntype the number of norm you want (-1 to cancel): ");
+ res = scanf ("%d", &next_norm);
+ if (res != 1 || next_norm < 0) {
+ break;
+ }
+ if (index <= next_norm) {
+ printf ("Norm %d not available\n", next_norm);
+ break;
+ }
+ for (item = list, index = 0; item != NULL && index <= next_norm;
+ item = item->next, ++index) {
+ norm = item->data;
+ }
+ if (norm)
+ gst_tuner_set_norm (tuner, norm);
+ }
+ break;
+ case 'i':
+ {
+ GstTuner *tuner = GST_TUNER (source);
+ const GList *item, *list;
+ const GstTunerChannel *current_channel;
+ GstTunerChannel *channel = NULL;
+ gint index, next_channel;
+
+
+ list = gst_tuner_list_channels (tuner);
+
+ current_channel = gst_tuner_get_channel (tuner);
+
+ printf ("\nlist of inputs:\n");
+ for (item = list, index = 0; item != NULL; item = item->next, ++index) {
+ channel = item->data;
+ if (current_channel == channel) {
+ printf (" * %u - %s\n", index, channel->label);
+ } else {
+ printf (" %u - %s\n", index, channel->label);
+ }
+ }
+ printf ("\ntype the number of input you want (-1 to cancel): ");
+ res = scanf ("%d", &next_channel);
+ if (res != 1 || next_channel < 0) {
+ break;
+ }
+ if (index <= next_channel) {
+ printf ("Input %d not available\n", next_channel);
+ break;
+ }
+ for (item = list, index = 0; item != NULL && index <= next_channel;
+ item = item->next, ++index) {
+ channel = item->data;
+ }
+ if (channel)
+ gst_tuner_set_channel (tuner, channel);
+ }
+ break;
+ case 'e':
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ g_main_loop_quit (loop);
+ printf ("Bye\n");
+ g_thread_exit (0);
+ break;
+ case 'c':
+ {
+ GstColorBalance *balance = GST_COLOR_BALANCE (source);
+ const GList *controls;
+ GstColorBalanceChannel *channel;
+ const GList *item;
+ gint index, new_value;
+
+ controls = gst_color_balance_list_channels (balance);
+
+ printf ("\n");
+
+ if (controls == NULL) {
+ printf ("There is no list of colorbalance controls\n");
+ goto done;
+ }
+
+ if (controls) {
+ printf ("list of controls:\n");
+ for (item = controls, index = 0; item != NULL;
+ item = item->next, ++index) {
+ channel = item->data;
+ printf (" %u - %s (%d - %d) = %d\n", index, channel->label,
+ channel->min_value, channel->max_value,
+ gst_color_balance_get_value (balance, channel));
+ }
+ printf ("\ntype the number of color control you want (-1 to cancel): ");
+ res = scanf ("%d", &new_value);
+ if (res != 1 || new_value == -1)
+ break;
+ for (item = controls, index = 0; item != NULL && index <= new_value;
+ item = item->next, ++index) {
+ channel = item->data;
+ }
+ printf (" %u - %s (%d - %d) = %d, type the new value: ", index - 1,
+ channel->label, channel->min_value, channel->max_value,
+ gst_color_balance_get_value (balance, channel));
+ res = scanf ("%d", &new_value);
+ if (res != 1 || new_value == -1)
+ break;
+ gst_color_balance_set_value (balance, channel, new_value);
+ }
+ }
+ case 'v':
+ {
+ GstVideoOrientation *vidorient = GST_VIDEO_ORIENTATION (source);
+ gboolean flip = FALSE;
+ gint center = 0;
+
+ printf ("\n");
+
+ if (gst_video_orientation_get_hflip (vidorient, &flip)) {
+ gint new_value;
+
+ printf ("Horizontal flip is %s\n", flip ? "on" : "off");
+ printf ("\ntype 1 to toggle (-1 to cancel): ");
+ res = scanf ("%d", &new_value);
+ if (res != 1 || new_value == 1) {
+ flip = !flip;
+ if (gst_video_orientation_set_hflip (vidorient, flip)) {
+ gst_video_orientation_get_hflip (vidorient, &flip);
+ printf ("Now horizontal flip is %s\n", flip ? "on" : "off");
+ } else {
+ printf ("Error toggling horizontal flip\n");
+ }
+ } else {
+ }
+ } else {
+ printf ("Horizontal flip control not available\n");
+ }
+
+ if (gst_video_orientation_get_vflip (vidorient, &flip)) {
+ gint new_value;
+
+ printf ("\nVertical flip is %s\n", flip ? "on" : "off");
+ printf ("\ntype 1 to toggle (-1 to cancel): ");
+ res = scanf ("%d", &new_value);
+ if (res != 1 || new_value == 1) {
+ flip = !flip;
+ if (gst_video_orientation_set_vflip (vidorient, flip)) {
+ gst_video_orientation_get_vflip (vidorient, &flip);
+ printf ("Now vertical flip is %s\n", flip ? "on" : "off");
+ } else {
+ printf ("Error toggling vertical flip\n");
+ }
+ } else {
+ }
+ } else {
+ printf ("Vertical flip control not available\n");
+ }
+
+ if (gst_video_orientation_get_hcenter (vidorient, &center)) {
+ printf ("Horizontal center is %d\n", center);
+ printf ("\ntype the new horizontal center value (-1 to cancel): ");
+ res = scanf ("%d", &center);
+ if (res != 1 || center != -1) {
+ if (gst_video_orientation_set_hcenter (vidorient, center)) {
+ gst_video_orientation_get_hcenter (vidorient, &center);
+ printf ("Now horizontal center is %d\n", center);
+ } else {
+ printf ("Error setting horizontal center\n");
+ }
+ } else {
+ }
+ } else {
+ printf ("Horizontal center control not available\n");
+ }
+
+ if (gst_video_orientation_get_vcenter (vidorient, &center)) {
+ printf ("Vertical center is %d\n", center);
+ printf ("\ntype the new vertical center value (-1 to cancel): ");
+ res = scanf ("%d", &center);
+ if (res != 1 || center != -1) {
+ if (gst_video_orientation_set_vcenter (vidorient, center)) {
+ gst_video_orientation_get_vcenter (vidorient, &center);
+ printf ("Now vertical center is %d\n", center);
+ } else {
+ printf ("Error setting vertical center\n");
+ }
+ } else {
+ }
+ } else {
+ printf ("Vertical center control not available\n");
+ }
+
+ }
+ break;
+ break;
+ default:
+ if (opt != 10)
+ printf ("error: invalid option %c", opt);
+ break;
+ }
+
+done:
+
+ return;
+
+}
+
+static gpointer
+read_user (gpointer data)
+{
+
+ char opt;
+
+ while (!exit_read) {
+
+ print_options ();
+
+ do {
+ opt = getchar ();
+ if (exit_read) {
+ break;
+ }
+ } while (opt == '\n');
+
+ run_options (opt);
+
+ }
+
+ return NULL;
+
+}
+
+static gboolean
+my_bus_callback (GstBus * bus, GstMessage * message, gpointer data)
+{
+
+ switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_ERROR:{
+ GError *err;
+ gchar *debug;
+ gchar *str;
+
+ gst_message_parse_error (message, &err, &debug);
+ str = gst_element_get_name (message->src);
+ g_print ("%s error: %s\n", str, err->message);
+ g_free (str);
+ g_print ("Debug: %s\n", debug);
+
+ g_error_free (err);
+ g_free (debug);
+
+ printf ("presse <ENTER> key to exit\n");
+ exit_read = 1;
+ g_main_loop_quit (loop);
+ break;
+ case GST_MESSAGE_EOS:
+ /* end-of-stream */
+ printf ("presse any key to exit\n");
+ exit_read = 1;
+ g_main_loop_quit (loop);
+ break;
+ default:
+ break;
+ }
+ }
+ return TRUE;
+}
+
+int
+main (int argc, char *argv[])
+{
+
+ GThread *input_thread;
+ gint numbuffers = -1;
+ gchar device[128] = { '\0' };
+ gchar input[128] = { '\0' };
+ gulong frequency = 0;
+ GstBus *bus;
+
+ /* see for input option */
+
+ int c;
+
+ while (1) {
+ static char long_options_desc[][64] = {
+ {"Number of buffers to output before sending EOS"},
+ {"Device location. Common in /dev/video0"},
+ {"input/output (channel) to switch to"},
+ {"frequency to tune to (in Hz)"},
+ {0, 0, 0, 0}
+ };
+ static struct option long_options[] = {
+ {"numbuffers", 1, 0, 'n'},
+ {"device", 1, 0, 'd'},
+ {"input", 1, 0, 'i'},
+ {"frequency", 1, 0, 'f'},
+ {0, 0, 0, 0}
+ };
+ /* getopt_long stores the option index here. */
+ int option_index = 0;
+
+ c = getopt_long (argc, argv, "n:d:i:f:h", long_options, &option_index);
+
+ /* Detect the end of the options. */
+ if (c == -1) {
+ printf ("tip: use -h to see help message.\n");
+ break;
+ }
+
+ switch (c) {
+ case 0:
+ /* If this option set a flag, do nothing else now. */
+ if (long_options[option_index].flag != 0)
+ break;
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case 'n':
+ numbuffers = atoi (optarg);
+ break;
+
+ case 'd':
+ strncpy (device, optarg, sizeof (device) / sizeof (device[0]));
+ break;
+
+ case 'i':
+ strncpy (input, optarg, sizeof (input) / sizeof (input[0]));
+ break;
+
+ case 'f':
+ frequency = atol (optarg);
+ break;
+
+ case 'h':
+ printf ("Usage: v4l2src-test [OPTION]...\n");
+ for (c = 0; long_options[c].name; ++c) {
+ printf ("-%c, --%s\r\t\t\t\t%s\n", long_options[c].val,
+ long_options[c].name, long_options_desc[c]);
+ }
+ exit (0);
+ break;
+
+ case '?':
+ /* getopt_long already printed an error message. */
+ printf ("Use -h to see help message.\n");
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ /* Print any remaining command line arguments (not options). */
+ if (optind < argc) {
+ printf ("Use -h to see help message.\n" "non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ putchar ('\n');
+ }
+
+ /* init */
+ gst_init (&argc, &argv);
+
+ /* create elements */
+ if (!(pipeline = gst_pipeline_new ("my_pipeline"))) {
+ fprintf (stderr, "error: gst_pipeline_new return NULL");
+ return -1;
+ }
+
+ if (!(source = gst_element_factory_make ("v4l2src", NULL))) {
+ fprintf (stderr,
+ "error: gst_element_factory_make (\"v4l2src\", NULL) return NULL");
+ return -1;
+ }
+
+ if (!(sink = gst_element_factory_make ("xvimagesink", NULL))) {
+ fprintf (stderr,
+ "error: gst_element_factory_make (\"xvimagesink\", NULL) return NULL");
+ return -1;
+ }
+
+ if (numbuffers > -1) {
+ g_object_set (source, "num-buffers", numbuffers, NULL);
+ }
+ if (device[0]) {
+ g_object_set (source, "device", device, NULL);
+ }
+ if (input[0]) {
+ g_object_set (source, "input", input, NULL);
+ }
+ if (frequency) {
+ g_object_set (source, "frequency", frequency, NULL);
+ }
+
+ /* you would normally check that the elements were created properly */
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, my_bus_callback, NULL);
+
+ /* put together a pipeline */
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+ gst_element_link_pads (source, "src", sink, "sink");
+
+ /* start the pipeline */
+ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
+ loop = g_main_loop_new (NULL, FALSE);
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ input_thread = g_thread_create (read_user, source, TRUE, NULL);
+#else
+ input_thread = g_thread_try_new ("v4l2src-test", read_user, source, NULL);
+#endif
+
+ if (input_thread == NULL) {
+ fprintf (stderr, "error: g_thread_create return NULL");
+ return -1;
+ }
+
+ g_main_loop_run (loop);
+ g_thread_join (input_thread);
+
+ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
+
+ gst_object_unref (bus);
+ gst_object_unref (pipeline);
+
+ gst_deinit ();
+
+ return 0;
+
+}
diff --git a/tests/icles/videobox-test.c b/tests/icles/videobox-test.c
new file mode 100644
index 0000000..49697df
--- /dev/null
+++ b/tests/icles/videobox-test.c
@@ -0,0 +1,141 @@
+/* GStreamer interactive videobox test
+ *
+ * Copyright (C) 2008 Wim Taymans <wim.taymans@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+
+#include <gst/gst.h>
+
+static GstElement *
+make_pipeline (gint type)
+{
+ GstElement *result;
+ gchar *pstr;
+
+ switch (type) {
+ case 0:
+ pstr = g_strdup_printf ("videotestsrc ! videobox name=box ! "
+ "xvimagesink");
+ break;
+ default:
+ return NULL;
+ }
+
+ result = gst_parse_launch_full (pstr, NULL, GST_PARSE_FLAG_NONE, NULL);
+ g_print ("created test %d: \"%s\"\n", type, pstr);
+ g_free (pstr);
+
+ return result;
+}
+
+#define MAX_ROUND 500
+
+int
+main (int argc, char **argv)
+{
+ GstElement *pipe, *box;
+ gint left, right;
+ gint top, bottom;
+ gint ldir, rdir;
+ gint tdir, bdir;
+ gint round, type, stop;
+
+ gst_init (&argc, &argv);
+
+ type = 0;
+ stop = -1;
+
+ if (argc > 1) {
+ type = atoi (argv[1]);
+ stop = type + 1;
+ }
+
+ while (TRUE) {
+ GstMessage *message;
+
+ pipe = make_pipeline (type);
+ if (pipe == NULL)
+ break;
+
+ box = gst_bin_get_by_name (GST_BIN (pipe), "box");
+ g_assert (box);
+
+ top = bottom = left = right = 0;
+ tdir = bdir = -10;
+ ldir = rdir = 10;
+
+ for (round = 0; round < MAX_ROUND; round++) {
+ g_print ("box to %4d %4d %4d %4d (%d/%d) \r", top, bottom, left, right,
+ round, MAX_ROUND);
+
+ g_object_set (box, "top", top, "bottom", bottom, "left", left, "right",
+ right, NULL);
+
+ if (round == 0)
+ gst_element_set_state (pipe, GST_STATE_PLAYING);
+
+ top += tdir;
+ if (top >= 50)
+ tdir = -10;
+ else if (top < -50)
+ tdir = 10;
+
+ bottom += bdir;
+ if (bottom >= 40)
+ bdir = -10;
+ else if (bottom < -60)
+ bdir = 10;
+
+ left += ldir;
+ if (left >= 60)
+ ldir = -10;
+ else if (left < -80)
+ ldir = 10;
+
+ right += rdir;
+ if (right >= 80)
+ rdir = -10;
+ else if (right < -90)
+ rdir = 10;
+
+ message =
+ gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_ERROR,
+ 50 * GST_MSECOND);
+ if (message) {
+ g_print ("got error \n");
+
+ gst_message_unref (message);
+ }
+ }
+ g_print ("test %d done \n", type);
+
+ gst_object_unref (box);
+ gst_element_set_state (pipe, GST_STATE_NULL);
+ gst_object_unref (pipe);
+
+ type++;
+ if (type == stop)
+ break;
+ }
+ return 0;
+}
diff --git a/tests/icles/videocrop-test.c b/tests/icles/videocrop-test.c
new file mode 100644
index 0000000..cc8f8d0
--- /dev/null
+++ b/tests/icles/videocrop-test.c
@@ -0,0 +1,357 @@
+/* GStreamer interactive test for the videocrop element
+ * Copyright (C) 2006 Tim-Philipp Müller <tim centricular net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include <stdlib.h>
+#include <math.h>
+
+GST_DEBUG_CATEGORY_STATIC (videocrop_test_debug);
+#define GST_CAT_DEFAULT videocrop_test_debug
+
+#define OUT_WIDTH 640
+#define OUT_HEIGHT 480
+#define TIME_PER_TEST 10 /* seconds each format is tested */
+#define FRAMERATE 15 /* frames per second */
+
+#ifndef DEFAULT_VIDEOSINK
+#define DEFAULT_VIDEOSINK "xvimagesink"
+#endif
+
+static gboolean
+check_bus_for_errors (GstBus * bus, GstClockTime max_wait_time)
+{
+ GstMessage *msg;
+
+ msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, max_wait_time);
+
+ if (msg) {
+ GError *err = NULL;
+ gchar *debug = NULL;
+
+ g_assert (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR);
+ gst_message_parse_error (msg, &err, &debug);
+ GST_ERROR ("ERROR: %s [%s]", err->message, debug);
+ g_print ("\n===========> ERROR: %s\n%s\n\n", err->message, debug);
+ g_error_free (err);
+ g_free (debug);
+ gst_message_unref (msg);
+ }
+
+ return (msg != NULL);
+}
+
+static void
+test_with_caps (GstElement * src, GstElement * videocrop, GstCaps * caps)
+{
+ GstClockTime time_run;
+ GstElement *pipeline;
+ GTimer *timer;
+ GstBus *bus;
+ GstPad *pad;
+ guint hcrop;
+ guint vcrop;
+
+ /* caps must be writable, we can't check that here though */
+ g_assert (GST_CAPS_REFCOUNT_VALUE (caps) == 1);
+
+ timer = g_timer_new ();
+ vcrop = 0;
+ hcrop = 0;
+
+ pipeline = GST_ELEMENT (gst_element_get_parent (videocrop));
+ g_assert (GST_IS_PIPELINE (pipeline));
+
+ /* at this point the pipeline is in PLAYING state; we only want to capture
+ * errors resulting from our on-the-fly changing of the filtercaps */
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+
+ /* pad to block */
+ pad = gst_element_get_static_pad (src, "src");
+
+ time_run = 0;
+ do {
+ GstClockTime wait_time, waited_for_block;
+
+ if (check_bus_for_errors (bus, 0))
+ break;
+
+ wait_time = GST_SECOND / FRAMERATE;
+
+ GST_LOG ("hcrop = %3d, vcrop = %3d", vcrop, hcrop);
+
+ g_timer_reset (timer);
+
+ /* need to block the streaming thread while changing these properties,
+ * otherwise we might get random not-negotiated errors (when caps are
+ * changed in between upstream calling pad_alloc_buffer() and pushing
+ * the processed buffer?) */
+ gst_pad_set_blocked (pad, TRUE);
+ g_object_set (videocrop, "left", hcrop, "top", vcrop, NULL);
+ gst_pad_set_blocked (pad, FALSE);
+
+ waited_for_block = g_timer_elapsed (timer, NULL) * (double) GST_SECOND;
+ /* GST_LOG ("waited: %" GST_TIME_FORMAT ", frame len: %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (waited_for_block), GST_TIME_ARGS (wait_time)); */
+ ++vcrop;
+ ++hcrop;
+
+ if (wait_time > waited_for_block) {
+ g_usleep ((wait_time - waited_for_block) / GST_MSECOND);
+ }
+
+ time_run += wait_time;
+ }
+ while (time_run < (TIME_PER_TEST * GST_SECOND));
+
+ g_timer_destroy (timer);
+ gst_object_unref (bus);
+ gst_object_unref (pad);
+}
+
+/* return a list of caps where we only need to set
+ * width and height to get fixed caps */
+static GList *
+video_crop_get_test_caps (GstElement * videocrop)
+{
+ const GstCaps *allowed_caps;
+ GstPad *srcpad;
+ GList *list = NULL;
+ guint i;
+
+ srcpad = gst_element_get_static_pad (videocrop, "src");
+ g_assert (srcpad != NULL);
+ allowed_caps = gst_pad_get_pad_template_caps (srcpad);
+ g_assert (allowed_caps != NULL);
+
+ for (i = 0; i < gst_caps_get_size (allowed_caps); ++i) {
+ GstStructure *new_structure;
+ GstCaps *single_caps;
+
+ single_caps = gst_caps_new_empty ();
+ new_structure =
+ gst_structure_copy (gst_caps_get_structure (allowed_caps, i));
+ gst_structure_set (new_structure, "framerate", GST_TYPE_FRACTION,
+ FRAMERATE, 1, NULL);
+ gst_structure_remove_field (new_structure, "width");
+ gst_structure_remove_field (new_structure, "height");
+ gst_caps_append_structure (single_caps, new_structure);
+
+ /* should be fixed without width/height */
+ g_assert (gst_caps_is_fixed (single_caps));
+
+ list = g_list_prepend (list, single_caps);
+ }
+
+ gst_object_unref (srcpad);
+
+ return list;
+}
+
+static gchar *opt_videosink_str; /* NULL */
+static gchar *opt_filtercaps_str; /* NULL */
+static gboolean opt_with_ffmpegcolorspace; /* FALSE */
+
+int
+main (int argc, char **argv)
+{
+ static const GOptionEntry test_goptions[] = {
+ {"videosink", '\0', 0, G_OPTION_ARG_STRING, &opt_videosink_str,
+ "videosink to use (default: " DEFAULT_VIDEOSINK ")", NULL},
+ {"caps", '\0', 0, G_OPTION_ARG_STRING, &opt_filtercaps_str,
+ "filter caps to narrow down formats to test", NULL},
+ {"with-ffmpegcolorspace", '\0', 0, G_OPTION_ARG_NONE,
+ &opt_with_ffmpegcolorspace,
+ "whether to add an ffmpegcolorspace element in front of the sink",
+ NULL},
+ {NULL, '\0', 0, 0, NULL, NULL, NULL}
+ };
+ GOptionContext *ctx;
+ GError *opt_err = NULL;
+
+ GstElement *pipeline, *src, *filter1, *crop, *scale, *filter2, *csp, *sink;
+ GstCaps *filter_caps = NULL;
+ GList *caps_list, *l;
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+#endif
+
+ /* command line option parsing */
+ ctx = g_option_context_new ("");
+ g_option_context_add_group (ctx, gst_init_get_option_group ());
+ g_option_context_add_main_entries (ctx, test_goptions, NULL);
+
+ if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) {
+ g_error ("Error parsing command line options: %s", opt_err->message);
+ return -1;
+ }
+
+ GST_DEBUG_CATEGORY_INIT (videocrop_test_debug, "videocroptest", 0, "vctest");
+
+ pipeline = gst_pipeline_new ("pipeline");
+ src = gst_element_factory_make ("videotestsrc", "videotestsrc");
+ g_assert (src != NULL);
+ filter1 = gst_element_factory_make ("capsfilter", "capsfilter1");
+ g_assert (filter1 != NULL);
+ crop = gst_element_factory_make ("videocrop", "videocrop");
+ g_assert (crop != NULL);
+ scale = gst_element_factory_make ("videoscale", "videoscale");
+ g_assert (scale != NULL);
+ filter2 = gst_element_factory_make ("capsfilter", "capsfilter2");
+ g_assert (filter2 != NULL);
+
+ if (opt_with_ffmpegcolorspace) {
+ g_print ("Adding ffmpegcolorspace\n");
+ csp = gst_element_factory_make ("ffmpegcolorspace", "colorspace");
+ } else {
+ csp = gst_element_factory_make ("identity", "colorspace");
+ }
+ g_assert (csp != NULL);
+
+ if (opt_filtercaps_str) {
+ filter_caps = gst_caps_from_string (opt_filtercaps_str);
+ if (filter_caps == NULL) {
+ g_error ("Invalid filter caps string '%s'", opt_filtercaps_str);
+ } else {
+ g_print ("Using filter caps '%s'\n", opt_filtercaps_str);
+ }
+ }
+
+ if (opt_videosink_str) {
+ g_print ("Trying videosink '%s' ...", opt_videosink_str);
+ sink = gst_element_factory_make (opt_videosink_str, "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ } else {
+ sink = NULL;
+ }
+
+ if (sink == NULL) {
+ g_print ("Trying videosink '%s' ...", DEFAULT_VIDEOSINK);
+ sink = gst_element_factory_make (DEFAULT_VIDEOSINK, "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+ if (sink == NULL) {
+ g_print ("Trying videosink '%s' ...", "xvimagesink");
+ sink = gst_element_factory_make ("xvimagesink", "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+ if (sink == NULL) {
+ g_print ("Trying videosink '%s' ...", "ximagesink");
+ sink = gst_element_factory_make ("ximagesink", "sink");
+ g_print ("%s\n", (sink) ? "ok" : "element couldn't be created");
+ }
+
+ g_assert (sink != NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), src, filter1, crop, scale, filter2,
+ csp, sink, NULL);
+
+ if (!gst_element_link (src, filter1))
+ g_error ("Failed to link videotestsrc to capsfilter1");
+
+ if (!gst_element_link (filter1, crop))
+ g_error ("Failed to link capsfilter1 to videocrop");
+
+ if (!gst_element_link (crop, scale))
+ g_error ("Failed to link videocrop to videoscale");
+
+ if (!gst_element_link (scale, filter2))
+ g_error ("Failed to link videoscale to capsfilter2");
+
+ if (!gst_element_link (filter2, csp))
+ g_error ("Failed to link capsfilter2 to ffmpegcolorspace");
+
+ if (!gst_element_link (csp, sink))
+ g_error ("Failed to link ffmpegcolorspace to video sink");
+
+ caps_list = video_crop_get_test_caps (crop);
+ for (l = caps_list; l != NULL; l = l->next) {
+ GstStateChangeReturn ret;
+ GstCaps *caps, *out_caps;
+ gboolean skip = FALSE;
+ gchar *s;
+
+ if (filter_caps) {
+ GstCaps *icaps;
+
+ icaps = gst_caps_intersect (filter_caps, GST_CAPS (l->data));
+ skip = gst_caps_is_empty (icaps);
+ gst_caps_unref (icaps);
+ }
+
+ /* this is the size of our window (stays fixed) */
+ out_caps = gst_caps_copy (GST_CAPS (l->data));
+ gst_structure_set (gst_caps_get_structure (out_caps, 0), "width",
+ G_TYPE_INT, OUT_WIDTH, "height", G_TYPE_INT, OUT_HEIGHT, NULL);
+
+ g_object_set (filter2, "caps", out_caps, NULL);
+
+ /* filter1 gets these too to prevent videotestsrc from renegotiating */
+ g_object_set (filter1, "caps", out_caps, NULL);
+ gst_caps_unref (out_caps);
+
+ caps = gst_caps_copy (GST_CAPS (l->data));
+ GST_INFO ("testing format: %" GST_PTR_FORMAT, caps);
+
+ s = gst_caps_to_string (caps);
+
+ if (skip) {
+ g_print ("Skipping format: %s\n", s);
+ g_free (s);
+ continue;
+ }
+
+ g_print ("Format: %s\n", s);
+
+ caps = gst_caps_make_writable (caps);
+
+ /* FIXME: check return values */
+ ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ if (ret != GST_STATE_CHANGE_FAILURE) {
+ ret = gst_element_get_state (pipeline, NULL, NULL, -1);
+
+ if (ret != GST_STATE_CHANGE_FAILURE) {
+ test_with_caps (src, crop, caps);
+ } else {
+ g_print ("Format: %s not supported (failed to go to PLAYING)\n", s);
+ }
+ } else {
+ g_print ("Format: %s not supported\n", s);
+ }
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+
+ gst_caps_unref (caps);
+ g_free (s);
+ }
+
+ g_list_foreach (caps_list, (GFunc) gst_caps_unref, NULL);
+ g_list_free (caps_list);
+
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (pipeline);
+
+ return 0;
+}
diff --git a/tests/icles/videocrop2-test.c b/tests/icles/videocrop2-test.c
new file mode 100644
index 0000000..58d1932
--- /dev/null
+++ b/tests/icles/videocrop2-test.c
@@ -0,0 +1,141 @@
+/* GStreamer interactive videocrop test
+ *
+ * Copyright (C) 2008 Wim Taymans <wim.taymans@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+
+#include <gst/gst.h>
+
+static GstElement *
+make_pipeline (gint type)
+{
+ GstElement *result;
+ gchar *pstr;
+
+ switch (type) {
+ case 0:
+ pstr = g_strdup_printf ("videotestsrc ! videocrop name=crop ! "
+ "xvimagesink");
+ break;
+ default:
+ return NULL;
+ }
+
+ result = gst_parse_launch_full (pstr, NULL, GST_PARSE_FLAG_NONE, NULL);
+ g_print ("created test %d: \"%s\"\n", type, pstr);
+ g_free (pstr);
+
+ return result;
+}
+
+#define MAX_ROUND 500
+
+int
+main (int argc, char **argv)
+{
+ GstElement *pipe, *crop;
+ gint left, right;
+ gint top, bottom;
+ gint ldir, rdir;
+ gint tdir, bdir;
+ gint round, type, stop;
+
+ gst_init (&argc, &argv);
+
+ type = 0;
+ stop = -1;
+
+ if (argc > 1) {
+ type = atoi (argv[1]);
+ stop = type + 1;
+ }
+
+ while (TRUE) {
+ GstMessage *message;
+
+ pipe = make_pipeline (type);
+ if (pipe == NULL)
+ break;
+
+ crop = gst_bin_get_by_name (GST_BIN (pipe), "crop");
+ g_assert (crop);
+
+ top = bottom = left = right = 0;
+ tdir = bdir = 10;
+ ldir = rdir = 10;
+
+ for (round = 0; round < MAX_ROUND; round++) {
+ g_print ("crop to %4d %4d %4d %4d (%d/%d) \r", top, bottom, left, right,
+ round, MAX_ROUND);
+
+ g_object_set (crop, "top", top, "bottom", bottom, "left", left, "right",
+ right, NULL);
+
+ if (round == 0)
+ gst_element_set_state (pipe, GST_STATE_PLAYING);
+
+ top += tdir;
+ if (top >= 80)
+ tdir = -10;
+ else if (top < 10)
+ tdir = 10;
+
+ bottom += bdir;
+ if (bottom >= 60)
+ bdir = -10;
+ else if (bottom < 10)
+ bdir = 10;
+
+ left += ldir;
+ if (left >= 100)
+ ldir = -10;
+ else if (left < 10)
+ ldir = 10;
+
+ right += rdir;
+ if (right >= 80)
+ rdir = -10;
+ else if (right < 10)
+ rdir = 10;
+
+ message =
+ gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_ERROR,
+ 50 * GST_MSECOND);
+ if (message) {
+ g_print ("got error \n");
+
+ gst_message_unref (message);
+ }
+ }
+ g_print ("test %d done \n", type);
+
+ gst_object_unref (crop);
+ gst_element_set_state (pipe, GST_STATE_NULL);
+ gst_object_unref (pipe);
+
+ type++;
+ if (type == stop)
+ break;
+ }
+ return 0;
+}
diff --git a/tests/icles/ximagesrc-test.c b/tests/icles/ximagesrc-test.c
new file mode 100644
index 0000000..a01bf65
--- /dev/null
+++ b/tests/icles/ximagesrc-test.c
@@ -0,0 +1,70 @@
+/* GStreamer
+ * Copyright (C) <2006> Zaheer Abbas Merali <zaheerabbas at merali dot org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+static GMainLoop *loop;
+
+static gboolean
+terminate_playback (GstElement * pipeline)
+{
+ g_print ("Terminating playback\n");
+ g_main_loop_quit (loop);
+ return FALSE;
+}
+
+int
+main (int argc, char **argv)
+{
+ GstElement *pipeline;
+#ifndef G_DISABLE_ASSERT
+ GstState state, pending;
+#endif
+ GError *error = NULL;
+
+ gst_init (&argc, &argv);
+
+ pipeline = gst_parse_launch ("ximagesrc ! fakesink", &error);
+ if (error) {
+ g_print ("Error while parsing pipeline description: %s\n", error->message);
+ return -1;
+ }
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ /* lets check it gets to PLAYING */
+ g_assert (gst_element_get_state (pipeline, &state, &pending,
+ GST_CLOCK_TIME_NONE) != GST_STATE_CHANGE_FAILURE);
+ g_assert (state == GST_STATE_PLAYING || pending == GST_STATE_PLAYING);
+
+ /* We want to get out after 5 seconds */
+ g_timeout_add (5000, (GSourceFunc) terminate_playback, pipeline);
+
+ g_main_loop_run (loop);
+
+ g_main_loop_unref (loop);
+
+ return 0;
+}