Merge tag 'upstream/1.5.0.1+git20150513' into debian-experimental

Upstream version 1.5.0.1+git20150513
diff --git a/INSTALL b/INSTALL
index b42a17a..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,48 +1,80 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
 those values to create a `Makefile' in each directory of the package.
 It may also create one or more `.h' files containing system-dependent
 definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
 diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
 
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
 
-  5. You can remove the program binaries and object files from the
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -51,62 +83,119 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -119,25 +208,80 @@
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
      CPU-COMPANY-SYSTEM
 
-See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
+where SYSTEM can have one of these forms:
 
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
 
 Sharing Defaults
 ================
@@ -150,19 +294,56 @@
 `CONFIG_SITE' environment variable to the location of the site script.
 A warning: not all `configure' scripts look for a site script.
 
-Operation Controls
+Defining Variables
 ==================
 
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
    `configure' recognizes the following options to control how it
 operates.
 
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
-
 `--help'
-     Print a summary of the options to `configure', and exit.
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
 
 `--quiet'
 `--silent'
@@ -175,8 +356,15 @@
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
 
-`configure' also accepts some other, not widely useful, options.
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/autogen.sh b/autogen.sh
index a02e711..61f93f2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -57,24 +57,13 @@
 
 printf "+ check for build tools"
 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
+version_check "autoreconf" "autoreconf " \
               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.11" \
-              "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
-version_check "autopoint" "autopoint" \
-              "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
-version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
-              "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
 version_check "pkg-config" "" \
               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
 
 die_check $DIE
 
-aclocal_check || DIE=1
-autoheader_check || DIE=1
-
-die_check $DIE
-
 # if no arguments specified then this will be printed
 if test -z "$*" && test -z "$NOCONFIGURE"; then
   echo "+ checking for autogen.sh options"
@@ -88,22 +77,13 @@
 
 # autopoint
 if test -d po ; then
-  tool_run "$autopoint" "--force"
+  tool_run "autopoint" "--force"
 fi
 
 # aclocal
 if test -f acinclude.m4; then rm acinclude.m4; fi
 
-tool_run "$libtoolize" "--copy --force"
-tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
-tool_run "$autoheader"
-
-# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
-echo timestamp > stamp-h.in 2> /dev/null
-
-tool_run "$autoconf"
-debug "automake: $automake"
-tool_run "$automake" "--add-missing --copy"
+autoreconf --force --install || exit 1
 
 test -n "$NOCONFIGURE" && {
   echo "+ skipping configure stage for package $package, as requested."
diff --git a/common/check.mak b/common/check.mak
index efd5458..8a90b5d 100644
--- a/common/check.mak
+++ b/common/check.mak
@@ -16,38 +16,38 @@
 # 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)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
 	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -65,7 +65,7 @@
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -95,7 +95,7 @@
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -205,7 +205,7 @@
 GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION)
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
diff --git a/common/gst-autogen.sh b/common/gst-autogen.sh
index 78cab66..c5798d0 100644
--- a/common/gst-autogen.sh
+++ b/common/gst-autogen.sh
@@ -169,54 +169,6 @@
   return 1;
 }
 
-aclocal_check ()
-{
-  # normally aclocal is part of automake
-  # so we expect it to be in the same place as automake
-  # so if a different automake is supplied, we need to adapt as well
-  # so how's about replacing automake with aclocal in the set var,
-  # and saving that in $aclocal ?
-  # note, this will fail if the actual automake isn't called automake*
-  # or if part of the path before it contains it
-  if [ -z "$automake" ]; then
-    echo "Error: no automake variable set !"
-    return 1
-  else
-    aclocal=`echo $automake | sed s/automake/aclocal/`
-    debug "aclocal: $aclocal"
-    if [ "$aclocal" != "aclocal" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
-    fi
-    if [ ! -x `which $aclocal` ]; then
-      echo "Error: cannot execute $aclocal !"
-      return 1
-    fi
-  fi
-}
-
-autoheader_check ()
-{
-  # same here - autoheader is part of autoconf
-  # use the same voodoo
-  if [ -z "$autoconf" ]; then
-    echo "Error: no autoconf variable set !"
-    return 1
-  else
-    autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
-    debug "autoheader: $autoheader"
-    if [ "$autoheader" != "autoheader" ];
-    then
-      CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
-    fi
-    if [ ! -x `which $autoheader` ]; then
-      echo "Error: cannot execute $autoheader !"
-      return 1
-    fi
-  fi
-
-}
-
 die_check ()
 {
   # call with $DIE
diff --git a/common/gst.supp b/common/gst.supp
index c08f660..5e2aaf9 100644
--- a/common/gst.supp
+++ b/common/gst.supp
@@ -3972,3 +3972,37 @@
   timer_create(evp)
   fun:timer_create@@GLIBC_2.3.3
 }
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_cclosure_new
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:malloc
+   ...
+   fun:g_closure_add_invalidate_notifier
+}
+
+{
+   closures aren't valgrind friendly (bgo#739850)
+   Memcheck:Leak
+   match-leak-kinds: possible
+   fun:calloc
+   ...
+   fun:g_closure_new_simple
+}
+
+{
+   glib/giomodules2 (from libsoup.supp)
+   Memcheck:Leak
+   ...
+   fun:_g_io_module_get_default
+}
diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4
index 63f0f46..5b9cd8b 100644
--- a/common/m4/gst-glib2.m4
+++ b/common/m4/gst-glib2.m4
@@ -120,6 +120,10 @@
   GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`"
   AC_DEFINE_UNQUOTED(GIO_LIBDIR, "$GIO_LIBDIR",
       [The GIO library directory.])
+  GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`"
+  AC_DEFINE_UNQUOTED(GIO_PREFIX, "$GIO_PREFIX",
+      [The GIO install prefix.])
+
   AC_SUBST(GIO_CFLAGS)
   AC_SUBST(GIO_LIBS)
   AC_SUBST(GIO_LDFLAGS)
diff --git a/config.h.in b/config.h.in
index 8cf04d4..06ef48e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -47,6 +47,9 @@
 /* The GIO modules directory. */
 #undef GIO_MODULE_DIR
 
+/* The GIO install prefix. */
+#undef GIO_PREFIX
+
 /* major/minor version */
 #undef GST_API_VERSION
 
diff --git a/configure b/configure
index 0712f16..6869990 100755
--- a/configure
+++ b/configure
@@ -23574,6 +23574,13 @@
 #define GIO_LIBDIR "$GIO_LIBDIR"
 _ACEOF
 
+  GIO_PREFIX="`$PKG_CONFIG --variable=prefix gio-2.0`"
+
+cat >>confdefs.h <<_ACEOF
+#define GIO_PREFIX "$GIO_PREFIX"
+_ACEOF
+
+
 
 
 
@@ -24281,7 +24288,7 @@
 
 HAVE_GTK=no
 HAVE_GTK_X11=no
-GTK_REQ=3.0.0
+GTK_REQ=3.10
 if test "x$BUILD_EXAMPLES" = "xyes"; then
 
 pkg_failed=no
diff --git a/configure.ac b/configure.ac
index f3dab3d..60c3ca3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_PREREQ([2.68])
+AC_PREREQ([2.69])
 
 dnl please read gstreamer/docs/random/autotools before changing this file
 
@@ -10,7 +10,7 @@
 AG_GST_INIT
 
 dnl initialize automake
-AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([-Wno-portability 1.14 no-dist-gzip dist-xz tar-ustar subdir-objects])
 
 dnl define PACKAGE_VERSION_* variables
 AS_VERSION
@@ -270,7 +270,7 @@
 dnl GTK is optional and only used in examples
 HAVE_GTK=no
 HAVE_GTK_X11=no
-GTK_REQ=3.0.0
+GTK_REQ=3.10
 if test "x$BUILD_EXAMPLES" = "xyes"; then
   PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
   dnl some examples need gtk+-x11
diff --git a/docs/design/part-mediatype-video-raw.txt b/docs/design/part-mediatype-video-raw.txt
index ad8f256..541b366 100644
--- a/docs/design/part-mediatype-video-raw.txt
+++ b/docs/design/part-mediatype-video-raw.txt
@@ -1197,6 +1197,7 @@
  "GBR_10LE" planar 4:4:4 RGB, 10 bits per channel
 
  "NV16" planar 4:2:2 YUV with interleaved UV plane
+ "NV61" planar 4:2:2 YUV with interleaved VU plane
  "NV24" planar 4:4:4 YUV with interleaved UV plane
 
 
diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt
index 82a351f..83a5e7c 100644
--- a/docs/libs/gst-plugins-base-libs-sections.txt
+++ b/docs/libs/gst-plugins-base-libs-sections.txt
@@ -2307,6 +2307,7 @@
 
 GstVideoColorimetry
 gst_video_colorimetry_matches
+gst_video_colorimetry_is_equal
 gst_video_colorimetry_from_string
 gst_video_colorimetry_to_string
 <SUBSECTION Standard>
@@ -2357,6 +2358,8 @@
 GST_VIDEO_INFO_COMP_PLANE
 GST_VIDEO_INFO_COMP_PSTRIDE
 GST_VIDEO_INFO_COMP_POFFSET
+GST_VIDEO_INFO_CHROMA_SITE
+GST_VIDEO_INFO_COLORIMETRY
 gst_video_info_init
 gst_video_info_set_format
 gst_video_info_from_caps
@@ -2696,6 +2699,7 @@
 gst_video_encoder_get_output_state
 gst_video_encoder_proxy_getcaps
 gst_video_encoder_merge_tags
+gst_video_encoder_get_allocator
 <SUBSECTION Standard>
 GST_IS_VIDEO_ENCODER
 GST_IS_VIDEO_ENCODER_CLASS
diff --git a/docs/libs/html/api-index-full.html b/docs/libs/html/api-index-full.html
index 04b767a..2029081 100644
--- a/docs/libs/html/api-index-full.html
+++ b/docs/libs/html/api-index-full.html
@@ -5127,6 +5127,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-is-equal" title="gst_video_colorimetry_is_equal ()">gst_video_colorimetry_is_equal</a>, function in <a class="link" href="gst-plugins-base-libs-gstvideo.html" title="gstvideo">gstvideo</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-matches" title="gst_video_colorimetry_matches ()">gst_video_colorimetry_matches</a>, function in <a class="link" href="gst-plugins-base-libs-gstvideo.html" title="gstvideo">gstvideo</a>
 </dt>
 <dd></dd>
@@ -5755,6 +5759,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-CHROMA-SITE:CAPS" title="GST_VIDEO_INFO_CHROMA_SITE()">GST_VIDEO_INFO_CHROMA_SITE</a>, macro in <a class="link" href="gst-plugins-base-libs-gstvideo.html" title="gstvideo">gstvideo</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COLORIMETRY:CAPS" title="GST_VIDEO_INFO_COLORIMETRY()">GST_VIDEO_INFO_COLORIMETRY</a>, macro in <a class="link" href="gst-plugins-base-libs-gstvideo.html" title="gstvideo">gstvideo</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-DATA:CAPS" title="GST_VIDEO_INFO_COMP_DATA()">GST_VIDEO_INFO_COMP_DATA</a>, macro in <a class="link" href="gst-plugins-base-libs-gstvideo.html" title="gstvideo">gstvideo</a>
 </dt>
 <dd></dd>
diff --git a/docs/libs/html/gst-plugins-base-libs-1.0.devhelp2 b/docs/libs/html/gst-plugins-base-libs-1.0.devhelp2
index c4ae12c..bcb542f 100644
--- a/docs/libs/html/gst-plugins-base-libs-1.0.devhelp2
+++ b/docs/libs/html/gst-plugins-base-libs-1.0.devhelp2
@@ -1293,6 +1293,7 @@
     <keyword type="function" name="gst_video_color_transfer_decode ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-color-transfer-decode" since="1.6"/>
     <keyword type="function" name="gst_video_color_transfer_encode ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-color-transfer-encode" since="1.6"/>
     <keyword type="function" name="gst_video_colorimetry_matches ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-matches"/>
+    <keyword type="function" name="gst_video_colorimetry_is_equal ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-is-equal" since="1.6"/>
     <keyword type="function" name="gst_video_colorimetry_from_string ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-from-string"/>
     <keyword type="function" name="gst_video_colorimetry_to_string ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-to-string"/>
     <keyword type="macro" name="GST_VIDEO_INFO_FORMAT()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-FORMAT:CAPS"/>
@@ -1328,6 +1329,8 @@
     <keyword type="macro" name="GST_VIDEO_INFO_COMP_PLANE()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-PLANE:CAPS"/>
     <keyword type="macro" name="GST_VIDEO_INFO_COMP_PSTRIDE()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-PSTRIDE:CAPS"/>
     <keyword type="macro" name="GST_VIDEO_INFO_COMP_POFFSET()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-POFFSET:CAPS"/>
+    <keyword type="macro" name="GST_VIDEO_INFO_CHROMA_SITE()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-CHROMA-SITE:CAPS"/>
+    <keyword type="macro" name="GST_VIDEO_INFO_COLORIMETRY()" link="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COLORIMETRY:CAPS"/>
     <keyword type="function" name="gst_video_info_init ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-info-init"/>
     <keyword type="function" name="gst_video_info_set_format ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-info-set-format"/>
     <keyword type="function" name="gst_video_info_from_caps ()" link="gst-plugins-base-libs-gstvideo.html#gst-video-info-from-caps"/>
diff --git a/docs/libs/html/gst-plugins-base-libs-appsrc.html b/docs/libs/html/gst-plugins-base-libs-appsrc.html
index 90c9d27..06dac50 100644
--- a/docs/libs/html/gst-plugins-base-libs-appsrc.html
+++ b/docs/libs/html/gst-plugins-base-libs-appsrc.html
@@ -206,18 +206,18 @@
 <div class="refsect1">
 <a name="gst-plugins-base-libs-appsrc.description"></a><h2>Description</h2>
 <p>The appsrc element can be used by applications to insert data into a
-GStreamer pipeline. Unlike most GStreamer elements, Appsrc provides
+GStreamer pipeline. Unlike most GStreamer elements, appsrc provides
 external API functions.</p>
 <p>appsrc can be used by linking with the libgstapp library to access the
 methods directly or by using the appsrc action signals.</p>
-<p>Before operating appsrc, the caps property must be set to a fixed caps
+<p>Before operating appsrc, the caps property must be set to fixed caps
 describing the format of the data that will be pushed with appsrc. An
 exception to this is when pushing buffers with unknown caps, in which case no
 caps should be set. This is typically true of file-like sources that push raw
-byte buffers. If you don't want to explicitly set the caps you can use
-gst_app_src_push_sample, this method get the caps associated with the
-sample and set them on appsrc replacing any previous setted caps if
-different from that of the sample.</p>
+byte buffers. If you don't want to explicitly set the caps, you can use
+gst_app_src_push_sample. This method gets the caps associated with the
+sample and sets them on the appsrc replacing any previously set caps (if
+different from sample's caps).</p>
 <p>The main way of handing data to the appsrc element is by calling the
 <a class="link" href="gst-plugins-base-libs-appsrc.html#gst-app-src-push-buffer" title="gst_app_src_push_buffer ()"><code class="function">gst_app_src_push_buffer()</code></a> method or by emitting the push-buffer action signal.
 This will put the buffer onto a queue from which appsrc will read from in its
@@ -239,25 +239,25 @@
 new position.</p>
 <p>These signals allow the application to operate the appsrc in two different
 ways:</p>
-<p>The push model, in which the application repeatedly calls the push-buffer/push-sample 
+<p>The push mode, in which the application repeatedly calls the push-buffer/push-sample
 method with a new buffer/sample. Optionally, the queue size in the appsrc 
 can be controlled with the enough-data and need-data signals by respectively 
 stopping/starting the push-buffer/push-sample calls. This is a typical 
 mode of operation for the stream-type "stream" and "seekable". Use this 
-model when implementing various network protocols or hardware devices.</p>
-<p>The pull model where the need-data signal triggers the next push-buffer call.
+mode when implementing various network protocols or hardware devices.</p>
+<p>The pull mode, in which the need-data signal triggers the next push-buffer call.
 This mode is typically used in the "random-access" stream-type. Use this
-model for file access or other randomly accessable sources. In this mode, a
+mode for file access or other randomly accessable sources. In this mode, a
 buffer of exactly the amount of bytes given by the need-data signal should be
 pushed into appsrc.</p>
 <p>In all modes, the size property on appsrc should contain the total stream
 size in bytes. Setting this property is mandatory in the random-access mode.
 For the stream and seekable modes, setting this property is optional but
 recommended.</p>
-<p>When the application is finished pushing data into appsrc, it should call
+<p>When the application has finished pushing data into appsrc, it should call
 <a class="link" href="gst-plugins-base-libs-appsrc.html#gst-app-src-end-of-stream" title="gst_app_src_end_of_stream ()"><code class="function">gst_app_src_end_of_stream()</code></a> or emit the end-of-stream action signal. After
 this call, no more buffers can be pushed into appsrc until a flushing seek
-happened or the state of the appsrc has gone through READY.</p>
+occurs or the state of the appsrc has gone through READY.</p>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-base-libs-appsrc.functions_details"></a><h2>Functions</h2>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstaudiodecoder.html b/docs/libs/html/gst-plugins-base-libs-gstaudiodecoder.html
index 7faf645..c373f17 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstaudiodecoder.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstaudiodecoder.html
@@ -1492,6 +1492,10 @@
   gboolean      (*propose_allocation) (GstAudioDecoder *dec,
                                        GstQuery * query);
 
+  gboolean      (*sink_query)         (GstAudioDecoder *dec, GstQuery *query);
+
+  gboolean      (*src_query)          (GstAudioDecoder *dec, GstQuery *query);
+
   GstCaps *     (*getcaps)            (GstAudioDecoder * dec,
                                        GstCaps * filter);
 };
@@ -1625,6 +1629,24 @@
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.sink-query"></a>sink_query</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Query handler on the sink pad. This function should
+return TRUE if the query could be performed. Subclasses
+should chain up to the parent implementation to invoke the
+default handler. Since 1.6</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.src-query"></a>src_query</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Query handler on the source pad. This function should
+return TRUE if the query could be performed. Subclasses
+should chain up to the parent implementation to invoke the
+default handler. Since 1.6</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.getcaps"></a>getcaps</code></em> ()</p></td>
 <td class="struct_member_description"><p>Optional.
 Allows for a custom sink getcaps implementation.
diff --git a/docs/libs/html/gst-plugins-base-libs-gstaudioringbuffer.html b/docs/libs/html/gst-plugins-base-libs-gstaudioringbuffer.html
index 132ac2d..99fd9ab 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstaudioringbuffer.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstaudioringbuffer.html
@@ -1608,7 +1608,7 @@
 </tr>
 <tr>
 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioRingBufferClass.delay"></a>delay</code></em> ()</p></td>
-<td class="struct_member_description"><p>get number of samples queued in device</p></td>
+<td class="struct_member_description"><p>get number of frames queued in device</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstaudiosink.html b/docs/libs/html/gst-plugins-base-libs-gstaudiosink.html
index 913ad47..49287a9 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstaudiosink.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstaudiosink.html
@@ -140,7 +140,7 @@
   gboolean (*close)     (GstAudioSink *sink);
   /* write samples to the device */
   gint     (*write)     (GstAudioSink *sink, gpointer data, guint length);
-  /* get number of samples queued in the device */
+  /* get number of frames queued in the device */
   guint    (*delay)     (GstAudioSink *sink);
   /* reset the audio device, unblock from a write */
   void     (*reset)     (GstAudioSink *sink);
@@ -189,7 +189,7 @@
 </tr>
 <tr>
 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioSinkClass.delay"></a>delay</code></em> ()</p></td>
-<td class="struct_member_description"><p>Return how many samples are still in the device. This is used to
+<td class="struct_member_description"><p>Return how many frames are still in the device. This is used to
 drive the synchronisation.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstaudiosrc.html b/docs/libs/html/gst-plugins-base-libs-gstaudiosrc.html
index 356d6b4..1fae9d2 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstaudiosrc.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstaudiosrc.html
@@ -142,7 +142,7 @@
   /* read samples from the device */
   guint    (*read)      (GstAudioSrc *src, gpointer data, guint length,
       GstClockTime *timestamp);
-  /* get number of samples queued in the device */
+  /* get number of frames queued in the device */
   guint    (*delay)     (GstAudioSrc *src);
   /* reset the audio device, unblock from a write */
   void     (*reset)     (GstAudioSrc *src);
@@ -191,7 +191,7 @@
 </tr>
 <tr>
 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioSrcClass.delay"></a>delay</code></em> ()</p></td>
-<td class="struct_member_description"><p>the number of samples queued in the device</p></td>
+<td class="struct_member_description"><p>the number of frames queued in the device</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstnavigation.html b/docs/libs/html/gst-plugins-base-libs-gstnavigation.html
index f7c810b..cb60cf7 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstnavigation.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstnavigation.html
@@ -1479,6 +1479,14 @@
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-NAVIGATION-MESSAGE-EVENT:CAPS"></a>GST_NAVIGATION_MESSAGE_EVENT</p></td>
+<td class="enum_member_description">
+<p>Sent when a navigation event was not handled
+by any element in the pipeline (Since 1.6)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstrtcpbuffer.html b/docs/libs/html/gst-plugins-base-libs-gstrtcpbuffer.html
index ced0821..4c6efa4 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstrtcpbuffer.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstrtcpbuffer.html
@@ -2822,9 +2822,12 @@
 <td class="enum_member_annotations"> </td>
 </tr>
 <tr>
-<td class="enum_member_name"><p><a name="GST-RTCP-RTPFB-TYPE-RCTP-SR-REQ:CAPS"></a>GST_RTCP_RTPFB_TYPE_RCTP_SR_REQ</p></td>
-<td> </td>
-<td> </td>
+<td class="enum_member_name"><p><a name="GST-RTCP-RTPFB-TYPE-RTCP-SR-REQ:CAPS"></a>GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ</p></td>
+<td class="enum_member_description">
+<p>Request an SR packet for early
+   synchronization</p>
+</td>
+<td class="enum_member_annotations"> </td>
 </tr>
 <tr>
 <td class="enum_member_name"><p><a name="GST-RTCP-PSFB-TYPE-PLI:CAPS"></a>GST_RTCP_PSFB_TYPE_PLI</p></td>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstvideo.html b/docs/libs/html/gst-plugins-base-libs-gstvideo.html
index cca6297..c29b93e 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstvideo.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstvideo.html
@@ -430,6 +430,14 @@
 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-is-equal" title="gst_video_colorimetry_is_equal ()">gst_video_colorimetry_is_equal</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
 <a class="link" href="gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-from-string" title="gst_video_colorimetry_from_string ()">gst_video_colorimetry_from_string</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
@@ -640,6 +648,18 @@
 </td>
 </tr>
 <tr>
+<td class="define_keyword">#define</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-CHROMA-SITE:CAPS" title="GST_VIDEO_INFO_CHROMA_SITE()">GST_VIDEO_INFO_CHROMA_SITE</a><span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COLORIMETRY:CAPS" title="GST_VIDEO_INFO_COLORIMETRY()">GST_VIDEO_INFO_COLORIMETRY</a><span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
 <td class="function_type">
 <span class="returnvalue">void</span>
 </td>
@@ -2617,6 +2637,44 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-video-colorimetry-is-equal"></a><h3>gst_video_colorimetry_is_equal ()</h3>
+<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_video_colorimetry_is_equal (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoColorimetry" title="GstVideoColorimetry"><span class="type">GstVideoColorimetry</span></a> *cinfo</code></em>,
+                                <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoColorimetry" title="GstVideoColorimetry"><span class="type">GstVideoColorimetry</span></a> *other</code></em>);</pre>
+<p>Compare the 2 colorimetry sets for equality</p>
+<div class="refsect3">
+<a name="id-1.2.15.3.7.58.5"></a><h4>Parameters</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="parameter_name"><p>cinfo</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoColorimetry" title="GstVideoColorimetry"><span class="type">GstVideoColorimetry</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>other</p></td>
+<td class="parameter_description"><p>another <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoColorimetry" title="GstVideoColorimetry"><span class="type">GstVideoColorimetry</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.15.3.7.58.6"></a><h4>Returns</h4>
+<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if <em class="parameter"><code>cinfo</code></em>
+and <em class="parameter"><code>other</code></em>
+are equal.</p>
+<p></p>
+</div>
+<p class="since">Since 1.6</p>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-video-colorimetry-from-string"></a><h3>gst_video_colorimetry_from_string ()</h3>
 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_video_colorimetry_from_string (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoColorimetry" title="GstVideoColorimetry"><span class="type">GstVideoColorimetry</span></a> *cinfo</code></em>,
@@ -2625,7 +2683,7 @@
  with the parsed
 values.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.58.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.59.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -2647,7 +2705,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.58.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.59.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if <em class="parameter"><code>color</code></em>
 points to valid colorimetry info.</p>
 <p></p>
@@ -2661,7 +2719,7 @@
 <p>Make a string representation of <em class="parameter"><code>cinfo</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.59.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.60.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -2676,7 +2734,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.59.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.60.6"></a><h4>Returns</h4>
 <p> a string representation of <em class="parameter"><code>cinfo</code></em>
 .</p>
 <p></p>
@@ -2882,13 +2940,25 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="GST-VIDEO-INFO-CHROMA-SITE:CAPS"></a><h3>GST_VIDEO_INFO_CHROMA_SITE()</h3>
+<pre class="programlisting">#define GST_VIDEO_INFO_CHROMA_SITE(i) ((i)-&gt;chroma_site)
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-VIDEO-INFO-COLORIMETRY:CAPS"></a><h3>GST_VIDEO_INFO_COLORIMETRY()</h3>
+<pre class="programlisting">#define GST_VIDEO_INFO_COLORIMETRY(i) ((i)-&gt;colorimetry)
+</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-video-info-init"></a><h3>gst_video_info_init ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_video_info_init (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoInfo" title="struct GstVideoInfo"><span class="type">GstVideoInfo</span></a> *info</code></em>);</pre>
 <p>Initialize <em class="parameter"><code>info</code></em>
  with default values.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.93.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.96.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -2920,7 +2990,7 @@
 does not set the offsets correctly for interlaced vertically
 subsampled formats.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.94.6"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.97.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -2962,7 +3032,7 @@
  and update <em class="parameter"><code>info</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.95.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.98.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -2984,7 +3054,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.95.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.98.6"></a><h4>Returns</h4>
 <p> TRUE if <em class="parameter"><code>caps</code></em>
 could be parsed</p>
 <p></p>
@@ -2998,7 +3068,7 @@
 <p>Convert the values of <em class="parameter"><code>info</code></em>
  into a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a>.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.96.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.99.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3013,7 +3083,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.96.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.99.6"></a><h4>Returns</h4>
 <p> a new <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> containing the info of <em class="parameter"><code>info</code></em>
 .</p>
 <p></p>
@@ -3033,7 +3103,7 @@
 raw video, GST_FORMAT_DEFAULT corresponds to video frames.  This
 function can be used to handle pad queries of the type GST_QUERY_CONVERT.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.97.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.100.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3072,7 +3142,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.97.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.100.6"></a><h4>Returns</h4>
 <p> TRUE if the conversion was successful.</p>
 <p></p>
 </div>
@@ -3085,7 +3155,7 @@
                          <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoInfo" title="struct GstVideoInfo"><span class="type">GstVideoInfo</span></a> *other</code></em>);</pre>
 <p>Compares two <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoInfo" title="struct GstVideoInfo"><span class="type">GstVideoInfo</span></a> and returns whether they are equal or not</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.98.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.101.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3107,7 +3177,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.98.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.101.6"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>info</code></em>
 and <em class="parameter"><code>other</code></em>
 are equal, else <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
@@ -3128,7 +3198,7 @@
 is required and <em class="parameter"><code>align</code></em>
  will be updated with the new padding values.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.99.6"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.102.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3174,7 +3244,7 @@
 <em class="parameter"><code>frame-&gt;data</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.100.7"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.103.7"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3211,7 +3281,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.100.8"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.103.8"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</p>
 <p></p>
 </div>
@@ -3233,7 +3303,7 @@
 <em class="parameter"><code>frame-&gt;data</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.101.6"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.104.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3265,7 +3335,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.101.7"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.104.7"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</p>
 <p></p>
 </div>
@@ -3277,7 +3347,7 @@
 gst_video_frame_unmap (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoFrame" title="struct GstVideoFrame"><span class="type">GstVideoFrame</span></a> *frame</code></em>);</pre>
 <p>Unmap the memory previously mapped with gst_video_frame_map.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.102.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.105.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3302,7 +3372,7 @@
  to <em class="parameter"><code>dest</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.103.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.106.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3324,7 +3394,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.103.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.106.6"></a><h4>Returns</h4>
 <p> TRUE if the contents could be copied.</p>
 <p></p>
 </div>
@@ -3341,7 +3411,7 @@
  to <em class="parameter"><code>dest</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.104.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.107.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3368,7 +3438,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.104.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.107.6"></a><h4>Returns</h4>
 <p> TRUE if the contents could be copied.</p>
 <p></p>
 </div>
@@ -3535,7 +3605,7 @@
 <p>Use this method when <em class="parameter"><code>mode</code></em>
  is of type <code class="literal">GST_VIDEO_TILE_MODE_INDEXED</code>.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.129.6"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.132.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3572,7 +3642,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.129.7"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.132.7"></a><h4>Returns</h4>
 <p> the index of the tile at <em class="parameter"><code>x</code></em>
 and <em class="parameter"><code>y</code></em>
 in the tiled image of
@@ -3589,7 +3659,7 @@
 <pre class="programlisting">#define             GST_VIDEO_TILE_MAKE_MODE(num, type)</pre>
 <p>use this macro to create new tile modes.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.130.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.133.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3619,7 +3689,7 @@
 <p>Get the tile mode type of <em class="parameter"><code>mode</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.131.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.134.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3642,7 +3712,7 @@
 <p>Check if <em class="parameter"><code>mode</code></em>
  is an indexed tile type</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.132.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.135.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3663,7 +3733,7 @@
 <pre class="programlisting">#define             GST_VIDEO_TILE_MAKE_STRIDE(x_tiles, y_tiles)</pre>
 <p>Encode the number of tile in X and Y into the stride.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.133.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.136.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3692,7 +3762,7 @@
 </pre>
 <p>Extract the number of tiles in X from the stride value.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.134.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.137.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3714,7 +3784,7 @@
 </pre>
 <p>Extract the number of tiles in Y from the stride value.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.135.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.138.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3742,7 +3812,7 @@
  image into the <em class="parameter"><code>dest</code></em>
  image</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.136.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.139.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3798,7 +3868,7 @@
 deprecated in the near future. Use <a class="link" href="gst-plugins-base-libs-GstVideoScaler.html#GstVideoScaler" title="GstVideoScaler"><span class="type">GstVideoScaler</span></a> to scale video buffers
 instead.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.137.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.140.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3859,7 +3929,7 @@
 with <em class="parameter"><code>config</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.138.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.141.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3886,7 +3956,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.138.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.141.6"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-base-libs-gstvideo.html#GstVideoConverter" title="GstVideoConverter"><span class="type">GstVideoConverter</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if conversion is not possible.</p>
 <p></p>
 </div>
@@ -3900,7 +3970,7 @@
 <p>Free <em class="parameter"><code>convert</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.139.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.142.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3924,7 +3994,7 @@
 <p>Get the current configuration of <em class="parameter"><code>convert</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.140.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.143.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3939,7 +4009,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.140.6"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.143.6"></a><h4>Returns</h4>
 <p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html"><span class="type">GstStructure</span></a> that remains valid for as long as <em class="parameter"><code>convert</code></em>
 is valid
 or until <a class="link" href="gst-plugins-base-libs-gstvideo.html#gst-video-converter-set-config" title="gst_video_converter_set_config ()"><code class="function">gst_video_converter_set_config()</code></a> is called.</p>
@@ -3962,7 +4032,7 @@
 <p>Look at the <span class="type">GST_VIDEO_CONVERTER_OPT_</span>* fields to check valid configuration
 option and values.</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.141.7"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.144.7"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -3984,7 +4054,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.141.8"></a><h4>Returns</h4>
+<a name="id-1.2.15.3.7.144.8"></a><h4>Returns</h4>
 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when <em class="parameter"><code>config</code></em>
 could be set.</p>
 <p></p>
@@ -4003,7 +4073,7 @@
  using <em class="parameter"><code>convert</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.15.3.7.142.5"></a><h4>Parameters</h4>
+<a name="id-1.2.15.3.7.145.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -4553,6 +4623,13 @@
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-VIDEO-FORMAT-NV61:CAPS"></a>GST_VIDEO_FORMAT_NV61</p></td>
+<td class="enum_member_description">
+<p>planar 4:2:2 YUV with interleaved VU plane (Since 1.6)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
diff --git a/docs/libs/html/gst-plugins-base-libs-gstvideoutils.html b/docs/libs/html/gst-plugins-base-libs-gstvideoutils.html
index 1d1568b..3a533ea 100644
--- a/docs/libs/html/gst-plugins-base-libs-gstvideoutils.html
+++ b/docs/libs/html/gst-plugins-base-libs-gstvideoutils.html
@@ -738,7 +738,8 @@
 <tr>
 <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstVideoCodecFrame.input-buffer"></a>input_buffer</code></em>;</p></td>
 <td class="struct_member_description"><p>the input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> that created this frame. The buffer is owned
-by the frame and references to the frame instead of the buffer should</p></td>
+by the frame and references to the frame instead of the buffer should
+be kept.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
diff --git a/docs/libs/html/index.sgml b/docs/libs/html/index.sgml
index 3c88576..c560801 100644
--- a/docs/libs/html/index.sgml
+++ b/docs/libs/html/index.sgml
@@ -1634,6 +1634,7 @@
 <ANCHOR id="gst-video-color-transfer-decode" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-color-transfer-decode">
 <ANCHOR id="gst-video-color-transfer-encode" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-color-transfer-encode">
 <ANCHOR id="gst-video-colorimetry-matches" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-matches">
+<ANCHOR id="gst-video-colorimetry-is-equal" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-is-equal">
 <ANCHOR id="gst-video-colorimetry-from-string" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-from-string">
 <ANCHOR id="gst-video-colorimetry-to-string" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-colorimetry-to-string">
 <ANCHOR id="GST-VIDEO-INFO-FORMAT:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-FORMAT:CAPS">
@@ -1669,6 +1670,8 @@
 <ANCHOR id="GST-VIDEO-INFO-COMP-PLANE:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-PLANE:CAPS">
 <ANCHOR id="GST-VIDEO-INFO-COMP-PSTRIDE:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-PSTRIDE:CAPS">
 <ANCHOR id="GST-VIDEO-INFO-COMP-POFFSET:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COMP-POFFSET:CAPS">
+<ANCHOR id="GST-VIDEO-INFO-CHROMA-SITE:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-CHROMA-SITE:CAPS">
+<ANCHOR id="GST-VIDEO-INFO-COLORIMETRY:CAPS" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#GST-VIDEO-INFO-COLORIMETRY:CAPS">
 <ANCHOR id="gst-video-info-init" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-info-init">
 <ANCHOR id="gst-video-info-set-format" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-info-set-format">
 <ANCHOR id="gst-video-info-from-caps" href="gst-plugins-base-libs-1.0/gst-plugins-base-libs-gstvideo.html#gst-video-info-from-caps">
diff --git a/docs/plugins/html/gst-plugins-base-plugins-1.0.devhelp2 b/docs/plugins/html/gst-plugins-base-plugins-1.0.devhelp2
index 991ee8a..ea88b27 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-1.0.devhelp2
+++ b/docs/plugins/html/gst-plugins-base-plugins-1.0.devhelp2
@@ -82,9 +82,9 @@
     </sub>
   </chapters>
   <functions>
-    <keyword type="" name="Example launch line" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.4"/>
-    <keyword type="" name="Element Information" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.5.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.5.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.5"/>
+    <keyword type="" name="Element Information" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.6.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-base-plugins-adder.html#id-1.2.2.8.6.2"/>
     <keyword type="struct" name="struct GstAdder" link="gst-plugins-base-plugins-adder.html#GstAdder-struct"/>
     <keyword type="property" name="The “caps” property" link="gst-plugins-base-plugins-adder.html#GstAdder--caps"/>
     <keyword type="" name="Element Information" link="gst-plugins-base-plugins-appsrc.html#id-1.2.3.9.5.1.1"/>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-adder.html b/docs/plugins/html/gst-plugins-base-plugins-adder.html
index 0a5d2c7..5636766 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-adder.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-adder.html
@@ -84,14 +84,17 @@
 Mixed data is clamped to the min/max values of the data format.</p>
 <p>The adder currently mixes all data received on the sinkpads as soon as
 possible without trying to synchronize the streams.</p>
+<p>Check out the audiomixer element in gst-plugins-bad for a better-behaving
+audio mixing element: It will sync input streams correctly and also handle
+live inputs properly.</p>
 <div class="refsect2">
-<a name="id-1.2.2.8.4"></a><h3>Example launch line</h3>
+<a name="id-1.2.2.8.5"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> adder name<span class="gtkdoc opt">=</span>mix <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">500</span> <span class="gtkdoc opt">!</span> mix<span class="gtkdoc opt">.</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> adder name<span class="gtkdoc opt">=</span>mix <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> autoaudiosink audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">500</span> <span class="gtkdoc opt">!</span> mix<span class="gtkdoc opt">.</span></pre></td>
       </tr>
     </tbody>
   </table>
@@ -101,7 +104,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.2.8.5.1"></a><h3>Element Information</h3>
+<a name="id-1.2.2.8.6.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -127,7 +130,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.2.8.5.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.2.8.6.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
diff --git a/docs/plugins/html/gst-plugins-base-plugins-audioconvert.html b/docs/plugins/html/gst-plugins-base-plugins-audioconvert.html
index 2040a52..303cad2 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-audioconvert.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-audioconvert.html
@@ -92,7 +92,8 @@
 <a name="gst-plugins-base-plugins-audioconvert.description"></a><h2>Description</h2>
 <p>Audioconvert converts raw audio buffers between various possible formats.
 It supports integer to float conversion, width/depth conversion,
-signedness and endianness conversion and channel transformations.</p>
+signedness and endianness conversion and channel transformations
+(ie. upmixing and downmixing), as well as dithering and noise-shaping.</p>
 <div class="refsect2">
 <a name="id-1.2.7.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
@@ -100,7 +101,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audio<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>format<span class="gtkdoc opt">=</span>S8<span class="gtkdoc opt">,</span>channels<span class="gtkdoc opt">=</span><span class="number">2</span> <span class="gtkdoc opt">!</span> level <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audio<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>format<span class="gtkdoc opt">=</span>S8<span class="gtkdoc opt">,</span>channels<span class="gtkdoc opt">=</span><span class="number">2</span> <span class="gtkdoc opt">!</span> level <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
       </tr>
     </tbody>
   </table>
@@ -112,13 +113,15 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/audio.flac ! audioconvert ! vorbisenc ! oggmux ! filesink location=audio.ogg</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
  The vorbis encoder takes float audio data instead of the integer data
-generated by audiotestsrc.
+output by most other audio elements. This pipeline decodes a FLAC audio file
+(or any other audio file for which decoders are installed) and re-encodes
+it into an Ogg/Vorbis audio file.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-audiorate.html b/docs/plugins/html/gst-plugins-base-plugins-audiorate.html
index 764d2fc..7715a34 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-audiorate.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-audiorate.html
@@ -133,13 +133,27 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v alsasrc <span class="gtkdoc opt">!</span> audiorate <span class="gtkdoc opt">!</span> wavenc <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>alsa<span class="gtkdoc opt">.</span>wav</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v autoaudiosrc <span class="gtkdoc opt">!</span> audiorate <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> wavenc <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>alsa<span class="gtkdoc opt">.</span>wav</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Capture audio from an ALSA device, and turn it into a perfect stream
+ Capture audio from the sound card and turn it into a perfect stream
 for saving in a raw audio file.
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/audio.file ! audiorate ! audioconvert ! wavenc ! filesink location=alsa.wav</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ Decodes an audio file and transforms it into a perfect stream for saving
+in a raw audio WAV file. Without the audio rate, the timing might not be
+preserved correctly in the WAV file in case the decoded stream is jittery
+or there are samples missing.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-audioresample.html b/docs/plugins/html/gst-plugins-base-plugins-audioresample.html
index a7069bc..e2115b7 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-audioresample.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-audioresample.html
@@ -101,13 +101,14 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>sine<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioresample <span class="gtkdoc opt">!</span> audio<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span> rate<span class="gtkdoc opt">=</span><span class="number">8000</span> <span class="gtkdoc opt">!</span> alsasink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/audio.ogg ! audioconvert ! audioresample ! audio/x-raw, rate=8000 ! autoaudiosink</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Decode an Ogg/Vorbis downsample to 8Khz and play sound through alsa.
+ Decode an audio file and downsample it to 8Khz and play sound.
 To create the Ogg/Vorbis file refer to the documentation of vorbisenc.
+This assumes there is an audio sink that will accept/handle 8kHz audio.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-audiotestsrc.html b/docs/plugins/html/gst-plugins-base-plugins-audiotestsrc.html
index ac773f2..6d2c051 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-audiotestsrc.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-audiotestsrc.html
@@ -125,7 +125,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> autoaudiosink</pre></td>
       </tr>
     </tbody>
   </table>
@@ -137,7 +137,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc wave<span class="gtkdoc opt">=</span><span class="number">2</span> freq<span class="gtkdoc opt">=</span><span class="number">200</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> tee name<span class="gtkdoc opt">=</span>t <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> alsasink t<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> libvisual_lv_scope <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span><span class="number">2</span> freq<span class="gtkdoc opt">=</span><span class="number">200</span> <span class="gtkdoc opt">!</span> tee name<span class="gtkdoc opt">=</span>t <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> autoaudiosink t<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> libvisual_lv_scope <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-decodebin.html b/docs/plugins/html/gst-plugins-base-plugins-decodebin.html
index 6409ddd..d9a078c 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-decodebin.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-decodebin.html
@@ -408,8 +408,6 @@
 </p>
 <p></p>
 <p>
-@:
-@:
 @:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.2.7"></a><h4>Parameters</h4>
@@ -480,8 +478,6 @@
 </p>
 <p></p>
 <p>
-@:
-@:
 @:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.3.9"></a><h4>Parameters</h4>
@@ -540,9 +536,6 @@
 <p>
 </p>
 <p>
-@:
-@:
-@:
 @:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.4.5"></a><h4>Parameters</h4>
@@ -623,9 +616,6 @@
 </p>
 <p></p>
 <p>
-@:
-@:
-@:
 @:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.5.11"></a><h4>Parameters</h4>
@@ -702,9 +692,6 @@
 </p>
 <p></p>
 <p>
-@:
-@:
-@:
 @:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.6.8"></a><h4>Parameters</h4>
@@ -757,10 +744,6 @@
 user_function (<a class="link" href="gst-plugins-base-plugins-decodebin.html#GstDecodeBin"><span class="type">GstDecodeBin</span></a> *bin,
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This signal is emitted once decodebin has finished decoding all the data.</p>
-<p>
-</p>
-<p>
-@:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.7.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
@@ -795,12 +778,6 @@
                <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 <p>This signal is emitted when a pad for which there is no further possible
 decoding is added to the decodebin.</p>
-<p>
-</p>
-<p>
-@:
-@:
-@:</p>
 <div class="refsect3">
 <a name="id-1.2.13.13.8.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
diff --git a/docs/plugins/html/gst-plugins-base-plugins-giosink.html b/docs/plugins/html/gst-plugins-base-plugins-giosink.html
index f30276e..5162014 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-giosink.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-giosink.html
@@ -116,7 +116,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>input<span class="gtkdoc opt">.</span>xyz <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/out.xyz</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>input<span class="gtkdoc opt">.</span>xyz <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/out.xyz</span></pre></td>
       </tr>
     </tbody>
   </table>
@@ -128,19 +128,19 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>foo<span class="gtkdoc opt">.</span>mp3 <span class="gtkdoc opt">!</span> mad <span class="gtkdoc opt">!</span> flacenc <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/foo.flac</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/audio.file ! audioconvert ! flacenc ! giosink location=smb://othercomputer/foo.flac</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- The above pipeline will re-encode an mp3 file into FLAC format and store
+ The above pipeline will re-encode an audio file into FLAC format and store
 it on a remote host using the Samba protocol.
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v audiotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/foo/bar.ogg</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> giosink location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/foo/bar.ogg</span></pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-giosrc.html b/docs/plugins/html/gst-plugins-base-plugins-giosrc.html
index 2a4f4cf..61467aa 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-giosrc.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-giosrc.html
@@ -112,7 +112,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/foo.xyz ! fakesink</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///home/joe/foo.xyz ! fakesink</span></pre></td>
       </tr>
     </tbody>
   </table>
@@ -125,7 +125,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz</span></pre></td>
       </tr>
     </tbody>
   </table>
@@ -137,13 +137,13 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>http<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//music.foobar.com/demo.mp3 ! mad ! audioconvert ! audioresample ! alsasink</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v giosrc location<span class="gtkdoc opt">=</span>smb<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//othercomputer/demo.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
  The above pipeline will read and decode and play an mp3 file from a
-web server using the http protocol.
+SAMBA server.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-playbin.html b/docs/plugins/html/gst-plugins-base-plugins-playbin.html
index 2447710..6189cdc 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-playbin.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-playbin.html
@@ -557,22 +557,22 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/somefile.avi</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/somefile.mp4</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
  This will play back the given AVI video file, given that the video and
 audio decoders required to decode the content are installed. Since no
-special audio sink or video sink is supplied (not possible via gst-launch),
-playbin will try to find a suitable audio and video sink automatically
-using the autoaudiosink and autovideosink elements.
+special audio sink or video sink is supplied (via playbin's audio-sink or
+video-sink properties) playbin will try to find a suitable audio and
+video sink automatically using the autoaudiosink and autovideosink elements.
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>cdda<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//4</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>cdda<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//4</span></pre></td>
       </tr>
     </tbody>
   </table>
@@ -584,7 +584,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>dvd<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v playbin uri<span class="gtkdoc opt">=</span>dvd<span class="gtkdoc opt">:</span><span class="gtkdoc slc">//</span></pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-subtitleoverlay.html b/docs/plugins/html/gst-plugins-base-plugins-subtitleoverlay.html
index daf720c..0125a0d 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-subtitleoverlay.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-subtitleoverlay.html
@@ -105,12 +105,12 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mkv <span class="gtkdoc opt">!</span> matroskademux name<span class="gtkdoc opt">=</span>demux <span class="gtkdoc opt">!</span> <span class="string">&quot;video/x-h264&quot;</span> <span class="gtkdoc opt">!</span> queue2 <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> subtitleoverlay name<span class="gtkdoc opt">=</span>overlay <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> autovideosink  demux<span class="gtkdoc opt">. !</span> <span class="string">&quot;subpicture/x-dvd&quot;</span> <span class="gtkdoc opt">!</span> queue2 <span class="gtkdoc opt">!</span> overlay<span class="gtkdoc opt">.</span></pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mkv <span class="gtkdoc opt">!</span> matroskademux name<span class="gtkdoc opt">=</span>demux <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>h264 <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> subtitleoverlay name<span class="gtkdoc opt">=</span>overlay <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> autovideosink  demux<span class="gtkdoc opt">. !</span> subpicture<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>dvd <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> overlay<span class="gtkdoc opt">.</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- This will play back the given Matroska file with h264 video and subpicture subtitles.
+ This will play back the given Matroska file with h264 video and dvd subpicture style subtitles.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-tcpclientsink.html b/docs/plugins/html/gst-plugins-base-plugins-tcpclientsink.html
index a07ebad..8234909 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-tcpclientsink.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-tcpclientsink.html
@@ -94,12 +94,13 @@
         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc"># server:</span>
 nc <span class="gtkdoc opt">-</span>l <span class="gtkdoc opt">-</span>p <span class="number">3000</span>
 <span class="gtkdoc ppc"># client:</span>
-gst<span class="gtkdoc opt">-</span>launch fdsink fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpclientsink port<span class="gtkdoc opt">=</span><span class="number">3000</span></pre></td>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpclientsink port<span class="gtkdoc opt">=</span><span class="number">3000</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- everything you type in the client is shown on the server
+ everything you type in the client is shown on the server (fd=1 means
+standard input which is the command line input file descriptor)
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-tcpclientsrc.html b/docs/plugins/html/gst-plugins-base-plugins-tcpclientsrc.html
index 9475893..eb71a0f 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-tcpclientsrc.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-tcpclientsrc.html
@@ -95,7 +95,7 @@
         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc"># server:</span>
 nc <span class="gtkdoc opt">-</span>l <span class="gtkdoc opt">-</span>p <span class="number">3000</span>
 <span class="gtkdoc ppc"># client:</span>
-gst<span class="gtkdoc opt">-</span>launch tcpclientsrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span></pre></td>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> tcpclientsrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span></pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-tcpserversink.html b/docs/plugins/html/gst-plugins-base-plugins-tcpserversink.html
index d96b784..b394f64 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-tcpserversink.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-tcpserversink.html
@@ -99,9 +99,9 @@
 3
 4</pre></td>
         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc"># server:</span>
-gst<span class="gtkdoc opt">-</span>launch fdsrc fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpserversink port<span class="gtkdoc opt">=</span><span class="number">3000</span>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> fdsrc fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpserversink port<span class="gtkdoc opt">=</span><span class="number">3000</span>
 <span class="gtkdoc ppc"># client:</span>
-gst<span class="gtkdoc opt">-</span>launch tcpclientsrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span></pre></td>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> tcpclientsrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span></pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-tcpserversrc.html b/docs/plugins/html/gst-plugins-base-plugins-tcpserversrc.html
index cc129a9..5c3f08d 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-tcpserversrc.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-tcpserversrc.html
@@ -98,9 +98,9 @@
 3
 4</pre></td>
         <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc"># server:</span>
-gst<span class="gtkdoc opt">-</span>launch tcpserversrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> tcpserversrc port<span class="gtkdoc opt">=</span><span class="number">3000</span> <span class="gtkdoc opt">!</span> fdsink fd<span class="gtkdoc opt">=</span><span class="number">2</span>
 <span class="gtkdoc ppc"># client:</span>
-gst<span class="gtkdoc opt">-</span>launch fdsrc fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpclientsink port<span class="gtkdoc opt">=</span><span class="number">3000</span></pre></td>
+gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> fdsrc fd<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> tcpclientsink port<span class="gtkdoc opt">=</span><span class="number">3000</span></pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-videoconvert.html b/docs/plugins/html/gst-plugins-base-plugins-videoconvert.html
index 24332bb..654fc12 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-videoconvert.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-videoconvert.html
@@ -82,12 +82,14 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v videotestsrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>format<span class="gtkdoc opt">=</span>\<span class="gtkdoc opt">(</span>string\<span class="gtkdoc opt">)</span>YUY2 <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> ximagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v videotestsrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>format<span class="gtkdoc opt">=</span>YUY2 <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
-
+ This will output a test video (generated in YUY2 format) in a video
+window. If the video sink selected does not support YUY2 videoconvert will
+automatically convert the video to a format understood by the video sink.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-videorate.html b/docs/plugins/html/gst-plugins-base-plugins-videorate.html
index 80c4c56..83eab7f 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-videorate.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-videorate.html
@@ -151,25 +151,36 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videorate <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span><span class="number">15</span><span class="gtkdoc opt">/</span><span class="number">1</span> <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/video.ogg ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=15/1 ! autovideosink</span></pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Decode an Ogg/Theora file and adjust the framerate to 15 fps before playing.
-To create the test Ogg/Theora file refer to the documentation of theoraenc.
+ Decode a video file and adjust the framerate to 15 fps before playing.
+To create a test Ogg/Theora file refer to the documentation of theoraenc.
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v v4l2src <span class="gtkdoc opt">!</span> videorate <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span><span class="number">25</span><span class="gtkdoc opt">/</span><span class="number">2</span> <span class="gtkdoc opt">!</span> theoraenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>recording<span class="gtkdoc opt">.</span>ogg</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v v4l2src <span class="gtkdoc opt">!</span> videorate <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span><span class="number">25</span><span class="gtkdoc opt">/</span><span class="number">2</span> <span class="gtkdoc opt">!</span> theoraenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>recording<span class="gtkdoc opt">.</span>ogg</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
  Capture video from a V4L device, and adjust the stream to 12.5 fps before
 encoding to Ogg/Theora.
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/video.ogg ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=1/5 ! jpegenc ! multifilesink location=snapshot-%05d.jpg</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ Decode a video file and save a snapshot every 5 seconds as consecutively numbered jpeg file.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-videoscale.html b/docs/plugins/html/gst-plugins-base-plugins-videoscale.html
index 12e7192..a3907d0 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-videoscale.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-videoscale.html
@@ -121,27 +121,26 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> ximagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Decode an Ogg/Theora and display the video using ximagesink. Since
-ximagesink cannot perform scaling, the video scaling will be performed by
-videoscale when you resize the video window.
+ Decode an Ogg/Theora and display the video. If the video sink chosen
+cannot perform scaling, the video scaling will be performed by videoscale
+when you resize the video window.
 To create the test Ogg/Theora file refer to the documentation of theoraenc.
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">50</span> <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>videotestsrc<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> theoradec <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> videoscale <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Decode an Ogg/Theora and display the video using xvimagesink with a width
-of 50.
+ Decode an Ogg/Theora and display the video with a width of 100.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-videotestsrc.html b/docs/plugins/html/gst-plugins-base-plugins-videotestsrc.html
index e8b216a..863bef2 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-videotestsrc.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-videotestsrc.html
@@ -177,12 +177,12 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v videotestsrc pattern<span class="gtkdoc opt">=</span>snow <span class="gtkdoc opt">!</span> ximagesink</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v videotestsrc pattern<span class="gtkdoc opt">=</span>snow <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">1280</span><span class="gtkdoc opt">,</span>height<span class="gtkdoc opt">=</span><span class="number">720</span> <span class="gtkdoc opt">!</span> autovideosink</pre></td>
       </tr>
     </tbody>
   </table>
 </div>
- Shows random noise in an X window.
+ Shows random noise in a video window.
 </div>
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
diff --git a/docs/plugins/html/gst-plugins-base-plugins-volume.html b/docs/plugins/html/gst-plugins-base-plugins-volume.html
index d3a54e2..c95a84d 100644
--- a/docs/plugins/html/gst-plugins-base-plugins-volume.html
+++ b/docs/plugins/html/gst-plugins-base-plugins-volume.html
@@ -96,7 +96,7 @@
     <tbody>
       <tr>
         <td class="listing_lines" align="right"><pre>1</pre></td>
-        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> volume volume<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> level <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
+        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> volume volume<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> level <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
       </tr>
     </tbody>
   </table>
diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c
index 5c6a958..77fa0a1 100644
--- a/ext/alsa/gstalsasink.c
+++ b/ext/alsa/gstalsasink.c
@@ -24,13 +24,13 @@
  * SECTION:element-alsasink
  * @see_also: alsasrc
  *
- * This element renders raw audio samples using the ALSA api.
+ * This element renders raw audio samples using the ALSA audio API.
  *
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! alsasink
- * ]| Play an Ogg/Vorbis file.
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/audio.ogg ! audioconvert ! audioresample ! autoaudiosink
+ * ]| Play an Ogg/Vorbis file and output audio via ALSA.
  * </refsect2>
  */
 
diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c
index 6d11ba4..0233748 100644
--- a/ext/alsa/gstalsasrc.c
+++ b/ext/alsa/gstalsasrc.c
@@ -28,7 +28,7 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
+ * gst-launch-1.0 -v alsasrc ! queue ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
  * ]| Record from a sound card using ALSA and encode to Ogg/Vorbis.
  * </refsect2>
  */
diff --git a/ext/libvisual/gstaudiovisualizer.c b/ext/libvisual/gstaudiovisualizer.c
index 598d2fc..cbb3b53 100644
--- a/ext/libvisual/gstaudiovisualizer.c
+++ b/ext/libvisual/gstaudiovisualizer.c
@@ -3,19 +3,20 @@
  *
  * gstaudiovisualizer.h: base class for audio visualisation elements
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 /**
  * SECTION:gstaudiovisualizer
diff --git a/ext/libvisual/gstaudiovisualizer.h b/ext/libvisual/gstaudiovisualizer.h
index a9b7a9c..e17a914 100644
--- a/ext/libvisual/gstaudiovisualizer.h
+++ b/ext/libvisual/gstaudiovisualizer.h
@@ -3,19 +3,20 @@
  *
  * gstaudiovisualizer.c: base class for audio visualisation elements
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_AUDIO_VISUALIZER_H__
diff --git a/ext/ogg/Makefile.am b/ext/ogg/Makefile.am
index 9fd326c..1128141 100644
--- a/ext/ogg/Makefile.am
+++ b/ext/ogg/Makefile.am
@@ -35,18 +35,3 @@
 	$(OGG_LIBS)
 libgstogg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstogg_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstogg -:SHARED libgstogg \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstogg_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstogg_la_CFLAGS) \
-	 -:LDFLAGS $(libgstogg_la_LDFLAGS) \
-	           $(libgstogg_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/ext/ogg/Makefile.in b/ext/ogg/Makefile.in
index 6461597..ec5dfea 100644
--- a/ext/ogg/Makefile.in
+++ b/ext/ogg/Makefile.in
@@ -953,20 +953,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstogg -:SHARED libgstogg \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstogg_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstogg_la_CFLAGS) \
-	 -:LDFLAGS $(libgstogg_la_LDFLAGS) \
-	           $(libgstogg_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index 86615bf..05ce495 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -28,8 +28,8 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=test.ogg ! oggdemux ! vorbisdec ! audioconvert ! alsasink
- * ]| Decodes the vorbis audio stored inside an ogg container.
+ * gst-launch-1.0 -v filesrc location=test.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink
+ * ]| Decodes a vorbis audio stream stored inside an ogg container and plays it.
  * </refsect2>
  */
 
@@ -586,6 +586,74 @@
     GST_DEBUG_OBJECT (ogg, "packet duration %" G_GUINT64_FORMAT, duration);
   }
 
+
+  /* If we get a hole at start, it might be we're catching a stream
+   * partway through. In that case, if the stream has an index, the
+   * index might be mooted. However, as it's totally valid to index
+   * a stream with a hole at start (ie, capturing a live stream and
+   * then index it), we now check whether the index references some
+   * offset beyond the byte length (if known). If this is the case,
+   * we can be reasonably sure we're getting a stream partway, with
+   * its index being now useless since we don't know how many bytes
+   * were skipped, preventing us from patching the index offsets to
+   * match the hole size. */
+  if (!is_header && ogg->check_index_overflow) {
+    GstQuery *query;
+    GstFormat format;
+    int i;
+    gint64 length;
+    gboolean beyond;
+
+    if (ogg->current_chain) {
+      query = gst_query_new_duration (GST_FORMAT_BYTES);
+      if (gst_pad_peer_query (ogg->sinkpad, query)) {
+        gst_query_parse_duration (query, &format, &length);
+        if (format == GST_FORMAT_BYTES && length >= 0) {
+          for (i = 0; i < ogg->current_chain->streams->len; i++) {
+            GstOggPad *ipad =
+                g_array_index (ogg->current_chain->streams, GstOggPad *, i);
+            if (!ipad->map.index)
+              continue;
+            beyond = ipad->map.n_index
+                && ipad->map.index[ipad->map.n_index - 1].offset >= length;
+            if (beyond) {
+              GST_WARNING_OBJECT (pad, "Index offsets beyong byte length");
+              if (ipad->discont) {
+                /* hole - the index is most likely screwed up */
+                GST_WARNING_OBJECT (ogg, "Discarding entire index");
+                g_free (ipad->map.index);
+                ipad->map.index = NULL;
+                ipad->map.n_index = 0;
+              } else {
+                /* no hole - we can just clip the index if needed */
+                GST_WARNING_OBJECT (ogg, "Clipping index");
+                while (ipad->map.n_index > 0
+                    && ipad->map.index[ipad->map.n_index - 1].offset >= length)
+                  ipad->map.n_index--;
+                if (ipad->map.n_index == 0) {
+                  GST_WARNING_OBJECT (ogg, "The entire index was clipped");
+                  g_free (ipad->map.index);
+                  ipad->map.index = NULL;
+                }
+              }
+              /* We can't trust the total time if the index goes beyond */
+              ipad->map.total_time = -1;
+            } else {
+              /* use total time to update the total ogg time */
+              if (ogg->total_time == -1) {
+                ogg->total_time = ipad->map.total_time;
+              } else if (ipad->map.total_time > 0) {
+                ogg->total_time = MAX (ogg->total_time, ipad->map.total_time);
+              }
+            }
+          }
+        }
+      }
+      gst_query_unref (query);
+    }
+    ogg->check_index_overflow = FALSE;
+  }
+
   if (packet->b_o_s) {
     out_timestamp = GST_CLOCK_TIME_NONE;
     out_duration = GST_CLOCK_TIME_NONE;
@@ -919,13 +987,7 @@
           case GST_OGG_SKELETON_INDEX:
             gst_ogg_map_add_index (&skel_pad->map, &pad->map, packet->packet,
                 packet->bytes);
-
-            /* use total time to update the total ogg time */
-            if (ogg->total_time == -1) {
-              ogg->total_time = skel_pad->map.total_time;
-            } else if (skel_pad->map.total_time > 0) {
-              ogg->total_time = MAX (ogg->total_time, skel_pad->map.total_time);
-            }
+            ogg->check_index_overflow = TRUE;
             break;
           default:
             break;
@@ -1225,8 +1287,9 @@
   if (pad->current_granule == -1) {
     ogg_int64_t granpos = ogg_page_granulepos (page);
     if (granpos > 0) {
-      ogg_int64_t granule =
-          gst_ogg_stream_granulepos_to_granule (&pad->map, granpos), duration;
+      gint64 granule =
+          (gint64) gst_ogg_stream_granulepos_to_granule (&pad->map, granpos);
+      gint64 duration;
       int packets = ogg_page_packets (page), n;
       GST_DEBUG_OBJECT (pad,
           "This page completes %d packets, granule %" G_GINT64_FORMAT, packets,
@@ -1462,6 +1525,7 @@
         GST_SEEK_TYPE_SET, 1, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
   }
   gst_event_replace (&ogg->seek_event, event);
+  gst_event_unref (event);
   GST_PUSH_UNLOCK (ogg);
   g_mutex_lock (&ogg->seek_event_mutex);
   g_cond_broadcast (&ogg->seek_event_cond);
@@ -1792,6 +1856,7 @@
       gst_event_set_seqnum (sevent, ogg->seqnum);
 
       gst_event_replace (&ogg->seek_event, sevent);
+      gst_event_unref (sevent);
       GST_PUSH_UNLOCK (ogg);
       g_mutex_lock (&ogg->seek_event_mutex);
       g_cond_broadcast (&ogg->seek_event_cond);
@@ -2028,7 +2093,6 @@
 gst_ogg_chain_new_stream (GstOggChain * chain, guint32 serialno)
 {
   GstOggPad *ret;
-  GstTagList *list;
   gchar *name;
 
   GST_DEBUG_OBJECT (chain->ogg,
@@ -2050,12 +2114,6 @@
   if (ogg_stream_init (&ret->map.stream, serialno) != 0)
     goto init_failed;
 
-  /* FIXME: either do something with it or remove it */
-  list = gst_tag_list_new_empty ();
-  gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_SERIAL, serialno,
-      NULL);
-  gst_tag_list_unref (list);
-
   GST_DEBUG_OBJECT (chain->ogg,
       "created new ogg src %p for stream with serial %08x", ret, serialno);
 
@@ -3583,6 +3641,7 @@
   sevent = gst_event_new_seek (1.0, GST_FORMAT_BYTES, flags, GST_SEEK_TYPE_SET,
       position, GST_SEEK_TYPE_SET, ogg->push_byte_length - 1);
   gst_event_replace (&ogg->seek_event, sevent);
+  gst_event_unref (sevent);
   g_mutex_lock (&ogg->seek_event_mutex);
   g_cond_broadcast (&ogg->seek_event_cond);
   g_mutex_unlock (&ogg->seek_event_mutex);
@@ -3793,6 +3852,7 @@
   gst_event_set_seqnum (sevent, gst_event_get_seqnum (event));
 
   gst_event_replace (&ogg->seek_event, sevent);
+  gst_event_unref (sevent);
   GST_PUSH_UNLOCK (ogg);
   g_mutex_lock (&ogg->seek_event_mutex);
   g_cond_broadcast (&ogg->seek_event_cond);
@@ -4541,7 +4601,8 @@
   pad->last_ret = ret;
   pad->is_eos = (ret == GST_FLOW_EOS);
 
-  return gst_flow_combiner_update_flow (ogg->flowcombiner, ret);
+  return gst_flow_combiner_update_pad_flow (ogg->flowcombiner,
+      GST_PAD_CAST (pad), ret);
 }
 
 static GstFlowReturn
@@ -4814,7 +4875,7 @@
     if (!event)
       continue;
 
-    GST_ERROR ("Pushing event %" GST_PTR_FORMAT, event);
+    GST_DEBUG_OBJECT (ogg->sinkpad, "Pushing event %" GST_PTR_FORMAT, event);
     if (!gst_pad_push_event (ogg->sinkpad, event)) {
       GST_WARNING_OBJECT (ogg, "Failed to push event");
       GST_PUSH_LOCK (ogg);
@@ -4824,7 +4885,7 @@
       }
       GST_PUSH_UNLOCK (ogg);
     } else {
-      GST_ERROR ("Pushed event ok");
+      GST_DEBUG_OBJECT (ogg->sinkpad, "Pushed event ok");
     }
   }
   gst_object_unref (ogg);
diff --git a/ext/ogg/gstoggdemux.h b/ext/ogg/gstoggdemux.h
index 742392f..db1f393 100644
--- a/ext/ogg/gstoggdemux.h
+++ b/ext/ogg/gstoggdemux.h
@@ -148,6 +148,8 @@
      useful for skewing when seeking */
   guint64 max_packet_size, max_page_size;
 
+  gboolean check_index_overflow;
+
   /* state */
   GMutex chain_lock;           /* we need the lock to protect the chains */
   GArray *chains;               /* list of chains we know */
diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c
index ded27a2..b62f125 100644
--- a/ext/ogg/gstoggmux.c
+++ b/ext/ogg/gstoggmux.c
@@ -27,7 +27,7 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! theoraenc ! oggmux ! filesink location=video.ogg
+ * gst-launch-1.0 v4l2src num-buffers=500 ! video/x-raw,width=320,height=240 ! videoconvert ! videorate ! theoraenc ! oggmux ! filesink location=video.ogg
  * ]| Encodes a video stream captured from a v4l2-compatible camera to Ogg/Theora
  * (the encoding will stop automatically after 500 frames)
  * </refsect2>
@@ -1663,7 +1663,7 @@
     if (next_buf) {
       ogg_mux->pulling->eos = FALSE;
       gst_buffer_unref (next_buf);
-    } else {
+    } else if (!ogg_mux->pulling->map.is_sparse) {
       GST_DEBUG_OBJECT (ogg_mux->pulling->collect.pad, "setting eos to true");
       ogg_mux->pulling->eos = TRUE;
     }
@@ -1676,7 +1676,7 @@
     if (next_buf) {
       best->eos = FALSE;
       gst_buffer_unref (next_buf);
-    } else {
+    } else if (!best->map.is_sparse) {
       GST_DEBUG_OBJECT (best->collect.pad, "setting eos to true");
       best->eos = TRUE;
     }
@@ -2044,6 +2044,14 @@
   if (best->eos && all_pads_eos (pads))
     goto eos;
 
+  /* We might have used up a cached pad->buffer. If all streams
+   * have a buffer ready in collectpads, collectpads will block at
+   * next chain, and will never call collected again. So we make a
+   * last call to _queue_pads now, to ensure that collectpads can
+   * push to at least one pad (mostly for streams with a single
+   * logical stream). */
+  gst_ogg_mux_queue_pads (ogg_mux, &popped);
+
   return ret;
 
 eos:
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
index a300f32..a8d82d0 100644
--- a/ext/pango/gstbasetextoverlay.c
+++ b/ext/pango/gstbasetextoverlay.c
@@ -22,55 +22,6 @@
  * Boston, MA 02110-1301, USA.
  */
 
-/**
- * SECTION:element-textoverlay
- * @see_also: #GstTextRender, #GstClockOverlay, #GstTimeOverlay, #GstSubParse
- *
- * This plugin renders text on top of a video stream. This can be either
- * static text or text from buffers received on the text sink pad, e.g.
- * as produced by the subparse element. If the text sink pad is not linked,
- * the text set via the "text" property will be rendered. If the text sink
- * pad is linked, text will be rendered as it is received on that pad,
- * honouring and matching the buffer timestamps of both input streams.
- *
- * The text can contain newline characters and text wrapping is enabled by
- * default.
- *
- * <refsect2>
- * <title>Example launch lines</title>
- * |[
- * gst-launch -v videotestsrc ! textoverlay text="Room A" valign=top halign=left ! xvimagesink
- * ]| Here is a simple pipeline that displays a static text in the top left
- * corner of the video picture
- * |[
- * gst-launch -v filesrc location=subtitles.srt ! subparse ! txt.   videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! xvimagesink
- * ]| Here is another pipeline that displays subtitles from an .srt subtitle
- * file, centered at the bottom of the picture and with a rectangular shading
- * around the text in the background:
- * <para>
- * If you do not have such a subtitle file, create one looking like this
- * in a text editor:
- * |[
- * 1
- * 00:00:03,000 --> 00:00:05,000
- * Hello? (3-5s)
- *
- * 2
- * 00:00:08,000 --> 00:00:13,000
- * Yes, this is a subtitle. Don&apos;t
- * you like it? (8-13s)
- *
- * 3
- * 00:00:18,826 --> 00:01:02,886
- * Uh? What are you talking about?
- * I don&apos;t understand  (18-62s)
- * ]|
- * </para>
- * </refsect2>
- */
-
-/* FIXME: alloc segment as part of instance struct */
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -670,11 +621,11 @@
       }
     } else {
       width =
-          (overlay->use_vertical_render ? overlay->height : overlay->width) *
-          PANGO_SCALE;
+          ((overlay->use_vertical_render ? overlay->height : overlay->width) -
+          overlay->deltax) * PANGO_SCALE;
     }
 
-    GST_DEBUG_OBJECT (overlay, "Set layout width %d", overlay->width);
+    GST_DEBUG_OBJECT (overlay, "Set layout width %d", width);
     GST_DEBUG_OBJECT (overlay, "Set wrap mode    %d", overlay->wrap_mode);
     pango_layout_set_width (overlay->layout, width);
     pango_layout_set_wrap (overlay->layout, (PangoWrapMode) overlay->wrap_mode);
@@ -2273,7 +2224,9 @@
     if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
       overlay->text_segment.position = clip_start;
 
-    overlay->text_buffer = buffer;
+    overlay->text_buffer = buffer;      /* pass ownership of @buffer */
+    buffer = NULL;
+
     /* That's a new text buffer we need to render */
     overlay->need_render = TRUE;
 
@@ -2284,6 +2237,8 @@
   GST_BASE_TEXT_OVERLAY_UNLOCK (overlay);
 
 beach:
+  if (buffer)
+    gst_buffer_unref (buffer);
 
   return ret;
 }
diff --git a/ext/pango/gstclockoverlay.c b/ext/pango/gstclockoverlay.c
index 8fb1ecf..e5e177f 100644
--- a/ext/pango/gstclockoverlay.c
+++ b/ext/pango/gstclockoverlay.c
@@ -31,10 +31,10 @@
  * <refsect2>
  * <title>Example launch lines</title>
  * |[
- * gst-launch -v videotestsrc ! clockoverlay ! xvimagesink
- * ]| Display the current time in the top left corner of the video picture
+ * gst-launch-1.0 -v videotestsrc ! clockoverlay ! autovideosink
+ * ]| Display the current wall clock time in the top left corner of the video picture
  * |[
- * gst-launch -v videotestsrc ! clockoverlay halign=right valign=bottom text="Edge City" shaded-background=true ! videoconvert ! ximagesink
+ * gst-launch-1.0 -v videotestsrc ! clockoverlay halignment=right valignment=bottom text="Edge City" shaded-background=true font-desc="Sans, 36" ! videoconvert ! autovideosink
  * ]| Another pipeline that displays the current time with some leading
  * text in the bottom right corner of the video picture, with the background
  * of the text being shaded in order to make it more legible on top of a
diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c
index 9e3f9de..d036579 100644
--- a/ext/pango/gsttextoverlay.c
+++ b/ext/pango/gsttextoverlay.c
@@ -40,11 +40,11 @@
  * <refsect2>
  * <title>Example launch lines</title>
  * |[
- * gst-launch -v videotestsrc ! textoverlay text="Room A" valign=top halign=left ! xvimagesink
+ * gst-launch-1.0 -v gst-launch-1.0 videotestsrc ! textoverlay text="Room A" valignment=top halignment=left font-desc="Sans, 72" ! autovideosink
  * ]| Here is a simple pipeline that displays a static text in the top left
  * corner of the video picture
  * |[
- * gst-launch -v filesrc location=subtitles.srt ! subparse ! txt.   videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! xvimagesink
+ * gst-launch-1.0 -v filesrc location=subtitles.srt ! subparse ! txt.   videotestsrc ! timeoverlay ! textoverlay name=txt shaded-background=yes ! autovideosink
  * ]| Here is another pipeline that displays subtitles from an .srt subtitle
  * file, centered at the bottom of the picture and with a rectangular shading
  * around the text in the background:
@@ -66,15 +66,6 @@
  * Uh? What are you talking about?
  * I don&apos;t understand  (18-62s)
  * ]|
- * One can also feed arbitrary live text into the element:
- * |[
- * gst-launch fdsrc fd=0 ! text/x-raw,format=utf8 ! txt. videotestsrc ! \
- * textoverlay  name=txt shaded-background=yes font-desc="Serif 40" wait-text=false ! \
- * xvimagesink
- * ]| This shows new text as entered on the terminal (stdin). This is not suited
- * for subtitles as the test overlay is not timed. Subtitles should use
- * timestamped formats. For the above use case one can also read the text from
- * the application as set the #GstTextOverlay:text property.
  * </para>
  * </refsect2>
  */
diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c
index be7df62..603457c 100644
--- a/ext/pango/gsttextrender.c
+++ b/ext/pango/gsttextrender.c
@@ -34,7 +34,7 @@
  * <refsect2>
  * <title>Example launch lines</title>
  * |[
- * gst-launch -v filesrc location=subtitles.srt ! subparse ! textrender ! xvimagesink
+ * gst-launch-1.0 -v filesrc location=subtitles.srt ! subparse ! textrender ! videoconvert ! autovideosink
  * ]|
  * </refsect2>
  */
diff --git a/ext/pango/gsttimeoverlay.c b/ext/pango/gsttimeoverlay.c
index 535202f..0cedd66 100644
--- a/ext/pango/gsttimeoverlay.c
+++ b/ext/pango/gsttimeoverlay.c
@@ -30,11 +30,10 @@
  *
  * <refsect2>
  * |[
- * gst-launch -v videotestsrc ! timeoverlay ! xvimagesink
- * ]| Display the time stamps in the top left
- * corner of the video picture.
+ * gst-launch-1.0 -v videotestsrc ! timeoverlay ! autovideosink
+ * ]| Display the time stamps in the top left corner of the video picture.
  * |[
- * gst-launch -v videotestsrc ! timeoverlay halign=right valign=bottom text="Stream time:" shaded-background=true ! xvimagesink
+ * gst-launch-1.0 -v videotestsrc ! timeoverlay halignment=right valignment=bottom text="Stream time:" shaded-background=true font-desc="Sans, 24" ! autovideosink
  * ]| Another pipeline that displays the time stamps with some leading
  * text in the bottom right corner of the video picture, with the background
  * of the text being shaded in order to make it more legible on top of a
diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c
index 5adb057..fdb8a83 100644
--- a/ext/theora/gsttheoradec.c
+++ b/ext/theora/gsttheoradec.c
@@ -32,9 +32,9 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! xvimagesink
- * ]| This example pipeline will decode an ogg stream and decodes the theora video. Refer to
- * the theoraenc example to create the ogg file.
+ * gst-launch-1.0 -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! autovideosink
+ * ]| This example pipeline will decode an ogg stream and decodes the theora video in it.
+ * Refer to the theoraenc example to create the ogg file.
  * </refsect2>
  */
 
diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c
index 126c5e3..f8af353 100644
--- a/ext/theora/gsttheoraenc.c
+++ b/ext/theora/gsttheoraenc.c
@@ -45,7 +45,7 @@
  * <refsect2>
  * <title>Example pipeline</title>
  * |[
- * gst-launch -v videotestsrc num-buffers=1000 ! theoraenc ! oggmux ! filesink location=videotestsrc.ogg
+ * gst-launch-1.0 -v videotestsrc num-buffers=500 ! video/x-raw,width=1280,height=720 ! queue ! progressreport ! theoraenc ! oggmux ! filesink location=videotestsrc.ogg
  * ]| This example pipeline will encode a test video source to theora muxed in an
  * ogg container. Refer to the theoradec documentation to decode the create
  * stream.
diff --git a/ext/theora/gsttheoraparse.c b/ext/theora/gsttheoraparse.c
index f3558e8..5c58644 100644
--- a/ext/theora/gsttheoraparse.c
+++ b/ext/theora/gsttheoraparse.c
@@ -43,11 +43,11 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=video.ogg ! oggdemux ! theoraparse ! fakesink
+ * gst-launch-1.0 -v filesrc location=video.ogg ! oggdemux ! theoraparse ! fakesink
  * ]| This pipeline shows that the streamheader is set in the caps, and that each
  * buffer has the timestamp, duration, offset, and offset_end set.
  * |[
- * gst-launch filesrc location=video.ogg ! oggdemux ! theoraparse \
+ * gst-launch-1.0 filesrc location=video.ogg ! oggdemux ! theoraparse \
  *            ! oggmux ! filesink location=video-remuxed.ogg
  * ]| This pipeline shows remuxing. video-remuxed.ogg might not be exactly the same
  * as video.ogg, but they should produce exactly the same decoded data.
diff --git a/ext/vorbis/Makefile.am b/ext/vorbis/Makefile.am
index 41062bb..cc3d28e 100644
--- a/ext/vorbis/Makefile.am
+++ b/ext/vorbis/Makefile.am
@@ -45,18 +45,3 @@
 		 gstvorbisparse.h \
 		 gstvorbistag.h \
 		 gstvorbiscommon.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivorbisdec -:SHARED libgstivorbisdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivorbisdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivorbisdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivorbisdec_la_LDFLAGS) \
-	           $(libgstivorbisdec_la_LIBADD) \
-		   -lvorbisidec \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/ext/vorbis/Makefile.in b/ext/vorbis/Makefile.in
index defb4eb..1536596 100644
--- a/ext/vorbis/Makefile.in
+++ b/ext/vorbis/Makefile.in
@@ -1000,21 +1000,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstivorbisdec -:SHARED libgstivorbisdec \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstivorbisdec_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstivorbisdec_la_CFLAGS) \
-	 -:LDFLAGS $(libgstivorbisdec_la_LDFLAGS) \
-	           $(libgstivorbisdec_la_LIBADD) \
-		   -lvorbisidec \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/ext/vorbis/gstvorbisdec.c b/ext/vorbis/gstvorbisdec.c
index 5741053..00dc784 100644
--- a/ext/vorbis/gstvorbisdec.c
+++ b/ext/vorbis/gstvorbisdec.c
@@ -24,12 +24,14 @@
  * This element decodes a Vorbis stream to raw float audio.
  * <ulink url="http://www.vorbis.com/">Vorbis</ulink> is a royalty-free
  * audio codec maintained by the <ulink url="http://www.xiph.org/">Xiph.org
- * Foundation</ulink>.
+ * Foundation</ulink>. As it outputs raw float audio you will often need to
+ * put an audioconvert element after it.
+ *
  *
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! alsasink
+ * gst-launch-1.0 -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! autoaudiosink
  * ]| Decode an Ogg/Vorbis. To create an Ogg/Vorbis file refer to the documentation of vorbisenc.
  * </refsect2>
  */
diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c
index 8dec477..7e9f504 100644
--- a/ext/vorbis/gstvorbisenc.c
+++ b/ext/vorbis/gstvorbisenc.c
@@ -29,12 +29,12 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=sine.ogg
+ * gst-launch-1.0 -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! vorbisenc ! oggmux ! filesink location=sine.ogg
  * ]| Encode a test sine signal to Ogg/Vorbis.  Note that the resulting file
  * will be really small because a sine signal compresses very well.
  * |[
- * gst-launch -v alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
- * ]| Record from a sound card using ALSA and encode to Ogg/Vorbis.
+ * gst-launch-1.0 -v autoaudiosrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=alsasrc.ogg
+ * ]| Record from a sound card and encode to Ogg/Vorbis.
  * </refsect2>
  */
 #ifdef HAVE_CONFIG_H
diff --git a/ext/vorbis/gstvorbisparse.c b/ext/vorbis/gstvorbisparse.c
index 6cf8510..f9f9198 100644
--- a/ext/vorbis/gstvorbisparse.c
+++ b/ext/vorbis/gstvorbisparse.c
@@ -36,11 +36,11 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisparse ! fakesink
+ * gst-launch-1.0 -v filesrc location=sine.ogg ! oggdemux ! vorbisparse ! fakesink
  * ]| This pipeline shows that the streamheader is set in the caps, and that each
  * buffer has the timestamp, duration, offset, and offset_end set.
  * |[
- * gst-launch filesrc location=sine.ogg ! oggdemux ! vorbisparse \
+ * gst-launch-1.0 filesrc location=sine.ogg ! oggdemux ! vorbisparse \
  *            ! oggmux ! filesink location=sine-remuxed.ogg
  * ]| This pipeline shows remuxing. sine-remuxed.ogg might not be exactly the same
  * as sine.ogg, but they should produce exactly the same decoded data.
diff --git a/ext/vorbis/gstvorbistag.c b/ext/vorbis/gstvorbistag.c
index fa7af7a..fded30c 100644
--- a/ext/vorbis/gstvorbistag.c
+++ b/ext/vorbis/gstvorbistag.c
@@ -37,8 +37,8 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=foo.ogg ! oggdemux ! vorbistag ! oggmux ! filesink location=bar.ogg
- * ]| This element is not useful with gst-launch, because it does not support
+ * gst-launch-1.0 -v filesrc location=foo.ogg ! oggdemux ! vorbistag ! oggmux ! filesink location=bar.ogg
+ * ]| This element is not useful with gst-launch-1.0, because it does not support
  * setting the tags on a #GstTagSetter interface. Conceptually, the element
  * will usually be used in this order though.
  * </refsect2>
diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
index 1ff3800..9361bf9 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
@@ -4,9 +4,10 @@
 
 libgstallocators_@GST_API_VERSION@_include_HEADERS = \
 	allocators.h \
+	gstfdmemory.h \
 	gstdmabuf.h
 
-noinst_HEADERS = gstfdmemory.h
+noinst_HEADERS =
 
 libgstallocators_@GST_API_VERSION@_la_SOURCES = \
 	gstfdmemory.c \
@@ -24,7 +25,7 @@
 gir_cincludes=$(patsubst %,--c-include='gst/allocators/%',$(libgstallocators_@GST_API_VERSION@_include_HEADERS))
 
 GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstAllocators \
 		--nsversion=@GST_API_VERSION@ \
@@ -62,17 +63,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstallocators -:SHARED libgstallocators-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstallocators_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstallocators_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstallocators_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstallocators_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/allocators \
-	 -:HEADERS $(libgstallocatorsinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/allocators/Makefile.in b/gst-libs/gst/allocators/Makefile.in
index 2bee7ed..1494869 100644
--- a/gst-libs/gst/allocators/Makefile.in
+++ b/gst-libs/gst/allocators/Makefile.in
@@ -219,24 +219,6 @@
 HEADERS = $(libgstallocators_@GST_API_VERSION@_include_HEADERS) \
 	$(noinst_HEADERS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -534,9 +516,10 @@
 libgstallocators_@GST_API_VERSION@_includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/allocators
 libgstallocators_@GST_API_VERSION@_include_HEADERS = \
 	allocators.h \
+	gstfdmemory.h \
 	gstdmabuf.h
 
-noinst_HEADERS = gstfdmemory.h
+noinst_HEADERS = 
 libgstallocators_@GST_API_VERSION@_la_SOURCES = \
 	gstfdmemory.c \
 	gstdmabuf.c 
@@ -744,58 +727,12 @@
 	@list='$(libgstallocators_@GST_API_VERSION@_include_HEADERS)'; test -n "$(libgstallocators_@GST_API_VERSION@_includedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(libgstallocators_@GST_API_VERSION@_includedir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
 
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
+ctags CTAGS:
 
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	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-am
+cscope cscopelist:
 
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	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"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -873,8 +810,7 @@
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic
 
 dvi: dvi-am
 
@@ -942,28 +878,28 @@
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
-	ctags-am 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-girDATA install-html install-html-am \
-	install-info install-info-am install-libLTLIBRARIES \
+.PHONY: all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags-am \
+	distclean distclean-compile 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-girDATA \
+	install-html install-html-am install-info install-info-am \
+	install-libLTLIBRARIES \
 	install-libgstallocators_@GST_API_VERSION@_includeHEADERS \
 	install-man install-pdf install-pdf-am install-ps \
 	install-ps-am install-strip install-typelibsDATA installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-girDATA \
+	tags-am uninstall uninstall-am uninstall-girDATA \
 	uninstall-libLTLIBRARIES \
 	uninstall-libgstallocators_@GST_API_VERSION@_includeHEADERS \
 	uninstall-typelibsDATA
 
 
 @HAVE_INTROSPECTION_TRUE@GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstAllocators \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -990,20 +926,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstallocators -:SHARED libgstallocators-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstallocators_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstallocators_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstallocators_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstallocators_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/allocators \
-	 -:HEADERS $(libgstallocatorsinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/allocators/gstdmabuf.c b/gst-libs/gst/allocators/gstdmabuf.c
index 84e0c78..785a076 100644
--- a/gst-libs/gst/allocators/gstdmabuf.c
+++ b/gst-libs/gst/allocators/gstdmabuf.c
@@ -43,16 +43,16 @@
 
 typedef struct
 {
-  GstAllocator parent;
+  GstFdAllocator parent;
 } GstDmaBufAllocator;
 
 typedef struct
 {
-  GstAllocatorClass parent_class;
+  GstFdAllocatorClass parent_class;
 } GstDmaBufAllocatorClass;
 
 GType dmabuf_mem_allocator_get_type (void);
-G_DEFINE_TYPE (GstDmaBufAllocator, dmabuf_mem_allocator, GST_TYPE_ALLOCATOR);
+G_DEFINE_TYPE (GstDmaBufAllocator, dmabuf_mem_allocator, GST_TYPE_FD_ALLOCATOR);
 
 #define GST_TYPE_DMABUF_ALLOCATOR   (dmabuf_mem_allocator_get_type())
 #define GST_IS_DMABUF_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DMABUF_ALLOCATOR))
@@ -60,11 +60,6 @@
 static void
 dmabuf_mem_allocator_class_init (GstDmaBufAllocatorClass * klass)
 {
-  GstAllocatorClass *allocator_class;
-
-  allocator_class = (GstAllocatorClass *) klass;
-
-  __gst_fd_memory_class_init_allocator (allocator_class);
 }
 
 static void
@@ -72,9 +67,7 @@
 {
   GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
 
-  __gst_fd_memory_init_allocator (alloc, GST_ALLOCATOR_DMABUF);
-
-  GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
+  alloc->mem_type = GST_ALLOCATOR_DMABUF;
 }
 
 /**
@@ -113,17 +106,9 @@
 GstMemory *
 gst_dmabuf_allocator_alloc (GstAllocator * allocator, gint fd, gsize size)
 {
-#ifdef HAVE_MMAP
-  if (!GST_IS_DMABUF_ALLOCATOR (allocator)) {
-    GST_WARNING ("it isn't the correct allocator for dmabuf");
-    return NULL;
-  }
+  g_return_val_if_fail (GST_IS_DMABUF_ALLOCATOR (allocator), NULL);
 
-  GST_DEBUG ("alloc from allocator %p", allocator);
-  return __gst_fd_memory_new (allocator, fd, size, GST_FD_MEMORY_FLAG_NONE);
-#else /* !HAVE_MMAP */
-  return NULL;
-#endif
+  return gst_fd_allocator_alloc (allocator, fd, size, GST_FD_MEMORY_FLAG_NONE);
 }
 
 /**
@@ -141,11 +126,9 @@
 gint
 gst_dmabuf_memory_get_fd (GstMemory * mem)
 {
-  GstFdMemory *fdmem = (GstFdMemory *) mem;
-
   g_return_val_if_fail (gst_is_dmabuf_memory (mem), -1);
 
-  return fdmem->fd;
+  return gst_fd_memory_get_fd (mem);
 }
 
 /**
diff --git a/gst-libs/gst/allocators/gstfdmemory.c b/gst-libs/gst/allocators/gstfdmemory.c
index 9a5c5b3..95f544f 100644
--- a/gst-libs/gst/allocators/gstfdmemory.c
+++ b/gst-libs/gst/allocators/gstfdmemory.c
@@ -29,6 +29,18 @@
 #include <unistd.h>
 #endif
 
+typedef struct
+{
+  GstMemory mem;
+
+  GstFdMemoryFlags flags;
+  gint fd;
+  gpointer data;
+  gint mmapping_flags;
+  gint mmap_count;
+  GMutex lock;
+} GstFdMemory;
+
 static void
 gst_fd_mem_free (GstAllocator * allocator, GstMemory * gmem)
 {
@@ -165,30 +177,78 @@
 #endif
 }
 
+G_DEFINE_TYPE (GstFdAllocator, gst_fd_allocator, GST_TYPE_ALLOCATOR);
+
+static void
+gst_fd_allocator_class_init (GstFdAllocatorClass * klass)
+{
+  GstAllocatorClass *allocator_class;
+
+  allocator_class = (GstAllocatorClass *) klass;
+
+  allocator_class->alloc = NULL;
+  allocator_class->free = gst_fd_mem_free;
+
+}
+
+static void
+gst_fd_allocator_init (GstFdAllocator * allocator)
+{
+  GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
+
+  alloc->mem_type = GST_ALLOCATOR_FD;
+
+  alloc->mem_map = gst_fd_mem_map;
+  alloc->mem_unmap = gst_fd_mem_unmap;
+  alloc->mem_share = gst_fd_mem_share;
+
+  GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
+}
+
 /**
- * gst_fd_memory_new:
- * @allocator: allocator to be used for this memory
+ * gst_fd_allocator_new:
+ *
+ * Return a new fd allocator.
+ *
+ * Returns: (transfer full): a new fd allocator, or NULL if the allocator
+ *    isn't available. Use gst_object_unref() to release the allocator after
+ *    usage
+ *
+ * Since: 1.6
+ */
+GstAllocator *
+gst_fd_allocator_new (void)
+{
+  return g_object_new (GST_TYPE_FD_ALLOCATOR, NULL);
+}
+
+/**
+ * gst_fd_allocator_alloc:
+ * @allocator: (allow-none): allocator to be used for this memory
  * @fd: file descriptor
  * @size: memory size
  * @flags: extra #GstFdMemoryFlags
  *
- * Return a %GstMemory that wraps a file descriptor.
+ * Return a %GstMemory that wraps a generic file descriptor.
  *
  * Returns: (transfer full): a GstMemory based on @allocator.
- * When the buffer is released, @fd is closed.
+ * When the buffer will be released the allocator will close the @fd.
  * The memory is only mmapped on gst_buffer_mmap() request.
  *
- * Since: 1.2
+ * Since: 1.6
  */
 GstMemory *
-__gst_fd_memory_new (GstAllocator * allocator, gint fd, gsize size,
+gst_fd_allocator_alloc (GstAllocator * allocator, gint fd, gsize size,
     GstFdMemoryFlags flags)
 {
 #ifdef HAVE_MMAP
   GstFdMemory *mem;
 
+  g_return_val_if_fail (GST_IS_FD_ALLOCATOR (allocator), NULL);
+
   mem = g_slice_new0 (GstFdMemory);
-  gst_memory_init (GST_MEMORY_CAST (mem), 0, allocator, NULL, size, 0, 0, size);
+  gst_memory_init (GST_MEMORY_CAST (mem), 0, GST_ALLOCATOR_CAST (allocator),
+      NULL, size, 0, 0, size);
 
   mem->flags = flags;
   mem->fd = fd;
@@ -204,32 +264,40 @@
 }
 
 /**
- * gst_fd_memory_class_init_allocator:
- * @allocator: a #GstAllocatorClass
+ * gst_is_fd_memory:
+ * @mem: #GstMemory
  *
- * Sets up the methods to alloc and free fd backed memory created
- * with @gst_fd_memory_new by @allocator.
+ * Check if @mem is memory backed by an fd
+ *
+ * Returns: %TRUE when @mem has an fd that can be retrieved with
+ * gst_fd_memory_get_fd().
+ *
+ * Since: 1.6
  */
-void
-__gst_fd_memory_class_init_allocator (GstAllocatorClass * allocator)
+gboolean
+gst_is_fd_memory (GstMemory * mem)
 {
-  allocator->alloc = NULL;
-  allocator->free = gst_fd_mem_free;
+  g_return_val_if_fail (mem != NULL, FALSE);
+
+  return GST_IS_FD_ALLOCATOR (mem->allocator);
 }
 
 /**
- * gst_fd_memory_init_allocator:
- * @allocator: a #GstAllocator
- * @type: the memory type
+ * gst_fd_memory_get_fd:
+ * @mem: #GstMemory
  *
- * Sets up the methods to map and unmap and share fd backed memory
- * created with @allocator.
+ * Get the fd from @mem. Call gst_is_fd_memory() to check if @mem has
+ * an fd.
+ *
+ * Returns: the fd of @mem or -1 when there is no fd on @mem
+ *
+ * Since: 1.6
  */
-void
-__gst_fd_memory_init_allocator (GstAllocator * allocator, const gchar * type)
+gint
+gst_fd_memory_get_fd (GstMemory * mem)
 {
-  allocator->mem_type = type;
-  allocator->mem_map = gst_fd_mem_map;
-  allocator->mem_unmap = gst_fd_mem_unmap;
-  allocator->mem_share = gst_fd_mem_share;
+  g_return_val_if_fail (mem != NULL, -1);
+  g_return_val_if_fail (GST_IS_FD_ALLOCATOR (mem->allocator), -1);
+
+  return ((GstFdMemory *) mem)->fd;
 }
diff --git a/gst-libs/gst/allocators/gstfdmemory.h b/gst-libs/gst/allocators/gstfdmemory.h
index 9f28332..178698b 100644
--- a/gst-libs/gst/allocators/gstfdmemory.h
+++ b/gst-libs/gst/allocators/gstfdmemory.h
@@ -18,13 +18,26 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __GST_FD_MEMORY_H__
-#define __GST_FD_MEMORY_H__
+#ifndef __GST_FD_ALLOCATOR_H__
+#define __GST_FD_ALLOCATOR_H__
 
 #include <gst/gst.h>
 
 G_BEGIN_DECLS
 
+typedef struct _GstFdAllocator GstFdAllocator;
+typedef struct _GstFdAllocatorClass GstFdAllocatorClass;
+
+#define GST_ALLOCATOR_FD "fd"
+
+#define GST_TYPE_FD_ALLOCATOR              (gst_fd_allocator_get_type())
+#define GST_IS_FD_ALLOCATOR(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FD_ALLOCATOR))
+#define GST_IS_FD_ALLOCATOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FD_ALLOCATOR))
+#define GST_FD_ALLOCATOR_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_FD_ALLOCATOR, GstFdAllocatorClass))
+#define GST_FD_ALLOCATOR(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_FD_ALLOCATOR, GstFdAllocator))
+#define GST_FD_ALLOCATOR_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_FD_ALLOCATOR, GstFdAllocatorClass))
+#define GST_FD_ALLOCATOR_CAST(obj)         ((GstFdAllocator *)(obj))
+
 /**
  * @GST_FD_MEMORY_FLAG_NONE: no flag
  * @GST_FD_MEMORY_FLAG_KEEP_MAPPED: once the memory is mapped,
@@ -33,6 +46,8 @@
  *        the default shared mapping.
  *
  * Various flags to control the operation of the fd backed memory.
+ *
+ * Since: 1.6
  */
 typedef enum {
   GST_FD_MEMORY_FLAG_NONE = 0,
@@ -40,33 +55,32 @@
   GST_FD_MEMORY_FLAG_MAP_PRIVATE = (1 << 1),
 } GstFdMemoryFlags;
 
-/*
- * GstFdMemory
- * @flags: #GstFdMemoryFlags
- * @fd: the file descriptor associated this memory
- * @data: mmapped address
- * @mmapping_flags: mmapping flags
- * @mmap_count: mmapping counter
- * @lock: a mutex to make mmapping thread safe
+/**
+ * GstFdAllocator:
+ *
+ * Base class for allocators with fd-backed memory
+ *
+ * Since: 1.6
  */
-typedef struct
+struct _GstFdAllocator
 {
-  GstMemory mem;
+  GstAllocator parent;
+};
 
-  GstFdMemoryFlags flags;
-  gint fd;
-  gpointer data;
-  gint mmapping_flags;
-  gint mmap_count;
-  GMutex lock;
-} GstFdMemory;
+struct _GstFdAllocatorClass
+{
+  GstAllocatorClass parent_class;
+};
 
-void        __gst_fd_memory_class_init_allocator  (GstAllocatorClass * allocator);
-void        __gst_fd_memory_init_allocator        (GstAllocator * allocator, const gchar *type);
+GType gst_fd_allocator_get_type (void);
 
-GstMemory * __gst_fd_memory_new                   (GstAllocator * allocator, gint fd, gsize size,
-                                                   GstFdMemoryFlags flags);
+GstAllocator *  gst_fd_allocator_new    (void);
+GstMemory *     gst_fd_allocator_alloc  (GstAllocator * allocator, gint fd,
+                                         gsize size, GstFdMemoryFlags flags);
 
+gboolean        gst_is_fd_memory        (GstMemory *mem);
+gint            gst_fd_memory_get_fd    (GstMemory *mem);
 
 G_END_DECLS
-#endif /* __GST_FD_MEMORY_H__ */
+
+#endif /* __GST_FD_ALLOCATOR_H__ */
diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
index e89057a..9e40db3 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
@@ -38,7 +38,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(nodist_libgstapp_@GST_API_VERSION@_la_SOURCES))
 
 GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstApp \
 		--nsversion=@GST_API_VERSION@ \
@@ -81,18 +81,3 @@
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstapp -:SHARED libgstapp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapp_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstapp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstapp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/app \
-	 -:HEADERS $(libgstapp_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/app/Makefile.in b/gst-libs/gst/app/Makefile.in
index 31a7f91..8f66ae3 100644
--- a/gst-libs/gst/app/Makefile.in
+++ b/gst-libs/gst/app/Makefile.in
@@ -969,7 +969,7 @@
 	@touch $@
 
 @HAVE_INTROSPECTION_TRUE@GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstApp \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1001,21 +1001,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`$(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstapp -:SHARED libgstapp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapp_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstapp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstapp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/app \
-	 -:HEADERS $(libgstapp_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c
index f3a56b3..1124438 100644
--- a/gst-libs/gst/app/gstappsrc.c
+++ b/gst-libs/gst/app/gstappsrc.c
@@ -24,20 +24,20 @@
  * @see_also: #GstBaseSrc, appsink
  *
  * The appsrc element can be used by applications to insert data into a
- * GStreamer pipeline. Unlike most GStreamer elements, Appsrc provides
+ * GStreamer pipeline. Unlike most GStreamer elements, appsrc provides
  * external API functions.
  *
  * appsrc can be used by linking with the libgstapp library to access the
  * methods directly or by using the appsrc action signals.
  *
- * Before operating appsrc, the caps property must be set to a fixed caps
+ * Before operating appsrc, the caps property must be set to fixed caps
  * describing the format of the data that will be pushed with appsrc. An
  * exception to this is when pushing buffers with unknown caps, in which case no
  * caps should be set. This is typically true of file-like sources that push raw
- * byte buffers. If you don't want to explicitly set the caps you can use
- * gst_app_src_push_sample, this method get the caps associated with the
- * sample and set them on appsrc replacing any previous setted caps if
- * different from that of the sample.
+ * byte buffers. If you don't want to explicitly set the caps, you can use
+ * gst_app_src_push_sample. This method gets the caps associated with the
+ * sample and sets them on the appsrc replacing any previously set caps (if
+ * different from sample's caps).
  *
  * The main way of handing data to the appsrc element is by calling the
  * gst_app_src_push_buffer() method or by emitting the push-buffer action signal.
@@ -65,16 +65,16 @@
  * These signals allow the application to operate the appsrc in two different
  * ways:
  *
- * The push model, in which the application repeatedly calls the push-buffer/push-sample 
+ * The push mode, in which the application repeatedly calls the push-buffer/push-sample
  * method with a new buffer/sample. Optionally, the queue size in the appsrc 
  * can be controlled with the enough-data and need-data signals by respectively 
  * stopping/starting the push-buffer/push-sample calls. This is a typical 
  * mode of operation for the stream-type "stream" and "seekable". Use this 
- * model when implementing various network protocols or hardware devices.
+ * mode when implementing various network protocols or hardware devices.
  *
- * The pull model where the need-data signal triggers the next push-buffer call.
+ * The pull mode, in which the need-data signal triggers the next push-buffer call.
  * This mode is typically used in the "random-access" stream-type. Use this
- * model for file access or other randomly accessable sources. In this mode, a
+ * mode for file access or other randomly accessable sources. In this mode, a
  * buffer of exactly the amount of bytes given by the need-data signal should be
  * pushed into appsrc.
  *
@@ -83,10 +83,10 @@
  * For the stream and seekable modes, setting this property is optional but
  * recommended.
  *
- * When the application is finished pushing data into appsrc, it should call
+ * When the application has finished pushing data into appsrc, it should call
  * gst_app_src_end_of_stream() or emit the end-of-stream action signal. After
  * this call, no more buffers can be pushed into appsrc until a flushing seek
- * happened or the state of the appsrc has gone through READY.
+ * occurs or the state of the appsrc has gone through READY.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -1666,10 +1666,22 @@
 {
   GstBuffer *buffer;
   GstCaps *caps;
+
   g_return_val_if_fail (GST_IS_SAMPLE (sample), GST_FLOW_ERROR);
+
   caps = gst_sample_get_caps (sample);
-  gst_app_src_set_caps (appsrc, caps);
+  if (caps != NULL) {
+    gst_app_src_set_caps (appsrc, caps);
+  } else {
+    GST_WARNING_OBJECT (appsrc, "received sample without caps");
+  }
+
   buffer = gst_sample_get_buffer (sample);
+  if (buffer == NULL) {
+    GST_WARNING_OBJECT (appsrc, "received sample without buffer");
+    return GST_FLOW_OK;
+  }
+
   return gst_app_src_push_buffer_full (appsrc, buffer, FALSE);
 }
 
diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
index 4956fa7..cd39fd4 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
@@ -87,7 +87,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
 
 GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstAudio \
 		--nsversion=@GST_API_VERSION@ \
@@ -136,19 +136,3 @@
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstaudio -:SHARED libgstaudio-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudio_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstaudio_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudio_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudio_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstaudio_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstaudio_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstaudio_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/audio/Makefile.in b/gst-libs/gst/audio/Makefile.in
index d514077..c307c3f 100644
--- a/gst-libs/gst/audio/Makefile.in
+++ b/gst-libs/gst/audio/Makefile.in
@@ -1344,7 +1344,7 @@
 	@touch $@
 
 @HAVE_INTROSPECTION_TRUE@GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstAudio \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1382,22 +1382,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstaudio -:SHARED libgstaudio-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudio_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstaudio_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudio_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudio_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstaudio_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstaudio_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstaudio_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c
index 233efcb..32013fe 100644
--- a/gst-libs/gst/audio/gstaudiobasesink.c
+++ b/gst-libs/gst/audio/gstaudiobasesink.c
@@ -2225,8 +2225,13 @@
       sink->ringbuffer = rb;
       GST_OBJECT_UNLOCK (sink);
 
-      if (!gst_audio_ring_buffer_open_device (sink->ringbuffer))
+      if (!gst_audio_ring_buffer_open_device (sink->ringbuffer)) {
+        GST_OBJECT_LOCK (sink);
+        gst_object_unparent (GST_OBJECT_CAST (sink->ringbuffer));
+        sink->ringbuffer = NULL;
+        GST_OBJECT_UNLOCK (sink);
         goto open_failed;
+      }
       break;
     }
     case GST_STATE_CHANGE_READY_TO_PAUSED:
diff --git a/gst-libs/gst/audio/gstaudiobasesrc.c b/gst-libs/gst/audio/gstaudiobasesrc.c
index 51bb1e7..b529b76 100644
--- a/gst-libs/gst/audio/gstaudiobasesrc.c
+++ b/gst-libs/gst/audio/gstaudiobasesrc.c
@@ -1140,8 +1140,13 @@
       src->ringbuffer = rb;
       GST_OBJECT_UNLOCK (src);
 
-      if (!gst_audio_ring_buffer_open_device (src->ringbuffer))
+      if (!gst_audio_ring_buffer_open_device (src->ringbuffer)) {
+        GST_OBJECT_LOCK (src);
+        gst_object_unparent (GST_OBJECT_CAST (src->ringbuffer));
+        src->ringbuffer = NULL;
+        GST_OBJECT_UNLOCK (src);
         goto open_failed;
+      }
       break;
     }
     case GST_STATE_CHANGE_READY_TO_PAUSED:
diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
index a4a184b..485708e 100644
--- a/gst-libs/gst/audio/gstaudiodecoder.c
+++ b/gst-libs/gst/audio/gstaudiodecoder.c
@@ -383,6 +383,10 @@
 static gboolean gst_audio_decoder_negotiate_unlocked (GstAudioDecoder * dec);
 static gboolean gst_audio_decoder_handle_gap (GstAudioDecoder * dec,
     GstEvent * event);
+static gboolean gst_audio_decoder_sink_query_default (GstAudioDecoder * dec,
+    GstQuery * query);
+static gboolean gst_audio_decoder_src_query_default (GstAudioDecoder * dec,
+    GstQuery * query);
 
 static GstElementClass *parent_class = NULL;
 
@@ -470,6 +474,10 @@
       GST_DEBUG_FUNCPTR (gst_audio_decoder_decide_allocation_default);
   audiodecoder_class->negotiate =
       GST_DEBUG_FUNCPTR (gst_audio_decoder_negotiate_default);
+  audiodecoder_class->sink_query =
+      GST_DEBUG_FUNCPTR (gst_audio_decoder_sink_query_default);
+  audiodecoder_class->src_query =
+      GST_DEBUG_FUNCPTR (gst_audio_decoder_src_query_default);
 }
 
 static void
@@ -622,7 +630,7 @@
 
       dec->output_segment = seg;
       dec->priv->in_out_segment_sync =
-          (memcmp (&dec->input_segment, &seg, sizeof (seg)) == 0);
+          gst_segment_is_equal (&dec->input_segment, &seg);
       GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
       break;
     }
@@ -1113,7 +1121,7 @@
 
         dec->output_segment = seg;
         dec->priv->in_out_segment_sync =
-            (memcmp (&dec->input_segment, &seg, sizeof (seg)) == 0);
+            gst_segment_is_equal (&dec->input_segment, &seg);
         GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
         break;
       }
@@ -1890,12 +1898,6 @@
   gint caps_size;
   GstStructure *structure;
 
-  caps = gst_pad_get_current_caps (dec->srcpad);
-  if (caps && !gst_audio_info_from_caps (&dec->priv->ctx.info, caps))
-    goto caps_error;
-  if (caps)
-    gst_caps_unref (caps);
-
   caps = gst_pad_get_allowed_caps (dec->srcpad);
   if (!caps || gst_caps_is_empty (caps) || gst_caps_is_any (caps))
     goto caps_error;
@@ -1964,12 +1966,6 @@
       "Chose default caps %" GST_PTR_FORMAT " for initial gap", caps);
   gst_caps_unref (caps);
 
-  if (!gst_audio_decoder_negotiate_unlocked (dec)) {
-    GST_INFO_OBJECT (dec, "Failed to negotiate default caps for initial gap");
-    gst_pad_mark_reconfigure (dec->srcpad);
-    return FALSE;
-  }
-
   return TRUE;
 
 caps_error:
@@ -1985,16 +1981,26 @@
 {
   gboolean ret;
   GstClockTime timestamp, duration;
+  gboolean needs_reconfigure = FALSE;
 
   /* Ensure we have caps first */
   GST_AUDIO_DECODER_STREAM_LOCK (dec);
   if (!GST_AUDIO_INFO_IS_VALID (&dec->priv->ctx.info)) {
     if (!gst_audio_decoder_negotiate_default_caps (dec)) {
+      GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
       GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL),
           ("Decoder output not negotiated before GAP event."));
-      GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
       return FALSE;
     }
+    needs_reconfigure = TRUE;
+  }
+  needs_reconfigure = gst_pad_check_reconfigure (dec->srcpad)
+      || needs_reconfigure;
+  if (G_UNLIKELY (dec->priv->ctx.output_format_changed || needs_reconfigure)) {
+    if (!gst_audio_decoder_negotiate_unlocked (dec)) {
+      GST_WARNING_OBJECT (dec, "Failed to negotiate with downstream");
+      gst_pad_mark_reconfigure (dec->srcpad);
+    }
   }
   GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
 
@@ -2156,6 +2162,18 @@
       ret = gst_audio_decoder_push_event (dec, event);
       break;
 
+    case GST_EVENT_SEGMENT_DONE:
+      GST_AUDIO_DECODER_STREAM_LOCK (dec);
+      gst_audio_decoder_drain (dec);
+      GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+
+      /* Forward SEGMENT_DONE because no buffer or serialized event might come after
+       * SEGMENT_DONE and nothing could trigger another _finish_frame() call. */
+      if (dec->priv->pending_events)
+        send_pending_events (dec);
+      ret = gst_audio_decoder_push_event (dec, event);
+      break;
+
     case GST_EVENT_EOS:
       GST_AUDIO_DECODER_STREAM_LOCK (dec);
       gst_audio_decoder_drain (dec);
@@ -2535,15 +2553,11 @@
   return caps;
 }
 
-
 static gboolean
-gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
-    GstQuery * query)
+gst_audio_decoder_sink_query_default (GstAudioDecoder * dec, GstQuery * query)
 {
+  GstPad *pad = GST_AUDIO_DECODER_SINK_PAD (dec);
   gboolean res = FALSE;
-  GstAudioDecoder *dec;
-
-  dec = GST_AUDIO_DECODER (parent);
 
   GST_LOG_OBJECT (dec, "handling query: %" GST_PTR_FORMAT, query);
 
@@ -2624,7 +2638,7 @@
       /* fall-through */
     }
     default:
-      res = gst_pad_query_default (pad, parent, query);
+      res = gst_pad_query_default (pad, GST_OBJECT_CAST (dec), query);
       break;
   }
 
@@ -2632,18 +2646,35 @@
   return res;
 }
 
+static gboolean
+gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
+    GstQuery * query)
+{
+  GstAudioDecoderClass *dec_class;
+  GstAudioDecoder *dec;
+  gboolean ret = FALSE;
+
+  dec = GST_AUDIO_DECODER (parent);
+  dec_class = GST_AUDIO_DECODER_GET_CLASS (dec);
+
+  GST_DEBUG_OBJECT (pad, "received query %" GST_PTR_FORMAT, query);
+
+  if (dec_class->sink_query)
+    ret = dec_class->sink_query (dec, query);
+
+  return ret;
+}
+
 /* FIXME ? are any of these queries (other than latency) a decoder's business ??
  * also, the conversion stuff might seem to make sense, but seems to not mind
  * segment stuff etc at all
  * Supposedly that's backward compatibility ... */
 static gboolean
-gst_audio_decoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_audio_decoder_src_query_default (GstAudioDecoder * dec, GstQuery * query)
 {
-  GstAudioDecoder *dec;
+  GstPad *pad = GST_AUDIO_DECODER_SRC_PAD (dec);
   gboolean res = FALSE;
 
-  dec = GST_AUDIO_DECODER (parent);
-
   GST_LOG_OBJECT (dec, "handling query: %" GST_PTR_FORMAT, query);
 
   switch (GST_QUERY_TYPE (query)) {
@@ -2652,7 +2683,7 @@
       GstFormat format;
 
       /* upstream in any case */
-      if ((res = gst_pad_query_default (pad, parent, query)))
+      if ((res = gst_pad_query_default (pad, GST_OBJECT_CAST (dec), query)))
         break;
 
       gst_query_parse_duration (query, &format, NULL);
@@ -2749,7 +2780,7 @@
       break;
     }
     default:
-      res = gst_pad_query_default (pad, parent, query);
+      res = gst_pad_query_default (pad, GST_OBJECT_CAST (dec), query);
       break;
   }
 
@@ -2757,6 +2788,24 @@
 }
 
 static gboolean
+gst_audio_decoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  GstAudioDecoder *dec;
+  GstAudioDecoderClass *dec_class;
+  gboolean ret = FALSE;
+
+  dec = GST_AUDIO_DECODER (parent);
+  dec_class = GST_AUDIO_DECODER_GET_CLASS (dec);
+
+  GST_DEBUG_OBJECT (pad, "received query %" GST_PTR_FORMAT, query);
+
+  if (dec_class->src_query)
+    ret = dec_class->src_query (dec, query);
+
+  return ret;
+}
+
+static gboolean
 gst_audio_decoder_stop (GstAudioDecoder * dec)
 {
   GstAudioDecoderClass *klass;
diff --git a/gst-libs/gst/audio/gstaudiodecoder.h b/gst-libs/gst/audio/gstaudiodecoder.h
index 56cfa46..10317fc 100644
--- a/gst-libs/gst/audio/gstaudiodecoder.h
+++ b/gst-libs/gst/audio/gstaudiodecoder.h
@@ -231,6 +231,16 @@
  *                      Propose buffer allocation parameters for upstream elements.
  *                      Subclasses should chain up to the parent implementation to
  *                      invoke the default handler.
+ * @sink_query:     Optional.
+ *                  Query handler on the sink pad. This function should
+ *                  return TRUE if the query could be performed. Subclasses
+ *                  should chain up to the parent implementation to invoke the
+ *                  default handler. Since 1.6
+ * @src_query:      Optional.
+ *                  Query handler on the source pad. This function should
+ *                  return TRUE if the query could be performed. Subclasses
+ *                  should chain up to the parent implementation to invoke the
+ *                  default handler. Since 1.6
  * @getcaps:        Optional.
  *                  Allows for a custom sink getcaps implementation.
  *                  If not implemented,
@@ -283,11 +293,15 @@
   gboolean      (*propose_allocation) (GstAudioDecoder *dec,
                                        GstQuery * query);
 
+  gboolean      (*sink_query)         (GstAudioDecoder *dec, GstQuery *query);
+
+  gboolean      (*src_query)          (GstAudioDecoder *dec, GstQuery *query);
+
   GstCaps *     (*getcaps)            (GstAudioDecoder * dec,
                                        GstCaps * filter);
 
   /*< private >*/
-  gpointer       _gst_reserved[GST_PADDING_LARGE - 1];
+  gpointer       _gst_reserved[GST_PADDING_LARGE - 3];
 };
 
 GType             gst_audio_decoder_get_type (void);
diff --git a/gst-libs/gst/audio/gstaudioringbuffer.h b/gst-libs/gst/audio/gstaudioringbuffer.h
index 24fe350..b3c87c4 100644
--- a/gst-libs/gst/audio/gstaudioringbuffer.h
+++ b/gst-libs/gst/audio/gstaudioringbuffer.h
@@ -220,7 +220,7 @@
  * @pause: pause processing of samples
  * @resume: resume processing of samples after pause
  * @stop: stop processing of samples
- * @delay: get number of samples queued in device
+ * @delay: get number of frames queued in device
  * @activate: activate the thread that starts pulling and monitoring the
  * consumed segments in the device.
  * @commit: write samples into the ringbuffer
diff --git a/gst-libs/gst/audio/gstaudiosink.h b/gst-libs/gst/audio/gstaudiosink.h
index 9237fef..02d5a7e 100644
--- a/gst-libs/gst/audio/gstaudiosink.h
+++ b/gst-libs/gst/audio/gstaudiosink.h
@@ -66,7 +66,7 @@
  * @unprepare: Undo operations done in prepare.
  * @close: Close the device.
  * @write: Write data to the device.
- * @delay: Return how many samples are still in the device. This is used to
+ * @delay: Return how many frames are still in the device. This is used to
  *         drive the synchronisation.
  * @reset: Returns as quickly as possible from a write and flush any pending
  *         samples from the device.
@@ -88,7 +88,7 @@
   gboolean (*close)     (GstAudioSink *sink);
   /* write samples to the device */
   gint     (*write)     (GstAudioSink *sink, gpointer data, guint length);
-  /* get number of samples queued in the device */
+  /* get number of frames queued in the device */
   guint    (*delay)     (GstAudioSink *sink);
   /* reset the audio device, unblock from a write */
   void     (*reset)     (GstAudioSink *sink);
diff --git a/gst-libs/gst/audio/gstaudiosrc.h b/gst-libs/gst/audio/gstaudiosrc.h
index 040caa2..89d8af1 100644
--- a/gst-libs/gst/audio/gstaudiosrc.h
+++ b/gst-libs/gst/audio/gstaudiosrc.h
@@ -65,7 +65,7 @@
  * @unprepare: undo the configuration
  * @close: close the device
  * @read: read samples from the audio device
- * @delay: the number of samples queued in the device
+ * @delay: the number of frames queued in the device
  * @reset: unblock a read to the device and reset.
  *
  * #GstAudioSrc class. Override the vmethod to implement
@@ -87,7 +87,7 @@
   /* read samples from the device */
   guint    (*read)      (GstAudioSrc *src, gpointer data, guint length,
       GstClockTime *timestamp);
-  /* get number of samples queued in the device */
+  /* get number of frames queued in the device */
   guint    (*delay)     (GstAudioSrc *src);
   /* reset the audio device, unblock from a write */
   void     (*reset)     (GstAudioSrc *src);
diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
index 99c71ba..09b3d68 100644
--- a/gst-libs/gst/fft/Makefile.am
+++ b/gst-libs/gst/fft/Makefile.am
@@ -52,7 +52,7 @@
 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstfft_@GST_API_VERSION@_la_SOURCES))
 
 GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstFft \
 		--nsversion=@GST_API_VERSION@ \
@@ -90,17 +90,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstfft -:SHARED libgstfft-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfft_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstfft_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfft_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstfft_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/fft \
-	 -:HEADERS $(libgstfftinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/fft/Makefile.in b/gst-libs/gst/fft/Makefile.in
index a2165c2..4f2922a 100644
--- a/gst-libs/gst/fft/Makefile.in
+++ b/gst-libs/gst/fft/Makefile.in
@@ -1089,7 +1089,7 @@
 
 
 @HAVE_INTROSPECTION_TRUE@GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstFft \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1116,20 +1116,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstfft -:SHARED libgstfft-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstfft_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(libgstfft_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstfft_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstfft_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/fft \
-	 -:HEADERS $(libgstfftinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
index c0f0091..34553c1 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
@@ -70,7 +70,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(nodist_libgstpbutils_@GST_API_VERSION@_la_SOURCES))
 
 GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstPbutils \
 		--nsversion=@GST_API_VERSION@ \
@@ -128,19 +128,3 @@
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstpbutils -:SHARED libgstpbutils-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpbutils_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstpbutils_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpbutils_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpbutils_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstpbutils_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/pbutils \
-	 -:HEADERS $(libgstpbutils_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstpbutils_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/pbutils/Makefile.in b/gst-libs/gst/pbutils/Makefile.in
index 55e2034..06010f7 100644
--- a/gst-libs/gst/pbutils/Makefile.in
+++ b/gst-libs/gst/pbutils/Makefile.in
@@ -1181,7 +1181,7 @@
 	@touch $@
 
 @HAVE_INTROSPECTION_TRUE@GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstPbutils \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1228,22 +1228,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir="$(top_builddir)/gst-libs/gst/audio/" \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstpbutils -:SHARED libgstpbutils-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstpbutils_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstpbutils_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstpbutils_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstpbutils_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstpbutils_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/pbutils \
-	 -:HEADERS $(libgstpbutils_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstpbutils_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c
index 5964975..7aadecb 100644
--- a/gst-libs/gst/pbutils/codec-utils.c
+++ b/gst-libs/gst/pbutils/codec-utils.c
@@ -682,7 +682,6 @@
 gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level, guint len)
 {
   const gchar *profile = NULL;
-  gint gpcf1 = 0, gpcf2 = 0, gpcf3 = 0;
   gint profile_idc;
 
   g_return_val_if_fail (profile_tier_level != NULL, NULL);
@@ -694,15 +693,11 @@
 
   profile_idc = (profile_tier_level[0] & 0x1f);
 
-  gpcf1 = (profile_tier_level[1] & 0x40) >> 6;
-  gpcf2 = (profile_tier_level[1] & 0x20) >> 5;
-  gpcf3 = (profile_tier_level[1] & 0x10) >> 4;
-
-  if (profile_idc == 1 || gpcf1)
+  if (profile_idc == 1)
     profile = "main";
-  else if (profile_idc == 2 || gpcf2)
+  else if (profile_idc == 2)
     profile = "main-10";
-  else if (profile_idc == 3 || gpcf3)
+  else if (profile_idc == 3)
     profile = "main-still-picture";
   else
     profile = NULL;
diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c
index 244b374..dd1944f 100644
--- a/gst-libs/gst/pbutils/gstdiscoverer.c
+++ b/gst-libs/gst/pbutils/gstdiscoverer.c
@@ -1423,7 +1423,9 @@
 
       gst_message_parse_toc (msg, &tmp, NULL);
       GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg), "Got toc %" GST_PTR_FORMAT, tmp);
-      dc->priv->current_info->toc = tmp;
+      if (dc->priv->current_info->toc)
+        gst_toc_unref (dc->priv->current_info->toc);
+      dc->priv->current_info->toc = tmp;        /* transfer ownership */
       GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg), "Current info %p, toc %"
           GST_PTR_FORMAT, dc->priv->current_info, tmp);
     }
diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
index 974efd4..0c428c5 100644
--- a/gst-libs/gst/riff/Makefile.am
+++ b/gst-libs/gst/riff/Makefile.am
@@ -27,7 +27,7 @@
 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstriff_@GST_API_VERSION@_la_SOURCES))
 
 GstRiff-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstriff-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstRiff \
 		--nsversion=@GST_API_VERSION@ \
@@ -74,17 +74,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstriff -:SHARED libgstriff-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstriff_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstriff_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstriff_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstriff_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstriff_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/riff/Makefile.in b/gst-libs/gst/riff/Makefile.in
index e19548d..4278943 100644
--- a/gst-libs/gst/riff/Makefile.in
+++ b/gst-libs/gst/riff/Makefile.in
@@ -910,7 +910,7 @@
 
 
 @HAVE_INTROSPECTION_TRUE@GstRiff-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstriff-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstRiff \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -946,20 +946,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgstriff -:SHARED libgstriff-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstriff_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstriff_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstriff_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstriff_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstriff_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/riff/riff-ids.h b/gst-libs/gst/riff/riff-ids.h
index f92918a..ae64972 100644
--- a/gst-libs/gst/riff/riff-ids.h
+++ b/gst-libs/gst/riff/riff-ids.h
@@ -63,6 +63,7 @@
 #define GST_RIFF_TAG_note GST_MAKE_FOURCC ('n','o','t','e')
 #define GST_RIFF_TAG_smpl GST_MAKE_FOURCC ('s','m','p','l')
 #define GST_RIFF_TAG_inst GST_MAKE_FOURCC ('i','n','s','t')
+#define GST_RIFF_TAG_FLLR GST_MAKE_FOURCC ('F','L','L','R')
 
 /* LIST types */
 #define GST_RIFF_LIST_movi GST_MAKE_FOURCC ('m','o','v','i')
diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
index 15126ff..bec9524 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
@@ -31,7 +31,7 @@
 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstrtp_@GST_API_VERSION@_la_SOURCES))
 
 GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstRtp \
 		--nsversion=@GST_API_VERSION@ \
@@ -73,17 +73,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstrtp -:SHARED libgstrtp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstrtp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/rtp \
-	 -:HEADERS $(libgstrtp_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/rtp/Makefile.in b/gst-libs/gst/rtp/Makefile.in
index 5e75635..fbffbd5 100644
--- a/gst-libs/gst/rtp/Makefile.in
+++ b/gst-libs/gst/rtp/Makefile.in
@@ -1007,7 +1007,7 @@
 
 
 @HAVE_INTROSPECTION_TRUE@GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstRtp \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1038,20 +1038,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstrtp -:SHARED libgstrtp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstrtp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/rtp \
-	 -:HEADERS $(libgstrtp_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/rtp/gstrtcpbuffer.h b/gst-libs/gst/rtp/gstrtcpbuffer.h
index b5ff4a1..47378cf 100644
--- a/gst-libs/gst/rtp/gstrtcpbuffer.h
+++ b/gst-libs/gst/rtp/gstrtcpbuffer.h
@@ -59,6 +59,9 @@
   GST_RTCP_TYPE_PSFB    = 206
 } GstRTCPType;
 
+/* FIXME 2.0: backwards compatibility define for enum typo */
+#define GST_RTCP_RTPFB_TYPE_RCTP_SR_REQ GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ
+
 /**
  * GstRTCPFBType:
  * @GST_RTCP_FB_TYPE_INVALID: Invalid type
@@ -66,7 +69,7 @@
  * @GST_RTCP_RTPFB_TYPE_TMMBR: Temporary Maximum Media Stream Bit Rate Request
  * @GST_RTCP_RTPFB_TYPE_TMMBN: Temporary Maximum Media Stream Bit Rate
  *    Notification
- * @GST_RTCP_RTPFB_TYPE_RTCP_SR_SEQ: Request an SR packet for early
+ * @GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ: Request an SR packet for early
  *    synchronization
  * @GST_RTCP_PSFB_TYPE_PLI: Picture Loss Indication
  * @GST_RTCP_PSFB_TYPE_SLI: Slice Loss Indication
@@ -89,7 +92,7 @@
   GST_RTCP_RTPFB_TYPE_TMMBR       = 3,
   GST_RTCP_RTPFB_TYPE_TMMBN       = 4,
   /* RTPFB types assigned in RFC 6051 */
-  GST_RTCP_RTPFB_TYPE_RCTP_SR_REQ = 5,
+  GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ = 5,
   /* PSFB types */
   GST_RTCP_PSFB_TYPE_PLI          = 1,
   GST_RTCP_PSFB_TYPE_SLI          = 2,
diff --git a/gst-libs/gst/rtp/gstrtpbasedepayload.c b/gst-libs/gst/rtp/gstrtpbasedepayload.c
index 05a9033..06b773b 100644
--- a/gst-libs/gst/rtp/gstrtpbasedepayload.c
+++ b/gst-libs/gst/rtp/gstrtpbasedepayload.c
@@ -39,6 +39,7 @@
   GstClockTime npt_stop;
   gdouble play_speed;
   gdouble play_scale;
+  guint clock_base;
 
   gboolean discont;
   GstClockTime pts;
@@ -52,6 +53,7 @@
   gboolean negotiated;
 
   GstCaps *last_caps;
+  GstEvent *segment_event;
 };
 
 /* Filter signals and args */
@@ -92,6 +94,8 @@
     klass);
 static void gst_rtp_base_depayload_init (GstRTPBaseDepayload * rtpbasepayload,
     GstRTPBaseDepayloadClass * klass);
+static GstEvent *create_segment_event (GstRTPBaseDepayload * filter,
+    guint rtptime, GstClockTime position);
 
 GType
 gst_rtp_base_depayload_get_type (void)
@@ -238,6 +242,7 @@
   priv->npt_stop = -1;
   priv->play_speed = 1.0;
   priv->play_scale = 1.0;
+  priv->clock_base = -1;
   priv->dts = -1;
   priv->pts = -1;
   priv->duration = -1;
@@ -306,6 +311,12 @@
   else
     priv->play_scale = 1.0;
 
+  value = gst_structure_get_value (caps_struct, "clock-base");
+  if (value && G_VALUE_HOLDS_UINT (value))
+    priv->clock_base = g_value_get_uint (value);
+  else
+    priv->clock_base = -1;
+
   if (bclass->set_caps) {
     res = bclass->set_caps (filter, caps);
     if (!res) {
@@ -422,6 +433,13 @@
     }
   }
 
+  /* prepare segment event if needed */
+  if (filter->need_newsegment) {
+    priv->segment_event = create_segment_event (filter, rtptime,
+        GST_BUFFER_PTS (in));
+    filter->need_newsegment = FALSE;
+  }
+
   bclass = GST_RTP_BASE_DEPAYLOAD_GET_CLASS (filter);
 
   if (G_UNLIKELY (bclass->process == NULL))
@@ -487,6 +505,7 @@
       gst_segment_init (&filter->segment, GST_FORMAT_UNDEFINED);
       filter->need_newsegment = TRUE;
       filter->priv->next_seqnum = -1;
+      gst_event_replace (&filter->priv->segment_event, NULL);
       break;
     case GST_EVENT_CAPS:
     {
@@ -560,28 +579,59 @@
 }
 
 static GstEvent *
-create_segment_event (GstRTPBaseDepayload * filter, GstClockTime position)
+create_segment_event (GstRTPBaseDepayload * filter, guint rtptime,
+    GstClockTime position)
 {
   GstEvent *event;
-  GstClockTime stop;
+  GstClockTime start, stop, running_time;
   GstRTPBaseDepayloadPrivate *priv;
   GstSegment segment;
 
   priv = filter->priv;
 
+  /* determining the start of the segment */
+  start = 0;
+  if (priv->clock_base != -1 && position != -1) {
+    GstClockTime exttime, gap;
+
+    exttime = priv->clock_base;
+    gst_rtp_buffer_ext_timestamp (&exttime, rtptime);
+    gap = gst_util_uint64_scale_int (exttime - priv->clock_base,
+        filter->clock_rate, GST_SECOND);
+
+    /* account for lost packets */
+    if (position > gap) {
+      GST_DEBUG_OBJECT (filter,
+          "Found gap of %" GST_TIME_FORMAT ", adjusting start: %"
+          GST_TIME_FORMAT " = %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (gap), GST_TIME_ARGS (position - gap),
+          GST_TIME_ARGS (position), GST_TIME_ARGS (gap));
+      start = position - gap;
+    }
+  }
+
+  /* determining the stop of the segment */
+  stop = -1;
   if (priv->npt_stop != -1)
-    stop = priv->npt_stop - priv->npt_start;
-  else
-    stop = -1;
+    stop = start + (priv->npt_stop - priv->npt_start);
+
+  if (position == -1)
+    position = 0;
+
+  running_time = gst_segment_to_running_time (&filter->segment,
+      GST_FORMAT_TIME, start);
 
   gst_segment_init (&segment, GST_FORMAT_TIME);
   segment.rate = priv->play_speed;
   segment.applied_rate = priv->play_scale;
-  segment.start = 0;
+  segment.start = start;
   segment.stop = stop;
   segment.time = priv->npt_start;
   segment.position = position;
+  segment.base = running_time;
 
+  GST_DEBUG_OBJECT (filter, "Creating segment event %" GST_SEGMENT_FORMAT,
+      &segment);
   event = gst_event_new_segment (&segment);
 
   return event;
@@ -647,14 +697,9 @@
   }
 
   /* if this is the first buffer send a NEWSEGMENT */
-  if (G_UNLIKELY (filter->need_newsegment)) {
-    GstEvent *event;
-
-    event = create_segment_event (filter, 0);
-
-    gst_pad_push_event (filter->srcpad, event);
-
-    filter->need_newsegment = FALSE;
+  if (G_UNLIKELY (filter->priv->segment_event)) {
+    gst_pad_push_event (filter->srcpad, filter->priv->segment_event);
+    filter->priv->segment_event = NULL;
     GST_DEBUG_OBJECT (filter, "Pushed newsegment event on this first buffer");
   }
 
@@ -760,9 +805,11 @@
       priv->npt_stop = -1;
       priv->play_speed = 1.0;
       priv->play_scale = 1.0;
+      priv->clock_base = -1;
       priv->next_seqnum = -1;
       priv->negotiated = FALSE;
       priv->discont = FALSE;
+      gst_event_replace (&filter->priv->segment_event, NULL);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
       break;
diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index 40f3f4c..3a87480 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
@@ -56,7 +56,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(nodist_libgstrtsp_@GST_API_VERSION@_la_SOURCES))
 
 GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstRtsp \
 		--nsversion=@GST_API_VERSION@ \
@@ -101,19 +101,3 @@
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstrtsp -:SHARED libgstrtsp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtsp_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstrtsp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtsp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstrtsp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/rtsp \
-	 -:HEADERS $(libgstrtspinclude_HEADERS) \
-	           $(nodist_libgstrtspinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/rtsp/Makefile.in b/gst-libs/gst/rtsp/Makefile.in
index ec55e08..3e0b77d 100644
--- a/gst-libs/gst/rtsp/Makefile.in
+++ b/gst-libs/gst/rtsp/Makefile.in
@@ -1121,7 +1121,7 @@
 	@touch $@
 
 @HAVE_INTROSPECTION_TRUE@GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstRtsp \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1155,22 +1155,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstrtsp -:SHARED libgstrtsp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstrtsp_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstrtsp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstrtsp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstrtsp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstrtsp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/rtsp \
-	 -:HEADERS $(libgstrtspinclude_HEADERS) \
-	           $(nodist_libgstrtspinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
index e15fa93..a90f30b 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
@@ -20,7 +20,7 @@
 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstsdp_@GST_API_VERSION@_la_SOURCES))
 
 GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstSdp \
 		--nsversion=@GST_API_VERSION@ \
@@ -57,17 +57,3 @@
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstsdp -:SHARED libgstsdp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstsdp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/sdp \
-	 -:HEADERS $(libgstsdpinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/sdp/Makefile.in b/gst-libs/gst/sdp/Makefile.in
index b60e168..13f7b97 100644
--- a/gst-libs/gst/sdp/Makefile.in
+++ b/gst-libs/gst/sdp/Makefile.in
@@ -950,7 +950,7 @@
 
 
 @HAVE_INTROSPECTION_TRUE@GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstSdp \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -976,20 +976,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstsdp -:SHARED libgstsdp-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstsdp_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsdp_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstsdp_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstsdp_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/sdp \
-	 -:HEADERS $(libgstsdpinclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index 1883636..2c404a9 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
@@ -30,7 +30,7 @@
 gir_sources=$(patsubst %,$(srcdir)/%, $(libgsttag_@GST_API_VERSION@_la_SOURCES))
 
 GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstTag \
 		--nsversion=@GST_API_VERSION@ \
@@ -105,17 +105,3 @@
 licensetransdir = $(pkgdatadir)/@GST_API_VERSION@
 licensetrans_DATA = $(srcdir)/license-translations.dict
 #endif
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgsttag -:SHARED libgsttag-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttag_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttag_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttag_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgsttag_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgsttaginclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/tag/Makefile.in b/gst-libs/gst/tag/Makefile.in
index f368b05..0c413f1 100644
--- a/gst-libs/gst/tag/Makefile.in
+++ b/gst-libs/gst/tag/Makefile.in
@@ -1160,7 +1160,7 @@
 
 
 @HAVE_INTROSPECTION_TRUE@GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstTag \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1203,20 +1203,6 @@
 		echo "Updated licenses-tables.dat and license-translations.dict"
 #endif
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT libgsttag -:SHARED libgsttag-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttag_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttag_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttag_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgsttag_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgsttaginclude_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/tag/gstexiftag.c b/gst-libs/gst/tag/gstexiftag.c
index 8200a9f..1f0528e 100644
--- a/gst-libs/gst/tag/gstexiftag.c
+++ b/gst-libs/gst/tag/gstexiftag.c
@@ -801,6 +801,20 @@
   }
 }
 
+static inline gboolean
+gst_exif_tag_str_is_ascii (const gchar * str, gsize * length)
+{
+  gsize len = 0;
+
+  while (*str) {
+    if (*str++ & 0x80)
+      return FALSE;
+    ++len;
+  }
+  *length = len;
+  return TRUE;
+}
+
 static void
 write_exif_ascii_tag (GstExifWriter * writer, guint16 tag, const gchar * str)
 {
@@ -809,7 +823,11 @@
   gsize ascii_size;
   GError *error = NULL;
 
-  ascii_str = g_convert (str, -1, "latin1", "utf8", NULL, &ascii_size, &error);
+  if (gst_exif_tag_str_is_ascii (str, &ascii_size))
+    ascii_str = g_strndup (str, ascii_size);
+  else
+    ascii_str =
+        g_convert (str, -1, "latin1", "utf8", NULL, &ascii_size, &error);
 
   if (error) {
     GST_WARNING ("Failed to convert exif tag to ascii: 0x%x - %s. Error: %s",
diff --git a/gst-libs/gst/tag/gstxmptag.c b/gst-libs/gst/tag/gstxmptag.c
index 57c104d..52112a0 100644
--- a/gst-libs/gst/tag/gstxmptag.c
+++ b/gst-libs/gst/tag/gstxmptag.c
@@ -1237,7 +1237,6 @@
   if (len < max_ft_len)
     goto missing_footer;
 
-  GST_DEBUG ("checking footer: [%s]", &xps[len - max_ft_len]);
   xp2 = g_strstr_len (&xps[len - max_ft_len], max_ft_len, "<?xpacket ");
   if (!xp2)
     goto missing_footer;
diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
index ac9e486..551b174 100644
--- a/gst-libs/gst/tag/id3v2frames.c
+++ b/gst-libs/gst/tag/id3v2frames.c
@@ -656,11 +656,16 @@
     }
   }
 
-  peak = peak << (64 - GST_ROUND_UP_8 (peak_bits));
-  peak_val =
-      gst_guint64_to_gdouble (peak) / gst_util_guint64_to_gdouble (G_MAXINT64);
-  GST_LOG ("RVA2 frame: id=%s, chan=%u, adj=%.2fdB, peak_bits=%u, peak=%.2f",
-      id, chan, gain_dB, (guint) peak_bits, peak_val);
+  if (peak_bits > 0) {
+    peak = peak << (64 - GST_ROUND_UP_8 (peak_bits));
+    peak_val =
+        gst_guint64_to_gdouble (peak) /
+        gst_util_guint64_to_gdouble (G_MAXINT64);
+    GST_LOG ("RVA2 frame: id=%s, chan=%u, adj=%.2fdB, peak_bits=%u, peak=%.2f",
+        id, chan, gain_dB, (guint) peak_bits, peak_val);
+  } else {
+    peak_val = 0;
+  }
 
   if (chan == ID3V2_RVA2_CHANNEL_MASTER && strcmp (id, "track") == 0) {
     gain_tag_name = GST_TAG_TRACK_GAIN;
diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index c786a36..7ac5f44 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
@@ -97,7 +97,7 @@
 gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
 
 GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VERSION@.la
-	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 		$(INTROSPECTION_SCANNER) -v --namespace GstVideo \
 		--nsversion=@GST_API_VERSION@ \
@@ -140,19 +140,3 @@
 
 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
 endif
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstvideo -:SHARED libgstvideo-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideo_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstvideo_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideo_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideo_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstvideo_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstvideo_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstvideo_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/gst-libs/gst/video/Makefile.in b/gst-libs/gst/video/Makefile.in
index 41d349e..730b7d4 100644
--- a/gst-libs/gst/video/Makefile.in
+++ b/gst-libs/gst/video/Makefile.in
@@ -1443,7 +1443,7 @@
 	@touch $@
 
 @HAVE_INTROSPECTION_TRUE@GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VERSION@.la
-@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
 @HAVE_INTROSPECTION_TRUE@		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_SCANNER) -v --namespace GstVideo \
 @HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
@@ -1475,22 +1475,6 @@
 @HAVE_INTROSPECTION_TRUE@		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
 @HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer -:PROJECT libgstvideo -:SHARED libgstvideo-@GST_API_VERSION@ \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideo_@GST_API_VERSION@_la_SOURCES) \
-	           $(nodist_libgstvideo_@GST_API_VERSION@_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideo_@GST_API_VERSION@_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideo_@GST_API_VERSION@_la_LDFLAGS) \
-	           $(libgstvideo_@GST_API_VERSION@_la_LIBADD) \
-	           -ldl \
-	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/tag \
-	 -:HEADERS $(libgstvideo_@GST_API_VERSION@include_HEADERS) \
-	           $(nodist_libgstvideo_@GST_API_VERSION@include_HEADERS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
index 6a6105f..3420b1c 100644
--- a/gst-libs/gst/video/gstvideodecoder.c
+++ b/gst-libs/gst/video/gstvideodecoder.c
@@ -909,7 +909,7 @@
       GST_VIDEO_DECODER_STREAM_LOCK (decoder);
       decoder->output_segment = segment;
       decoder->priv->in_out_segment_sync =
-          (memcmp (&decoder->input_segment, &segment, sizeof (segment)) == 0);
+          gst_segment_is_equal (&decoder->input_segment, &segment);
       decoder->priv->last_timestamp_out = GST_CLOCK_TIME_NONE;
       GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
       break;
@@ -1027,6 +1027,94 @@
   return NULL;
 }
 
+/* Must be called holding the GST_VIDEO_DECODER_STREAM_LOCK */
+static gboolean
+gst_video_decoder_negotiate_default_caps (GstVideoDecoder * decoder)
+{
+  GstCaps *caps;
+  GstVideoCodecState *state;
+  GstVideoInfo info;
+  gint i;
+  gint caps_size;
+  GstStructure *structure;
+
+  caps = gst_pad_get_allowed_caps (decoder->srcpad);
+  if (!caps || gst_caps_is_empty (caps) || gst_caps_is_any (caps))
+    goto caps_error;
+
+  /* before fixating, try to use whatever upstream provided */
+  caps = gst_caps_make_writable (caps);
+  caps_size = gst_caps_get_size (caps);
+  if (decoder->priv->input_state && decoder->priv->input_state->caps) {
+    GstCaps *sinkcaps = decoder->priv->input_state->caps;
+    GstStructure *structure = gst_caps_get_structure (sinkcaps, 0);
+    gint width, height;
+    gint par_n, par_d;
+    gint fps_n, fps_d;
+
+    if (gst_structure_get_int (structure, "width", &width)) {
+      for (i = 0; i < caps_size; i++) {
+        gst_structure_set (gst_caps_get_structure (caps, i), "width",
+            G_TYPE_INT, width, NULL);
+      }
+    }
+
+    if (gst_structure_get_int (structure, "height", &height)) {
+      for (i = 0; i < caps_size; i++) {
+        gst_structure_set (gst_caps_get_structure (caps, i), "height",
+            G_TYPE_INT, height, NULL);
+      }
+    }
+
+    if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {
+      for (i = 0; i < caps_size; i++) {
+        gst_structure_set (gst_caps_get_structure (caps, i), "framerate",
+            GST_TYPE_FRACTION, fps_n, fps_d, NULL);
+      }
+    }
+
+    if (gst_structure_get_fraction (structure, "pixel-aspect-ratio", &par_n,
+            &par_d)) {
+      for (i = 0; i < caps_size; i++) {
+        gst_structure_set (gst_caps_get_structure (caps, i),
+            "pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d, NULL);
+      }
+    }
+  }
+
+  for (i = 0; i < caps_size; i++) {
+    structure = gst_caps_get_structure (caps, i);
+    /* Random 1280x720@30 for fixation */
+    gst_structure_fixate_field_nearest_int (structure, "width", 1280);
+    gst_structure_fixate_field_nearest_int (structure, "height", 720);
+    gst_structure_fixate_field_nearest_fraction (structure,
+        "pixel-aspect-ratio", 1, 1);
+    gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
+  }
+  caps = gst_caps_fixate (caps);
+  structure = gst_caps_get_structure (caps, 0);
+
+  if (!caps || !gst_video_info_from_caps (&info, caps))
+    goto caps_error;
+
+  GST_INFO_OBJECT (decoder,
+      "Chose default caps %" GST_PTR_FORMAT " for initial gap", caps);
+  state =
+      gst_video_decoder_set_output_state (decoder, info.finfo->format,
+      info.width, info.height, decoder->priv->input_state);
+  gst_video_codec_state_unref (state);
+  gst_caps_unref (caps);
+
+  return TRUE;
+
+caps_error:
+  {
+    if (caps)
+      gst_caps_unref (caps);
+    return FALSE;
+  }
+}
+
 static gboolean
 gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
     GstEvent * event)
@@ -1071,6 +1159,25 @@
       event = NULL;
       break;
     }
+    case GST_EVENT_SEGMENT_DONE:
+    {
+      GstFlowReturn flow_ret = GST_FLOW_OK;
+
+      flow_ret = gst_video_decoder_drain_out (decoder, TRUE);
+      ret = (flow_ret == GST_FLOW_OK);
+
+      /* Forward SEGMENT_DONE immediately. This is required
+       * because no buffer or serialized event might come
+       * after SEGMENT_DONE and nothing could trigger another
+       * _finish_frame() call.
+       *
+       * The subclass can override this behaviour by overriding
+       * the ::sink_event() vfunc and not chaining up to the
+       * parent class' ::sink_event() until a later time.
+       */
+      forward_immediate = TRUE;
+      break;
+    }
     case GST_EVENT_EOS:
     {
       GstFlowReturn flow_ret = GST_FLOW_OK;
@@ -1099,10 +1206,34 @@
     case GST_EVENT_GAP:
     {
       GstFlowReturn flow_ret = GST_FLOW_OK;
+      gboolean needs_reconfigure = FALSE;
 
       flow_ret = gst_video_decoder_drain_out (decoder, FALSE);
       ret = (flow_ret == GST_FLOW_OK);
 
+      /* Ensure we have caps before forwarding the event */
+      GST_VIDEO_DECODER_STREAM_LOCK (decoder);
+      if (!decoder->priv->output_state) {
+        if (!gst_video_decoder_negotiate_default_caps (decoder)) {
+          GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
+          GST_ELEMENT_ERROR (decoder, STREAM, FORMAT, (NULL),
+              ("Decoder output not negotiated before GAP event."));
+          forward_immediate = TRUE;
+          break;
+        }
+        needs_reconfigure = TRUE;
+      }
+
+      needs_reconfigure = gst_pad_check_reconfigure (decoder->srcpad)
+          || needs_reconfigure;
+      if (decoder->priv->output_state_changed || needs_reconfigure) {
+        if (!gst_video_decoder_negotiate_unlocked (decoder)) {
+          GST_WARNING_OBJECT (decoder, "Failed to negotiate with downstream");
+          gst_pad_mark_reconfigure (decoder->srcpad);
+        }
+      }
+      GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
+
       /* Forward GAP immediately. Everything is drained after
        * the GAP event and we can forward this event immediately
        * now without having buffers out of order.
@@ -2093,7 +2224,7 @@
           if (segment.format == GST_FORMAT_TIME) {
             dec->output_segment = segment;
             dec->priv->in_out_segment_sync =
-                (memcmp (&dec->input_segment, &segment, sizeof (segment)) == 0);
+                gst_segment_is_equal (&dec->input_segment, &segment);
           }
         }
         dec->priv->pending_events =
@@ -2822,23 +2953,33 @@
 
   if (GST_CLOCK_TIME_IS_VALID (start) && GST_CLOCK_TIME_IS_VALID (duration)) {
     stop = start + duration;
+  } else if (GST_CLOCK_TIME_IS_VALID (start)
+      && !GST_CLOCK_TIME_IS_VALID (duration)) {
+    /* 2 second frame duration is rather unlikely... but if we don't clip
+     * away buffers that far before the segment we can cause the pipeline to
+     * lockup. This can happen if audio is properly clipped, and thus the
+     * audio sink does not preroll yet but the video sink prerolls because
+     * we already outputted a buffer here... and then queues run full.
+     *
+     * In the worst case we will clip one buffer too many here now if no
+     * framerate is given, no buffer duration is given and the actual
+     * framerate is less than 0.5fps */
+    stop = start + 2 * GST_SECOND;
   }
 
   segment = &decoder->output_segment;
   if (gst_segment_clip (segment, GST_FORMAT_TIME, start, stop, &cstart, &cstop)) {
-
     GST_BUFFER_PTS (buf) = cstart;
 
-    if (stop != GST_CLOCK_TIME_NONE)
+    if (stop != GST_CLOCK_TIME_NONE && GST_CLOCK_TIME_IS_VALID (duration))
       GST_BUFFER_DURATION (buf) = cstop - cstart;
 
     GST_LOG_OBJECT (decoder,
         "accepting buffer inside segment: %" GST_TIME_FORMAT " %"
         GST_TIME_FORMAT " seg %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT
         " time %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (GST_BUFFER_PTS (buf)),
-        GST_TIME_ARGS (GST_BUFFER_PTS (buf) +
-            GST_BUFFER_DURATION (buf)),
+        GST_TIME_ARGS (cstart),
+        GST_TIME_ARGS (cstop),
         GST_TIME_ARGS (segment->start), GST_TIME_ARGS (segment->stop),
         GST_TIME_ARGS (segment->time));
   } else {
diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c
index eb9d186..0f85cd9 100644
--- a/gst-libs/gst/video/gstvideoencoder.c
+++ b/gst-libs/gst/video/gstvideoencoder.c
@@ -340,10 +340,6 @@
 
   priv->drained = TRUE;
 
-  g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
-  g_list_free (priv->frames);
-  priv->frames = NULL;
-
   priv->bytes = 0;
   priv->time = 0;
 
@@ -389,6 +385,10 @@
         encoder->priv->current_frame_events);
   }
 
+  g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
+  g_list_free (priv->frames);
+  priv->frames = NULL;
+
   GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
 
   return ret;
diff --git a/gst-libs/gst/video/gstvideoutils.h b/gst-libs/gst/video/gstvideoutils.h
index e385103..84399d4 100644
--- a/gst-libs/gst/video/gstvideoutils.h
+++ b/gst-libs/gst/video/gstvideoutils.h
@@ -206,6 +206,7 @@
  * @distance_from_sync: Distance in frames from the last synchronization point.
  * @input_buffer: the input #GstBuffer that created this frame. The buffer is owned
  *           by the frame and references to the frame instead of the buffer should
+ *           be kept.
  * @output_buffer: the output #GstBuffer. Implementations should set this either
  *           directly, or by using the
  *           @gst_video_decoder_allocate_output_frame() or
diff --git a/gst-libs/gst/video/navigation.c b/gst-libs/gst/video/navigation.c
index c598875..54bac85 100644
--- a/gst-libs/gst/video/navigation.c
+++ b/gst-libs/gst/video/navigation.c
@@ -115,6 +115,8 @@
 
   if (iface->send_event) {
     iface->send_event (navigation, structure);
+  } else {
+    gst_structure_free (structure);
   }
 }
 
@@ -495,6 +497,8 @@
     return GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED;
   else if (g_str_equal (m_type, "angles-changed"))
     return GST_NAVIGATION_MESSAGE_ANGLES_CHANGED;
+  else if (g_str_equal (m_type, "event"))
+    return GST_NAVIGATION_MESSAGE_EVENT;
 
   return GST_NAVIGATION_MESSAGE_INVALID;
 }
@@ -554,6 +558,61 @@
 }
 
 /**
+ * gst_navigation_message_new_event:
+ * @src: A #GstObject to set as source of the new message.
+ * @event: (transfer none): A navigation #GstEvent
+ *
+ * Creates a new #GstNavigation message with type
+ * #GST_NAVIGATION_MESSAGE_EVENT.
+ *
+ * Returns: The new #GstMessage.
+ *
+ * Since: 1.6
+ */
+GstMessage *
+gst_navigation_message_new_event (GstObject * src, GstEvent * event)
+{
+  GstStructure *s;
+  GstMessage *m;
+
+  s = gst_structure_new (GST_NAVIGATION_MESSAGE_NAME,
+      "type", G_TYPE_STRING, "event", "event", GST_TYPE_EVENT, event, NULL);
+
+  m = gst_message_new_custom (GST_MESSAGE_ELEMENT, src, s);
+
+  return m;
+}
+
+/**
+ * gst_navigation_message_parse_event:
+ * @message: A #GstMessage to inspect.
+ * @event: (out) (transfer full): a pointer to a #GstEvent to receive the
+ *     contained navigation event.
+ *
+ * Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_EVENT
+ * and extract contained #GstEvent. The caller must unref the @event when done
+ * with it.
+ *
+ * Returns: %TRUE if the message could be successfully parsed. %FALSE if not.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_navigation_message_parse_event (GstMessage * message, GstEvent ** event)
+{
+  if (!GST_NAVIGATION_MESSAGE_HAS_TYPE (message, EVENT))
+    return FALSE;
+
+  if (event) {
+    const GstStructure *s = gst_message_get_structure (message);
+    if (!gst_structure_get (s, "event", GST_TYPE_EVENT, event, NULL))
+      return FALSE;
+  }
+
+  return TRUE;
+}
+
+/**
  * gst_navigation_message_new_commands_changed:
  * @src: A #GstObject to set as source of the new message.
  *
diff --git a/gst-libs/gst/video/navigation.h b/gst-libs/gst/video/navigation.h
index 3630dc3..b69c70c 100644
--- a/gst-libs/gst/video/navigation.h
+++ b/gst-libs/gst/video/navigation.h
@@ -178,6 +178,8 @@
  * @GST_NAVIGATION_MESSAGE_ANGLES_CHANGED: Sent when display angles in a multi-angle
  * feature (such as a multiangle DVD) change - either angles have appeared or
  * disappeared.
+ * @GST_NAVIGATION_MESSAGE_EVENT: Sent when a navigation event was not handled
+ * by any element in the pipeline (Since 1.6)
  *
  * A set of notifications that may be received on the bus when navigation
  * related status changes.
@@ -186,7 +188,8 @@
   GST_NAVIGATION_MESSAGE_INVALID,
   GST_NAVIGATION_MESSAGE_MOUSE_OVER,
   GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED,
-  GST_NAVIGATION_MESSAGE_ANGLES_CHANGED
+  GST_NAVIGATION_MESSAGE_ANGLES_CHANGED,
+  GST_NAVIGATION_MESSAGE_EVENT
 } GstNavigationMessageType;
 
 GstNavigationMessageType gst_navigation_message_get_type (GstMessage *message);
@@ -205,6 +208,10 @@
                                                              guint *cur_angle,
                                                              guint *n_angles);
 
+GstMessage *    gst_navigation_message_new_event            (GstObject *src,
+							     GstEvent *event);
+gboolean        gst_navigation_message_parse_event          (GstMessage *message,
+							     GstEvent ** event);
 /* event parsing functions */
 /**
  * GstNavigationEventType:
diff --git a/gst-libs/gst/video/video-color.c b/gst-libs/gst/video/video-color.c
index 8f8c274..d09a860 100644
--- a/gst-libs/gst/video/video-color.c
+++ b/gst-libs/gst/video/video-color.c
@@ -70,10 +70,12 @@
   return NULL;
 }
 
-#define IS_EQUAL(ci,i) (((ci)->color.range == (i)->range) && \
-                        ((ci)->color.matrix == (i)->matrix) && \
-                        ((ci)->color.transfer == (i)->transfer) && \
-                        ((ci)->color.primaries == (i)->primaries))
+#define CI_IS_EQUAL(ci,i) (((ci)->range == (i)->range) && \
+                        ((ci)->matrix == (i)->matrix) && \
+                        ((ci)->transfer == (i)->transfer) && \
+                        ((ci)->primaries == (i)->primaries))
+
+#define IS_EQUAL(ci,i) CI_IS_EQUAL(&(ci)->color, (i))
 
 #define IS_UNKNOWN(ci) (IS_EQUAL (&colorimetry[DEFAULT_UNKNOWN], ci))
 
@@ -221,6 +223,26 @@
   GST_DEBUG ("offset: %d %d %d %d", offset[0], offset[1], offset[2], offset[3]);
 }
 
+/**
+ * gst_video_colorimetry_is_equal:
+ * @cinfo: a #GstVideoColorimetry
+ * @other: another #GstVideoColorimetry
+ *
+ * Compare the 2 colorimetry sets for equality
+ *
+ * Returns: #TRUE if @cinfo and @other are equal.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_video_colorimetry_is_equal (const GstVideoColorimetry * cinfo,
+    const GstVideoColorimetry * other)
+{
+  g_return_val_if_fail (cinfo != NULL, FALSE);
+  g_return_val_if_fail (other != NULL, FALSE);
+
+  return CI_IS_EQUAL (cinfo, other);
+}
 
 #define WP_C    0.31006, 0.31616
 #define WP_D65  0.31271, 0.32902
diff --git a/gst-libs/gst/video/video-color.h b/gst-libs/gst/video/video-color.h
index 07b87a5..99fa017 100644
--- a/gst-libs/gst/video/video-color.h
+++ b/gst-libs/gst/video/video-color.h
@@ -192,6 +192,7 @@
 gboolean     gst_video_colorimetry_matches     (GstVideoColorimetry *cinfo, const gchar *color);
 gboolean     gst_video_colorimetry_from_string (GstVideoColorimetry *cinfo, const gchar *color);
 gchar *      gst_video_colorimetry_to_string   (GstVideoColorimetry *cinfo);
+gboolean     gst_video_colorimetry_is_equal (const GstVideoColorimetry *cinfo, const GstVideoColorimetry *other);
 
 /* compute offset and scale */
 void         gst_video_color_range_offsets     (GstVideoColorRange range,
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index 437c3c6..2fa64fa 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -298,7 +298,7 @@
   gpointer need_line_data;
   GDestroyNotify need_line_notify;
 
-  gboolean n_lines;
+  guint n_lines;
   guint stride;
   GstLineCacheAllocLineFunc alloc_line;
   gpointer alloc_line_data;
@@ -566,28 +566,19 @@
   return res;
 }
 
-static const gchar *
-get_opt_str (GstVideoConverter * convert, const gchar * opt, const gchar * def)
-{
-  const gchar *res;
-  if (!(res = gst_structure_get_string (convert->config, opt)))
-    res = def;
-  return res;
-}
-
 #define DEFAULT_OPT_FILL_BORDER TRUE
 #define DEFAULT_OPT_ALPHA_VALUE 1.0
 /* options copy, set, mult */
-#define DEFAULT_OPT_ALPHA_MODE "copy"
+#define DEFAULT_OPT_ALPHA_MODE GST_VIDEO_ALPHA_MODE_COPY
 #define DEFAULT_OPT_BORDER_ARGB 0xff000000
 /* options full, input-only, output-only, none */
-#define DEFAULT_OPT_MATRIX_MODE "full"
+#define DEFAULT_OPT_MATRIX_MODE GST_VIDEO_MATRIX_MODE_FULL
 /* none, remap */
-#define DEFAULT_OPT_GAMMA_MODE "none"
+#define DEFAULT_OPT_GAMMA_MODE GST_VIDEO_GAMMA_MODE_NONE
 /* none, merge-only, fast */
-#define DEFAULT_OPT_PRIMARIES_MODE "none"
+#define DEFAULT_OPT_PRIMARIES_MODE GST_VIDEO_PRIMARIES_MODE_NONE
 /* options full, upsample-only, downsample-only, none */
-#define DEFAULT_OPT_CHROMA_MODE "full"
+#define DEFAULT_OPT_CHROMA_MODE GST_VIDEO_CHROMA_MODE_FULL
 #define DEFAULT_OPT_RESAMPLER_METHOD GST_VIDEO_RESAMPLER_METHOD_CUBIC
 #define DEFAULT_OPT_CHROMA_RESAMPLER_METHOD GST_VIDEO_RESAMPLER_METHOD_LINEAR
 #define DEFAULT_OPT_RESAMPLER_TAPS 0
@@ -598,18 +589,18 @@
     GST_VIDEO_CONVERTER_OPT_FILL_BORDER, DEFAULT_OPT_FILL_BORDER)
 #define GET_OPT_ALPHA_VALUE(c) get_opt_double(c, \
     GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE, DEFAULT_OPT_ALPHA_VALUE)
-#define GET_OPT_ALPHA_MODE(c) get_opt_str(c, \
-    GST_VIDEO_CONVERTER_OPT_ALPHA_MODE, DEFAULT_OPT_ALPHA_MODE)
+#define GET_OPT_ALPHA_MODE(c) get_opt_enum(c, \
+    GST_VIDEO_CONVERTER_OPT_ALPHA_MODE, GST_TYPE_VIDEO_ALPHA_MODE, DEFAULT_OPT_ALPHA_MODE)
 #define GET_OPT_BORDER_ARGB(c) get_opt_uint(c, \
     GST_VIDEO_CONVERTER_OPT_BORDER_ARGB, DEFAULT_OPT_BORDER_ARGB)
-#define GET_OPT_MATRIX_MODE(c) get_opt_str(c, \
-    GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, DEFAULT_OPT_MATRIX_MODE)
-#define GET_OPT_GAMMA_MODE(c) get_opt_str(c, \
-    GST_VIDEO_CONVERTER_OPT_GAMMA_MODE, DEFAULT_OPT_GAMMA_MODE)
-#define GET_OPT_PRIMARIES_MODE(c) get_opt_str(c, \
-    GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE, DEFAULT_OPT_PRIMARIES_MODE)
-#define GET_OPT_CHROMA_MODE(c) get_opt_str(c, \
-    GST_VIDEO_CONVERTER_OPT_CHROMA_MODE, DEFAULT_OPT_CHROMA_MODE)
+#define GET_OPT_MATRIX_MODE(c) get_opt_enum(c, \
+    GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, GST_TYPE_VIDEO_MATRIX_MODE, DEFAULT_OPT_MATRIX_MODE)
+#define GET_OPT_GAMMA_MODE(c) get_opt_enum(c, \
+    GST_VIDEO_CONVERTER_OPT_GAMMA_MODE, GST_TYPE_VIDEO_GAMMA_MODE, DEFAULT_OPT_GAMMA_MODE)
+#define GET_OPT_PRIMARIES_MODE(c) get_opt_enum(c, \
+    GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE, GST_TYPE_VIDEO_PRIMARIES_MODE, DEFAULT_OPT_PRIMARIES_MODE)
+#define GET_OPT_CHROMA_MODE(c) get_opt_enum(c, \
+    GST_VIDEO_CONVERTER_OPT_CHROMA_MODE, GST_TYPE_VIDEO_CHROMA_MODE, DEFAULT_OPT_CHROMA_MODE)
 #define GET_OPT_RESAMPLER_METHOD(c) get_opt_enum(c, \
     GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD, GST_TYPE_VIDEO_RESAMPLER_METHOD, \
     DEFAULT_OPT_RESAMPLER_METHOD)
@@ -624,26 +615,26 @@
 #define GET_OPT_DITHER_QUANTIZATION(c) get_opt_uint(c, \
     GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION, DEFAULT_OPT_DITHER_QUANTIZATION)
 
-#define CHECK_ALPHA_COPY(c) (!g_strcmp0(GET_OPT_ALPHA_MODE(c), "copy"))
-#define CHECK_ALPHA_SET(c) (!g_strcmp0(GET_OPT_ALPHA_MODE(c), "set"))
-#define CHECK_ALPHA_MULT(c) (!g_strcmp0(GET_OPT_ALPHA_MODE(c), "mult"))
+#define CHECK_ALPHA_COPY(c) (GET_OPT_ALPHA_MODE(c) == GST_VIDEO_ALPHA_MODE_COPY)
+#define CHECK_ALPHA_SET(c) (GET_OPT_ALPHA_MODE(c) == GST_VIDEO_ALPHA_MODE_SET)
+#define CHECK_ALPHA_MULT(c) (GET_OPT_ALPHA_MODE(c) == GST_VIDEO_ALPHA_MODE_MULT)
 
-#define CHECK_MATRIX_FULL(c) (!g_strcmp0(GET_OPT_MATRIX_MODE(c), "full"))
-#define CHECK_MATRIX_INPUT(c) (!g_strcmp0(GET_OPT_MATRIX_MODE(c), "input-only"))
-#define CHECK_MATRIX_OUTPUT(c) (!g_strcmp0(GET_OPT_MATRIX_MODE(c), "output-only"))
-#define CHECK_MATRIX_NONE(c) (!g_strcmp0(GET_OPT_MATRIX_MODE(c), "none"))
+#define CHECK_MATRIX_FULL(c) (GET_OPT_MATRIX_MODE(c) == GST_VIDEO_MATRIX_MODE_FULL)
+#define CHECK_MATRIX_INPUT(c) (GET_OPT_MATRIX_MODE(c) == GST_VIDEO_MATRIX_MODE_INPUT_ONLY)
+#define CHECK_MATRIX_OUTPUT(c) (GET_OPT_MATRIX_MODE(c) == GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY)
+#define CHECK_MATRIX_NONE(c) (GET_OPT_MATRIX_MODE(c) == GST_VIDEO_MATRIX_MODE_NONE)
 
-#define CHECK_GAMMA_NONE(c) (!g_strcmp0(GET_OPT_GAMMA_MODE(c), "none"))
-#define CHECK_GAMMA_REMAP(c) (!g_strcmp0(GET_OPT_GAMMA_MODE(c), "remap"))
+#define CHECK_GAMMA_NONE(c) (GET_OPT_GAMMA_MODE(c) == GST_VIDEO_GAMMA_MODE_NONE)
+#define CHECK_GAMMA_REMAP(c) (GET_OPT_GAMMA_MODE(c) == GST_VIDEO_GAMMA_MODE_REMAP)
 
-#define CHECK_PRIMARIES_NONE(c) (!g_strcmp0(GET_OPT_PRIMARIES_MODE(c), "none"))
-#define CHECK_PRIMARIES_MERGE(c) (!g_strcmp0(GET_OPT_PRIMARIES_MODE(c), "merge-only"))
-#define CHECK_PRIMARIES_FAST(c) (!g_strcmp0(GET_OPT_PRIMARIES_MODE(c), "fast"))
+#define CHECK_PRIMARIES_NONE(c) (GET_OPT_PRIMARIES_MODE(c) == GST_VIDEO_PRIMARIES_MODE_NONE)
+#define CHECK_PRIMARIES_MERGE(c) (GET_OPT_PRIMARIES_MODE(c) == GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY)
+#define CHECK_PRIMARIES_FAST(c) (GET_OPT_PRIMARIES_MODE(c) == GST_VIDEO_PRIMARIES_MODE_FAST)
 
-#define CHECK_CHROMA_FULL(c) (!g_strcmp0(GET_OPT_CHROMA_MODE(c), "full"))
-#define CHECK_CHROMA_UPSAMPLE(c) (!g_strcmp0(GET_OPT_CHROMA_MODE(c), "upsample-only"))
-#define CHECK_CHROMA_DOWNSAMPLE(c) (!g_strcmp0(GET_OPT_CHROMA_MODE(c), "downsample-only"))
-#define CHECK_CHROMA_NONE(c) (!g_strcmp0(GET_OPT_CHROMA_MODE(c), "none"))
+#define CHECK_CHROMA_FULL(c) (GET_OPT_CHROMA_MODE(c) == GST_VIDEO_CHROMA_MODE_FULL)
+#define CHECK_CHROMA_UPSAMPLE(c) (GET_OPT_CHROMA_MODE(c) == GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY)
+#define CHECK_CHROMA_DOWNSAMPLE(c) (GET_OPT_CHROMA_MODE(c) == GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY)
+#define CHECK_CHROMA_NONE(c) (GET_OPT_CHROMA_MODE(c) == GST_VIDEO_CHROMA_MODE_NONE)
 
 static GstLineCache *
 chain_unpack_line (GstVideoConverter * convert)
@@ -1676,7 +1667,7 @@
 
   for (i = 0; i < width; i++) {
     gint a = (p[i * 4] * alpha) / 255;
-    p[i * 4] = CLAMP (a, 0, 255);
+    p[i * 4] = CLAMP (a, 0, 65535);
   }
 }
 
@@ -3705,8 +3696,6 @@
   }
 }
 
-#define GET_TMP_LINE(fl,idx) &fl->data[fl->stride * ((idx) % fl->n_lines)]
-
 static void
 convert_plane_fill (GstVideoConverter * convert,
     const GstVideoFrame * src, GstVideoFrame * dest, gint plane)
@@ -3936,6 +3925,7 @@
     case GST_VIDEO_FORMAT_NV12:
     case GST_VIDEO_FORMAT_NV21:
     case GST_VIDEO_FORMAT_NV16:
+    case GST_VIDEO_FORMAT_NV61:
     case GST_VIDEO_FORMAT_NV24:
       res = plane == 0 ? GST_VIDEO_FORMAT_GRAY8 : GST_VIDEO_FORMAT_NV12;
       break;
@@ -3987,7 +3977,7 @@
 {
   int i, n_planes;
   gint method, cr_method, stride, in_width, in_height, out_width, out_height;
-  guint taps, max_taps = 0;
+  guint taps;
   GstVideoInfo *in_info, *out_info;
   const GstVideoFormatInfo *in_finfo, *out_finfo;
   GstVideoFormat in_format, out_format;
@@ -4087,7 +4077,6 @@
       convert->fv_scaler[0] =
           gst_video_scaler_new (method, GST_VIDEO_SCALER_FLAG_NONE, taps,
           in_height, out_height, convert->config);
-      gst_video_scaler_get_coeff (convert->fv_scaler[0], 0, NULL, &max_taps);
     } else {
       convert->fv_scaler[0] = NULL;
     }
@@ -4101,7 +4090,6 @@
     convert->fsplane[0] = 0;
   } else {
     for (i = 0; i < n_planes; i++) {
-      guint n_taps = 0;
       gint comp, n_comp, j, iw, ih, ow, oh, pstride;
       gboolean need_v_scaler, need_h_scaler;
       GstStructure *config;
@@ -4235,12 +4223,10 @@
       if (need_v_scaler && ih != 0 && oh != 0) {
         convert->fv_scaler[i] = gst_video_scaler_new (resample_method,
             GST_VIDEO_SCALER_FLAG_NONE, taps, ih, oh, config);
-        gst_video_scaler_get_coeff (convert->fv_scaler[i], 0, NULL, &n_taps);
       } else
         convert->fv_scaler[i] = NULL;
 
       gst_structure_free (config);
-      max_taps = MAX (max_taps, n_taps);
       convert->fformat[i] = get_scale_format (in_format, i);
     }
   }
@@ -4537,6 +4523,9 @@
   {GST_VIDEO_FORMAT_NV16, GST_VIDEO_FORMAT_NV24, TRUE, FALSE, FALSE, TRUE,
       TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
 
+  {GST_VIDEO_FORMAT_NV61, GST_VIDEO_FORMAT_NV61, TRUE, FALSE, FALSE, TRUE,
+      TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
+
   {GST_VIDEO_FORMAT_NV24, GST_VIDEO_FORMAT_NV12, TRUE, FALSE, FALSE, TRUE,
       TRUE, FALSE, FALSE, FALSE, 0, 0, convert_scale_planes},
   {GST_VIDEO_FORMAT_NV24, GST_VIDEO_FORMAT_NV16, TRUE, FALSE, FALSE, TRUE,
diff --git a/gst-libs/gst/video/video-converter.h b/gst-libs/gst/video/video-converter.h
index e69d4c0..c9477c8 100644
--- a/gst-libs/gst/video/video-converter.h
+++ b/gst-libs/gst/video/video-converter.h
@@ -133,20 +133,31 @@
  */
 #define GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE   "GstVideoConverter.alpha-value"
 /**
+ * GstVideoAlphaMode:
+ * @GST_VIDEO_ALPHA_MODE_COPY: When input and output have alpha, it will be copied.
+ *         When the input has no alpha, alpha will be set to
+ *         #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
+ * @GST_VIDEO_ALPHA_MODE_SET: set all alpha to
+ *	   #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
+ * @GST_VIDEO_ALPHA_MODE_MULT:  multiply all alpha with
+ *         #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE.
+ *         When the input format has no alpha but the output format has, the
+ *         alpha value will be set to #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
+ *
+ * Different alpha modes.
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_VIDEO_ALPHA_MODE_COPY,
+  GST_VIDEO_ALPHA_MODE_SET,
+  GST_VIDEO_ALPHA_MODE_MULT
+} GstVideoAlphaMode;
+/**
  * GST_VIDEO_CONVERTER_OPT_ALPHA_MODE:
  *
- * #G_TYPE_STRING, the alpha mode to use.
- *
- * "copy": When input and output have alpha, it will be copied.
- *         When the input has no alpha, alpha will be set to
- *         GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
- * "set": set all alpha to #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
- * "mult": multiply all alpha with #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE.
- *         When the input format has no alpha but the output format has,
- *         the alpha value will be set to
- *         #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
- *
- * Default to "none".
+ * #GST_TYPE_VIDEO_ALPHA_MODE, the alpha mode to use.
+ * Default is #GST_VIDEO_ALPHA_MODE_COPY.
  */
 #define GST_VIDEO_CONVERTER_OPT_ALPHA_MODE   "GstVideoConverter.alpha-mode"
 /**
@@ -157,55 +168,100 @@
  * Default 0xff000000
  */
 #define GST_VIDEO_CONVERTER_OPT_BORDER_ARGB   "GstVideoConverter.border-argb"
+
+/**
+ * GstVideoChromaMode:
+ * @GST_VIDEO_CHROMA_MODE_FULL: do full chroma up and down sampling
+ * @GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY: only perform chroma upsampling
+ * @GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY: only perform chroma downsampling
+ * @GST_VIDEO_CHROMA_MODE_NONE: disable chroma resampling
+ *
+ * Different chroma downsampling and upsampling modes
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_VIDEO_CHROMA_MODE_FULL,
+  GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY,
+  GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY,
+  GST_VIDEO_CHROMA_MODE_NONE
+} GstVideoChromaMode;
+
 /**
  * GST_VIDEO_CONVERTER_OPT_CHROMA_MODE:
  *
- * #G_TYPE_STRING, set the chroma resample mode subsampled formats.
- *
- * "full": do full chroma up and down sampling
- * "upsample-only": only perform chroma upsampling
- * "downsample-only": only perform chroma downsampling
- * "none": disable chroma resampling
- *
- * Default "full"
+ * #GST_TYPE_VIDEO_CHROMA_MODE, set the chroma resample mode subsampled
+ * formats. Default is #GST_VIDEO_CHROMA_MODE_FULL.
  */
 #define GST_VIDEO_CONVERTER_OPT_CHROMA_MODE   "GstVideoConverter.chroma-mode"
+
+/**
+ *GstVideoMatrixMode:
+ * @GST_VIDEO_MATRIX_MODE_FULL: do conversion between color matrices
+ * @GST_VIDEO_MATRIX_MODE_INPUT_ONLY:  use the input color matrix to convert
+ *	  to and from R'G'B
+ * @GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY: use the output color matrix to convert
+ *	  to and from R'G'B
+ * @GST_VIDEO_MATRIX_MODE_NONE: disable color matrix conversion.
+ *
+ * Different color matrix conversion modes
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_VIDEO_MATRIX_MODE_FULL,
+  GST_VIDEO_MATRIX_MODE_INPUT_ONLY,
+  GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY,
+  GST_VIDEO_MATRIX_MODE_NONE
+} GstVideoMatrixMode;
 /**
  * GST_VIDEO_CONVERTER_OPT_MATRIX_MODE:
  *
- * #G_TYPE_STRING, set the color matrix conversion mode for converting
- *     between Y'PbPr and non-linear RGB (R'G'B').
- *
- * "full": do conversion between color matrices
- * "input-only": use the input color matrix to convert to and from R'G'B
- * "output-only": use the output color matrix to convert to and from R'G'B
- * "none": disable color matrix conversion.
- *
- * Default "full"
+ * #GST_TYPE_VIDEO_MATRIX_MODE, set the color matrix conversion mode for
+ *	converting between Y'PbPr and non-linear RGB (R'G'B').
+ * Default is #GST_VIDEO_MATRIX_MODE_FULL.
  */
 #define GST_VIDEO_CONVERTER_OPT_MATRIX_MODE   "GstVideoConverter.matrix-mode"
 /**
+ * GstVideoGammaMode:
+ * @GST_VIDEO_GAMMA_MODE_NONE: disable gamma handling
+ * @GST_VIDEO_GAMMA_MODE_REMAP: convert between input and output gamma
+ * Different gamma conversion modes
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_VIDEO_GAMMA_MODE_NONE,
+  GST_VIDEO_GAMMA_MODE_REMAP
+} GstVideoGammaMode;
+/**
  * GST_VIDEO_CONVERTER_OPT_GAMMA_MODE:
  *
- * #G_TYPE_STRING, set the gamma mode.
- *
- * "none": disable gamma handling
- * "remap": convert between input and output gamma
- *
- * Default "none"
+ * #GST_TYPE_VIDEO_GAMMA_MODE, set the gamma mode.
+ * Default is #GST_VIDEO_GAMMA_MODE_NONE.
  */
 #define GST_VIDEO_CONVERTER_OPT_GAMMA_MODE   "GstVideoConverter.gamma-mode"
 /**
+ * GstVideoPrimariesMode:
+ * @GST_VIDEO_PRIMARIES_MODE_NONE: disable conversion between primaries
+ * @GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY: do conversion between primaries only
+ *	  when it can be merged with color matrix conversion.
+ * @GST_VIDEO_PRIMARIES_MODE_FAST: fast conversion between primaries
+ *
+ * Different primaries conversion modes
+ *
+ * Since: 1.6
+ */
+typedef enum {
+  GST_VIDEO_PRIMARIES_MODE_NONE,
+  GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY,
+  GST_VIDEO_PRIMARIES_MODE_FAST
+} GstVideoPrimariesMode;
+/**
  * GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE:
  *
- * #G_TYPE_STRING, set the primaries conversion mode.
- *
- * "none": disable conversion between primaries
- * "merge-only": do conversion between primaries only when it can be merged
- *               with color matrix conversion.
- * "fast": fast conversion between primaries
- *
- * Default "none"
+ * #GST_TYPE_VIDEO_PRIMARIES_MODE, set the primaries conversion mode.
+ * Default is #GST_VIDEO_PRIMARIES_MODE_NONE.
  */
 #define GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE   "GstVideoConverter.primaries-mode"
 
diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c
index 47c2ea8..97a745b 100644
--- a/gst-libs/gst/video/video-format.c
+++ b/gst-libs/gst/video/video-format.c
@@ -1517,6 +1517,88 @@
   }
 }
 
+#define PACK_NV61 GST_VIDEO_FORMAT_AYUV, unpack_NV61, 1, pack_NV61
+static void
+unpack_NV61 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+    gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+    const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+{
+  const guint8 *restrict sy = GET_PLANE_LINE (0, y);
+  const guint8 *restrict svu = GET_PLANE_LINE (1, y);
+  guint8 *restrict d = dest;
+
+  sy += x;
+  svu += (x & ~1);
+
+  if (x & 1) {
+    d[0] = 0xff;
+    d[1] = *sy++;
+    d[2] = svu[1];
+    d[3] = svu[0];
+    width--;
+    d += 4;
+    svu += 2;
+  }
+
+  if (IS_ALIGNED (d, 8)) {
+    video_orc_unpack_NV21 (d, sy, svu, width / 2);
+  } else {
+    gint i;
+
+    for (i = 0; i < width / 2; i++) {
+      d[i * 8 + 0] = 0xff;
+      d[i * 8 + 1] = sy[i * 2 + 0];
+      d[i * 8 + 2] = svu[i * 2 + 1];
+      d[i * 8 + 3] = svu[i * 2 + 0];
+      d[i * 8 + 4] = 0xff;
+      d[i * 8 + 5] = sy[i * 2 + 1];
+      d[i * 8 + 6] = svu[i * 2 + 1];
+      d[i * 8 + 7] = svu[i * 2 + 0];
+    }
+  }
+
+  if (width & 1) {
+    gint i = width - 1;
+
+    d[i * 4 + 0] = 0xff;
+    d[i * 4 + 1] = sy[i];
+    d[i * 4 + 2] = svu[i + 1];
+    d[i * 4 + 3] = svu[i + 0];
+  }
+}
+
+static void
+pack_NV61 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+    const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+    const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+    gint y, gint width)
+{
+  const guint8 *restrict s = src;
+  guint8 *restrict dy = GET_PLANE_LINE (0, y);
+  guint8 *restrict dvu = GET_PLANE_LINE (1, y);
+
+  if (IS_ALIGNED (s, 8)) {
+    video_orc_pack_NV21 (dy, dvu, s, width / 2);
+  } else {
+    gint i;
+
+    for (i = 0; i < width / 2; i++) {
+      dy[i * 2 + 0] = s[i * 8 + 1];
+      dy[i * 2 + 1] = s[i * 8 + 5];
+      dvu[i * 2 + 0] = s[i * 8 + 3];
+      dvu[i * 2 + 1] = s[i * 8 + 2];
+    }
+  }
+
+  if (width & 1) {
+    gint i = width - 1;
+
+    dy[i] = s[i * 4 + 1];
+    dvu[i + 0] = s[i * 4 + 2];
+    dvu[i + 1] = s[i * 4 + 3];
+  }
+}
+
 #define PACK_NV24 GST_VIDEO_FORMAT_AYUV, unpack_NV24, 1, pack_NV24
 static void
 unpack_NV24 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
@@ -3488,6 +3570,8 @@
       PSTR2222, PLANE0123, OFFS0, SUB4444, PACK_A444_10BE),
   MAKE_YUV_LE_FORMAT (A444_10LE, "raw video", 0x00000000, DPTH10_10_10_10,
       PSTR2222, PLANE0123, OFFS0, SUB4444, PACK_A444_10LE),
+  MAKE_YUV_FORMAT (NV61, "raw video", GST_MAKE_FOURCC ('N', 'V', '6', '1'),
+      DPTH888, PSTR122, PLANE011, OFFS010, SUB422, PACK_NV61),
 };
 
 static GstVideoFormat
@@ -3692,6 +3776,8 @@
       return GST_VIDEO_FORMAT_NV21;
     case GST_MAKE_FOURCC ('N', 'V', '1', '6'):
       return GST_VIDEO_FORMAT_NV16;
+    case GST_MAKE_FOURCC ('N', 'V', '6', '1'):
+      return GST_VIDEO_FORMAT_NV61;
     case GST_MAKE_FOURCC ('N', 'V', '2', '4'):
       return GST_VIDEO_FORMAT_NV24;
     case GST_MAKE_FOURCC ('v', '3', '0', '8'):
diff --git a/gst-libs/gst/video/video-format.h b/gst-libs/gst/video/video-format.h
index e60f9ca..343663f 100644
--- a/gst-libs/gst/video/video-format.h
+++ b/gst-libs/gst/video/video-format.h
@@ -84,6 +84,7 @@
  * @GST_VIDEO_FORMAT_GBR_10BE: planar 4:4:4 RGB, 10 bits per channel
  * @GST_VIDEO_FORMAT_GBR_10LE: planar 4:4:4 RGB, 10 bits per channel
  * @GST_VIDEO_FORMAT_NV16: planar 4:2:2 YUV with interleaved UV plane
+ * @GST_VIDEO_FORMAT_NV61: planar 4:2:2 YUV with interleaved VU plane (Since 1.6)
  * @GST_VIDEO_FORMAT_NV24: planar 4:4:4 YUV with interleaved UV plane
  * @GST_VIDEO_FORMAT_NV12_64Z32: NV12 with 64x32 tiling in zigzag pattern
  * @GST_VIDEO_FORMAT_A420_10BE: planar 4:4:2:0 YUV, 10 bits per channel
@@ -156,6 +157,7 @@
   GST_VIDEO_FORMAT_A422_10LE,
   GST_VIDEO_FORMAT_A444_10BE,
   GST_VIDEO_FORMAT_A444_10LE,
+  GST_VIDEO_FORMAT_NV61,
 } GstVideoFormat;
 
 #define GST_VIDEO_MAX_PLANES 4
@@ -476,8 +478,8 @@
 
 #define GST_VIDEO_FORMATS_ALL "{ I420, YV12, YUY2, UYVY, AYUV, RGBx, "  \
     "BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, "  \
-    "YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, " \
-    "v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
+    "YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, " \
+    "GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
     "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, " \
     " Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, "\
     " A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE }"
diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c
index 19c1b0a..f05958c 100644
--- a/gst-libs/gst/video/video-frame.c
+++ b/gst-libs/gst/video/video-frame.c
@@ -74,8 +74,8 @@
   if (meta) {
     /* All these values must be consistent */
     g_return_val_if_fail (info->finfo->format == meta->format, FALSE);
-    g_return_val_if_fail (info->width >= meta->width, FALSE);
-    g_return_val_if_fail (info->height >= meta->height, FALSE);
+    g_return_val_if_fail (info->width <= meta->width, FALSE);
+    g_return_val_if_fail (info->height <= meta->height, FALSE);
     g_return_val_if_fail (info->finfo->n_planes == meta->n_planes, FALSE);
 
     frame->info.finfo = gst_video_format_get_info (meta->format);
diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c
index 8533617..5b9b380 100644
--- a/gst-libs/gst/video/video-info.c
+++ b/gst-libs/gst/video/video-info.c
@@ -153,8 +153,18 @@
   "fields"
 };
 
-static const gchar *
-gst_interlace_mode_to_string (GstVideoInterlaceMode mode)
+/**
+ * gst_video_interlace_mode_to_string:
+ * @mode: a #GstVideoInterlaceMode
+ *
+ * Convert @mode to its string representation.
+ *
+ * Returns: @mode as a string or NULL if @mode in invalid.
+ *
+ * Since: 1.6
+ */
+const gchar *
+gst_video_interlace_mode_to_string (GstVideoInterlaceMode mode)
 {
   if (((guint) mode) >= G_N_ELEMENTS (interlace_mode))
     return NULL;
@@ -162,8 +172,20 @@
   return interlace_mode[mode];
 }
 
-static GstVideoInterlaceMode
-gst_interlace_mode_from_string (const gchar * mode)
+/**
+ * gst_video_interlace_mode_from_string:
+ * @mode: a mode
+ *
+ * Convert @mode to a #GstVideoInterlaceMode
+ *
+ * Returns: the #GstVideoInterlaceMode of @mode or
+ *    #GST_VIDEO_INTERLACE_MODE_PROGRESSIVE when @mode is not a valid
+ *    string representation for a #GstVideoInterlaceMode.
+ *
+ * Since: 1.6
+ */
+GstVideoInterlaceMode
+gst_video_interlace_mode_from_string (const gchar * mode)
 {
   gint i;
   for (i = 0; i < G_N_ELEMENTS (interlace_mode); i++) {
@@ -245,7 +267,7 @@
   }
 
   if ((s = gst_structure_get_string (structure, "interlace-mode")))
-    info->interlace_mode = gst_interlace_mode_from_string (s);
+    info->interlace_mode = gst_video_interlace_mode_from_string (s);
   else
     info->interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
 
@@ -348,6 +370,11 @@
     return FALSE;
   if (GST_VIDEO_INFO_FPS_D (info) != GST_VIDEO_INFO_FPS_D (other))
     return FALSE;
+  if (!gst_video_colorimetry_is_equal (&GST_VIDEO_INFO_COLORIMETRY (info),
+          &GST_VIDEO_INFO_COLORIMETRY (other)))
+    return FALSE;
+  if (GST_VIDEO_INFO_CHROMA_SITE (info) != GST_VIDEO_INFO_CHROMA_SITE (other))
+    return FALSE;
 
   for (i = 0; i < info->finfo->n_planes; i++) {
     if (info->stride[i] != other->stride[i])
@@ -388,7 +415,7 @@
       "pixel-aspect-ratio", GST_TYPE_FRACTION, info->par_n, info->par_d, NULL);
 
   gst_caps_set_simple (caps, "interlace-mode", G_TYPE_STRING,
-      gst_interlace_mode_to_string (info->interlace_mode), NULL);
+      gst_video_interlace_mode_to_string (info->interlace_mode), NULL);
 
   if (info->chroma_site != GST_VIDEO_CHROMA_SITE_UNKNOWN)
     gst_caps_set_simple (caps, "chroma-site", G_TYPE_STRING,
@@ -562,6 +589,7 @@
       info->size = info->offset[1] + info->stride[0] * cr_h;
       break;
     case GST_VIDEO_FORMAT_NV16:
+    case GST_VIDEO_FORMAT_NV61:
       info->stride[0] = GST_ROUND_UP_4 (width);
       info->stride[1] = info->stride[0];
       info->offset[0] = 0;
diff --git a/gst-libs/gst/video/video-info.h b/gst-libs/gst/video/video-info.h
index 2409816..20c653b 100644
--- a/gst-libs/gst/video/video-info.h
+++ b/gst-libs/gst/video/video-info.h
@@ -55,6 +55,9 @@
   GST_VIDEO_INTERLACE_MODE_FIELDS
 } GstVideoInterlaceMode;
 
+const gchar *          gst_video_interlace_mode_to_string    (GstVideoInterlaceMode mode);
+GstVideoInterlaceMode  gst_video_interlace_mode_from_string  (const gchar * mode);
+
 /**
  * GstVideoFlags:
  * @GST_VIDEO_FLAG_NONE: no flags
@@ -141,6 +144,9 @@
 #define GST_VIDEO_INFO_FPS_N(i)          ((i)->fps_n)
 #define GST_VIDEO_INFO_FPS_D(i)          ((i)->fps_d)
 
+#define GST_VIDEO_INFO_COLORIMETRY(i) ((i)->colorimetry)
+#define GST_VIDEO_INFO_CHROMA_SITE(i) ((i)->chroma_site)
+
 /* dealing with GstVideoInfo flags */
 #define GST_VIDEO_INFO_FLAG_IS_SET(i,flag) ((GST_VIDEO_INFO_FLAGS(i) & (flag)) == (flag))
 #define GST_VIDEO_INFO_FLAG_SET(i,flag)    (GST_VIDEO_INFO_FLAGS(i) |= (flag))
diff --git a/gst-libs/gst/video/video-orc-dist.c b/gst-libs/gst/video/video-orc-dist.c
index 71838d2..333d8ac 100644
--- a/gst-libs/gst/video/video-orc-dist.c
+++ b/gst-libs/gst/video/video-orc-dist.c
@@ -12545,7 +12545,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 98, 105, 108, 105, 110, 101, 97, 114, 95,
-            117,
+        117,
         51, 50, 11, 4, 4, 12, 4, 4, 16, 4, 16, 4, 51, 0, 4, 24,
         25, 2, 0,
       };
@@ -22038,14 +22038,14 @@
 _backup_video_orc_matrix8 (OrcExecutor * ORC_RESTRICT ex)
 {
   _custom_video_orc_matrix8 (ex->arrays[ORC_VAR_D1], ex->arrays[ORC_VAR_S1],
-      (ex->params[ORC_VAR_P1] & 0xffffffff) | ((orc_uint64) (ex->
-              params[ORC_VAR_T1]) << 32),
-      (ex->params[ORC_VAR_P2] & 0xffffffff) | ((orc_uint64) (ex->
-              params[ORC_VAR_T2]) << 32),
-      (ex->params[ORC_VAR_P3] & 0xffffffff) | ((orc_uint64) (ex->
-              params[ORC_VAR_T3]) << 32),
-      (ex->params[ORC_VAR_P4] & 0xffffffff) | ((orc_uint64) (ex->
-              params[ORC_VAR_T4]) << 32), ex->n);
+      (ex->params[ORC_VAR_P1] & 0xffffffff) |
+      ((orc_uint64) (ex->params[ORC_VAR_T1]) << 32),
+      (ex->params[ORC_VAR_P2] & 0xffffffff) |
+      ((orc_uint64) (ex->params[ORC_VAR_T2]) << 32),
+      (ex->params[ORC_VAR_P3] & 0xffffffff) |
+      ((orc_uint64) (ex->params[ORC_VAR_T3]) << 32),
+      (ex->params[ORC_VAR_P4] & 0xffffffff) |
+      ((orc_uint64) (ex->params[ORC_VAR_T4]) << 32), ex->n);
 }
 
 void
@@ -24379,7 +24379,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20, 2, 150, 32, 4,
         176, 0, 32, 5, 2, 0,
       };
@@ -24531,7 +24531,7 @@
       static const orc_uint8 bc[] = {
         1, 7, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101,
         115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100,
-            116,
+        116,
         97, 112, 115, 95, 117, 56, 11, 4, 4, 12, 1, 1, 12, 2, 2, 20,
         2, 20, 4, 150, 32, 4, 176, 33, 32, 5, 103, 0, 0, 33, 2, 0,
 
@@ -24687,7 +24687,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 11, 1, 1, 12, 4, 4, 14, 4, 255, 15, 0, 0, 14, 4,
         12, 0, 0, 0, 20, 2, 20, 4, 103, 33, 4, 16, 125, 33, 33, 17,
         166, 32, 33, 160, 0, 32, 2, 0,
@@ -24824,7 +24824,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 2, 2, 20, 2,
         150, 32, 4, 89, 0, 32, 5, 2, 0,
       };
@@ -24976,7 +24976,7 @@
       static const orc_uint8 bc[] = {
         1, 7, 9, 37, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101,
         115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100,
-            116,
+        116,
         97, 112, 115, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12,
         2, 2, 20, 2, 150, 32, 4, 89, 32, 32, 5, 70, 0, 0, 32, 2,
         0,
@@ -25195,7 +25195,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115,
-            51,
+        51,
         95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 1, 1, 12,
         1, 1, 12, 2, 2, 12, 2, 2, 12, 2, 2, 20, 2, 20, 2, 150,
         32, 4, 89, 32, 32, 7, 150, 33, 5, 89, 33, 33, 8, 70, 32, 32,
@@ -25441,7 +25441,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 38, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100, 116,
-            97,
+        97,
         112, 115, 51, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12,
         1, 1, 12, 1, 1, 12, 2, 2, 12, 2, 2, 12, 2, 2, 20, 2,
         20, 2, 150, 32, 4, 89, 32, 32, 7, 150, 33, 5, 89, 33, 33, 8,
@@ -25729,7 +25729,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 43, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100, 115,
-            99,
+        99,
         97, 108, 101, 116, 97, 112, 115, 51, 95, 117, 56, 95, 108, 113, 11, 1,
         1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 2, 2, 12, 2, 2,
         12, 2, 2, 12, 2, 2, 14, 2, 32, 0, 0, 0, 14, 2, 6, 0,
@@ -25908,7 +25908,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 95, 108, 113, 11, 1, 1, 12, 2, 2, 14, 2, 32, 0, 0,
         0, 14, 2, 6, 0, 0, 0, 20, 2, 70, 32, 4, 16, 94, 32, 32,
         17, 160, 0, 32, 2, 0,
@@ -26048,7 +26048,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 49, 54, 11, 4, 4, 12, 2, 2, 12, 2, 2, 20, 4, 20, 4,
         154, 32, 4, 153, 33, 5, 120, 0, 32, 33, 2, 0,
       };
@@ -26209,7 +26209,7 @@
       static const orc_uint8 bc[] = {
         1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101,
         115, 97, 109, 112, 108, 101, 95, 104, 95, 109, 117, 108, 97, 100, 100,
-            116,
+        116,
         97, 112, 115, 95, 117, 49, 54, 11, 4, 4, 12, 2, 2, 12, 2, 2,
         20, 4, 20, 4, 154, 32, 4, 153, 33, 5, 120, 32, 32, 33, 103, 0,
         0, 32, 2, 0,
@@ -26361,7 +26361,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 115, 99, 97, 108, 101, 116, 97, 112, 115,
-            95,
+        95,
         117, 49, 54, 11, 2, 2, 12, 4, 4, 14, 4, 255, 15, 0, 0, 14,
         4, 12, 0, 0, 0, 20, 4, 103, 32, 4, 16, 125, 32, 32, 17, 166,
         0, 32, 2, 0,
@@ -26491,7 +26491,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 31, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 150, 32, 4, 176,
         0, 32, 24, 2, 0,
       };
@@ -26630,7 +26630,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116,
-            97,
+        97,
         112, 115, 95, 117, 56, 11, 4, 4, 12, 1, 1, 16, 2, 20, 2, 20,
         4, 150, 32, 4, 176, 33, 32, 24, 103, 0, 0, 33, 2, 0,
       };
@@ -26760,7 +26760,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 32, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 49, 54, 11, 4, 4, 12, 2, 2, 16, 2, 20, 4, 154, 32, 4,
         120, 0, 32, 24, 2, 0,
       };
@@ -26905,7 +26905,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116,
-            97,
+        97,
         112, 115, 95, 117, 49, 54, 11, 4, 4, 12, 2, 2, 16, 2, 20, 4,
         20, 4, 154, 32, 4, 153, 33, 24, 120, 32, 32, 33, 103, 0, 0, 32,
         2, 0,
@@ -27038,7 +27038,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115,
-            95,
+        95,
         117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2, 20, 2, 150,
         32, 4, 89, 0, 32, 24, 2, 0,
       };
@@ -27271,7 +27271,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 35, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 116, 97, 112, 115,
-            52,
+        52,
         95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12, 1, 1, 12,
         1, 1, 12, 1, 1, 16, 2, 16, 2, 16, 2, 16, 2, 20, 2, 20,
         2, 150, 32, 4, 89, 32, 32, 24, 150, 33, 5, 89, 33, 33, 25, 70,
@@ -27444,7 +27444,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 37, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116,
-            97,
+        97,
         112, 115, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 16, 2,
         20, 2, 150, 32, 4, 89, 32, 32, 24, 70, 0, 0, 32, 2, 0,
       };
@@ -27691,7 +27691,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 38, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 116,
-            97,
+        97,
         112, 115, 52, 95, 117, 56, 95, 108, 113, 11, 2, 2, 12, 1, 1, 12,
         1, 1, 12, 1, 1, 12, 1, 1, 16, 2, 16, 2, 16, 2, 16, 2,
         20, 2, 20, 2, 150, 32, 4, 89, 32, 32, 24, 150, 33, 5, 89, 33,
@@ -28010,7 +28010,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 43, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 114, 101, 115,
         97, 109, 112, 108, 101, 95, 118, 95, 109, 117, 108, 97, 100, 100, 115,
-            99,
+        99,
         97, 108, 101, 116, 97, 112, 115, 52, 95, 117, 56, 95, 108, 113, 11, 1,
         1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 2, 2,
         14, 2, 32, 0, 0, 0, 14, 2, 6, 0, 0, 0, 16, 2, 16, 2,
@@ -30234,7 +30234,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 30, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 110, 111, 110, 101, 95, 52, 117, 56, 95, 109, 97,
-            115,
+        115,
         107, 11, 4, 4, 16, 4, 20, 4, 115, 32, 24, 21, 2, 37, 0, 32,
         0, 2, 0,
       };
@@ -30544,7 +30544,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 118, 101, 114, 116, 101, 114, 114, 95, 52, 117, 56,
-            95,
+        95,
         109, 97, 115, 107, 11, 4, 4, 11, 8, 8, 18, 8, 20, 8, 20, 8,
         134, 32, 24, 21, 2, 150, 33, 0, 21, 2, 70, 33, 1, 33, 21, 2,
         73, 1, 32, 33, 21, 2, 74, 33, 32, 33, 21, 2, 160, 0, 33, 2,
@@ -30727,7 +30727,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 29, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 102, 115, 95, 109, 117, 108, 97, 100, 100, 95, 117,
-            56,
+        56,
         11, 2, 2, 14, 4, 4, 0, 0, 0, 14, 2, 5, 0, 0, 0, 14,
         4, 8, 0, 0, 0, 14, 2, 3, 0, 0, 0, 20, 2, 20, 2, 83,
         33, 0, 16, 89, 33, 33, 17, 70, 32, 33, 0, 83, 33, 0, 18, 89,
@@ -30859,7 +30859,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 27, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 111, 114, 100, 101, 114, 101, 100, 95, 117, 56, 11,
-            1,
+        1,
         1, 12, 1, 1, 35, 0, 0, 4, 2, 0,
       };
       p = orc_program_new_from_static_bytecode (bc);
@@ -31022,7 +31022,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 33, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 111, 114, 100, 101, 114, 101, 100, 95, 52, 117, 56,
-            95,
+        95,
         109, 97, 115, 107, 11, 4, 4, 12, 8, 8, 18, 8, 20, 8, 20, 8,
         134, 33, 24, 21, 2, 150, 32, 0, 21, 2, 70, 32, 32, 4, 21, 2,
         74, 32, 33, 32, 21, 2, 160, 0, 32, 2, 0,
@@ -31182,7 +31182,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 34, 118, 105, 100, 101, 111, 95, 111, 114, 99, 95, 100, 105, 116,
         104, 101, 114, 95, 111, 114, 100, 101, 114, 101, 100, 95, 52, 117, 49,
-            54,
+        54,
         95, 109, 97, 115, 107, 11, 8, 8, 12, 8, 8, 18, 8, 20, 8, 20,
         8, 134, 33, 24, 21, 2, 70, 32, 0, 4, 21, 2, 74, 0, 33, 32,
         2, 0,
diff --git a/gst-libs/gst/video/video-resampler.h b/gst-libs/gst/video/video-resampler.h
index d0c18cc..699f382 100644
--- a/gst-libs/gst/video/video-resampler.h
+++ b/gst-libs/gst/video/video-resampler.h
@@ -45,7 +45,7 @@
   GST_VIDEO_RESAMPLER_METHOD_LINEAR,
   GST_VIDEO_RESAMPLER_METHOD_CUBIC,
   GST_VIDEO_RESAMPLER_METHOD_SINC,
-  GST_VIDEO_RESAMPLER_METHOD_LANCZOS,
+  GST_VIDEO_RESAMPLER_METHOD_LANCZOS
 } GstVideoResamplerMethod;
 
 /**
diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c
index b637775..17d0334 100644
--- a/gst-libs/gst/video/video-scaler.c
+++ b/gst-libs/gst/video/video-scaler.c
@@ -1195,6 +1195,7 @@
     case GST_VIDEO_FORMAT_NV16:
     case GST_VIDEO_FORMAT_NV21:
     case GST_VIDEO_FORMAT_NV24:
+    case GST_VIDEO_FORMAT_NV61:
       bits = 8;
       *n_elems = 2;
       break;
@@ -1480,15 +1481,23 @@
           vfunc (vscale, lines, LINE (dest, dest_stride, i), i, width, n_elems);
         }
       } else {
-        guint vx, vw;
+        guint vx, vw, w1;
         guint h_taps;
 
         h_taps = hscale->resampler.max_taps;
+        w1 = x + width - 1;
 
         vx = (hscale->inc * x) >> 16;
         vx = MIN (vx, hscale->resampler.offset[x]);
         vw = (hscale->inc * (x + width)) >> 16;
-        vw = MAX (vw, hscale->resampler.offset[x + width - 1] + h_taps);
+        if (hscale->merged) {
+          if ((w1 & 1) == hscale->out_y_offset)
+            vw = MAX (vw, hscale->resampler.offset[w1] + (2 * h_taps));
+          else
+            vw = MAX (vw, hscale->resampler.offset[w1] + (4 * h_taps));
+        } else {
+          vw = MAX (vw, hscale->resampler.offset[w1] + h_taps);
+        }
         vw += 1;
 
         if (vscale->tmpwidth < vw)
diff --git a/gst-plugins-base.spec b/gst-plugins-base.spec
index c547584..eee1fb4 100644
--- a/gst-plugins-base.spec
+++ b/gst-plugins-base.spec
@@ -5,7 +5,7 @@
 
 Name: 		%{gstreamer}-plugins-base
 Version: 	1.5.0.1
-Release: 	0.20150316.185339.gst
+Release: 	0.20150513.125519.gst
 Summary: 	GStreamer streaming media framework plug-ins
 
 Group: 		Applications/Multimedia
diff --git a/gst/adder/Makefile.am b/gst/adder/Makefile.am
index c899cfc..3ba6523 100644
--- a/gst/adder/Makefile.am
+++ b/gst/adder/Makefile.am
@@ -14,18 +14,3 @@
 libgstadder_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstadder.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadder -:SHARED libgstadder \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadder_la_SOURCES) \
-	    $(nodist_libgstadder_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadder_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadder_la_LDFLAGS) \
-	           $(libgstadder_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/adder/Makefile.in b/gst/adder/Makefile.in
index 1e72046..2b038c7 100644
--- a/gst/adder/Makefile.in
+++ b/gst/adder/Makefile.in
@@ -945,21 +945,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstadder -:SHARED libgstadder \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstadder_la_SOURCES) \
-	    $(nodist_libgstadder_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstadder_la_CFLAGS) \
-	 -:LDFLAGS $(libgstadder_la_LDFLAGS) \
-	           $(libgstadder_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/adder/gstadder.c b/gst/adder/gstadder.c
index 094b25e..0f297d0 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -29,10 +29,14 @@
  * The adder currently mixes all data received on the sinkpads as soon as
  * possible without trying to synchronize the streams.
  *
+ * Check out the audiomixer element in gst-plugins-bad for a better-behaving
+ * audio mixing element: It will sync input streams correctly and also handle
+ * live inputs properly.
+ *
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch audiotestsrc freq=100 ! adder name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix.
+ * gst-launch-1.0 audiotestsrc freq=100 ! adder name=mix ! audioconvert ! autoaudiosink audiotestsrc freq=500 ! mix.
  * ]| This pipeline produces two sine waves mixed together.
  * </refsect2>
  */
diff --git a/gst/app/Makefile.am b/gst/app/Makefile.am
index f2bb6f0..bdd761a 100644
--- a/gst/app/Makefile.am
+++ b/gst/app/Makefile.am
@@ -1,21 +1,7 @@
 plugin_LTLIBRARIES = libgstapp.la
 
 libgstapp_la_SOURCES = gstapp.c
-libgstapp_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
-libgstapp_la_LIBADD = $(GST_BASE_LIBS) $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la
+libgstapp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstapp_la_LIBADD = $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la $(GST_BASE_LIBS)
 libgstapp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstapp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstapp -:SHARED libgstapp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapp_la_LDFLAGS) \
-	           $(libgstapp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/app/Makefile.in b/gst/app/Makefile.in
index 15856c6..98b028d 100644
--- a/gst/app/Makefile.in
+++ b/gst/app/Makefile.in
@@ -152,8 +152,8 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstapp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la
+libgstapp_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la \
+	$(am__DEPENDENCIES_1)
 am_libgstapp_la_OBJECTS = libgstapp_la-gstapp.lo
 libgstapp_la_OBJECTS = $(am_libgstapp_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -519,8 +519,8 @@
 top_srcdir = @top_srcdir@
 plugin_LTLIBRARIES = libgstapp.la
 libgstapp_la_SOURCES = gstapp.c
-libgstapp_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
-libgstapp_la_LIBADD = $(GST_BASE_LIBS) $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la
+libgstapp_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstapp_la_LIBADD = $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_API_VERSION@.la $(GST_BASE_LIBS)
 libgstapp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstapp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 all: all-am
@@ -849,20 +849,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstapp -:SHARED libgstapp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstapp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstapp_la_CFLAGS) \
-	 -:LDFLAGS $(libgstapp_la_LDFLAGS) \
-	           $(libgstapp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/audioconvert/Makefile.am b/gst/audioconvert/Makefile.am
index 66846fc..1e2672b 100644
--- a/gst/audioconvert/Makefile.am
+++ b/gst/audioconvert/Makefile.am
@@ -25,18 +25,3 @@
 	gstaudioquantize.h \
 	gstfastrandom.h \
 	plugin.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudioconvert -:SHARED libgstaudioconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudioconvert_la_SOURCES) \
-	 	   $(nodist_libgstaudioconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudioconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudioconvert_la_LDFLAGS) \
-	           $(libgstaudioconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/audioconvert/Makefile.in b/gst/audioconvert/Makefile.in
index 108d0a2..f0f22f2 100644
--- a/gst/audioconvert/Makefile.in
+++ b/gst/audioconvert/Makefile.in
@@ -996,21 +996,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudioconvert -:SHARED libgstaudioconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudioconvert_la_SOURCES) \
-	 	   $(nodist_libgstaudioconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudioconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudioconvert_la_LDFLAGS) \
-	           $(libgstaudioconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/audioconvert/audioconvert.h b/gst/audioconvert/audioconvert.h
index a086cbc..56080cc 100644
--- a/gst/audioconvert/audioconvert.h
+++ b/gst/audioconvert/audioconvert.h
@@ -107,6 +107,11 @@
   /* channel conversion matrix, m[in_channels][out_channels].
    * If identity matrix, passthrough applies. */
   gfloat **matrix;
+
+  /* channel conversion matrix with int values, m[in_channels][out_channels].
+   * this is matrix * (2^10) as integers */
+  gint **matrix_int;
+
   /* temp storage for channelmix */
   gpointer tmp;
 
diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c
index 21510fa..09a6860 100644
--- a/gst/audioconvert/gstaudioconvert.c
+++ b/gst/audioconvert/gstaudioconvert.c
@@ -26,18 +26,21 @@
  *
  * Audioconvert converts raw audio buffers between various possible formats.
  * It supports integer to float conversion, width/depth conversion,
- * signedness and endianness conversion and channel transformations.
+ * signedness and endianness conversion and channel transformations
+ * (ie. upmixing and downmixing), as well as dithering and noise-shaping.
  *
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v -m audiotestsrc ! audioconvert ! audio/x-raw,format=S8,channels=2 ! level ! fakesink silent=TRUE
+ * gst-launch-1.0 -v -m audiotestsrc ! audioconvert ! audio/x-raw,format=S8,channels=2 ! level ! fakesink silent=TRUE
  * ]| This pipeline converts audio to 8-bit.  The level element shows that
  * the output levels still match the one for a sine wave.
  * |[
- * gst-launch -v -m audiotestsrc ! audioconvert ! vorbisenc ! fakesink silent=TRUE
+ * gst-launch-1.0 -v -m uridecodebin uri=file:///path/to/audio.flac ! audioconvert ! vorbisenc ! oggmux ! filesink location=audio.ogg
  * ]| The vorbis encoder takes float audio data instead of the integer data
- * generated by audiotestsrc.
+ * output by most other audio elements. This pipeline decodes a FLAC audio file
+ * (or any other audio file for which decoders are installed) and re-encodes
+ * it into an Ogg/Vorbis audio file.
  * </refsect2>
  */
 
@@ -97,9 +100,9 @@
 
 enum
 {
-  ARG_0,
-  ARG_DITHERING,
-  ARG_NOISE_SHAPING,
+  PROP_0,
+  PROP_DITHERING,
+  PROP_NOISE_SHAPING,
 };
 
 #define DEBUG_INIT \
@@ -183,13 +186,13 @@
   gobject_class->set_property = gst_audio_convert_set_property;
   gobject_class->get_property = gst_audio_convert_get_property;
 
-  g_object_class_install_property (gobject_class, ARG_DITHERING,
+  g_object_class_install_property (gobject_class, PROP_DITHERING,
       g_param_spec_enum ("dithering", "Dithering",
           "Selects between different dithering methods.",
           GST_TYPE_AUDIO_CONVERT_DITHERING, DITHER_TPDF,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, ARG_NOISE_SHAPING,
+  g_object_class_install_property (gobject_class, PROP_NOISE_SHAPING,
       g_param_spec_enum ("noise-shaping", "Noise shaping",
           "Selects between different noise shaping methods.",
           GST_TYPE_AUDIO_CONVERT_NOISE_SHAPING, NOISE_SHAPING_NONE,
@@ -867,10 +870,10 @@
   GstAudioConvert *this = GST_AUDIO_CONVERT (object);
 
   switch (prop_id) {
-    case ARG_DITHERING:
+    case PROP_DITHERING:
       this->dither = g_value_get_enum (value);
       break;
-    case ARG_NOISE_SHAPING:
+    case PROP_NOISE_SHAPING:
       this->ns = g_value_get_enum (value);
       break;
     default:
@@ -886,10 +889,10 @@
   GstAudioConvert *this = GST_AUDIO_CONVERT (object);
 
   switch (prop_id) {
-    case ARG_DITHERING:
+    case PROP_DITHERING:
       g_value_set_enum (value, this->dither);
       break;
-    case ARG_NOISE_SHAPING:
+    case PROP_NOISE_SHAPING:
       g_value_set_enum (value, this->ns);
       break;
     default:
diff --git a/gst/audioconvert/gstaudioquantize.c b/gst/audioconvert/gstaudioquantize.c
index 93f1287..91a8c12 100644
--- a/gst/audioconvert/gstaudioquantize.c
+++ b/gst/audioconvert/gstaudioquantize.c
@@ -136,7 +136,7 @@
 
 /* Dithering definitions
  * See http://en.wikipedia.org/wiki/Dithering or
- * http://www.cadenzarecording.com/Dither.html for explainations.
+ * http://www.users.qwest.net/~volt42/cadenzarecording/DitherExplained.pdf for explainations.
  *
  * We already add the rounding offset to the dither noise here
  * to have only one overflow check instead of two. */
@@ -145,9 +145,14 @@
   gint32 rand;                                                          \
   gint32 dither = (1<<(scale));
 
+/* Assuming dither == 2^n,
+ * returns one of 2^(n+1) possible random values:
+ * -dither <= retval < dither */
+#define RANDOM_INT_DITHER(dither)                                       \
+  (- dither + (gst_fast_random_int32 () & ((dither << 1) - 1)))
+
 #define ADD_DITHER_RPDF_I()                                             \
-        rand = gst_fast_random_int32_range (bias - dither,              \
-	    bias + dither);                                             \
+        rand = bias + RANDOM_INT_DITHER(dither);                        \
         if (rand > 0 && tmp > 0 && G_MAXINT32 - tmp <= rand)            \
                 tmp = G_MAXINT32;                                       \
         else if (rand < 0 && tmp < 0 && G_MININT32 - tmp >= rand)       \
@@ -163,14 +168,11 @@
 
 #define INIT_DITHER_TPDF_I()                                            \
   gint32 rand;                                                          \
-  gint32 dither = (1<<(scale - 1));                                     \
-  bias = bias >> 1;
+  gint32 dither = (1<<(scale - 1));
 
 #define ADD_DITHER_TPDF_I()                                             \
-        rand = gst_fast_random_int32_range (bias - dither,              \
-                   bias + dither - 1)                                   \
-               + gst_fast_random_int32_range (bias - dither,            \
-                   bias + dither - 1);                                  \
+        rand = bias + RANDOM_INT_DITHER(dither)                         \
+                    + RANDOM_INT_DITHER(dither);                        \
         if (rand > 0 && tmp > 0 && G_MAXINT32 - tmp <= rand)            \
                 tmp = G_MAXINT32;                                       \
         else if (rand < 0 && tmp < 0 && G_MININT32 - tmp >= rand)       \
@@ -188,13 +190,11 @@
 #define INIT_DITHER_TPDF_HF_I()                                         \
   gint32 rand;                                                          \
   gint32 dither = (1<<(scale-1));                                       \
-  gint32 *last_random = (gint32 *) ctx->last_random, tmp_rand;          \
-  bias = bias >> 1;
+  gint32 *last_random = (gint32 *) ctx->last_random, tmp_rand;
 
 #define ADD_DITHER_TPDF_HF_I()                                          \
-        tmp_rand = gst_fast_random_int32_range (bias - dither,          \
-                       bias + dither);                                  \
-        rand = tmp_rand - last_random[chan_pos];                        \
+        tmp_rand = RANDOM_INT_DITHER(dither);                           \
+        rand = bias + tmp_rand - last_random[chan_pos];                 \
         last_random[chan_pos] = tmp_rand;                               \
         if (rand > 0 && tmp > 0 && G_MAXINT32 - tmp <= rand)            \
                 tmp = G_MAXINT32;                                       \
@@ -306,20 +306,12 @@
         errors[chan_pos] = (*dst)/factor - orig;
 
 
-MAKE_QUANTIZE_FUNC_I (signed_none_none, NONE_FUNC, NONE_FUNC, ROUND);
-MAKE_QUANTIZE_FUNC_I (signed_rpdf_none, INIT_DITHER_RPDF_I, ADD_DITHER_RPDF_I,
+MAKE_QUANTIZE_FUNC_I (int_none_none, NONE_FUNC, NONE_FUNC, ROUND);
+MAKE_QUANTIZE_FUNC_I (int_rpdf_none, INIT_DITHER_RPDF_I, ADD_DITHER_RPDF_I,
     NONE_FUNC);
-MAKE_QUANTIZE_FUNC_I (signed_tpdf_none, INIT_DITHER_TPDF_I, ADD_DITHER_TPDF_I,
+MAKE_QUANTIZE_FUNC_I (int_tpdf_none, INIT_DITHER_TPDF_I, ADD_DITHER_TPDF_I,
     NONE_FUNC);
-MAKE_QUANTIZE_FUNC_I (signed_tpdf_hf_none, INIT_DITHER_TPDF_HF_I,
-    ADD_DITHER_TPDF_HF_I, NONE_FUNC);
-
-MAKE_QUANTIZE_FUNC_I (unsigned_none_none, NONE_FUNC, NONE_FUNC, ROUND);
-MAKE_QUANTIZE_FUNC_I (unsigned_rpdf_none, INIT_DITHER_RPDF_I, ADD_DITHER_RPDF_I,
-    NONE_FUNC);
-MAKE_QUANTIZE_FUNC_I (unsigned_tpdf_none, INIT_DITHER_TPDF_I, ADD_DITHER_TPDF_I,
-    NONE_FUNC);
-MAKE_QUANTIZE_FUNC_I (unsigned_tpdf_hf_none, INIT_DITHER_TPDF_HF_I,
+MAKE_QUANTIZE_FUNC_I (int_tpdf_hf_none, INIT_DITHER_TPDF_HF_I,
     ADD_DITHER_TPDF_HF_I, NONE_FUNC);
 
 MAKE_QUANTIZE_FUNC_F (float_none_error_feedback, NONE_FUNC,
@@ -363,14 +355,10 @@
     ADD_NS_HIGH, ADD_DITHER_TPDF_HF_F, UPDATE_ERROR_HIGH);
 
 static const AudioConvertQuantize quantize_funcs[] = {
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_none_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_rpdf_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_tpdf_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (signed_tpdf_hf_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (unsigned_none_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (unsigned_rpdf_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (unsigned_tpdf_none),
-  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (unsigned_tpdf_hf_none),
+  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (int_none_none),
+  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (int_rpdf_none),
+  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (int_tpdf_none),
+  (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (int_tpdf_hf_none),
   (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_none_error_feedback),
   (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_none_simple),
   (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_none_medium),
@@ -476,9 +464,8 @@
 
   if (ctx->ns == NOISE_SHAPING_NONE) {
     index += ctx->dither;
-    index += GST_AUDIO_FORMAT_INFO_IS_SIGNED (ctx->out.finfo) ? 0 : 4;
   } else {
-    index += 8 + (4 * ctx->dither);
+    index += 4 + (4 * ctx->dither);
     index += ctx->ns - 1;
   }
 
diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c
index f5f5e0d..f144c20 100644
--- a/gst/audioconvert/gstchannelmix.c
+++ b/gst/audioconvert/gstchannelmix.c
@@ -29,6 +29,8 @@
 
 #include "gstchannelmix.h"
 
+#define INT_MATRIX_FACTOR_EXPONENT 10
+
 /*
  * Channel matrix functions.
  */
@@ -48,6 +50,13 @@
   g_free (this->matrix);
 
   this->matrix = NULL;
+
+  for (i = 0; i < this->in.channels; i++)
+    g_free (this->matrix_int[i]);
+  g_free (this->matrix_int);
+
+  this->matrix_int = NULL;
+
   g_free (this->tmp);
   this->tmp = NULL;
 }
@@ -590,6 +599,26 @@
   }
 }
 
+/* only call this after this->matrix is fully set up and normalized */
+static void
+gst_channel_mix_setup_matrix_int (AudioConvertCtx * this)
+{
+  gint i, j;
+  gfloat tmp;
+  gfloat factor = (1 << INT_MATRIX_FACTOR_EXPONENT);
+
+  this->matrix_int = g_new0 (gint *, this->in.channels);
+
+  for (i = 0; i < this->in.channels; i++) {
+    this->matrix_int[i] = g_new (gint, this->out.channels);
+
+    for (j = 0; j < this->out.channels; j++) {
+      tmp = this->matrix[i][j] * factor;
+      this->matrix_int[i][j] = (gint)tmp;
+    }
+  }
+}
+
 /* only call after this->out and this->in are filled in */
 void
 gst_channel_mix_setup_matrix (AudioConvertCtx * this)
@@ -618,6 +647,8 @@
   /* setup the matrix' internal values */
   gst_channel_mix_fill_matrix (this);
 
+  gst_channel_mix_setup_matrix_int(this);
+
 #ifndef GST_DISABLE_GST_DEBUG
   /* debug */
   {
@@ -694,9 +725,12 @@
       /* convert */
       res = 0;
       for (in = 0; in < inchannels; in++) {
-        res += in_data[n * inchannels + in] * this->matrix[in][out];
+        res += in_data[n * inchannels + in] * (gint64)this->matrix_int[in][out];
       }
 
+      /* remove factor from int matrix */
+      res = res >> INT_MATRIX_FACTOR_EXPONENT;
+
       /* clip (shouldn't we use doubles instead as intermediate format?) */
       if (res < G_MININT32)
         res = G_MININT32;
diff --git a/gst/audioconvert/gstfastrandom.h b/gst/audioconvert/gstfastrandom.h
index 07f56f1..deaa129 100644
--- a/gst/audioconvert/gstfastrandom.h
+++ b/gst/audioconvert/gstfastrandom.h
@@ -38,32 +38,12 @@
   return (state = state * 1103515245 + 12345);
 }
 
-static inline guint32
-gst_fast_random_uint32_range (gint32 start, gint32 end)
-{
-  guint64 tmp = gst_fast_random_uint32 ();
-
-  tmp = (tmp * (end - start)) / G_MAXUINT32 + start;
-
-  return (guint32) tmp;
-}
-
 static inline gint32
 gst_fast_random_int32 (void)
 {
   return (gint32) gst_fast_random_uint32 ();
 }
 
-static inline gint32
-gst_fast_random_int32_range (gint32 start, gint32 end)
-{
-  gint64 tmp = gst_fast_random_uint32 ();
-
-  tmp = (tmp * (end - start)) / G_MAXUINT32 + start;
-
-  return (gint32) tmp;
-}
-
 static inline gdouble
 gst_fast_random_double (void)
 {
diff --git a/gst/audiorate/Makefile.am b/gst/audiorate/Makefile.am
index 9c21d07..2b0697c 100644
--- a/gst/audiorate/Makefile.am
+++ b/gst/audiorate/Makefile.am
@@ -9,17 +9,3 @@
         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la
 
 libgstaudiorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiorate -:SHARED libgstaudiorate \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiorate_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiorate_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiorate_la_LDFLAGS) \
-	           $(libgstaudiorate_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/audiorate/Makefile.in b/gst/audiorate/Makefile.in
index 3772aaf..33583ee 100644
--- a/gst/audiorate/Makefile.in
+++ b/gst/audiorate/Makefile.in
@@ -854,20 +854,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiorate -:SHARED libgstaudiorate \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiorate_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiorate_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiorate_la_LDFLAGS) \
-	           $(libgstaudiorate_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c
index 783ff35..19661d8 100644
--- a/gst/audiorate/gstaudiorate.c
+++ b/gst/audiorate/gstaudiorate.c
@@ -51,9 +51,15 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v alsasrc ! audiorate ! wavenc ! filesink location=alsa.wav
- * ]| Capture audio from an ALSA device, and turn it into a perfect stream
+ * gst-launch-1.0 -v autoaudiosrc ! audiorate ! audioconvert ! wavenc ! filesink location=alsa.wav
+ * ]| Capture audio from the sound card and turn it into a perfect stream
  * for saving in a raw audio file.
+ * |[
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/audio.file ! audiorate ! audioconvert ! wavenc ! filesink location=alsa.wav
+ * ]| Decodes an audio file and transforms it into a perfect stream for saving
+ * in a raw audio WAV file. Without the audio rate, the timing might not be
+ * preserved correctly in the WAV file in case the decoded stream is jittery
+ * or there are samples missing.
  * </refsect2>
  */
 
@@ -82,14 +88,14 @@
 
 enum
 {
-  ARG_0,
-  ARG_IN,
-  ARG_OUT,
-  ARG_ADD,
-  ARG_DROP,
-  ARG_SILENT,
-  ARG_TOLERANCE,
-  ARG_SKIP_TO_FIRST
+  PROP_0,
+  PROP_IN,
+  PROP_OUT,
+  PROP_ADD,
+  PROP_DROP,
+  PROP_SILENT,
+  PROP_TOLERANCE,
+  PROP_SKIP_TO_FIRST
 };
 
 static GstStaticPadTemplate gst_audio_rate_src_template =
@@ -140,20 +146,20 @@
   object_class->set_property = gst_audio_rate_set_property;
   object_class->get_property = gst_audio_rate_get_property;
 
-  g_object_class_install_property (object_class, ARG_IN,
+  g_object_class_install_property (object_class, PROP_IN,
       g_param_spec_uint64 ("in", "In",
           "Number of input samples", 0, G_MAXUINT64, 0,
           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, ARG_OUT,
+  g_object_class_install_property (object_class, PROP_OUT,
       g_param_spec_uint64 ("out", "Out", "Number of output samples", 0,
           G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
   pspec_add = g_param_spec_uint64 ("add", "Add", "Number of added samples",
       0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-  g_object_class_install_property (object_class, ARG_ADD, pspec_add);
+  g_object_class_install_property (object_class, PROP_ADD, pspec_add);
   pspec_drop = g_param_spec_uint64 ("drop", "Drop", "Number of dropped samples",
       0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-  g_object_class_install_property (object_class, ARG_DROP, pspec_drop);
-  g_object_class_install_property (object_class, ARG_SILENT,
+  g_object_class_install_property (object_class, PROP_DROP, pspec_drop);
+  g_object_class_install_property (object_class, PROP_SILENT,
       g_param_spec_boolean ("silent", "silent",
           "Don't emit notify for dropped and duplicated frames", DEFAULT_SILENT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -163,7 +169,7 @@
    * The difference between incoming timestamp and next timestamp must exceed
    * the given value for audiorate to add or drop samples.
    */
-  g_object_class_install_property (object_class, ARG_TOLERANCE,
+  g_object_class_install_property (object_class, PROP_TOLERANCE,
       g_param_spec_uint64 ("tolerance", "tolerance",
           "Only act if timestamp jitter/imperfection exceeds indicated tolerance (ns)",
           0, G_MAXUINT64, DEFAULT_TOLERANCE,
@@ -174,7 +180,7 @@
    *
    * Don't produce buffers before the first one we receive.
    */
-  g_object_class_install_property (object_class, ARG_SKIP_TO_FIRST,
+  g_object_class_install_property (object_class, PROP_SKIP_TO_FIRST,
       g_param_spec_boolean ("skip-to-first", "Skip to first buffer",
           "Don't produce buffers before the first one we receive",
           DEFAULT_SKIP_TO_FIRST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -686,13 +692,13 @@
   GstAudioRate *audiorate = GST_AUDIO_RATE (object);
 
   switch (prop_id) {
-    case ARG_SILENT:
+    case PROP_SILENT:
       audiorate->silent = g_value_get_boolean (value);
       break;
-    case ARG_TOLERANCE:
+    case PROP_TOLERANCE:
       audiorate->tolerance = g_value_get_uint64 (value);
       break;
-    case ARG_SKIP_TO_FIRST:
+    case PROP_SKIP_TO_FIRST:
       audiorate->skip_to_first = g_value_get_boolean (value);
       break;
     default:
@@ -708,25 +714,25 @@
   GstAudioRate *audiorate = GST_AUDIO_RATE (object);
 
   switch (prop_id) {
-    case ARG_IN:
+    case PROP_IN:
       g_value_set_uint64 (value, audiorate->in);
       break;
-    case ARG_OUT:
+    case PROP_OUT:
       g_value_set_uint64 (value, audiorate->out);
       break;
-    case ARG_ADD:
+    case PROP_ADD:
       g_value_set_uint64 (value, audiorate->add);
       break;
-    case ARG_DROP:
+    case PROP_DROP:
       g_value_set_uint64 (value, audiorate->drop);
       break;
-    case ARG_SILENT:
+    case PROP_SILENT:
       g_value_set_boolean (value, audiorate->silent);
       break;
-    case ARG_TOLERANCE:
+    case PROP_TOLERANCE:
       g_value_set_uint64 (value, audiorate->tolerance);
       break;
-    case ARG_SKIP_TO_FIRST:
+    case PROP_SKIP_TO_FIRST:
       g_value_set_boolean (value, audiorate->skip_to_first);
       break;
     default:
diff --git a/gst/audioresample/Makefile.am b/gst/audioresample/Makefile.am
index 607115d..728700d 100644
--- a/gst/audioresample/Makefile.am
+++ b/gst/audioresample/Makefile.am
@@ -42,17 +42,3 @@
 	resample_neon.h \
 	speex_resampler.h \
 	speex_resampler_wrapper.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudioresample -:SHARED libgstaudioresample \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudioresample_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudioresample_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudioresample_la_LDFLAGS) \
-	           $(libgstaudioresample_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/audioresample/Makefile.in b/gst/audioresample/Makefile.in
index 9951639..b96a6fe 100644
--- a/gst/audioresample/Makefile.in
+++ b/gst/audioresample/Makefile.in
@@ -915,20 +915,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudioresample -:SHARED libgstaudioresample \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudioresample_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudioresample_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudioresample_la_LDFLAGS) \
-	           $(libgstaudioresample_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c
index b4db739..a268ebc 100644
--- a/gst/audioresample/gstaudioresample.c
+++ b/gst/audioresample/gstaudioresample.c
@@ -36,9 +36,10 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! audio/x-raw, rate=8000 ! alsasink
- * ]| Decode an Ogg/Vorbis downsample to 8Khz and play sound through alsa.
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/audio.ogg ! audioconvert ! audioresample ! audio/x-raw, rate=8000 ! autoaudiosink
+ * ]| Decode an audio file and downsample it to 8Khz and play sound.
  * To create the Ogg/Vorbis file refer to the documentation of vorbisenc.
+ * This assumes there is an audio sink that will accept/handle 8kHz audio.
  * </refsect2>
  */
 
diff --git a/gst/audiotestsrc/Makefile.am b/gst/audiotestsrc/Makefile.am
index 3680d20..027d2b7 100644
--- a/gst/audiotestsrc/Makefile.am
+++ b/gst/audiotestsrc/Makefile.am
@@ -9,17 +9,3 @@
 libgstaudiotestsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstaudiotestsrc.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiotestsrc -:SHARED libgstaudiotestsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiotestsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiotestsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiotestsrc_la_LDFLAGS) \
-	           $(libgstaudiotestsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/audiotestsrc/Makefile.in b/gst/audiotestsrc/Makefile.in
index 13c9481..60d57bf 100644
--- a/gst/audiotestsrc/Makefile.in
+++ b/gst/audiotestsrc/Makefile.in
@@ -857,20 +857,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstaudiotestsrc -:SHARED libgstaudiotestsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstaudiotestsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstaudiotestsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstaudiotestsrc_la_LDFLAGS) \
-	           $(libgstaudiotestsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c
index 04d9de6..894fa16 100644
--- a/gst/audiotestsrc/gstaudiotestsrc.c
+++ b/gst/audiotestsrc/gstaudiotestsrc.c
@@ -25,11 +25,11 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch audiotestsrc ! audioconvert ! alsasink
+ * gst-launch-1.0 audiotestsrc ! audioconvert ! autoaudiosink
  * ]| This pipeline produces a sine with default frequency, 440 Hz, and the
  * default volume, 0.8 (relative to a maximum 1.0).
  * |[
- * gst-launch audiotestsrc wave=2 freq=200 ! audioconvert ! tee name=t ! queue ! alsasink t. ! queue ! libvisual_lv_scope ! videoconvert ! xvimagesink
+ * gst-launch-1.0 audiotestsrc wave=2 freq=200 ! tee name=t ! queue ! audioconvert ! autoaudiosink t. ! queue ! audioconvert ! libvisual_lv_scope ! videoconvert ! autovideosink
  * ]| In this example a saw wave is generated. The wave is shown using a
  * scope visualizer from libvisual, allowing you to visually verify that
  * the saw wave is correct.
@@ -71,8 +71,7 @@
   PROP_IS_LIVE,
   PROP_TIMESTAMP_OFFSET,
   PROP_CAN_ACTIVATE_PUSH,
-  PROP_CAN_ACTIVATE_PULL,
-  PROP_LAST
+  PROP_CAN_ACTIVATE_PULL
 };
 
 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
diff --git a/gst/encoding/Makefile.am b/gst/encoding/Makefile.am
index 8ce1978..f9e7379 100644
--- a/gst/encoding/Makefile.am
+++ b/gst/encoding/Makefile.am
@@ -21,18 +21,3 @@
 	gststreamcombinerpad.h
 
 include $(top_srcdir)/common/gst-glib-gen.mak
-
-Android.mk: Makefile.am
-	androgenizer \
-	-:PROJECT libgstencodebin -:SHARED libgstencodebin \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstencodebin_la_SOURCES) \
-	 	   $(nodist_libgstencodebin_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstencodebin_la_CFLAGS) \
-	 -:LDFLAGS $(libgstencodebin_la_LDFLAGS) \
-	           $(libgstencodebin_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/encoding/Makefile.in b/gst/encoding/Makefile.in
index bde0677..a07befa 100644
--- a/gst/encoding/Makefile.in
+++ b/gst/encoding/Makefile.in
@@ -940,21 +940,6 @@
 .deps/%-enumtypes.Plo:
 	@touch $@
 
-Android.mk: Makefile.am
-	androgenizer \
-	-:PROJECT libgstencodebin -:SHARED libgstencodebin \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstencodebin_la_SOURCES) \
-	 	   $(nodist_libgstencodebin_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstencodebin_la_CFLAGS) \
-	 -:LDFLAGS $(libgstencodebin_la_LDFLAGS) \
-	           $(libgstencodebin_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
index 4a2da5a..212cb46 100644
--- a/gst/encoding/gstencodebin.c
+++ b/gst/encoding/gstencodebin.c
@@ -251,8 +251,7 @@
   PROP_QUEUE_TIME_MAX,
   PROP_AUDIO_JITTER_TOLERANCE,
   PROP_AVOID_REENCODING,
-  PROP_FLAGS,
-  PROP_LAST
+  PROP_FLAGS
 };
 
 /* Signals */
diff --git a/gst/encoding/gstsmartencoder.c b/gst/encoding/gstsmartencoder.c
index 9960204..5c46da8 100644
--- a/gst/encoding/gstsmartencoder.c
+++ b/gst/encoding/gstsmartencoder.c
@@ -61,7 +61,7 @@
 
 enum
 {
-  ARG_0
+  PROP_0
       /* FILL ME */
 };
 
diff --git a/gst/gio/gstgio.c b/gst/gio/gstgio.c
index 9f2f2ba..6e45e80 100644
--- a/gst/gio/gstgio.c
+++ b/gst/gio/gstgio.c
@@ -231,6 +231,11 @@
   g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &uri_handler_info);
 }
 
+#define GIO_GVFS_MOUNTS_DIR GIO_PREFIX \
+    G_DIR_SEPARATOR_S "share" \
+    G_DIR_SEPARATOR_S "gvfs" \
+    G_DIR_SEPARATOR_S "mounts"
+
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
@@ -240,8 +245,8 @@
 
   gst_plugin_add_dependency_simple (plugin, NULL, GIO_MODULE_DIR, NULL,
       GST_PLUGIN_DEPENDENCY_FLAG_NONE);
-  gst_plugin_add_dependency_simple (plugin, "LD_LIBRARY_PATH", GIO_LIBDIR,
-      "gvfsd", GST_PLUGIN_DEPENDENCY_FLAG_NONE);
+  gst_plugin_add_dependency_simple (plugin, NULL, GIO_GVFS_MOUNTS_DIR, NULL,
+      GST_PLUGIN_DEPENDENCY_FLAG_NONE);
 
   /* FIXME: Rank is MARGINAL for now, should be at least SECONDARY+1 in the future
    * to replace gnomevfssink/src. For testing purposes PRIMARY+1 one makes sense
diff --git a/gst/gio/gstgiosink.c b/gst/gio/gstgiosink.c
index 3f985b8..cf02090 100644
--- a/gst/gio/gstgiosink.c
+++ b/gst/gio/gstgiosink.c
@@ -48,15 +48,15 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=input.xyz ! giosink location=file:///home/joe/out.xyz
+ * gst-launch-1.0 -v filesrc location=input.xyz ! giosink location=file:///home/joe/out.xyz
  * ]| The above pipeline will simply copy a local file. Instead of giosink,
  * we could just as well have used the filesink element here.
  * |[
- * gst-launch -v filesrc location=foo.mp3 ! mad ! flacenc ! giosink location=smb://othercomputer/foo.flac
- * ]| The above pipeline will re-encode an mp3 file into FLAC format and store
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/audio.file ! audioconvert ! flacenc ! giosink location=smb://othercomputer/foo.flac
+ * ]| The above pipeline will re-encode an audio file into FLAC format and store
  * it on a remote host using the Samba protocol.
  * |[
- * gst-launch -v audiotestsrc num-buffers=100 ! vorbisenc ! oggmux ! giosink location=file:///home/foo/bar.ogg
+ * gst-launch-1.0 -v audiotestsrc num-buffers=100 ! vorbisenc ! oggmux ! giosink location=file:///home/foo/bar.ogg
  * ]| The above pipeline will encode a 440Hz sine wave to Ogg Vorbis and stores
  * it in the home directory of user foo.
  * </refsect2>
@@ -65,7 +65,7 @@
 /* FIXME: We would like to mount the enclosing volume of an URL
  *        if it isn't mounted yet but this is possible async-only.
  *        Unfortunately this requires a running main loop from the
- *        default context and we can't guarantuee this!
+ *        default context and we can't guarantee this!
  *
  *        We would also like to do authentication while mounting.
  */
diff --git a/gst/gio/gstgiosrc.c b/gst/gio/gstgiosrc.c
index d214905..9f9bae5 100644
--- a/gst/gio/gstgiosrc.c
+++ b/gst/gio/gstgiosrc.c
@@ -43,18 +43,18 @@
  * <refsect2>
  * <title>Example launch lines</title>
  * |[
- * gst-launch -v giosrc location=file:///home/joe/foo.xyz ! fakesink
+ * gst-launch-1.0 -v giosrc location=file:///home/joe/foo.xyz ! fakesink
  * ]| The above pipeline will simply read a local file and do nothing with the
  * data read. Instead of giosrc, we could just as well have used the
  * filesrc element here.
  * |[
- * gst-launch -v giosrc location=smb://othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz
+ * gst-launch-1.0 -v giosrc location=smb://othercomputer/foo.xyz ! filesink location=/home/joe/foo.xyz
  * ]| The above pipeline will copy a file from a remote host to the local file
  * system using the Samba protocol.
  * |[
- * gst-launch -v giosrc location=http://music.foobar.com/demo.mp3 ! mad ! audioconvert ! audioresample ! alsasink
+ * gst-launch-1.0 -v giosrc location=smb://othercomputer/demo.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink
  * ]| The above pipeline will read and decode and play an mp3 file from a
- * web server using the http protocol.
+ * SAMBA server.
  * </refsect2>
  */
 
diff --git a/gst/playback/Makefile.am b/gst/playback/Makefile.am
index 24e6b16..cc2c5ce 100644
--- a/gst/playback/Makefile.am
+++ b/gst/playback/Makefile.am
@@ -39,18 +39,3 @@
 BUILT_SOURCES = $(built_headers) $(built_sources)
 
 CLEANFILES = $(BUILT_SOURCES)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstplayback -:SHARED libgstplayback \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstplayback_la_SOURCES) \
-	           $(nodist_libgstplayback_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstplayback_la_CFLAGS) $(csp_cflags) \
-	 -:LDFLAGS $(libgstplayback_la_LDFLAGS) \
-	           $(libgstplayback_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/playback/Makefile.in b/gst/playback/Makefile.in
index 504b07c..4640c8d 100644
--- a/gst/playback/Makefile.in
+++ b/gst/playback/Makefile.in
@@ -983,21 +983,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstplayback -:SHARED libgstplayback \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstplayback_la_SOURCES) \
-	           $(nodist_libgstplayback_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstplayback_la_CFLAGS) $(csp_cflags) \
-	 -:LDFLAGS $(libgstplayback_la_LDFLAGS) \
-	           $(libgstplayback_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index 94ebda9..1e58ff4 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -269,8 +269,7 @@
   PROP_MAX_SIZE_TIME,
   PROP_POST_STREAM_TOPOLOGY,
   PROP_EXPOSE_ALL_STREAMS,
-  PROP_CONNECTION_SPEED,
-  PROP_LAST
+  PROP_CONNECTION_SPEED
 };
 
 static GstBinClass *parent_class;
@@ -286,6 +285,9 @@
 
 static void decodebin_set_queue_size (GstDecodeBin * dbin,
     GstElement * multiqueue, gboolean preroll, gboolean seekable);
+static void decodebin_set_queue_size_full (GstDecodeBin * dbin,
+    GstElement * multiqueue, gboolean use_buffering, gboolean preroll,
+    gboolean seekable);
 
 static gboolean gst_decode_bin_autoplug_continue (GstElement * element,
     GstPad * pad, GstCaps * caps);
@@ -2802,7 +2804,7 @@
   g_assert (dbin);
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_EOS:
-      GST_DEBUG_OBJECT (dbin, "Received EOS on a non final pad, this stream "
+      GST_DEBUG_OBJECT (pad, "Received EOS on a non final pad, this stream "
           "ended too early");
       chain->deadend = TRUE;
       chain->drained = TRUE;
@@ -3244,8 +3246,10 @@
 
   if (chain->endpad) {
     if (chain->endpad->exposed) {
-      gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin),
-          GST_PAD_CAST (chain->endpad));
+      GstPad *endpad = GST_PAD_CAST (chain->endpad);
+      gst_pad_push_event (endpad, gst_event_new_flush_start ());
+      gst_pad_push_event (endpad, gst_event_new_flush_stop (FALSE));
+      gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin), endpad);
     }
 
     decode_pad_set_target (chain->endpad, NULL);
@@ -3508,19 +3512,28 @@
   g_thread_unref (thread);
 }
 
-/* configure queue sizes, this depends on the buffering method and if we are
- * playing or prerolling. */
 static void
 decodebin_set_queue_size (GstDecodeBin * dbin, GstElement * multiqueue,
     gboolean preroll, gboolean seekable)
 {
-  guint max_bytes, max_buffers;
-  guint64 max_time;
   gboolean use_buffering;
 
   /* get the current config from the multiqueue */
   g_object_get (multiqueue, "use-buffering", &use_buffering, NULL);
 
+  decodebin_set_queue_size_full (dbin, multiqueue, use_buffering, preroll,
+      seekable);
+}
+
+/* configure queue sizes, this depends on the buffering method and if we are
+ * playing or prerolling. */
+static void
+decodebin_set_queue_size_full (GstDecodeBin * dbin, GstElement * multiqueue,
+    gboolean use_buffering, gboolean preroll, gboolean seekable)
+{
+  guint max_bytes, max_buffers;
+  guint64 max_time;
+
   GST_DEBUG_OBJECT (multiqueue, "use buffering %d", use_buffering);
 
   if (preroll || use_buffering) {
@@ -3595,7 +3608,7 @@
       gst_object_unref (pad);
     }
   }
-  decodebin_set_queue_size (dbin, mq, TRUE, seekable);
+  decodebin_set_queue_size_full (dbin, mq, FALSE, TRUE, seekable);
 
   group->overrunsig = g_signal_connect (mq, "overrun",
       G_CALLBACK (multi_queue_overrun_cb), group);
@@ -4005,6 +4018,9 @@
     CHAIN_MUTEX_UNLOCK (chain);
   }
 
+  decodebin_set_queue_size_full (group->dbin, group->multiqueue, !ret,
+      FALSE, (group->parent ? group->parent->seekable : TRUE));
+
   if (ret) {
     /* all chains are buffering already, no need to do it here */
     g_object_set (group->multiqueue, "use-buffering", FALSE, NULL);
@@ -4013,8 +4029,6 @@
         "low-percent", group->dbin->low_percent,
         "high-percent", group->dbin->high_percent, NULL);
   }
-  decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
-      (group->parent ? group->parent->seekable : TRUE));
 
   GST_DEBUG_OBJECT (group->dbin, "Setting %s buffering to %d",
       GST_ELEMENT_NAME (group->multiqueue), !ret);
@@ -4262,7 +4276,8 @@
 static gboolean
 debug_sticky_event (GstPad * pad, GstEvent ** event, gpointer user_data)
 {
-  GST_DEBUG_OBJECT (pad, "sticky event %s", GST_EVENT_TYPE_NAME (*event));
+  GST_DEBUG_OBJECT (pad, "sticky event %s (%p)", GST_EVENT_TYPE_NAME (*event),
+      *event);
   return TRUE;
 }
 
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index fc38b0c..df75a8e 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -199,18 +199,18 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v playbin uri=file:///path/to/somefile.avi
+ * gst-launch-1.0 -v playbin uri=file:///path/to/somefile.mp4
  * ]| This will play back the given AVI video file, given that the video and
  * audio decoders required to decode the content are installed. Since no
- * special audio sink or video sink is supplied (not possible via gst-launch),
- * playbin will try to find a suitable audio and video sink automatically
- * using the autoaudiosink and autovideosink elements.
+ * special audio sink or video sink is supplied (via playbin's audio-sink or
+ * video-sink properties) playbin will try to find a suitable audio and
+ * video sink automatically using the autoaudiosink and autovideosink elements.
  * |[
- * gst-launch -v playbin uri=cdda://4
+ * gst-launch-1.0 -v playbin uri=cdda://4
  * ]| This will play back track 4 on an audio CD in your disc drive (assuming
  * the drive is detected automatically by the plugin).
  * |[
- * gst-launch -v playbin uri=dvd://
+ * gst-launch-1.0 -v playbin uri=dvd://
  * ]| This will play back the DVD in your disc drive (assuming
  * the drive is detected automatically by the plugin).
  * </refsect2>
@@ -570,8 +570,7 @@
   PROP_RING_BUFFER_MAX_SIZE,
   PROP_FORCE_ASPECT_RATIO,
   PROP_AUDIO_FILTER,
-  PROP_VIDEO_FILTER,
-  PROP_LAST
+  PROP_VIDEO_FILTER
 };
 
 /* signals */
@@ -3148,6 +3147,8 @@
 
   playbin = group->playbin;
 
+  GST_PLAY_BIN_SHUTDOWN_LOCK (playbin, shutdown);
+
   caps = gst_pad_get_current_caps (pad);
   if (!caps)
     caps = gst_pad_query_caps (pad, NULL);
@@ -3189,8 +3190,10 @@
   }
   /* no combiner found for the media type, don't bother linking it to a
    * combiner. This will leave the pad unlinked and thus ignored. */
-  if (combine == NULL)
+  if (combine == NULL) {
+    GST_PLAY_BIN_SHUTDOWN_UNLOCK (playbin);
     goto unknown_type;
+  }
 
   GST_SOURCE_GROUP_LOCK (group);
   if (combine->combiner == NULL && playbin->have_selector) {
@@ -3236,6 +3239,8 @@
     }
   }
 
+  GST_PLAY_BIN_SHUTDOWN_UNLOCK (playbin);
+
   if (combine->srcpad == NULL) {
     if (combine->combiner) {
       /* save source pad of the combiner */
@@ -3385,6 +3390,12 @@
       ("Failed to get request pad from combiner %p.", combine->combiner));
   GST_SOURCE_GROUP_UNLOCK (group);
   goto done;
+shutdown:
+  {
+    GST_DEBUG ("ignoring, we are shutting down. Pad will be left unlinked");
+    /* not going to done as we didn't request the caps */
+    return;
+  }
 }
 
 /* called when a pad is removed from the uridecodebin. We unlink the pad from
@@ -5596,7 +5607,7 @@
         break;
     case GST_STATE_CHANGE_READY_TO_NULL:
       /* we go async to PAUSED, so if that fails, we never make it to PAUSED
-       * an no state change PAUSED to READY passes here,
+       * and no state change PAUSED to READY passes here,
        * though it is a nice-to-have ... */
       if (!g_atomic_int_get (&playbin->shutdown)) {
         do_save = TRUE;
@@ -5722,11 +5733,13 @@
       GstSourceGroup *curr_group;
 
       curr_group = playbin->curr_group;
-      if (curr_group && curr_group->active && curr_group->valid) {
-        /* unlink our pads with the sink */
-        deactivate_group (playbin, curr_group);
+      if (curr_group) {
+        if (curr_group->active && curr_group->valid) {
+          /* unlink our pads with the sink */
+          deactivate_group (playbin, curr_group);
+        }
+        curr_group->valid = FALSE;
       }
-      curr_group->valid = FALSE;
 
       /* Swap current and next group back */
       playbin->curr_group = playbin->next_group;
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
index 62dc5fb..041bff0 100644
--- a/gst/playback/gstplaysink.c
+++ b/gst/playback/gstplaysink.c
@@ -345,8 +345,7 @@
   PROP_SEND_EVENT_MODE,
   PROP_FORCE_ASPECT_RATIO,
   PROP_VIDEO_FILTER,
-  PROP_AUDIO_FILTER,
-  PROP_LAST
+  PROP_AUDIO_FILTER
 };
 
 /* signals */
diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
index d0a2d00..dd1e3d1 100644
--- a/gst/playback/gststreamsynchronizer.c
+++ b/gst/playback/gststreamsynchronizer.c
@@ -65,7 +65,6 @@
   GstSegment segment;
 
   gboolean wait;                /* TRUE if waiting/blocking */
-  gboolean new_stream;
   gboolean is_eos;              /* TRUE if EOS was received */
   gboolean eos_sent;            /* when EOS was sent downstream */
   gboolean flushing;            /* set after flush-start and before flush-stop */
@@ -325,7 +324,6 @@
                 "Stream %d belongs to running stream %d, no waiting",
                 stream->stream_number, ostream->stream_number);
             stream->wait = FALSE;
-            stream->new_stream = FALSE;
 
             GST_STREAM_SYNCHRONIZER_UNLOCK (self);
             break;
@@ -340,7 +338,6 @@
         GST_DEBUG_OBJECT (pad, "Stream %d changed", stream->stream_number);
 
         stream->wait = TRUE;
-        stream->new_stream = TRUE;
 
         for (l = self->streams; l; l = l->next) {
           GstStream *ostream = l->data;
@@ -377,13 +374,19 @@
               position_running_time =
                   gst_segment_to_running_time (&ostream->segment,
                   GST_FORMAT_TIME, ostream->segment.position);
-              position =
-                  MAX (position, MAX (stop_running_time,
-                      position_running_time));
+
+              position_running_time =
+                  MAX (position_running_time, stop_running_time);
+              position_running_time -=
+                  gst_segment_to_running_time (&ostream->segment,
+                  GST_FORMAT_TIME, ostream->segment.start);
+              position_running_time = MAX (0, position_running_time);
+
+              position = MAX (position, position_running_time);
             }
           }
-          position = MAX (0, position);
-          self->group_start_time = MAX (self->group_start_time, position);
+
+          self->group_start_time += position;
 
           GST_DEBUG_OBJECT (self, "New group start time: %" GST_TIME_FORMAT,
               GST_TIME_ARGS (self->group_start_time));
@@ -417,10 +420,11 @@
 
       stream = gst_pad_get_element_private (pad);
       if (stream && segment.format == GST_FORMAT_TIME) {
-        if (stream->new_stream) {
-          stream->new_stream = FALSE;
-          segment.base = self->group_start_time;
-        }
+        GST_DEBUG_OBJECT (pad,
+            "New stream, updating base from %" GST_TIME_FORMAT " to %"
+            GST_TIME_FORMAT, GST_TIME_ARGS (segment.base),
+            GST_TIME_ARGS (segment.base + self->group_start_time));
+        segment.base += self->group_start_time;
 
         GST_DEBUG_OBJECT (pad, "Segment was: %" GST_SEGMENT_FORMAT,
             &stream->segment);
@@ -475,7 +479,6 @@
         stream->eos_sent = FALSE;
         stream->flushing = FALSE;
         stream->wait = FALSE;
-        stream->new_stream = FALSE;
         g_cond_broadcast (&stream->stream_finish_cond);
       }
       GST_STREAM_SYNCHRONIZER_UNLOCK (self);
@@ -809,28 +812,6 @@
   gst_pad_set_active (stream->sinkpad, FALSE);
   gst_element_remove_pad (GST_ELEMENT_CAST (self), stream->sinkpad);
 
-  if (stream->segment.format == GST_FORMAT_TIME) {
-    gint64 stop_running_time;
-    gint64 position_running_time;
-
-    stop_running_time =
-        gst_segment_to_running_time (&stream->segment, GST_FORMAT_TIME,
-        stream->segment.stop);
-    position_running_time =
-        gst_segment_to_running_time (&stream->segment, GST_FORMAT_TIME,
-        stream->segment.position);
-    stop_running_time = MAX (stop_running_time, position_running_time);
-
-    if (stop_running_time > self->group_start_time) {
-      GST_DEBUG_OBJECT (stream->sinkpad,
-          "Updating global start running time from %" GST_TIME_FORMAT " to %"
-          GST_TIME_FORMAT, GST_TIME_ARGS (self->group_start_time),
-          GST_TIME_ARGS (stop_running_time));
-
-      self->group_start_time = stop_running_time;
-    }
-  }
-
   g_cond_clear (&stream->stream_finish_cond);
   g_slice_free (GstStream, stream);
 
@@ -943,7 +924,6 @@
         gst_segment_init (&stream->segment, GST_FORMAT_UNDEFINED);
         stream->gap_duration = GST_CLOCK_TIME_NONE;
         stream->wait = FALSE;
-        stream->new_stream = FALSE;
         stream->is_eos = FALSE;
         stream->eos_sent = FALSE;
         stream->flushing = FALSE;
diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c
index 16ac166..6c56ed8 100644
--- a/gst/playback/gstsubtitleoverlay.c
+++ b/gst/playback/gstsubtitleoverlay.c
@@ -29,8 +29,8 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v filesrc location=test.mkv ! matroskademux name=demux ! "video/x-h264" ! queue2 ! decodebin ! subtitleoverlay name=overlay ! videoconvert ! autovideosink  demux. ! "subpicture/x-dvd" ! queue2 ! overlay.
- * ]| This will play back the given Matroska file with h264 video and subpicture subtitles.
+ * gst-launch-1.0 -v filesrc location=test.mkv ! matroskademux name=demux ! video/x-h264 ! queue ! decodebin ! subtitleoverlay name=overlay ! videoconvert ! autovideosink  demux. ! subpicture/x-dvd ! queue ! overlay.
+ * ]| This will play back the given Matroska file with h264 video and dvd subpicture style subtitles.
  * </refsect2>
  */
 
diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c
index 2807a50..784d010 100644
--- a/gst/playback/gsturidecodebin.c
+++ b/gst/playback/gsturidecodebin.c
@@ -197,8 +197,7 @@
   PROP_DOWNLOAD,
   PROP_USE_BUFFERING,
   PROP_EXPOSE_ALL_STREAMS,
-  PROP_RING_BUFFER_MAX_SIZE,
-  PROP_LAST
+  PROP_RING_BUFFER_MAX_SIZE
 };
 
 static guint gst_uri_decode_bin_signals[LAST_SIGNAL] = { 0 };
diff --git a/gst/tcp/Makefile.am b/gst/tcp/Makefile.am
index bc91a42..1ff06a3 100644
--- a/gst/tcp/Makefile.am
+++ b/gst/tcp/Makefile.am
@@ -30,18 +30,3 @@
   gsttcpserversrc.h gsttcpserversink.h gstmultihandlesink.h
 
 CLEANFILES = $(BUILT_SOURCES)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttcp -:SHARED libgsttcp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttcp_la_SOURCES) \
-	 	   $(nodist_libgsttcp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttcp_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttcp_la_LDFLAGS) \
-	           $(libgsttcp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/tcp/Makefile.in b/gst/tcp/Makefile.in
index 7096c1a..36ae055 100644
--- a/gst/tcp/Makefile.in
+++ b/gst/tcp/Makefile.in
@@ -950,21 +950,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttcp -:SHARED libgsttcp \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttcp_la_SOURCES) \
-	 	   $(nodist_libgsttcp_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttcp_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttcp_la_LDFLAGS) \
-	           $(libgsttcp_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c
index ab95985..c7b591f 100644
--- a/gst/tcp/gstmultifdsink.c
+++ b/gst/tcp/gstmultifdsink.c
@@ -153,8 +153,7 @@
 enum
 {
   PROP_0,
-  PROP_HANDLE_READ,
-  PROP_LAST
+  PROP_HANDLE_READ
 };
 
 static void gst_multi_fd_sink_stop_pre (GstMultiHandleSink * mhsink);
diff --git a/gst/tcp/gstmultihandlesink.c b/gst/tcp/gstmultihandlesink.c
index 38bd841..6ddbc98 100644
--- a/gst/tcp/gstmultihandlesink.c
+++ b/gst/tcp/gstmultihandlesink.c
@@ -194,9 +194,7 @@
 
   PROP_RESEND_STREAMHEADER,
 
-  PROP_NUM_HANDLES,
-
-  PROP_LAST
+  PROP_NUM_HANDLES
 };
 
 GType
diff --git a/gst/tcp/gstmultisocketsink.c b/gst/tcp/gstmultisocketsink.c
index 22a7e33..aed9808 100644
--- a/gst/tcp/gstmultisocketsink.c
+++ b/gst/tcp/gstmultisocketsink.c
@@ -575,7 +575,7 @@
     GST_DEBUG_OBJECT (sink, "%s client wants us to read", mhclient->debug);
 
     navail = g_socket_get_available_bytes (mhclient->handle.socket);
-    if (navail < 0)
+    if (navail <= 0)
       break;
 
     nread =
diff --git a/gst/tcp/gsttcpclientsink.c b/gst/tcp/gsttcpclientsink.c
index d2465a6..65a9d01 100644
--- a/gst/tcp/gsttcpclientsink.c
+++ b/gst/tcp/gsttcpclientsink.c
@@ -30,8 +30,9 @@
  * # server:
  * nc -l -p 3000
  * # client:
- * gst-launch fdsink fd=1 ! tcpclientsink port=3000
- * ]| everything you type in the client is shown on the server
+ * gst-launch-1.0 fdsink fd=1 ! tcpclientsink port=3000
+ * ]| everything you type in the client is shown on the server (fd=1 means
+ * standard input which is the command line input file descriptor)
  * </refsect2>
  */
 
diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c
index 633665b..2207563 100644
--- a/gst/tcp/gsttcpclientsrc.c
+++ b/gst/tcp/gsttcpclientsrc.c
@@ -30,7 +30,7 @@
  * # server:
  * nc -l -p 3000
  * # client:
- * gst-launch tcpclientsrc port=3000 ! fdsink fd=2
+ * gst-launch-1.0 tcpclientsrc port=3000 ! fdsink fd=2
  * ]| everything you type in the server is shown on the client
  * </refsect2>
  */
diff --git a/gst/tcp/gsttcpserversink.c b/gst/tcp/gsttcpserversink.c
index b805ebc..cb43d2d 100644
--- a/gst/tcp/gsttcpserversink.c
+++ b/gst/tcp/gsttcpserversink.c
@@ -26,9 +26,9 @@
  * <title>Example launch line</title>
  * |[
  * # server:
- * gst-launch fdsrc fd=1 ! tcpserversink port=3000
+ * gst-launch-1.0 fdsrc fd=1 ! tcpserversink port=3000
  * # client:
- * gst-launch tcpclientsrc port=3000 ! fdsink fd=2
+ * gst-launch-1.0 tcpclientsrc port=3000 ! fdsink fd=2
  * ]| 
  * </refsect2>
  */
diff --git a/gst/tcp/gsttcpserversrc.c b/gst/tcp/gsttcpserversrc.c
index d2a09e9..9cd6ad6 100644
--- a/gst/tcp/gsttcpserversrc.c
+++ b/gst/tcp/gsttcpserversrc.c
@@ -28,9 +28,9 @@
  * <title>Example launch line</title>
  * |[
  * # server:
- * gst-launch tcpserversrc port=3000 ! fdsink fd=2
+ * gst-launch-1.0 tcpserversrc port=3000 ! fdsink fd=2
  * # client:
- * gst-launch fdsrc fd=1 ! tcpclientsink port=3000
+ * gst-launch-1.0 fdsrc fd=1 ! tcpclientsink port=3000
  * ]| 
  * </refsect2>
  */
diff --git a/gst/typefind/Makefile.am b/gst/typefind/Makefile.am
index 414b55d..3213c40 100644
--- a/gst/typefind/Makefile.am
+++ b/gst/typefind/Makefile.am
@@ -10,17 +10,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS) $(GIO_LIBS)
 
 libgsttypefindfunctions_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttypefindfunctions -:SHARED libgsttypefindfunctions \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttypefindfunctions_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttypefindfunctions_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttypefindfunctions_la_LDFLAGS) \
-	           $(libgsttypefindfunctions_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/typefind/Makefile.in b/gst/typefind/Makefile.in
index 8613c6a..034173b 100644
--- a/gst/typefind/Makefile.in
+++ b/gst/typefind/Makefile.in
@@ -859,20 +859,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgsttypefindfunctions -:SHARED libgsttypefindfunctions \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgsttypefindfunctions_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgsttypefindfunctions_la_CFLAGS) \
-	 -:LDFLAGS $(libgsttypefindfunctions_la_LDFLAGS) \
-	           $(libgsttypefindfunctions_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index c6073c3..2aa0bf0 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -3555,63 +3555,84 @@
 
 /*** application/vnd.ms-sstr+xml ***/
 
+static void
+mss_manifest_load_utf16 (gunichar2 * utf16_ne, const guint8 * utf16_data,
+    gsize data_size, guint data_endianness)
+{
+  memcpy (utf16_ne, utf16_data, data_size);
+  if (data_endianness != G_BYTE_ORDER) {
+    guint i;
+
+    for (i = 0; i < data_size / 2; ++i)
+      utf16_ne[i] = GUINT16_SWAP_LE_BE (utf16_ne[i]);
+  }
+}
+
 static GstStaticCaps mss_manifest_caps =
 GST_STATIC_CAPS ("application/vnd.ms-sstr+xml");
 #define MSS_MANIFEST_CAPS (gst_static_caps_get(&mss_manifest_caps))
 static void
 mss_manifest_type_find (GstTypeFind * tf, gpointer unused)
 {
+  gunichar2 utf16_ne[512];
+  const guint8 *data;
+  guint data_endianness = 0;
+  glong n_read = 0, size = 0;
+  guint length;
+  gchar *utf8;
+
   if (xml_check_first_element (tf, "SmoothStreamingMedia", 20, TRUE)) {
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MSS_MANIFEST_CAPS);
-  } else {
-    const guint8 *data;
-    gboolean utf16_le, utf16_be;
-    const gchar *convert_from = NULL;
-    guint8 *converted_data;
-
-    /* try detecting the charset */
-    data = gst_type_find_peek (tf, 0, 2);
-
-    if (data == NULL)
-      return;
-
-    /* look for a possible BOM */
-    utf16_le = data[0] == 0xFF && data[1] == 0xFE;
-    utf16_be = data[0] == 0xFE && data[1] == 0xFF;
-    if (utf16_le) {
-      convert_from = "UTF-16LE";
-    } else if (utf16_be) {
-      convert_from = "UTF-16BE";
-    }
-
-    if (convert_from) {
-      gsize new_size = 0;
-      guint length = gst_type_find_get_length (tf);
-
-      /* try a default that should be enough */
-      if (length == 0)
-        length = 512;
-      data = gst_type_find_peek (tf, 0, length);
-
-      if (data) {
-        /* skip the BOM */
-        data += 2;
-        length -= 2;
-
-        converted_data =
-            (guint8 *) g_convert ((gchar *) data, length, "UTF-8", convert_from,
-            NULL, &new_size, NULL);
-        if (converted_data) {
-          if (xml_check_first_element_from_data (converted_data, new_size,
-                  "SmoothStreamingMedia", 20, TRUE))
-            gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM,
-                MSS_MANIFEST_CAPS);
-
-          g_free (converted_data);
-        }
-      }
-    }
+    return;
   }
+
+  length = gst_type_find_get_length (tf);
+
+  /* try detecting the charset */
+  data = gst_type_find_peek (tf, 0, 2);
+
+  if (data == NULL)
+    return;
+
+  /* look for a possible BOM */
+  if (data[0] == 0xFF && data[1] == 0xFE)
+    data_endianness = G_LITTLE_ENDIAN;
+  else if (data[0] == 0xFE && data[1] == 0xFF)
+    data_endianness = G_BIG_ENDIAN;
+  else
+    return;
+
+  /* try a default that should be enough */
+  if (length == 0)
+    length = 512;
+  else if (length < 64)
+    return;
+  else                          /* the first few bytes should be enough */
+    length = MIN (1024, length);
+
+  data = gst_type_find_peek (tf, 0, length);
+
+  if (data == NULL)
+    return;
+
+  /* skip the BOM */
+  data += 2;
+  length -= 2;
+
+  length = GST_ROUND_DOWN_2 (length);
+
+  /* convert to native endian UTF-16 */
+  mss_manifest_load_utf16 (utf16_ne, data, length, data_endianness);
+
+  /* and now convert to UTF-8 */
+  utf8 = g_utf16_to_utf8 (utf16_ne, length / 2, &n_read, &size, NULL);
+  if (utf8 != NULL && n_read > 0) {
+    if (xml_check_first_element_from_data ((const guint8 *) utf8, size,
+            "SmoothStreamingMedia", 20, TRUE))
+      gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MSS_MANIFEST_CAPS);
+  }
+
+  g_free (utf8);
 }
 
 /*** image/jpeg ***/
diff --git a/gst/videoconvert/Makefile.am b/gst/videoconvert/Makefile.am
index aa449dc..67b5625 100644
--- a/gst/videoconvert/Makefile.am
+++ b/gst/videoconvert/Makefile.am
@@ -14,18 +14,3 @@
 libgstvideoconvert_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvideoconvert.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoconvert -:SHARED libgstvideoconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoconvert_la_SOURCES) \
-	           $(nodist_libgstvideoconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoconvert_la_LDFLAGS) \
-	           $(libgstvideoconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videoconvert/Makefile.in b/gst/videoconvert/Makefile.in
index 750a429..c697753 100644
--- a/gst/videoconvert/Makefile.in
+++ b/gst/videoconvert/Makefile.in
@@ -866,21 +866,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoconvert -:SHARED libgstvideoconvert \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoconvert_la_SOURCES) \
-	           $(nodist_libgstvideoconvert_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoconvert_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoconvert_la_LDFLAGS) \
-	           $(libgstvideoconvert_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/videoconvert/gstvideoconvert.c b/gst/videoconvert/gstvideoconvert.c
index e712aa3..ec71f8c 100644
--- a/gst/videoconvert/gstvideoconvert.c
+++ b/gst/videoconvert/gstvideoconvert.c
@@ -28,8 +28,10 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v videotestsrc ! video/x-raw,format=\(string\)YUY2 ! videoconvert ! ximagesink
- * ]|
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw,format=YUY2 ! videoconvert ! autovideosink
+ * ]| This will output a test video (generated in YUY2 format) in a video
+ * window. If the video sink selected does not support YUY2 videoconvert will
+ * automatically convert the video to a format understood by the video sink.
  * </refsect2>
  */
 
@@ -58,12 +60,26 @@
 
 #define DEFAULT_PROP_DITHER      GST_VIDEO_DITHER_BAYER
 #define DEFAULT_PROP_DITHER_QUANTIZATION 1
+#define DEFAULT_PROP_CHROMA_RESAMPLER	GST_VIDEO_RESAMPLER_METHOD_LINEAR
+#define DEFAULT_PROP_ALPHA_MODE GST_VIDEO_ALPHA_MODE_COPY
+#define DEFAULT_PROP_ALPHA_VALUE 1.0
+#define DEFAULT_PROP_CHROMA_MODE GST_VIDEO_CHROMA_MODE_FULL
+#define DEFAULT_PROP_MATRIX_MODE GST_VIDEO_MATRIX_MODE_FULL
+#define DEFAULT_PROP_GAMMA_MODE GST_VIDEO_GAMMA_MODE_NONE
+#define DEFAULT_PROP_PRIMARIES_MODE GST_VIDEO_PRIMARIES_MODE_NONE
 
 enum
 {
   PROP_0,
   PROP_DITHER,
-  PROP_DITHER_QUANTIZATION
+  PROP_DITHER_QUANTIZATION,
+  PROP_CHROMA_RESAMPLER,
+  PROP_ALPHA_MODE,
+  PROP_ALPHA_VALUE,
+  PROP_CHROMA_MODE,
+  PROP_MATRIX_MODE,
+  PROP_GAMMA_MODE,
+  PROP_PRIMARIES_MODE
 };
 
 #define CSP_VIDEO_CAPS GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" \
@@ -339,6 +355,12 @@
   /* fixate remaining fields */
   result = gst_caps_fixate (result);
 
+  if (direction == GST_PAD_SINK) {
+    if (gst_caps_is_subset (caps, result)) {
+      gst_caps_replace (&result, caps);
+    }
+  }
+
   return result;
 }
 
@@ -428,7 +450,21 @@
           GST_VIDEO_CONVERTER_OPT_DITHER_METHOD, GST_TYPE_VIDEO_DITHER_METHOD,
           space->dither,
           GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION, G_TYPE_UINT,
-          space->dither_quantization, NULL));
+          space->dither_quantization,
+          GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD,
+          GST_TYPE_VIDEO_RESAMPLER_METHOD, space->chroma_resampler,
+          GST_VIDEO_CONVERTER_OPT_ALPHA_MODE,
+          GST_TYPE_VIDEO_ALPHA_MODE, space->alpha_mode,
+          GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE,
+          G_TYPE_DOUBLE, space->alpha_value,
+          GST_VIDEO_CONVERTER_OPT_CHROMA_MODE,
+          GST_TYPE_VIDEO_CHROMA_MODE, space->chroma_mode,
+          GST_VIDEO_CONVERTER_OPT_MATRIX_MODE,
+          GST_TYPE_VIDEO_MATRIX_MODE, space->matrix_mode,
+          GST_VIDEO_CONVERTER_OPT_GAMMA_MODE,
+          GST_TYPE_VIDEO_GAMMA_MODE, space->gamma_mode,
+          GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE,
+          GST_TYPE_VIDEO_PRIMARIES_MODE, space->primaries_mode, NULL));
   if (space->convert == NULL)
     goto no_convert;
 
@@ -509,6 +545,37 @@
       g_param_spec_uint ("dither-quantization", "Dither Quantize",
           "Quantizer to use", 0, G_MAXUINT, DEFAULT_PROP_DITHER_QUANTIZATION,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_CHROMA_RESAMPLER,
+      g_param_spec_enum ("chroma-resampler", "Chroma resampler",
+          "Chroma resampler method", gst_video_resampler_method_get_type (),
+          DEFAULT_PROP_CHROMA_RESAMPLER,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ALPHA_MODE,
+      g_param_spec_enum ("alpha-mode", "Alpha Mode",
+          "Alpha Mode to use", gst_video_alpha_mode_get_type (),
+          DEFAULT_PROP_ALPHA_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ALPHA_VALUE,
+      g_param_spec_double ("alpha-value", "Alpha Value",
+          "Alpha Value to use", 0.0, 1.0,
+          DEFAULT_PROP_ALPHA_VALUE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_CHROMA_MODE,
+      g_param_spec_enum ("chroma-mode", "Chroma Mode", "Chroma Resampling Mode",
+          gst_video_chroma_mode_get_type (), DEFAULT_PROP_CHROMA_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_MATRIX_MODE,
+      g_param_spec_enum ("matrix-mode", "Matrix Mode", "Matrix Conversion Mode",
+          gst_video_matrix_mode_get_type (), DEFAULT_PROP_MATRIX_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_GAMMA_MODE,
+      g_param_spec_enum ("gamma-mode", "Gamma Mode", "Gamma Conversion Mode",
+          gst_video_gamma_mode_get_type (), DEFAULT_PROP_GAMMA_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PRIMARIES_MODE,
+      g_param_spec_enum ("primaries-mode", "Primaries Mode",
+          "Primaries Conversion Mode", gst_video_primaries_mode_get_type (),
+          DEFAULT_PROP_PRIMARIES_MODE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -516,6 +583,13 @@
 {
   space->dither = DEFAULT_PROP_DITHER;
   space->dither_quantization = DEFAULT_PROP_DITHER_QUANTIZATION;
+  space->chroma_resampler = DEFAULT_PROP_CHROMA_RESAMPLER;
+  space->alpha_mode = DEFAULT_PROP_ALPHA_MODE;
+  space->alpha_value = DEFAULT_PROP_ALPHA_VALUE;
+  space->chroma_mode = DEFAULT_PROP_CHROMA_MODE;
+  space->matrix_mode = DEFAULT_PROP_MATRIX_MODE;
+  space->gamma_mode = DEFAULT_PROP_GAMMA_MODE;
+  space->primaries_mode = DEFAULT_PROP_PRIMARIES_MODE;
 }
 
 void
@@ -530,6 +604,27 @@
     case PROP_DITHER:
       csp->dither = g_value_get_enum (value);
       break;
+    case PROP_CHROMA_RESAMPLER:
+      csp->chroma_resampler = g_value_get_enum (value);
+      break;
+    case PROP_ALPHA_MODE:
+      csp->alpha_mode = g_value_get_enum (value);
+      break;
+    case PROP_ALPHA_VALUE:
+      csp->alpha_value = g_value_get_double (value);
+      break;
+    case PROP_CHROMA_MODE:
+      csp->chroma_mode = g_value_get_enum (value);
+      break;
+    case PROP_MATRIX_MODE:
+      csp->matrix_mode = g_value_get_enum (value);
+      break;
+    case PROP_GAMMA_MODE:
+      csp->gamma_mode = g_value_get_enum (value);
+      break;
+    case PROP_PRIMARIES_MODE:
+      csp->primaries_mode = g_value_get_enum (value);
+      break;
     case PROP_DITHER_QUANTIZATION:
       csp->dither_quantization = g_value_get_uint (value);
       break;
@@ -551,6 +646,27 @@
     case PROP_DITHER:
       g_value_set_enum (value, csp->dither);
       break;
+    case PROP_CHROMA_RESAMPLER:
+      g_value_set_enum (value, csp->chroma_resampler);
+      break;
+    case PROP_ALPHA_MODE:
+      g_value_set_enum (value, csp->alpha_mode);
+      break;
+    case PROP_ALPHA_VALUE:
+      g_value_set_double (value, csp->alpha_value);
+      break;
+    case PROP_CHROMA_MODE:
+      g_value_set_enum (value, csp->chroma_mode);
+      break;
+    case PROP_MATRIX_MODE:
+      g_value_set_enum (value, csp->matrix_mode);
+      break;
+    case PROP_GAMMA_MODE:
+      g_value_set_enum (value, csp->gamma_mode);
+      break;
+    case PROP_PRIMARIES_MODE:
+      g_value_set_enum (value, csp->primaries_mode);
+      break;
     case PROP_DITHER_QUANTIZATION:
       g_value_set_uint (value, csp->dither_quantization);
       break;
diff --git a/gst/videoconvert/gstvideoconvert.h b/gst/videoconvert/gstvideoconvert.h
index 861891c..78678df 100644
--- a/gst/videoconvert/gstvideoconvert.h
+++ b/gst/videoconvert/gstvideoconvert.h
@@ -49,6 +49,13 @@
   GstVideoConverter *convert;
   GstVideoDitherMethod dither;
   guint dither_quantization;
+  GstVideoResamplerMethod chroma_resampler;
+  GstVideoAlphaMode alpha_mode;
+  GstVideoChromaMode chroma_mode;
+  GstVideoMatrixMode matrix_mode;
+  GstVideoGammaMode gamma_mode;
+  GstVideoPrimariesMode primaries_mode;
+  gdouble alpha_value;
 };
 
 struct _GstVideoConvertClass
diff --git a/gst/videorate/Makefile.am b/gst/videorate/Makefile.am
index f62c1ba..e107924 100644
--- a/gst/videorate/Makefile.am
+++ b/gst/videorate/Makefile.am
@@ -3,22 +3,10 @@
 plugin_LTLIBRARIES = libgstvideorate.la
 
 libgstvideorate_la_SOURCES = gstvideorate.c
-libgstvideorate_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstvideorate_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstvideorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvideorate_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
-	$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
+libgstvideorate_la_LIBADD = \
+	$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
+	$(GST_BASE_LIBS) \
+	$(GST_LIBS)
 libgstvideorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideorate -:SHARED libgstvideorate \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideorate_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideorate_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideorate_la_LDFLAGS) \
-	           $(libgstvideorate_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videorate/Makefile.in b/gst/videorate/Makefile.in
index 8338f8e..28cd105 100644
--- a/gst/videorate/Makefile.in
+++ b/gst/videorate/Makefile.in
@@ -153,9 +153,8 @@
 am__installdirs = "$(DESTDIR)$(plugindir)"
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstvideorate_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) \
-	$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
+libgstvideorate_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_libgstvideorate_la_OBJECTS = libgstvideorate_la-gstvideorate.lo
 libgstvideorate_la_OBJECTS = $(am_libgstvideorate_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -523,10 +522,12 @@
 noinst_HEADERS = gstvideorate.h
 plugin_LTLIBRARIES = libgstvideorate.la
 libgstvideorate_la_SOURCES = gstvideorate.c
-libgstvideorate_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+libgstvideorate_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstvideorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvideorate_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
-	$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
+libgstvideorate_la_LIBADD = \
+	$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la \
+	$(GST_BASE_LIBS) \
+	$(GST_LIBS)
 
 libgstvideorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 all: all-am
@@ -855,20 +856,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideorate -:SHARED libgstvideorate \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideorate_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideorate_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideorate_la_LDFLAGS) \
-	           $(libgstvideorate_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c
index 1aaf021..aa3cf14 100644
--- a/gst/videorate/gstvideorate.c
+++ b/gst/videorate/gstvideorate.c
@@ -55,13 +55,16 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videorate ! video/x-raw,framerate=15/1 ! xvimagesink
- * ]| Decode an Ogg/Theora file and adjust the framerate to 15 fps before playing.
- * To create the test Ogg/Theora file refer to the documentation of theoraenc.
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/video.ogg ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=15/1 ! autovideosink
+ * ]| Decode a video file and adjust the framerate to 15 fps before playing.
+ * To create a test Ogg/Theora file refer to the documentation of theoraenc.
  * |[
- * gst-launch -v v4l2src ! videorate ! video/x-raw,framerate=25/2 ! theoraenc ! oggmux ! filesink location=recording.ogg
+ * gst-launch-1.0 -v v4l2src ! videorate ! video/x-raw,framerate=25/2 ! theoraenc ! oggmux ! filesink location=recording.ogg
  * ]| Capture video from a V4L device, and adjust the stream to 12.5 fps before
  * encoding to Ogg/Theora.
+ * |[
+ * gst-launch-1.0 -v uridecodebin uri=file:///path/to/video.ogg ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=1/5 ! jpegenc ! multifilesink location=snapshot-%05d.jpg
+ * ]| Decode a video file and save a snapshot every 5 seconds as consecutively numbered jpeg file.
  * </refsect2>
  */
 
@@ -371,6 +374,19 @@
     s = gst_caps_get_structure (caps, i);
 
     s1 = gst_structure_copy (s);
+
+    if (videorate->updating_caps) {
+      GST_INFO_OBJECT (trans,
+          "Only updating caps %" GST_PTR_FORMAT " with framerate" " %d/%d",
+          caps, videorate->to_rate_numerator, videorate->to_rate_denominator);
+
+      gst_structure_set (s1, "framerate", GST_TYPE_FRACTION,
+          videorate->to_rate_numerator, videorate->to_rate_denominator, NULL);
+      ret = gst_caps_merge_structure (ret, s1);
+
+      continue;
+    }
+
     s2 = gst_structure_copy (s);
     s3 = NULL;
 
@@ -550,6 +566,7 @@
   videorate->last_ts = GST_CLOCK_TIME_NONE;
   videorate->discont = TRUE;
   videorate->average = 0;
+  videorate->force_variable_rate = FALSE;
   gst_video_rate_swap_prev (videorate, NULL, 0);
 
   gst_segment_init (&videorate->segment, GST_FORMAT_TIME);
@@ -615,6 +632,8 @@
         videorate->to_rate_denominator * GST_SECOND,
         videorate->to_rate_numerator);
     GST_BUFFER_DURATION (outbuf) = videorate->next_ts - push_ts;
+  } else if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (outbuf))) {
+    videorate->next_ts = GST_BUFFER_PTS (outbuf) + GST_BUFFER_DURATION (outbuf);
   }
 
   /* We do not need to update time in VFR (variable frame rate) mode */
@@ -892,7 +911,7 @@
     n_allocation = gst_query_get_n_allocation_pools (query);
 
     while (i < n_allocation) {
-      GstBufferPool *pool;
+      GstBufferPool *pool = NULL;
       guint size, min, max;
 
       gst_query_parse_nth_allocation_pool (query, i, &pool, &size, &min, &max);
@@ -907,6 +926,8 @@
       }
 
       gst_query_set_nth_allocation_pool (query, i, pool, size, min + 1, max);
+      if (pool)
+        gst_object_unref (pool);
       i++;
     }
 
@@ -977,6 +998,55 @@
   return GST_BASE_TRANSFORM_FLOW_DROPPED;
 }
 
+/* Check if downstream forces variable framerate (0/1) and if
+ * it is the case, use variable framerate ourself
+ * Otherwise compute the framerate from the 2 buffers that we
+ * have already received and make use of it as wanted framerate
+ */
+static void
+gst_video_rate_check_variable_rate (GstVideoRate * videorate,
+    GstBuffer * buffer)
+{
+  GstStructure *st;
+  gint fps_d, fps_n;
+  GstCaps *srcpadcaps, *tmpcaps;
+  GstPad *pad = NULL;
+
+  srcpadcaps =
+      gst_pad_get_current_caps (GST_BASE_TRANSFORM_SRC_PAD (videorate));
+
+  gst_video_guess_framerate (GST_BUFFER_PTS (buffer) -
+      GST_BUFFER_PTS (videorate->prevbuf), &fps_n, &fps_d);
+
+  tmpcaps = gst_caps_copy (srcpadcaps);
+  st = gst_caps_get_structure (tmpcaps, 0);
+  gst_structure_set (st, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL);
+  gst_caps_unref (srcpadcaps);
+
+  pad = gst_pad_get_peer (GST_BASE_TRANSFORM_SRC_PAD (videorate));
+  if (pad && !gst_pad_query_accept_caps (pad, tmpcaps)) {
+    videorate->force_variable_rate = TRUE;
+    GST_DEBUG_OBJECT (videorate, "Downstream forces variable framerate"
+        " respecting it");
+
+    goto done;
+  }
+
+  videorate->to_rate_numerator = fps_n;
+  videorate->to_rate_denominator = fps_d;
+
+  GST_INFO_OBJECT (videorate, "Computed framerate to %d/%d",
+      videorate->to_rate_numerator, videorate->to_rate_denominator);
+
+  videorate->updating_caps = TRUE;
+  gst_base_transform_update_src_caps (GST_BASE_TRANSFORM (videorate), tmpcaps);
+
+done:
+  gst_caps_unref (tmpcaps);
+  if (pad)
+    gst_object_unref (pad);
+}
+
 static GstFlowReturn
 gst_video_rate_transform_ip (GstBaseTransform * trans, GstBuffer * buffer)
 {
@@ -993,6 +1063,11 @@
       videorate->to_rate_denominator == 0)
     goto not_negotiated;
 
+  if (videorate->to_rate_numerator == 0 && videorate->prevbuf &&
+      !videorate->force_variable_rate) {
+    gst_video_rate_check_variable_rate (videorate, buffer);
+  }
+
   GST_OBJECT_LOCK (videorate);
   avg_period = videorate->average_period_set;
   GST_OBJECT_UNLOCK (videorate);
@@ -1124,6 +1199,12 @@
           GST_TIME_ARGS (diff1), GST_TIME_ARGS (diff2),
           GST_TIME_ARGS (videorate->next_ts));
 
+      if (!GST_BUFFER_DURATION_IS_VALID (videorate->prevbuf) &&
+          intime > prevtime) {
+        /* Make sure that we have a duration for previous buffer */
+        GST_BUFFER_DURATION (videorate->prevbuf) = intime - prevtime;
+      }
+
       /* output first one when its the best */
       if (diff1 <= diff2) {
         GstFlowReturn r;
diff --git a/gst/videorate/gstvideorate.h b/gst/videorate/gstvideorate.h
index 92c841c..d5e7c19 100644
--- a/gst/videorate/gstvideorate.h
+++ b/gst/videorate/gstvideorate.h
@@ -65,6 +65,8 @@
   guint64 average_period;
   GstClockTimeDiff wanted_diff; /* target average diff */
   GstClockTimeDiff average;     /* moving average period */
+  gboolean force_variable_rate;
+  gboolean updating_caps;
 
   /* segment handling */
   GstSegment segment;
diff --git a/gst/videoscale/Makefile.am b/gst/videoscale/Makefile.am
index 053cddf..9462611 100644
--- a/gst/videoscale/Makefile.am
+++ b/gst/videoscale/Makefile.am
@@ -11,17 +11,3 @@
 
 noinst_HEADERS = \
 	gstvideoscale.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoscale -:SHARED libgstvideoscale \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoscale_la_SOURCES)
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoscale_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoscale_la_LDFLAGS) \
-	           $(libgstvideoscale_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videoscale/Makefile.in b/gst/videoscale/Makefile.in
index 591af7f..35bfda8 100644
--- a/gst/videoscale/Makefile.in
+++ b/gst/videoscale/Makefile.in
@@ -858,20 +858,6 @@
 	uninstall-pluginLTLIBRARIES
 
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideoscale -:SHARED libgstvideoscale \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideoscale_la_SOURCES)
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoscale_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideoscale_la_LDFLAGS) \
-	           $(libgstvideoscale_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c
index 20eb6e9..a88bee2 100644
--- a/gst/videoscale/gstvideoscale.c
+++ b/gst/videoscale/gstvideoscale.c
@@ -34,15 +34,14 @@
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
- * gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! ximagesink
- * ]| Decode an Ogg/Theora and display the video using ximagesink. Since
- * ximagesink cannot perform scaling, the video scaling will be performed by
- * videoscale when you resize the video window.
+ * gst-launch-1.0 -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! autovideosink
+ * ]| Decode an Ogg/Theora and display the video. If the video sink chosen
+ * cannot perform scaling, the video scaling will be performed by videoscale
+ * when you resize the video window.
  * To create the test Ogg/Theora file refer to the documentation of theoraenc.
  * |[
- * gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoscale ! video/x-raw, width=50 ! xvimagesink
- * ]| Decode an Ogg/Theora and display the video using xvimagesink with a width
- * of 50.
+ * gst-launch-1.0 -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videoconvert ! videoscale ! video/x-raw,width=100 ! autovideosink
+ * ]| Decode an Ogg/Theora and display the video with a width of 100.
  * </refsect2>
  */
 
@@ -603,10 +602,11 @@
         out_info->width - videoscale->borders_w,
         GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT, G_TYPE_INT,
         out_info->height - videoscale->borders_h,
-        GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, G_TYPE_STRING, "none",
-        GST_VIDEO_CONVERTER_OPT_DITHER_METHOD, GST_TYPE_VIDEO_DITHER_METHOD,
-        GST_VIDEO_DITHER_NONE, GST_VIDEO_CONVERTER_OPT_CHROMA_MODE,
-        G_TYPE_STRING, "none", NULL);
+        GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, GST_TYPE_VIDEO_MATRIX_MODE,
+        GST_VIDEO_MATRIX_MODE_NONE, GST_VIDEO_CONVERTER_OPT_DITHER_METHOD,
+        GST_TYPE_VIDEO_DITHER_METHOD, GST_VIDEO_DITHER_NONE,
+        GST_VIDEO_CONVERTER_OPT_CHROMA_MODE, GST_TYPE_VIDEO_CHROMA_MODE,
+        GST_VIDEO_CHROMA_MODE_NONE, NULL);
 
     if (videoscale->gamma_decode) {
       gst_structure_set (options,
diff --git a/gst/videotestsrc/Makefile.am b/gst/videotestsrc/Makefile.am
index 52230f2..6c37d1c 100644
--- a/gst/videotestsrc/Makefile.am
+++ b/gst/videotestsrc/Makefile.am
@@ -22,18 +22,3 @@
 generate_sine_table_SOURCES = generate_sine_table.c
 generate_sine_table_CFLAGS = $(GST_CFLAGS)
 generate_sine_table_LDADD = $(LIBM) $(GLIB_LIBS)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideotestsrc -:SHARED libgstvideotestsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideotestsrc_la_SOURCES) \
-	 	   $(nodist_libgstvideotestsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideotestsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideotestsrc_la_LDFLAGS) \
-	           $(libgstvideotestsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/videotestsrc/Makefile.in b/gst/videotestsrc/Makefile.in
index 0487c45..b442abe 100644
--- a/gst/videotestsrc/Makefile.in
+++ b/gst/videotestsrc/Makefile.in
@@ -993,21 +993,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvideotestsrc -:SHARED libgstvideotestsrc \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvideotestsrc_la_SOURCES) \
-	 	   $(nodist_libgstvideotestsrc_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideotestsrc_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvideotestsrc_la_LDFLAGS) \
-	           $(libgstvideotestsrc_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index ce98cb4..96a2a92 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -28,8 +28,8 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v videotestsrc pattern=snow ! ximagesink
- * ]| Shows random noise in an X window.
+ * gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! autovideosink
+ * ]| Shows random noise in a video window.
  * </refsect2>
  */
 
@@ -74,8 +74,7 @@
   PROP_YOFFSET,
   PROP_FOREGROUND_COLOR,
   PROP_BACKGROUND_COLOR,
-  PROP_HORIZONTAL_SPEED,
-  PROP_LAST
+  PROP_HORIZONTAL_SPEED
 };
 
 
diff --git a/gst/volume/Makefile.am b/gst/volume/Makefile.am
index bb83001..e1dd738 100644
--- a/gst/volume/Makefile.am
+++ b/gst/volume/Makefile.am
@@ -15,18 +15,3 @@
 libgstvolume_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
 noinst_HEADERS = gstvolume.h
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvolume -:SHARED libgstvolume \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvolume_la_SOURCES) \
-	  $(nodist_libgstvolume_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvolume_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvolume_la_LDFLAGS) \
-	           $(libgstvolume_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
diff --git a/gst/volume/Makefile.in b/gst/volume/Makefile.in
index 60de525..5888a69 100644
--- a/gst/volume/Makefile.in
+++ b/gst/volume/Makefile.in
@@ -947,21 +947,6 @@
 	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
 	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
 
-Android.mk: Makefile.am $(BUILT_SOURCES)
-	androgenizer \
-	-:PROJECT libgstvolume -:SHARED libgstvolume \
-	 -:TAGS eng debug \
-         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:SOURCES $(libgstvolume_la_SOURCES) \
-	  $(nodist_libgstvolume_la_SOURCES) \
-	 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvolume_la_CFLAGS) \
-	 -:LDFLAGS $(libgstvolume_la_LDFLAGS) \
-	           $(libgstvolume_la_LIBADD) \
-	           -ldl \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-		       LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
-	> $@
-
 # 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/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
index 7612095..0b6482a 100644
--- a/gst/volume/gstvolume.c
+++ b/gst/volume/gstvolume.c
@@ -30,7 +30,7 @@
  * <refsect2>
  * <title>Example launch line</title>
  * |[
- * gst-launch -v -m audiotestsrc ! volume volume=0.5 ! level ! fakesink silent=TRUE
+ * gst-launch-1.0 -v -m audiotestsrc ! volume volume=0.5 ! level ! fakesink silent=TRUE
  * ]| This pipeline shows that the level of audiotestsrc has been halved
  * (peak values are around -6 dB and RMS around -9 dB) compared to
  * the same pipeline without the volume element.
diff --git a/gst/volume/gstvolumeorc-dist.c b/gst/volume/gstvolumeorc-dist.c
index d4ccde8..4b6ee6d 100644
--- a/gst/volume/gstvolumeorc-dist.c
+++ b/gst/volume/gstvolumeorc-dist.c
@@ -258,7 +258,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 32, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 115, 99,
         97, 108, 97, 114, 109, 117, 108, 116, 105, 112, 108, 121, 95, 102, 54,
-            52,
+        52,
         95, 110, 115, 11, 8, 8, 18, 8, 214, 0, 0, 24, 2, 0,
       };
       p = orc_program_new_from_static_bytecode (bc);
@@ -388,7 +388,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 32, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 115, 99,
         97, 108, 97, 114, 109, 117, 108, 116, 105, 112, 108, 121, 95, 102, 51,
-            50,
+        50,
         95, 110, 115, 11, 4, 4, 17, 4, 202, 0, 0, 24, 2, 0,
       };
       p = orc_program_new_from_static_bytecode (bc);
@@ -1142,7 +1142,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 29, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 105, 110, 116, 56, 95, 99, 108, 97, 109,
-            112,
+        112,
         11, 1, 1, 14, 2, 3, 0, 0, 0, 16, 1, 20, 2, 174, 32, 0,
         24, 94, 32, 32, 16, 159, 0, 32, 2, 0,
       };
@@ -1564,7 +1564,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 37, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 102, 54, 52, 95, 49, 99, 104, 11, 8, 8, 12, 8, 8, 214, 0,
         0, 4, 2, 0,
       };
@@ -1714,7 +1714,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 37, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 102, 51, 50, 95, 49, 99, 104, 11, 4, 4, 12, 8, 8, 20, 4,
         225, 32, 4, 202, 0, 0, 32, 2, 0,
       };
@@ -1901,7 +1901,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 37, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 102, 51, 50, 95, 50, 99, 104, 11, 8, 8, 12, 8, 8, 20, 4,
         20, 8, 225, 32, 4, 194, 33, 32, 32, 21, 1, 202, 0, 0, 33, 2,
         0,
@@ -2064,7 +2064,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 39, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 105, 110, 116, 51, 50, 95, 49, 99, 104, 11, 4, 4, 12, 8, 8,
         20, 8, 223, 32, 0, 214, 32, 32, 4, 222, 0, 32, 2, 0,
       };
@@ -2255,7 +2255,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 39, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 105, 110, 116, 49, 54, 95, 49, 99, 104, 11, 2, 2, 12, 8, 8,
         20, 4, 20, 4, 153, 32, 0, 211, 32, 32, 225, 33, 4, 202, 32, 32,
         33, 210, 32, 32, 165, 0, 32, 2, 0,
@@ -2508,7 +2508,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 39, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 105, 110, 116, 49, 54, 95, 50, 99, 104, 11, 4, 4, 12, 8, 8,
         20, 8, 20, 4, 20, 8, 21, 1, 153, 32, 0, 21, 1, 211, 32, 32,
         225, 33, 4, 194, 34, 33, 33, 21, 1, 202, 34, 34, 32, 21, 1, 210,
@@ -2723,7 +2723,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 38, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 105, 110, 116, 56, 95, 49, 99, 104, 11, 1, 1, 12, 8, 8, 20,
         2, 20, 4, 20, 4, 149, 32, 0, 153, 33, 32, 211, 33, 33, 225, 34,
         4, 202, 33, 33, 34, 210, 33, 33, 163, 32, 33, 159, 0, 32, 2, 0,
@@ -2998,7 +2998,7 @@
       static const orc_uint8 bc[] = {
         1, 9, 38, 118, 111, 108, 117, 109, 101, 95, 111, 114, 99, 95, 112, 114,
         111, 99, 101, 115, 115, 95, 99, 111, 110, 116, 114, 111, 108, 108, 101,
-            100,
+        100,
         95, 105, 110, 116, 56, 95, 50, 99, 104, 11, 2, 2, 12, 8, 8, 20,
         4, 20, 8, 20, 8, 21, 1, 149, 32, 0, 21, 1, 153, 33, 32, 21,
         1, 211, 33, 33, 225, 32, 4, 194, 34, 32, 32, 21, 1, 202, 33, 33,
diff --git a/po/af.gmo b/po/af.gmo
index 63cb8ca..cdc4cf7 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index ba24176..f8a8101 100644
--- a/po/af.po
+++ b/po/af.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins 0.7.6\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-03-18 14:16+0200\n"
 "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
 "Language-Team: Afrikaans <i18n@af.org.za>\n"
diff --git a/po/az.gmo b/po/az.gmo
index a84415f..1d54a9c 100644
--- a/po/az.gmo
+++ b/po/az.gmo
Binary files differ
diff --git a/po/az.po b/po/az.po
index 4cd9df8..3a92bad 100644
--- a/po/az.po
+++ b/po/az.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.0\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-03-19 18:29+0200\n"
 "Last-Translator: Metin Amiroff <metin@karegen.com>\n"
 "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n"
diff --git a/po/bg.gmo b/po/bg.gmo
index f179392..9ecce6a 100644
--- a/po/bg.gmo
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
index ea51195..0e47b09 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-04-26 22:31+0300\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@fsa-bg.org>\n"
diff --git a/po/ca.gmo b/po/ca.gmo
index 06cf3c6..12c33c7 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 93db0dc..16d8a2e 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-01-01 14:19+0100\n"
 "Last-Translator: Gil Forcada <gforcada@gnome.org>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
diff --git a/po/cs.gmo b/po/cs.gmo
index fb87a12..7bb9f71 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index 6957c63..921fd93 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -10,7 +10,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-03-09 12:37+0100\n"
 "Last-Translator: Marek Černocký <marek@manet.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
diff --git a/po/da.gmo b/po/da.gmo
index 4e4a6d8..4686788 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index e7be5bd..9757015 100644
--- a/po/da.po
+++ b/po/da.po
@@ -33,7 +33,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-24 16:38+0100\n"
 "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
diff --git a/po/de.gmo b/po/de.gmo
index b9acfc7..80f81dd 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index cfa25f0..6a4ae6c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 20:43+0100\n"
 "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
diff --git a/po/el.gmo b/po/el.gmo
index 048ddc2..29c797d 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index a66f749..2764adf 100644
--- a/po/el.po
+++ b/po/el.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-05-05 19:13+0100\n"
 "Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
 "Language-Team: Greek <team@lists.gnome.gr>\n"
diff --git a/po/en_GB.gmo b/po/en_GB.gmo
index 2baeee7..6a1c914 100644
--- a/po/en_GB.gmo
+++ b/po/en_GB.gmo
Binary files differ
diff --git a/po/en_GB.po b/po/en_GB.po
index c5ea73c..40d8160 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins 0.8.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-04-26 10:41-0400\n"
 "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n"
 "Language-Team: English (British) <en_gb@li.org>\n"
diff --git a/po/eo.gmo b/po/eo.gmo
index 08687d0..0bba5e2 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index 7518599..3e966d4 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-06-04 21:11+0100\n"
 "Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n"
 "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
diff --git a/po/es.gmo b/po/es.gmo
index 07ce35c..25e71d7 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index ade8375..5357020 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-10-02 15:46+0200\n"
 "Last-Translator: Jorge González González <aloriel@gmail.com>\n"
 "Language-Team: Spanish <es@li.org>\n"
diff --git a/po/eu.gmo b/po/eu.gmo
index 2f32d33..368a88e 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index 340286f..efef9f0 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-0.10.26.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-03-25 12:32+0100\n"
 "Last-Translator: Mikel Olasagasti Uranga <hey_neken@mundurat.net>\n"
 "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
diff --git a/po/fi.gmo b/po/fi.gmo
index aa11ea4..8c320f2 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index fa62f7e..86f2ec5 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -12,7 +12,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.30.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-12-31 23:21+0200\n"
 "Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n"
 "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
diff --git a/po/fr.gmo b/po/fr.gmo
index 345555f..3fde989 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 55e5292..fbfaa8d 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2011-04-28 09:19+0200\n"
 "Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
 "Language-Team: French <traduc@traduc.org>\n"
diff --git a/po/gl.gmo b/po/gl.gmo
index 254871e..e0386eb 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index 92047d0..b6b9961 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-12-15 03:40+0200\n"
 "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
diff --git a/po/gst-plugins-base-1.0.pot b/po/gst-plugins-base-1.0.pot
index e249380..cb187f5 100644
--- a/po/gst-plugins-base-1.0.pot
+++ b/po/gst-plugins-base-1.0.pot
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.5.0.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -82,124 +82,124 @@
 msgid "Could not read CD."
 msgstr ""
 
-#: ext/ogg/gstoggdemux.c:4758
+#: ext/ogg/gstoggdemux.c:4819
 msgid "Internal data stream error."
 msgstr ""
 
-#: gst/encoding/gstencodebin.c:1563 gst/playback/gstplaybin2.c:3211
-#: gst/playback/gstplaysink.c:1483 gst/playback/gstplaysink.c:1500
-#: gst/playback/gstplaysink.c:1834 gst/playback/gstplaysink.c:1863
-#: gst/playback/gstplaysink.c:2443 gst/playback/gstplaysink.c:2492
-#: gst/playback/gstplaysink.c:2507 gst/playback/gstplaysink.c:2532
-#: gst/playback/gstplaysink.c:2564 gst/playback/gstplaysink.c:2709
-#: gst/playback/gstplaysink.c:2737 gst/playback/gstplaysink.c:3130
-#: gst/playback/gstplaysink.c:3139 gst/playback/gstplaysink.c:3148
-#: gst/playback/gstplaysink.c:3157 gst/playback/gstplaysink.c:4363
+#: gst/encoding/gstencodebin.c:1562 gst/playback/gstplaybin2.c:3214
+#: gst/playback/gstplaysink.c:1482 gst/playback/gstplaysink.c:1499
+#: gst/playback/gstplaysink.c:1833 gst/playback/gstplaysink.c:1862
+#: gst/playback/gstplaysink.c:2442 gst/playback/gstplaysink.c:2491
+#: gst/playback/gstplaysink.c:2506 gst/playback/gstplaysink.c:2531
+#: gst/playback/gstplaysink.c:2563 gst/playback/gstplaysink.c:2708
+#: gst/playback/gstplaysink.c:2736 gst/playback/gstplaysink.c:3129
+#: gst/playback/gstplaysink.c:3138 gst/playback/gstplaysink.c:3147
+#: gst/playback/gstplaysink.c:3156 gst/playback/gstplaysink.c:4362
 #: gst/playback/gstplaysinkconvertbin.c:97
 #: gst/playback/gstplaysinkconvertbin.c:117
-#: gst/playback/gsturidecodebin.c:1491
+#: gst/playback/gsturidecodebin.c:1490
 #, c-format
 msgid "Missing element '%s' - check your GStreamer installation."
 msgstr ""
 
-#: gst/playback/gstdecodebin2.c:1843
+#: gst/playback/gstdecodebin2.c:1845
 msgid "Could not determine type of stream"
 msgstr ""
 
-#: gst/playback/gstdecodebin2.c:2761
+#: gst/playback/gstdecodebin2.c:2763
 msgid "This appears to be a text file"
 msgstr ""
 
-#: gst/playback/gstplaybin2.c:5292
+#: gst/playback/gstplaybin2.c:5303
 msgid "Could not create \"uridecodebin\" element."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:1962
+#: gst/playback/gstplaysink.c:1961
 #, c-format
 msgid "Both autovideosink and %s elements are missing."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:1966
+#: gst/playback/gstplaysink.c:1965
 msgid "The autovideosink element is missing."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:1971
+#: gst/playback/gstplaysink.c:1970
 #, c-format
 msgid "Configured videosink %s is not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:1975
+#: gst/playback/gstplaysink.c:1974
 #, c-format
 msgid "Both autovideosink and %s elements are not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:1979
+#: gst/playback/gstplaysink.c:1978
 msgid "The autovideosink element is not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2480
+#: gst/playback/gstplaysink.c:2479
 msgid "Custom text sink element is not usable."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2862
+#: gst/playback/gstplaysink.c:2861
 msgid "No volume control found"
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2892
+#: gst/playback/gstplaysink.c:2891
 #, c-format
 msgid "Both autoaudiosink and %s elements are missing."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2896
+#: gst/playback/gstplaysink.c:2895
 msgid "The autoaudiosink element is missing."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2901
+#: gst/playback/gstplaysink.c:2900
 #, c-format
 msgid "Configured audiosink %s is not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2905
+#: gst/playback/gstplaysink.c:2904
 #, c-format
 msgid "Both autoaudiosink and %s elements are not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:2909
+#: gst/playback/gstplaysink.c:2908
 msgid "The autoaudiosink element is not working."
 msgstr ""
 
-#: gst/playback/gstplaysink.c:3233 gst/playback/gstplaysink.c:3238
+#: gst/playback/gstplaysink.c:3232 gst/playback/gstplaysink.c:3237
 msgid "Can't play a text file without video or visualizations."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:940
+#: gst/playback/gsturidecodebin.c:939
 #, c-format
 msgid "No decoder available for type '%s'."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:1397
+#: gst/playback/gsturidecodebin.c:1396
 msgid "No URI specified to play from."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:1403
+#: gst/playback/gsturidecodebin.c:1402
 #, c-format
 msgid "Invalid URI \"%s\"."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:1410
+#: gst/playback/gsturidecodebin.c:1409
 msgid "This stream type cannot be played yet."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:1428
+#: gst/playback/gsturidecodebin.c:1427
 #, c-format
 msgid "No URI handler implemented for \"%s\"."
 msgstr ""
 
-#: gst/playback/gsturidecodebin.c:2301
+#: gst/playback/gsturidecodebin.c:2300
 msgid "Source element is invalid."
 msgstr ""
 
-#: gst/tcp/gsttcpclientsink.c:214
+#: gst/tcp/gsttcpclientsink.c:215
 #, c-format
 msgid "Error while sending data to \"%s:%d\"."
 msgstr ""
@@ -660,7 +660,7 @@
 msgid "Initial key in which the sound starts"
 msgstr ""
 
-#: tools/gst-device-monitor.c:123 tools/gst-play.c:867
+#: tools/gst-device-monitor.c:123 tools/gst-play.c:926
 msgid "Print version information and exit"
 msgstr ""
 
@@ -670,51 +670,51 @@
 "added/removed."
 msgstr ""
 
-#: tools/gst-play.c:268
+#: tools/gst-play.c:272
 msgid "Buffering..."
 msgstr ""
 
-#: tools/gst-play.c:289
+#: tools/gst-play.c:293
 msgid "Clock lost, selecting a new one\n"
 msgstr ""
 
-#: tools/gst-play.c:869
+#: tools/gst-play.c:928
 msgid "Video sink to use (default is autovideosink)"
 msgstr ""
 
-#: tools/gst-play.c:871
+#: tools/gst-play.c:930
 msgid "Audio sink to use (default is autoaudiosink)"
 msgstr ""
 
-#: tools/gst-play.c:873
+#: tools/gst-play.c:932
 msgid "Enable gapless playback"
 msgstr ""
 
-#: tools/gst-play.c:875
+#: tools/gst-play.c:934
 msgid "Shuffle playlist"
 msgstr ""
 
-#: tools/gst-play.c:877
+#: tools/gst-play.c:936
 msgid "Interactive control via keyboard"
 msgstr ""
 
-#: tools/gst-play.c:879
+#: tools/gst-play.c:938
 msgid "Volume"
 msgstr ""
 
-#: tools/gst-play.c:881
+#: tools/gst-play.c:940
 msgid "Playlist file containing input media files"
 msgstr ""
 
-#: tools/gst-play.c:883
+#: tools/gst-play.c:942
 msgid "Do not print any output (apart from errors)"
 msgstr ""
 
-#: tools/gst-play.c:952
+#: tools/gst-play.c:1011
 #, c-format
 msgid "Usage: %s FILE1|URI1 [FILE2|URI2] [FILE3|URI3] ..."
 msgstr ""
 
-#: tools/gst-play.c:956
+#: tools/gst-play.c:1015
 msgid "You must provide at least one filename or URI to play."
 msgstr ""
diff --git a/po/hr.gmo b/po/hr.gmo
index e8ea3d7..49bad82 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 5a1bc54..3a2ed73 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.32.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2012-04-16 04:19+0200\n"
 "Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
 "Language-Team: Croatian <lokalizacija@linux.hr>\n"
diff --git a/po/hu.gmo b/po/hu.gmo
index 6e4e5b3..6b37693 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 5d2b42b..64232b7 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-23 20:48+0200\n"
 "Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
diff --git a/po/id.gmo b/po/id.gmo
index e3b32b8..ebc2100 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index d452ce0..c7ad5b8 100644
--- a/po/id.po
+++ b/po/id.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-01 09:55+0700\n"
 "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
diff --git a/po/it.gmo b/po/it.gmo
index afcf907..b432008 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 0373ed7..8f556c8 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.28.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-04-28 14:27+0200\n"
 "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
diff --git a/po/ja.gmo b/po/ja.gmo
index 157654b..75907bd 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index d9921eb..4a686c7 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.30.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-10-25 10:27+0900\n"
 "Last-Translator: Makoto Kato <makoto.kt@gmail.com>\n"
 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
diff --git a/po/lt.gmo b/po/lt.gmo
index 75130ae..d0f6a0c 100644
--- a/po/lt.gmo
+++ b/po/lt.gmo
Binary files differ
diff --git a/po/lt.po b/po/lt.po
index 0bda9e9..f72e0d7 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-0.10.15.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2008-03-07 23:43+0200\n"
 "Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
 "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
diff --git a/po/lv.gmo b/po/lv.gmo
index 8d081dc..f3bfa15 100644
--- a/po/lv.gmo
+++ b/po/lv.gmo
Binary files differ
diff --git a/po/lv.po b/po/lv.po
index 91d4535..87a4af2 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-04-20 16:15+0300\n"
 "Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n"
 "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
diff --git a/po/nb.gmo b/po/nb.gmo
index c30131a..5c25cc8 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index 4a35835..a527f47 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-01-22 17:42+0100\n"
 "Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
 "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
diff --git a/po/nl.gmo b/po/nl.gmo
index 781c9d7..ba41ea3 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index b960053..ea980e6 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 00:34+0200\n"
 "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
diff --git a/po/or.gmo b/po/or.gmo
index a269399..cae5a1b 100644
--- a/po/or.gmo
+++ b/po/or.gmo
Binary files differ
diff --git a/po/or.po b/po/or.po
index 2e73694..e04f22d 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-0.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-09-27 13:32+0530\n"
 "Last-Translator: Gora Mohanty <gora_mohanty@yahoo.co.in>\n"
 "Language-Team: Oriya <gora_mohanty@yahoo.co.in>\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index 2bbbb25..a690a05 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 2a5963e..634f40c 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 18:36+0200\n"
 "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 0cd0b41..3a1ce3c 100644
--- a/po/pt_BR.gmo
+++ b/po/pt_BR.gmo
Binary files differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 691f62c..3d86e8c 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -11,7 +11,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-12-29 17:33-0300\n"
 "Last-Translator: Fabrício Godoy <skarllot@gmail.com>\n"
 "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
diff --git a/po/ro.gmo b/po/ro.gmo
index b86001e..05570e9 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 0cd56e7..4761770 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.29.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2010-08-16 01:21+0300\n"
 "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
diff --git a/po/ru.gmo b/po/ru.gmo
index f48b50e..76d2ea9 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index d3c39ea..8eec763 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 20:01+0400\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@mx.ru>\n"
diff --git a/po/sk.gmo b/po/sk.gmo
index b53de04..3415c4a 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 1697ce3..de6064b 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-01-30 10:57+0100\n"
 "Last-Translator: Peter Tuharsky <tuharsky@misbb.sk>\n"
 "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
diff --git a/po/sl.gmo b/po/sl.gmo
index f77a283..f31b8f8 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 1426367..05d126e 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -10,7 +10,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-01-05 10:10+0100\n"
 "Last-Translator: Klemen Košir <klemen913@gmail.com>\n"
 "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
diff --git a/po/sq.gmo b/po/sq.gmo
index 493353a..563fc38 100644
--- a/po/sq.gmo
+++ b/po/sq.gmo
Binary files differ
diff --git a/po/sq.po b/po/sq.po
index 5bbb595..c91e105 100644
--- a/po/sq.po
+++ b/po/sq.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins 0.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2004-08-07 20:29+0200\n"
 "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
 "Language-Team: Albanian <begraj@hotmail.com>\n"
diff --git a/po/sr.gmo b/po/sr.gmo
index 1282771..363255b 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index 0e67485..ac53b42 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base-1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-18 19:35+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
diff --git a/po/sv.gmo b/po/sv.gmo
index b501042..7068fd5 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 674d356..e3ecae9 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-07-11 02:52+0200\n"
 "Last-Translator: Sebastian Rasmussen <sebras@gmail.com>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
diff --git a/po/tr.gmo b/po/tr.gmo
index 049c01f..a3e8b86 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index 883bbab..4960880 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.0.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2013-03-10 12:46+0200\n"
 "Last-Translator: Server Acim <serveracim@gmail.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
diff --git a/po/uk.gmo b/po/uk.gmo
index 391c81e..cec16bb 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index c81c16c..e527195 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-05-22 07:40+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
 "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
diff --git a/po/vi.gmo b/po/vi.gmo
index 30d03e5..4741e91 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index fc16c99..2d4fbd4 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 1.3.90\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2014-06-30 09:27+0700\n"
 "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
 "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 040bc8f..c528687 100644
--- a/po/zh_CN.gmo
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index cb3aad9..064b523 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-base 0.10.21.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2015-03-16 19:31+0100\n"
+"POT-Creation-Date: 2015-05-13 13:04+0300\n"
 "PO-Revision-Date: 2009-01-14 12:41+0800\n"
 "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c
index 6a0d123..64d4687 100644
--- a/sys/ximage/ximagepool.c
+++ b/sys/ximage/ximagepool.c
@@ -213,7 +213,7 @@
   int (*handler) (Display *, XErrorEvent *);
   gboolean success = FALSE;
   GstXContext *xcontext;
-  gint width, height, align = 15, offset;
+  gint width, height, align, offset;
   GstXImageMemory *mem;
 
   ximagesink = xpool->sink;
@@ -276,6 +276,7 @@
         mem->size, width, mem->ximage->bytes_per_line);
 
     /* get shared memory */
+    align = 0;
     mem->SHMInfo.shmid =
         shmget (IPC_PRIVATE, mem->size + align, IPC_CREAT | 0777);
     if (mem->SHMInfo.shmid == -1)
@@ -330,6 +331,8 @@
     allocsize =
         GST_ROUND_UP_4 (mem->ximage->bytes_per_line) * mem->ximage->height;
 
+    /* we want 16 byte aligned memory, g_malloc may only give 8 */
+    align = 15;
     mem->ximage->data = g_malloc (allocsize + align);
     GST_LOG_OBJECT (ximagesink,
         "non-XShm image size is %" G_GSIZE_FORMAT " (alloced: %u), width %d, "
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 2a1f76b..7814ac8 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -74,14 +74,14 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! queue ! ximagesink
+ * gst-launch-1.0 -v videotestsrc ! queue ! ximagesink
  * ]| A pipeline to test reverse negotiation. When the test video signal appears
  * you can resize the window and see that scaled buffers of the desired size are
  * going to arrive with a short delay. This illustrates how buffers of desired
  * size are allocated along the way. If you take away the queue, scaling will
  * happen almost immediately.
  * |[
- * gst-launch -v videotestsrc ! navigationtest ! videoconvert ! ximagesink
+ * gst-launch-1.0 -v videotestsrc ! navigationtest ! videoconvert ! ximagesink
  * ]| A pipeline to test navigation events.
  * While moving the mouse pointer over the test signal you will see a black box
  * following the mouse pointer. If you press the mouse button somewhere on the 
@@ -89,7 +89,7 @@
  * the button and a red one where you released it. (The navigationtest element
  * is part of gst-plugins-good.)
  * |[
- * gst-launch -v videotestsrc ! video/x-raw, pixel-aspect-ratio=(fraction)4/3 ! videoscale ! ximagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw, pixel-aspect-ratio=(fraction)4/3 ! videoscale ! ximagesink
  * ]| This is faking a 4/3 pixel aspect ratio caps on video frames produced by
  * videotestsrc, in most cases the pixel aspect ratio of the display will be
  * 1/1. This means that videoscale will have to do the scaling to convert 
diff --git a/sys/xvimage/xvimageallocator.c b/sys/xvimage/xvimageallocator.c
index c14a165..3582183 100644
--- a/sys/xvimage/xvimageallocator.c
+++ b/sys/xvimage/xvimageallocator.c
@@ -346,7 +346,7 @@
   int (*handler) (Display *, XErrorEvent *);
   gboolean success = FALSE;
   GstXvContext *context;
-  gint align = 15, offset;
+  gint align, offset;
   GstXvImageMemory *mem;
 
   context = allocator->context;
@@ -453,8 +453,9 @@
     }
 
     /* get shared memory */
+    align = 0;
     mem->SHMInfo.shmid =
-        shmget (IPC_PRIVATE, mem->xvimage->data_size + align, IPC_CREAT | 0777);
+        shmget (IPC_PRIVATE, mem->xvimage->data_size, IPC_CREAT | 0777);
     if (mem->SHMInfo.shmid == -1)
       goto shmget_failed;
 
@@ -489,6 +490,7 @@
       goto create_failed;
 
     /* we have to use the returned data_size for our image size */
+    align = 15;                 /* g_malloc aligns to 8, we need 16 */
     mem->xvimage->data = g_malloc (mem->xvimage->data_size + align);
 
     XSync (context->disp, FALSE);
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index a0d62a0..ad2d773 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -73,17 +73,20 @@
  * <refsect2>
  * <title>Examples</title>
  * |[
- * gst-launch -v videotestsrc ! xvimagesink
+ * gst-launch-1.0 -v videotestsrc ! xvimagesink
  * ]| A pipeline to test hardware scaling.
  * When the test video signal appears you can resize the window and see that
- * video frames are scaled through hardware (no extra CPU cost).
+ * video frames are scaled through hardware (no extra CPU cost). By default
+ * the image will never be distorted when scaled, instead black borders will
+ * be added if needed.
  * |[
- * gst-launch -v videotestsrc ! xvimagesink force-aspect-ratio=true
- * ]| Same pipeline with #GstXvImageSink:force-aspect-ratio property set to true
- * You can observe the borders drawn around the scaled image respecting aspect
- * ratio.
+ * gst-launch-1.0 -v videotestsrc ! xvimagesink force-aspect-ratio=false
+ * ]| Same pipeline with #GstXvImageSink:force-aspect-ratio property set to
+ * false. You can observe that no borders are drawn around the scaled image
+ * now and it will be distorted to fill the entire frame instead of respecting
+ * the aspect ratio.
  * |[
- * gst-launch -v videotestsrc ! navigationtest ! xvimagesink
+ * gst-launch-1.0 -v videotestsrc ! navigationtest ! xvimagesink
  * ]| A pipeline to test navigation events.
  * While moving the mouse pointer over the test signal you will see a black box
  * following the mouse pointer. If you press the mouse button somewhere on the
@@ -95,15 +98,14 @@
  * position. This also handles borders correctly, limiting coordinates to the
  * image area
  * |[
- * gst-launch -v videotestsrc ! video/x-raw, pixel-aspect-ratio=(fraction)4/3 ! xvimagesink
+ * gst-launch-1.0 -v videotestsrc ! video/x-raw, pixel-aspect-ratio=4/3 ! xvimagesink
  * ]| This is faking a 4/3 pixel aspect ratio caps on video frames produced by
  * videotestsrc, in most cases the pixel aspect ratio of the display will be
  * 1/1. This means that XvImageSink will have to do the scaling to convert
  * incoming frames to a size that will match the display pixel aspect ratio
- * (from 320x240 to 320x180 in this case). Note that you might have to escape
- * some characters for your shell like '\(fraction\)'.
+ * (from 320x240 to 320x180 in this case).
  * |[
- * gst-launch -v videotestsrc ! xvimagesink hue=100 saturation=-100 brightness=100
+ * gst-launch-1.0 -v videotestsrc ! xvimagesink hue=100 saturation=-100 brightness=100
  * ]| Demonstrates how to use the colorbalance interface.
  * </refsect2>
  */
@@ -1127,17 +1129,16 @@
 {
   GstXvImageSink *xvimagesink = GST_XVIMAGESINK (navigation);
   GstPad *peer;
+  gboolean handled = FALSE;
+  GstEvent *event = NULL;
 
   if ((peer = gst_pad_get_peer (GST_VIDEO_SINK_PAD (xvimagesink)))) {
-    GstEvent *event;
     GstVideoRectangle src = { 0, };
     GstVideoRectangle dst = { 0, };
     GstVideoRectangle result;
     gdouble x, y, xscale = 1.0, yscale = 1.0;
     GstXWindow *xwindow;
 
-    event = gst_event_new_navigation (structure);
-
     /* We take the flow_lock while we look at the window */
     g_mutex_lock (&xvimagesink->flow_lock);
 
@@ -1182,9 +1183,19 @@
           (gdouble) y * yscale, NULL);
     }
 
-    gst_pad_send_event (peer, event);
+    event = gst_event_new_navigation (structure);
+    gst_event_ref (event);
+    handled = gst_pad_send_event (peer, event);
     gst_object_unref (peer);
   }
+
+  if (!handled && event) {
+    gst_element_post_message ((GstElement *) xvimagesink,
+        gst_navigation_message_new_event ((GstObject *) xvimagesink, event));
+  }
+
+  if (event)
+    gst_event_unref (event);
 }
 
 static void
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 55f33c9..158e723 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -6,7 +6,7 @@
 REGISTRY_ENVIRONMENT = \
 	GST_REGISTRY_1_0=$(CHECK_REGISTRY)
 
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	CK_DEFAULT_TIMEOUT=120                                  \
 	GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"	\
 	$(REGISTRY_ENVIRONMENT)					\
@@ -20,11 +20,11 @@
 CLEANFILES = core.* test-registry.*
 
 clean-local: clean-local-check
-	
+
 distclean-local: distclean-local-orc
 
 $(CHECK_REGISTRY):
-	$(TESTS_ENVIRONMENT)
+	$(AM_TESTS_ENVIRONMENT)
 
 # elements to ignore for the state tests
 STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc libvisual_ alsasrc alsasink
@@ -258,10 +258,12 @@
 AM_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
 	$(GST_CFLAGS) $(GST_CHECK_CFLAGS) \
 	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 AM_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
 	$(GST_CXXFLAGS) $(GST_CHECK_CFLAGS) \
 	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 LDADD = $(GST_LIBS) $(GST_CHECK_LIBS)
 
diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in
index 28e368a..7800622 100644
--- a/tests/check/Makefile.in
+++ b/tests/check/Makefile.in
@@ -1354,7 +1354,7 @@
 REGISTRY_ENVIRONMENT = \
 	GST_REGISTRY_1_0=$(CHECK_REGISTRY)
 
-TESTS_ENVIRONMENT = \
+AM_TESTS_ENVIRONMENT = \
 	CK_DEFAULT_TIMEOUT=120                                  \
 	GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"	\
 	$(REGISTRY_ENVIRONMENT)					\
@@ -1442,11 +1442,13 @@
 AM_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
 	$(GST_CFLAGS) $(GST_CHECK_CFLAGS) \
 	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 
 AM_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
 	$(GST_CXXFLAGS) $(GST_CHECK_CFLAGS) \
 	-DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+	-DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_PLUGIN_LOADING_WHITELIST\"" \
 	-UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 
 LDADD = $(GST_LIBS) $(GST_CHECK_LIBS)
@@ -4081,38 +4083,38 @@
 # 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)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* ||							\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	GST_DEBUG=$$GST_DEBUG,*:2				\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # just like 'check', but don't run it again if it fails (useful for debugging)
 %.check-norepeat: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*
 
 # run any given test in a loop
 %.torture: %
 	@for i in `seq 1 $(LOOPS)`; do				\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$*; done
 
 # run any given test in an infinite loop
 %.forever: %
 	@while true; do						\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=20					\
 	$* || break; done
 
 # valgrind any given test by running make test.valgrind
 %.valgrind: %
 	@valgrind_log=$(subst /,-,$*-valgrind.log);		\
-	$(TESTS_ENVIRONMENT)					\
+	$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -4130,7 +4132,7 @@
 
 # valgrind any given test and generate suppressions for it
 %.valgrind.gen-suppressions: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_DEFAULT_TIMEOUT=360					\
 	G_SLICE=always-malloc					\
 	$(LIBTOOL) --mode=execute				\
@@ -4160,7 +4162,7 @@
 
 # gdb any given test by running make test.gdb
 %.gdb: %
-	@$(TESTS_ENVIRONMENT)					\
+	@$(AM_TESTS_ENVIRONMENT)					\
 	CK_FORK=no						\
 	$(LIBTOOL) --mode=execute				\
 	gdb $*
@@ -4264,7 +4266,7 @@
 	fi
 inspect:
 	@echo "Inspecting features ..."
-	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
+	@for e in `$(AM_TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
 	  | cut -d: -f2`;						\
 	  do echo Inspecting $$e;					\
 	     $(GST_INSPECT) $$e > /dev/null 2>&1; done
@@ -4313,7 +4315,7 @@
 distclean-local: distclean-local-orc
 
 $(CHECK_REGISTRY):
-	$(TESTS_ENVIRONMENT)
+	$(AM_TESTS_ENVIRONMENT)
 
 orc/video.c: $(top_srcdir)/gst-libs/gst/video/video-orc.orc
 	$(MKDIR_P) orc/
diff --git a/tests/check/elements/appsrc.c b/tests/check/elements/appsrc.c
index 29371ba..981b098 100644
--- a/tests/check/elements/appsrc.c
+++ b/tests/check/elements/appsrc.c
@@ -18,10 +18,20 @@
  * Boston, MA 02110-1301, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <gst/check/gstcheck.h>
 #include <gst/app/gstappsrc.h>
 #include <gst/app/gstappsink.h>
 
+#ifdef HAVE_VALGRIND
+#include <valgrind/valgrind.h>
+#else
+#define RUNNING_ON_VALGRIND FALSE
+#endif
+
 #define SAMPLE_CAPS "application/x-gst-check-test"
 
 static GstPad *mysinkpad;
@@ -115,7 +125,6 @@
 
 typedef struct
 {
-  GMainLoop *loop;
   GstElement *source;
   GstElement *sink;
 } ProgramData;
@@ -137,64 +146,6 @@
   return GST_FLOW_OK;
 }
 
-/* called when we get a GstMessage from the source pipeline when we get EOS, we
- * notify the appsrc of it. */
-static gboolean
-on_source_message (GstBus * bus, GstMessage * message, ProgramData * data)
-{
-  GstElement *source;
-  gboolean ret = TRUE;
-
-  switch (GST_MESSAGE_TYPE (message)) {
-    case GST_MESSAGE_EOS:
-      source = gst_bin_get_by_name (GST_BIN (data->sink), "testsource");
-      fail_unless (gst_app_src_end_of_stream (GST_APP_SRC (source)) ==
-          GST_FLOW_OK);
-      gst_object_unref (source);
-      break;
-    case GST_MESSAGE_ERROR:
-      g_main_loop_quit (data->loop);
-      ret = FALSE;
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-static gboolean
-on_sink_message (GstBus * bus, GstMessage * message, ProgramData * data)
-{
-  gboolean ret = TRUE;
-
-  switch (GST_MESSAGE_TYPE (message)) {
-    case GST_MESSAGE_EOS:
-      g_main_loop_quit (data->loop);
-      ret = FALSE;
-      break;
-    case GST_MESSAGE_ERROR:
-      ASSERT_SET_STATE (data->sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
-      ASSERT_SET_STATE (data->source, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
-      g_main_loop_quit (data->loop);
-      ret = FALSE;
-      break;
-    default:
-      break;
-  }
-  return ret;
-}
-
-static gboolean
-error_timeout (ProgramData * data)
-{
-  GstBus *bus;
-  bus = gst_element_get_bus (data->sink);
-  gst_bus_post (bus, gst_message_new_error (GST_OBJECT (data->sink), NULL,
-          "test error"));
-  gst_object_unref (bus);
-  return FALSE;
-}
-
 /*
  * appsink => appsrc pipelines executed 100 times: 
  * - appsink pipeline has sync=false
@@ -208,62 +159,48 @@
 
 GST_START_TEST (test_appsrc_block_deadlock)
 {
-  int i = 0;
-  int num_iteration = 100;
-  while (i < num_iteration) {
-    ProgramData *data = NULL;
-    GstBus *bus = NULL;
-    GstElement *testsink = NULL;
+  GstElement *testsink;
+  ProgramData *data;
 
-    data = g_new0 (ProgramData, 1);
+  GST_INFO ("iteration %d", __i__);
 
-    data->loop = g_main_loop_new (NULL, FALSE);
+  data = g_new0 (ProgramData, 1);
 
-    data->source =
-        gst_parse_launch ("videotestsrc ! appsink sync=false name=testsink",
-        NULL);
+  data->source =
+      gst_parse_launch ("videotestsrc ! video/x-raw,width=16,height=16 ! "
+      "appsink sync=false name=testsink", NULL);
 
-    fail_unless (data->source != NULL);
+  fail_unless (data->source != NULL);
 
-    bus = gst_element_get_bus (data->source);
-    gst_bus_add_watch (bus, (GstBusFunc) on_source_message, data);
-    gst_object_unref (bus);
+  app_callbacks.new_sample = on_new_sample_from_source;
+  testsink = gst_bin_get_by_name (GST_BIN (data->source), "testsink");
+  gst_app_sink_set_callbacks (GST_APP_SINK_CAST (testsink), &app_callbacks,
+      data, NULL);
 
-    app_callbacks.new_sample = on_new_sample_from_source;
-    testsink = gst_bin_get_by_name (GST_BIN (data->source), "testsink");
-    gst_app_sink_set_callbacks (GST_APP_SINK_CAST (testsink), &app_callbacks,
-        data, NULL);
+  gst_object_unref (testsink);
 
-    gst_object_unref (testsink);
+  data->sink =
+      gst_parse_launch
+      ("appsrc name=testsource block=1 max-bytes=1000 is-live=true ! "
+      "fakesink sync=true", NULL);
 
-    data->sink =
-        gst_parse_launch
-        ("appsrc name=testsource block=1 max-bytes=1000 is-live=true ! fakesink sync=true",
-        NULL);
+  fail_unless (data->sink != NULL);
 
-    fail_unless (data->sink != NULL);
+  ASSERT_SET_STATE (data->sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
+  ASSERT_SET_STATE (data->source, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
 
-    bus = gst_element_get_bus (data->sink);
-    gst_bus_add_watch (bus, (GstBusFunc) on_sink_message, data);
-    gst_object_unref (bus);
+  /* wait for preroll */
+  gst_element_get_state (data->source, NULL, NULL, GST_CLOCK_TIME_NONE);
+  gst_element_get_state (data->sink, NULL, NULL, GST_CLOCK_TIME_NONE);
 
-    g_timeout_add (150, (GSourceFunc) error_timeout, data);
+  g_usleep (50 * (G_USEC_PER_SEC / 1000));
 
-    ASSERT_SET_STATE (data->sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
-    ASSERT_SET_STATE (data->source, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
+  ASSERT_SET_STATE (data->sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
+  ASSERT_SET_STATE (data->source, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
 
-    g_main_loop_run (data->loop);
-
-    ASSERT_SET_STATE (data->sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
-    ASSERT_SET_STATE (data->source, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
-
-    gst_object_unref (data->source);
-    gst_object_unref (data->sink);
-    g_main_loop_unref (data->loop);
-    g_free (data);
-    i++;
-    GST_INFO ("appsrc deadlock test iteration number %d/%d", i, num_iteration);
-  }
+  gst_object_unref (data->source);
+  gst_object_unref (data->sink);
+  g_free (data);
 }
 
 GST_END_TEST;
@@ -275,9 +212,12 @@
   TCase *tc_chain = tcase_create ("general");
 
   tcase_add_test (tc_chain, test_appsrc_non_null_caps);
-  tcase_add_test (tc_chain, test_appsrc_block_deadlock);
 
-  tcase_set_timeout (tc_chain, 20);
+  if (RUNNING_ON_VALGRIND)
+    tcase_add_loop_test (tc_chain, test_appsrc_block_deadlock, 0, 5);
+  else
+    tcase_add_loop_test (tc_chain, test_appsrc_block_deadlock, 0, 100);
+
   suite_add_tcase (s, tc_chain);
 
   return s;
diff --git a/tests/check/elements/multisocketsink.c b/tests/check/elements/multisocketsink.c
index 5d9d788..d3a9a65 100644
--- a/tests/check/elements/multisocketsink.c
+++ b/tests/check/elements/multisocketsink.c
@@ -124,6 +124,39 @@
   return TRUE;
 }
 
+static gboolean
+read_handle_n_bytes_exactly (GSocket * srchandle, void *buf, size_t count)
+{
+  gssize total_read, read;
+  gchar *data = buf;
+
+  GST_DEBUG ("reading exactly %" G_GSIZE_FORMAT " bytes", count);
+
+  /* loop to make sure the sink has had a chance to write out all data.
+   * Depending on system load it might be written in multiple write calls,
+   * so it's possible our first read() just returns parts of the data. */
+  total_read = 0;
+  do {
+    read =
+        g_socket_receive (srchandle, data + total_read, count - total_read,
+        NULL, NULL);
+
+    if (read == 0)              /* socket was closed */
+      return FALSE;
+
+    if (read < 0)
+      fail ("read error");
+
+    total_read += read;
+
+    GST_INFO ("read %" G_GSSIZE_FORMAT " bytes, total now %" G_GSSIZE_FORMAT,
+        read, total_read);
+  }
+  while (total_read < count);
+
+  return TRUE;
+}
+
 static ssize_t
 read_handle (GSocket * srchandle, void *buf, size_t count)
 {
@@ -161,7 +194,7 @@
   GstElement *sink;
   GstBuffer *buffer;
   GstCaps *caps;
-  gchar data[4];
+  gchar data[9];
   GSocket *sinksocket, *srcsocket;
 
   sink = setup_multisocketsink ();
@@ -245,7 +278,7 @@
   }
 }
 
-GST_START_TEST (test_sending_buffers_with_9_gstmemorys)
+GST_START_TEST (test_sending_buffers_with_9_gstmemories)
 {
   TestSinkAndSocket tsas = { 0 };
   GstBuffer *buffer;
@@ -260,14 +293,13 @@
   setup_sink_with_socket (&tsas);
 
   buffer = gst_buffer_new ();
-  for (i = 0; i < sizeof (numbers) / sizeof (*numbers); i++)
+  for (i = 0; i < G_N_ELEMENTS (numbers); i++)
     gst_buffer_append_memory (buffer,
         gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, (gpointer) numbers[i],
             strlen (numbers[i]), 0, strlen (numbers[i]), NULL, NULL));
   fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
 
-  GST_DEBUG ("reading");
-  fail_if (read_handle (tsas.srcsocket, data, len) < len);
+  fail_unless (read_handle_n_bytes_exactly (tsas.srcsocket, data, len));
   fail_unless (strncmp (data, numbers_concat, len) == 0);
 
   teardown_sink_with_socket (&tsas);
@@ -949,7 +981,7 @@
   suite_add_tcase (s, tc_chain);
   tcase_add_test (tc_chain, test_no_clients);
   tcase_add_test (tc_chain, test_add_client);
-  tcase_add_test (tc_chain, test_sending_buffers_with_9_gstmemorys);
+  tcase_add_test (tc_chain, test_sending_buffers_with_9_gstmemories);
   tcase_add_test (tc_chain, test_streamheader);
   tcase_add_test (tc_chain, test_change_streamheader);
   tcase_add_test (tc_chain, test_burst_client_bytes);
diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c
index f8a9e08..7bb8861 100644
--- a/tests/check/elements/videorate.c
+++ b/tests/check/elements/videorate.c
@@ -40,6 +40,10 @@
     "framerate = (fraction) 25/1 , "    \
     "format = (string) I420"
 
+#define VIDEO_CAPS_FORCE_VARIABLE_FRAMERATE_STRING \
+    "video/x-raw, "                 \
+    "framerate = (fraction) 0/1"
+
 #define VIDEO_CAPS_NO_FRAMERATE_STRING  \
     "video/x-raw, "                 \
     "width = (int) 320, "               \
@@ -77,6 +81,13 @@
     GST_STATIC_CAPS (VIDEO_CAPS_TEMPLATE_STRING)
     );
 
+static GstStaticPadTemplate force_variable_rate_template =
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (VIDEO_CAPS_FORCE_VARIABLE_FRAMERATE_STRING)
+    );
+
 static void
 assert_videorate_stats (GstElement * videorate, const gchar * reason,
     guint64 xin, guint64 xout, guint64 xdropped, guint64 xduplicated)
@@ -1015,8 +1026,10 @@
   videorate = setup_videorate_full (&srctemplate, &sinktemplate);
 
   caps = gst_caps_from_string (test->caps);
+
   g_object_set_data_full (G_OBJECT (mysrcpad), "caps",
       gst_caps_ref (caps), (GDestroyNotify) gst_caps_unref);
+
   g_object_set_data_full (G_OBJECT (mysinkpad), "caps",
       gst_caps_ref (caps), (GDestroyNotify) gst_caps_unref);
   gst_caps_unref (caps);
@@ -1036,6 +1049,95 @@
 
 GST_END_TEST;
 
+static void
+videorate_send_buffers (GstElement * videorate,
+    const gchar * pre_push_caps, const gchar * post_push_caps)
+{
+  GstCaps *caps, *expected_caps;
+  GstBuffer *first;
+  GstBuffer *second;
+  GstBuffer *third;
+
+  caps = gst_pad_get_current_caps (mysinkpad);
+  expected_caps = gst_caps_from_string (pre_push_caps);
+  gst_check_caps_equal (caps, expected_caps);
+  gst_caps_unref (caps);
+  gst_caps_unref (expected_caps);
+
+  GST_DEBUG ("pushing first buffer");
+  first = gst_buffer_new_and_alloc (4);
+  gst_buffer_memset (first, 0, 0, 4);
+  GST_BUFFER_TIMESTAMP (first) = 0;
+  fail_unless (gst_pad_push (mysrcpad, first) == GST_FLOW_OK);
+
+  /* second buffer */
+  second = gst_buffer_new_and_alloc (4);
+  GST_BUFFER_TIMESTAMP (second) = GST_SECOND / 25;
+  gst_buffer_memset (second, 0, 0, 4);
+
+  fail_unless (gst_pad_push (mysrcpad, second) == GST_FLOW_OK);
+
+  /* third buffer with new size */
+  third = gst_buffer_new_and_alloc (4);
+  GST_BUFFER_TIMESTAMP (third) = 2 * GST_SECOND / 25;
+  gst_buffer_memset (third, 0, 0, 4);
+
+  fail_unless (gst_pad_push (mysrcpad, third) == GST_FLOW_OK);
+
+  caps = gst_pad_get_current_caps (mysinkpad);
+  expected_caps = gst_caps_from_string (post_push_caps);
+  gst_check_caps_equal (caps, expected_caps);
+  gst_caps_unref (caps);
+  gst_caps_unref (expected_caps);
+
+}
+
+GST_START_TEST (test_fixed_framerate)
+{
+  GstElement *videorate;
+  GstCaps *caps;
+
+  /* 1) if upstream caps contain a non-0/1 framerate, we should use that and pass
+   *    it on downstream (if possible; otherwise fixate_to_nearest)
+   */
+  videorate = setup_videorate_full (&srctemplate, &sinktemplate);
+
+  caps = gst_caps_from_string ("video/x-raw,framerate=25/1");
+  ASSERT_SET_STATE (videorate, GST_STATE_PLAYING, GST_STATE_CHANGE_SUCCESS);
+  gst_check_setup_events (mysrcpad, videorate, caps, GST_FORMAT_TIME);
+  gst_caps_unref (caps);
+  videorate_send_buffers (videorate, "video/x-raw,framerate=25/1",
+      "video/x-raw,framerate=25/1");
+  cleanup_videorate (videorate);
+
+  /* 2) if upstream framerate is 0/1 and downstream doesn't force a particular
+   *    framerate, we try to guess based on buffer intervals and use that as output
+   *    framerate */
+  videorate = setup_videorate_full (&srctemplate, &sinktemplate);
+  ASSERT_SET_STATE (videorate, GST_STATE_PLAYING, GST_STATE_CHANGE_SUCCESS);
+  caps = gst_caps_from_string ("video/x-raw,framerate=0/1");
+  gst_check_setup_events (mysrcpad, videorate, caps, GST_FORMAT_TIME);
+  gst_caps_unref (caps);
+  videorate_send_buffers (videorate, "video/x-raw,framerate=0/1",
+      "video/x-raw,framerate=25/1");
+  cleanup_videorate (videorate);
+
+  /* 3) if downstream force variable framerate, do that */
+  videorate =
+      setup_videorate_full (&srctemplate, &force_variable_rate_template);
+  ASSERT_SET_STATE (videorate, GST_STATE_PLAYING, GST_STATE_CHANGE_SUCCESS);
+  caps = gst_caps_from_string ("video/x-raw,framerate=0/1");
+  gst_check_setup_events (mysrcpad, videorate, caps, GST_FORMAT_TIME);
+  gst_caps_unref (caps);
+  videorate_send_buffers (videorate, "video/x-raw,framerate=0/1",
+      "video/x-raw,framerate=0/1");
+  cleanup_videorate (videorate);
+
+}
+
+GST_END_TEST;
+
+
 static Suite *
 videorate_suite (void)
 {
@@ -1054,6 +1156,7 @@
   tcase_add_test (tc_chain, test_selected_caps);
   tcase_add_loop_test (tc_chain, test_caps_negotiation,
       0, G_N_ELEMENTS (caps_negotiation_tests));
+  tcase_add_test (tc_chain, test_fixed_framerate);
 
   return s;
 }
diff --git a/tests/check/gst/typefindfunctions.c b/tests/check/gst/typefindfunctions.c
index f40d4ec..9c1dc0e 100644
--- a/tests/check/gst/typefindfunctions.c
+++ b/tests/check/gst/typefindfunctions.c
@@ -25,6 +25,28 @@
 #include <gst/check/gstcheck.h>
 #include <gst/base/gsttypefindhelper.h>
 
+static GstCaps *
+typefind_data (const guint8 * data, gsize data_size,
+    GstTypeFindProbability * prob)
+{
+  GstBuffer *buf;
+  GstCaps *caps;
+
+  GST_MEMDUMP ("typefind data", data, data_size);
+  buf = gst_buffer_new ();
+  gst_buffer_append_memory (buf,
+      gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY,
+          (guint8 *) data, data_size, 0, data_size, NULL, NULL));
+  GST_BUFFER_OFFSET (buf) = 0;
+
+  caps = gst_type_find_helper_for_buffer (NULL, buf, prob);
+  GST_INFO ("caps: %" GST_PTR_FORMAT ", probability=%u", caps, *prob);
+
+  gst_buffer_unref (buf);
+
+  return caps;
+}
+
 GST_START_TEST (test_quicktime_mpeg4video)
 {
   /* quicktime redirect file which starts with what could also be interpreted
@@ -387,6 +409,73 @@
 
 GST_END_TEST;
 
+static const gchar MANIFEST[] =
+    "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n"
+    "<!--Created with Expression Encoder version 2.1.1216.0-->\n"
+    "<SmoothStreamingMedia\n"
+    "  MajorVersion=\"1\"\n"
+    "  MinorVersion=\"0\"\n"
+    "  Duration=\"5965419999\">\n"
+    "  <StreamIndex\n"
+    "    Type=\"video\"\n"
+    "    Subtype=\"WVC1\"\n"
+    "    Chunks=\"299\"\n"
+    "    Url=\"QualityLevels({bitrate})/Fragments(video={start time})\">\n"
+    "    <QualityLevel\n"
+    "      Bitrate=\"2750000\"\n"
+    "      FourCC=\"WVC1\"\n" "      Width=\"1280\"\n" "      Height=\"720\"\n";
+
+static guint8 *
+generate_utf16 (guint off_lo, guint off_hi)
+{
+  guint8 *utf16;
+  gsize len, i;
+
+  len = strlen (MANIFEST);
+  /* BOM + UTF-16 string */
+  utf16 = g_malloc (2 + len * 2);
+  utf16[off_lo] = 0xff;
+  utf16[off_hi] = 0xfe;
+  for (i = 0; i < len; ++i) {
+    utf16[2 + (2 * i) + off_lo] = MANIFEST[i];
+    utf16[2 + (2 * i) + off_hi] = 0x00;
+  }
+
+  return utf16;
+}
+
+/* Test that we can typefind UTF16-LE and UTF16-BE variants
+ * of smooth streaming manifests (even without iconv) */
+GST_START_TEST (test_manifest_typefinding)
+{
+  GstTypeFindProbability prob;
+  const gchar *media_type;
+  GstCaps *caps;
+  guint8 *utf16;
+
+  utf16 = generate_utf16 (0, 1);
+  prob = 0;
+  caps = typefind_data (utf16, 2 + strlen (MANIFEST) * 2, &prob);
+  fail_unless (caps != NULL);
+  media_type = gst_structure_get_name (gst_caps_get_structure (caps, 0));
+  fail_unless_equals_string (media_type, "application/vnd.ms-sstr+xml");
+  fail_unless_equals_int (prob, GST_TYPE_FIND_MAXIMUM);
+  gst_caps_unref (caps);
+  g_free (utf16);
+
+  utf16 = generate_utf16 (1, 0);
+  prob = 0;
+  caps = typefind_data (utf16, 2 + strlen (MANIFEST) * 2, &prob);
+  fail_unless (caps != NULL);
+  media_type = gst_structure_get_name (gst_caps_get_structure (caps, 0));
+  fail_unless_equals_string (media_type, "application/vnd.ms-sstr+xml");
+  fail_unless_equals_int (prob, GST_TYPE_FIND_MAXIMUM);
+  gst_caps_unref (caps);
+  g_free (utf16);
+}
+
+GST_END_TEST;
+
 static Suite *
 typefindfunctions_suite (void)
 {
@@ -403,6 +492,7 @@
   tcase_add_test (tc_chain, test_eac3);
   tcase_add_test (tc_chain, test_random_data);
   tcase_add_test (tc_chain, test_hls_m3u8);
+  tcase_add_test (tc_chain, test_manifest_typefinding);
 
   return s;
 }
diff --git a/tests/check/libs/rtpbasedepayload.c b/tests/check/libs/rtpbasedepayload.c
index 15fa511..32d967a 100644
--- a/tests/check/libs/rtpbasedepayload.c
+++ b/tests/check/libs/rtpbasedepayload.c
@@ -253,6 +253,11 @@
       const GstSegment *segment;
       gst_event_parse_segment (event, &segment);
       fail_unless_equals_uint64 (segment->rate, expected);
+    } else if (!g_strcmp0 (field, "base")) {
+      GstClockTime expected = va_arg (var_args, GstClockTime);
+      const GstSegment *segment;
+      gst_event_parse_segment (event, &segment);
+      fail_unless_equals_uint64 (segment->base, expected);
     } else if (!g_strcmp0 (field, "media-type")) {
       const gchar *expected = va_arg (var_args, const gchar *);
       GstCaps *caps;
@@ -292,6 +297,15 @@
       fail_unless (gst_structure_get_double (gst_caps_get_structure (caps, 0),
               "play-scale", &scale));
       fail_unless (scale == expected);
+    } else if (!g_strcmp0 (field, "clock-base")) {
+      guint expected = va_arg (var_args, guint);
+      GstCaps *caps;
+      guint clock_base;
+      gst_event_parse_caps (event, &caps);
+      fail_unless (gst_structure_get_uint (gst_caps_get_structure (caps, 0),
+              "clock-base", &clock_base));
+      fail_unless (clock_base == expected);
+
     } else {
       fail ("test cannot validate unknown event field '%s'", field);
     }
@@ -1061,6 +1075,72 @@
   destroy_depayloader (state);
 }
 
+GST_END_TEST
+/* when a depayloader receives new caps events with npt-start, npt-stop and
+ * clock-base it should save these timestamps as they should affect the next
+ * segment event being pushed by the depayloader. the produce segment should
+ * make the positon of the stream reflect the postion form clock-base instead
+ * of reflecting the running time (for RTSP).
+ */
+GST_START_TEST (rtp_base_depayload_clock_base_test)
+{
+  State *state;
+
+  state = create_depayloader ("application/x-rtp", NULL);
+
+  set_state (state, GST_STATE_PLAYING);
+
+  push_rtp_buffer (state,
+      "pts", 0 * GST_SECOND,
+      "rtptime", G_GUINT64_CONSTANT (1234), "seq", 0x4242, NULL);
+
+  reconfigure_caps (state,
+      "application/x-rtp, npt-start=(guint64)1234, npt-stop=(guint64)4321, clock-base=(guint)1234");
+
+  flush_pipeline (state);
+
+  push_rtp_buffer (state,
+      "pts", 1 * GST_SECOND,
+      "rtptime", G_GUINT64_CONSTANT (1234) + 1 * DEFAULT_CLOCK_RATE,
+      "seq", 0x4242 + 1, NULL);
+
+  set_state (state, GST_STATE_NULL);
+
+  validate_buffers_received (2);
+
+  validate_buffer (0, "pts", 0 * GST_SECOND, "discont", FALSE, NULL);
+
+  validate_buffer (1, "pts", 1 * GST_SECOND, "discont", FALSE, NULL);
+
+  validate_events_received (7);
+
+  validate_event (0, "stream-start", NULL);
+
+  validate_event (1, "caps", "media-type", "application/x-rtp", NULL);
+
+  validate_event (2, "segment",
+      "time", G_GUINT64_CONSTANT (0),
+      "start", G_GUINT64_CONSTANT (0), "stop", G_MAXUINT64, NULL);
+
+  validate_event (3, "caps",
+      "media-type", "application/x-rtp",
+      "npt-start", G_GUINT64_CONSTANT (1234),
+      "npt-stop", G_GUINT64_CONSTANT (4321),
+      "clock-base", 1234, NULL);
+
+  validate_event (4, "flush-start", NULL);
+
+  validate_event (5, "flush-stop", NULL);
+
+  validate_event (6, "segment",
+      "time", G_GUINT64_CONSTANT (1234),
+      "start", GST_SECOND,
+      "stop", GST_SECOND + G_GUINT64_CONSTANT (4321 - 1234),
+      "base", GST_SECOND, NULL);
+
+  destroy_depayloader (state);
+}
+
 GST_END_TEST static Suite *
 rtp_basepayloading_suite (void)
 {
@@ -1085,6 +1165,7 @@
   tcase_add_test (tc_chain, rtp_base_depayload_npt_test);
   tcase_add_test (tc_chain, rtp_base_depayload_play_scale_test);
   tcase_add_test (tc_chain, rtp_base_depayload_play_speed_test);
+  tcase_add_test (tc_chain, rtp_base_depayload_clock_base_test);
 
   return s;
 }
diff --git a/tests/check/pipelines/basetime.c b/tests/check/pipelines/basetime.c
index 180935f..1664188 100644
--- a/tests/check/pipelines/basetime.c
+++ b/tests/check/pipelines/basetime.c
@@ -24,6 +24,10 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_VALGRIND
+#include <valgrind/valgrind.h>
+#endif
+
 #include <gst/check/gstcheck.h>
 
 #ifndef GST_DISABLE_PARSE
@@ -55,7 +59,7 @@
   }
   old_ts = new_ts;
 
-  return TRUE;
+  return GST_PAD_PROBE_OK;
 }
 
 GST_START_TEST (test_basetime_calculation)
@@ -68,7 +72,7 @@
   loop = g_main_loop_new (NULL, FALSE);
 
   /* The "main" pipeline */
-  p1 = gst_parse_launch ("fakesrc ! fakesink", NULL);
+  p1 = gst_parse_launch ("fakesrc ! identity sleep-time=1 ! fakesink", NULL);
   fail_if (p1 == NULL);
 
   /* Create a sub-bin that is activated only in "certain situations" */
@@ -130,9 +134,19 @@
 {
   Suite *s = suite_create ("baseaudiosrc");
   TCase *tc_chain = tcase_create ("general");
+  guint timeout;
 
   /* timeout 6 sec */
-  tcase_set_timeout (tc_chain, 6);
+  timeout = 6;
+
+#ifdef HAVE_VALGRIND
+  {
+    if (RUNNING_ON_VALGRIND)
+      timeout *= 4;
+  }
+#endif
+
+  tcase_set_timeout (tc_chain, timeout);
   suite_add_tcase (s, tc_chain);
 
 #ifndef GST_DISABLE_PARSE
diff --git a/tests/check/pipelines/tcp.c b/tests/check/pipelines/tcp.c
index 08733b9..00bdaa3 100644
--- a/tests/check/pipelines/tcp.c
+++ b/tests/check/pipelines/tcp.c
@@ -158,8 +158,7 @@
   st->src = gst_check_setup_element ("socketsrc");
 
   fail_unless (g_socketpair (G_SOCKET_FAMILY_UNIX,
-          G_SOCKET_TYPE_STREAM | SOCK_CLOEXEC, G_SOCKET_PROTOCOL_DEFAULT,
-          sockets, &err));
+          G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, sockets, &err));
 
   g_object_set (st->src, "socket", sockets[0], NULL);
   g_object_unref (sockets[0]);
@@ -236,15 +235,13 @@
   socketsrc = gst_check_setup_element ("socketsrc");
 
   fail_unless (g_socketpair (G_SOCKET_FAMILY_UNIX,
-          G_SOCKET_TYPE_STREAM | SOCK_CLOEXEC, G_SOCKET_PROTOCOL_DEFAULT,
-          &sockets[0], NULL));
+          G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &sockets[0], NULL));
 
   fail_unless (g_socket_send (sockets[0], "hello", 5, NULL, NULL) == 5);
   fail_unless (g_socket_shutdown (sockets[0], FALSE, TRUE, NULL));
 
   fail_unless (g_socketpair (G_SOCKET_FAMILY_UNIX,
-          G_SOCKET_TYPE_STREAM | SOCK_CLOEXEC, G_SOCKET_PROTOCOL_DEFAULT,
-          &sockets[2], NULL));
+          G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &sockets[2], NULL));
   fail_unless (g_socket_send (sockets[2], "goodbye", 7, NULL, NULL) == 7);
   fail_unless (g_socket_shutdown (sockets[2], FALSE, TRUE, NULL));
 
@@ -280,7 +277,6 @@
 }
 
 GST_END_TEST
-
 #ifdef HAVE_GIO_UNIX_2_0
 static GSocketControlMessage *
 get_control_message_meta (GstBuffer * buf)
diff --git a/tests/examples/app/appsink-src.c b/tests/examples/app/appsink-src.c
index 0c31c4a..b0de46b 100644
--- a/tests/examples/app/appsink-src.c
+++ b/tests/examples/app/appsink-src.c
@@ -1,3 +1,25 @@
+/* GStreamer
+ *
+ * appsink-src.c: example for using appsink and appsrc.
+ *
+ * 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
 #include <gst/gst.h>
 
 #include <string.h>
@@ -106,6 +128,11 @@
   else
     filename = g_strdup ("/usr/share/sounds/ekiga/ring.wav");
 
+  if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+    g_print ("File %s does not exist\n", filename);
+    return -1;
+  }
+
   data = g_new0 (ProgramData, 1);
 
   data->loop = g_main_loop_new (NULL, FALSE);
diff --git a/tests/examples/app/appsink-src2.c b/tests/examples/app/appsink-src2.c
index 77ea4d4..a409fa8 100644
--- a/tests/examples/app/appsink-src2.c
+++ b/tests/examples/app/appsink-src2.c
@@ -1,3 +1,25 @@
+/* GStreamer
+ *
+ * appsrc-src2.c: example for using gst_app_src_push_sample().
+ *
+ * Copyright (C) 2014 Nicola Murino <nicola.murino@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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
 #include <gst/gst.h>
 
 #include <string.h>
@@ -90,7 +112,6 @@
 int
 main (int argc, char *argv[])
 {
-  gchar *filename = NULL;
   ProgramData *data = NULL;
   gchar *string = NULL;
   GstBus *bus = NULL;
@@ -108,7 +129,6 @@
   string =
       g_strdup_printf
       ("audiotestsrc num-buffers=200 ! wavenc ! wavparse ! appsink name=testsink");
-  g_free (filename);
   data->source = gst_parse_launch (string, NULL);
   g_free (string);
 
diff --git a/tests/examples/app/appsrc_ex.c b/tests/examples/app/appsrc_ex.c
index 7490613..8919280 100644
--- a/tests/examples/app/appsrc_ex.c
+++ b/tests/examples/app/appsrc_ex.c
@@ -1,3 +1,24 @@
+/* GStreamer
+ *
+ * appsrc_ex.c: example for using appsrc and appsink linked.
+ *
+ * Copyright (C) 2007 David 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
 
 
 #ifdef HAVE_CONFIG_H
diff --git a/tests/examples/audio/audiomix.c b/tests/examples/audio/audiomix.c
index 2b87f39..82eec8d 100644
--- a/tests/examples/audio/audiomix.c
+++ b/tests/examples/audio/audiomix.c
@@ -23,9 +23,6 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GDK_DISABLE_DEPRECATION_WARNINGS
 
 #include <string.h>
 #include <gst/gst.h>
@@ -55,8 +52,8 @@
   gtk_window_set_title (GTK_WINDOW (window), "audiomix");
   g_signal_connect (window, "destroy", gtk_main_quit, NULL);
 
-  layout = gtk_table_new (2, 3, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (layout), 6);
+  layout = gtk_grid_new ();
+  g_object_set (G_OBJECT (layout), "column-spacing", 6, NULL);
   gtk_container_add (GTK_CONTAINER (window), layout);
 
   /* channel labels */
@@ -65,25 +62,25 @@
     *ext = '\0';
   label = gtk_label_new (name);
   g_free (name);
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (layout), label, 0, 1, 0, 1);
+  gtk_grid_attach (GTK_GRID (layout), label, 0, 0, 1, 1);
 
-  gtk_table_attach_defaults (GTK_TABLE (layout), gtk_label_new ("|"), 1, 2, 0,
-      1);
+  gtk_grid_attach (GTK_GRID (layout), gtk_label_new ("|"), 1, 0, 1, 1);
 
   name = g_path_get_basename (file_name2);
   if ((ext = strrchr (name, '.')))
     *ext = '\0';
   label = gtk_label_new (name);
   g_free (name);
-  gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
-  gtk_table_attach_defaults (GTK_TABLE (layout), label, 2, 3, 0, 1);
+  gtk_grid_attach (GTK_GRID (layout), label, 2, 0, 1, 1);
 
   /* mix slider */
-  scale = gtk_hscale_new_with_range (0.0, 1.0, 1.0 / 200.0);
+  scale =
+      gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 0.0, 1.0,
+      1.0 / 200.0);
   gtk_range_set_value (GTK_RANGE (scale), 0.0);
   gtk_widget_set_size_request (scale, 200, -1);
-  gtk_table_attach_defaults (GTK_TABLE (layout), scale, 0, 3, 1, 2);
+  gtk_widget_set_hexpand (scale, TRUE);
+  gtk_grid_attach (GTK_GRID (layout), scale, 0, 1, 3, 1);
   g_signal_connect (scale, "value-changed",
       G_CALLBACK (value_changed_callback), volume);
 
diff --git a/tests/examples/audio/volume.c b/tests/examples/audio/volume.c
index 26d6bb1..398bc4f 100644
--- a/tests/examples/audio/volume.c
+++ b/tests/examples/audio/volume.c
@@ -23,9 +23,6 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GDK_DISABLE_DEPRECATION_WARNINGS
 
 #include <math.h>
 
@@ -62,22 +59,23 @@
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   g_signal_connect (window, "destroy", gtk_main_quit, NULL);
 
-  vbox = gtk_vbox_new (TRUE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_container_add (GTK_CONTAINER (window), vbox);
 
   /* elapsed widget */
-  hbox = gtk_hbox_new (TRUE, 0);
-  label = gtk_label_new ("Elapsed");
-  elapsed = gtk_label_new ("0.000");
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  label = gtk_label_new ("Elapsed: ");
+  elapsed = gtk_label_new ("0.0");
   gtk_container_add (GTK_CONTAINER (hbox), label);
   gtk_container_add (GTK_CONTAINER (hbox), elapsed);
   gtk_container_add (GTK_CONTAINER (vbox), hbox);
 
   /* volume */
-  hbox = gtk_hbox_new (TRUE, 0);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   label = gtk_label_new ("volume");
   gtk_container_add (GTK_CONTAINER (hbox), label);
-  scale = gtk_hscale_new_with_range (-90.0, 10.0, 0.2);
+  scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, -90.0, 10.0,
+      0.2);
   gtk_range_set_value (GTK_RANGE (scale), 0.0);
   gtk_widget_set_size_request (scale, 100, -1);
   gtk_container_add (GTK_CONTAINER (hbox), scale);
@@ -88,6 +86,24 @@
   gtk_widget_show_all (GTK_WIDGET (window));
 }
 
+static gboolean
+progress_update (gpointer data)
+{
+  GstElement *pipeline = (GstElement *) data;
+  gint64 position;
+  gchar *position_str;
+
+  if (gst_element_query_position (pipeline, GST_FORMAT_TIME, &position))
+    position_str = g_strdup_printf ("%.1f", (gfloat) position / GST_SECOND);
+  else
+    position_str = g_strdup_printf ("n/a");
+  gtk_label_set_text (GTK_LABEL (elapsed), position_str);
+
+  g_free (position_str);
+
+  return TRUE;
+}
+
 static void
 message_received (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
 {
@@ -167,6 +183,7 @@
 
   /* go to main loop */
   gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  g_timeout_add (100, progress_update, pipeline);
   gtk_main ();
   gst_element_set_state (pipeline, GST_STATE_NULL);
   gst_object_unref (pipeline);
diff --git a/tests/examples/dynamic/addstream.c b/tests/examples/dynamic/addstream.c
index b58b5cc..02bb8ae 100644
--- a/tests/examples/dynamic/addstream.c
+++ b/tests/examples/dynamic/addstream.c
@@ -53,7 +53,7 @@
   return bin;
 }
 
-static gboolean
+static void
 pause_play_stream (GstElement * bin, gint seconds)
 {
   gboolean punch_in;
@@ -85,9 +85,10 @@
        * this situation timestamps start from 0.  */
       punch_in = TRUE;
       break;
-    default:
     case GST_STATE_CHANGE_FAILURE:
-      return FALSE;
+      /* fall through to return */
+    default:
+      return;
   }
 
   if (seconds)
@@ -106,8 +107,6 @@
 
   /* now set the pipeline to PLAYING */
   gst_element_set_state (bin, GST_STATE_PLAYING);
-
-  return TRUE;
 }
 
 static void
@@ -151,7 +150,8 @@
           create_stream
           ("( v4l2src ! videoconvert ! timeoverlay ! queue ! xvimagesink name=v4llive )");
       pause_play_stream (bin1, 0);
-      g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (1));
+      g_timeout_add_seconds (1, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (1));
       break;
     case 1:
       /* live stream locks on to running_time, pipeline reconfigures latency
@@ -159,14 +159,16 @@
       g_print ("creating bin2\n");
       bin2 = create_stream ("( alsasrc ! queue ! alsasink name=alsalive )");
       pause_play_stream (bin2, 0);
-      g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (2));
+      g_timeout_add_seconds (1, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (2));
       break;
     case 2:
       /* non-live stream, need base_time to align with current running live sources. */
       g_print ("creating bin3\n");
       bin3 = create_stream ("( audiotestsrc ! alsasink name=atnonlive )");
       pause_play_stream (bin3, 0);
-      g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (3));
+      g_timeout_add_seconds (1, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (3));
       break;
     case 3:
       g_print ("creating bin4\n");
@@ -174,7 +176,8 @@
           create_stream
           ("( videotestsrc ! timeoverlay ! videoconvert ! ximagesink name=vtnonlive )");
       pause_play_stream (bin4, 0);
-      g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (4));
+      g_timeout_add_seconds (1, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (4));
       break;
     case 4:
       /* live stream locks on to running_time */
@@ -183,7 +186,8 @@
           create_stream
           ("( videotestsrc is-live=1 ! timeoverlay ! videoconvert ! ximagesink name=vtlive )");
       pause_play_stream (bin5, 0);
-      g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (5));
+      g_timeout_add_seconds (1, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (5));
       break;
     case 5:
       /* pause the fist live stream for 2 seconds */
@@ -196,7 +200,8 @@
       g_print ("PAUSE bin5 for 2 seconds\n");
       pause_play_stream (bin5, 2);
       g_print ("Waiting 5 seconds\n");
-      g_timeout_add_seconds (5, (GSourceFunc) perform_step, GINT_TO_POINTER (6));
+      g_timeout_add_seconds (5, (GSourceFunc) perform_step,
+          GINT_TO_POINTER (6));
       break;
     case 6:
       g_print ("quiting\n");
diff --git a/tests/examples/dynamic/sprinkle.c b/tests/examples/dynamic/sprinkle.c
index da49e95..c14afb1 100644
--- a/tests/examples/dynamic/sprinkle.c
+++ b/tests/examples/dynamic/sprinkle.c
@@ -164,7 +164,12 @@
     state->count++;
   } else {
     state->infos[0] = NULL;
+
+    /* if no more sources left, quit */
+    if (!state->infos[2])
+      g_main_loop_quit (loop);
   }
+
   return TRUE;
 }
 
@@ -202,7 +207,7 @@
   GstBus *bus;
   GstElement *filter, *convert, *sink;
   GstCaps *caps;
-  gboolean res;
+  gboolean linked;
   SprinkleState *state;
 
   gst_init (&argc, &argv);
@@ -227,8 +232,8 @@
 
   gst_bin_add_many (GST_BIN (pipeline), adder, filter, convert, sink, NULL);
 
-  res = gst_element_link_many (adder, filter, convert, sink, NULL);
-  g_assert (res);
+  linked = gst_element_link_many (adder, filter, convert, sink, NULL);
+  g_assert (linked);
 
   /* setup message handling */
   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
diff --git a/tests/examples/encoding/encoding.c b/tests/examples/encoding/encoding.c
index bde601c..1861f81 100644
--- a/tests/examples/encoding/encoding.c
+++ b/tests/examples/encoding/encoding.c
@@ -1,4 +1,7 @@
-/* Example application for using GstProfile and encodebin
+/* GStreamer
+ *
+ * encoding.c: example application for using GstProfile and encodebin
+ *
  * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
@@ -34,9 +37,10 @@
 static void
 list_codecs (void)
 {
-  GstCaps *l;
-  GstCaps *caps;
+  GstCaps *l, *caps;
+  GstStructure *st;
   guint i, len;
+  gchar *tmpstr, *desc;
 
   caps = gst_caps_new_empty ();
 
@@ -44,9 +48,7 @@
   l = gst_caps_list_container_formats (GST_RANK_NONE);
   len = gst_caps_get_size (l);
   for (i = 0; i < len; i++) {
-    GstStructure *st = gst_caps_steal_structure (l, 0);
-    gchar *tmpstr, *desc;
-
+    st = gst_caps_steal_structure (l, 0);
     gst_caps_append_structure (caps, st);
 
     tmpstr = gst_caps_to_string (caps);
@@ -64,9 +66,7 @@
   l = gst_caps_list_video_encoding_formats (GST_RANK_NONE);
   len = gst_caps_get_size (l);
   for (i = 0; i < len; i++) {
-    GstStructure *st = gst_caps_steal_structure (l, 0);
-    gchar *tmpstr, *desc;
-
+    st = gst_caps_steal_structure (l, 0);
     gst_caps_append_structure (caps, st);
 
     tmpstr = gst_caps_to_string (caps);
@@ -84,9 +84,7 @@
   l = gst_caps_list_audio_encoding_formats (GST_RANK_NONE);
   len = gst_caps_get_size (l);
   for (i = 0; i < len; i++) {
-    GstStructure *st = gst_caps_steal_structure (l, 0);
-    gchar *tmpstr, *desc;
-
+    st = gst_caps_steal_structure (l, 0);
     gst_caps_append_structure (caps, st);
 
     tmpstr = gst_caps_to_string (caps);
diff --git a/tests/examples/gio/giosrc-mounting.c b/tests/examples/gio/giosrc-mounting.c
index 9db6263..3c6c32b 100644
--- a/tests/examples/gio/giosrc-mounting.c
+++ b/tests/examples/gio/giosrc-mounting.c
@@ -1,5 +1,8 @@
 /* GStreamer
  *
+ * giosrc-mounting: example application that shows how to handle the
+ * "not-mounted" message
+ *
  * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
  * 
  * This library is free software; you can redistribute it and/or
@@ -48,8 +51,7 @@
 static gboolean
 message_handler (GstBus * bus, GstMessage * message, gpointer user_data)
 {
-
-  switch (message->type) {
+  switch (GST_MESSAGE_TYPE (message)) {
     case GST_MESSAGE_ELEMENT:{
       const GstStructure *s = gst_message_get_structure (message);
       const gchar *name = gst_structure_get_name (s);
diff --git a/tests/examples/overlay/gtk-videooverlay.c b/tests/examples/overlay/gtk-videooverlay.c
index 76eac7c..929d87e 100644
--- a/tests/examples/overlay/gtk-videooverlay.c
+++ b/tests/examples/overlay/gtk-videooverlay.c
@@ -125,12 +125,10 @@
   gtk_window_set_title (GTK_WINDOW (window), "GstVideoOverlay Gtk+ demo");
 
   video_window = gtk_drawing_area_new ();
-  gtk_widget_set_double_buffered (video_window, FALSE);
   gtk_container_add (GTK_CONTAINER (window), video_window);
   gtk_container_set_border_width (GTK_CONTAINER (window), 16);
 
   gtk_widget_show_all (window);
-  gtk_widget_realize (window);
 
   video_window_xwindow = gtk_widget_get_window (video_window);
   embed_xid = GDK_WINDOW_XID (video_window_xwindow);
diff --git a/tests/examples/playback/playback-test.c b/tests/examples/playback/playback-test.c
index 717a286..a2927b3 100644
--- a/tests/examples/playback/playback-test.c
+++ b/tests/examples/playback/playback-test.c
@@ -26,10 +26,6 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GDK_DISABLE_DEPRECATION_WARNINGS
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
 
 #include <stdlib.h>
 #include <math.h>
@@ -2626,7 +2622,6 @@
   g_signal_connect (app->video_window, "motion-notify-event",
       G_CALLBACK (motion_notify_cb), app);
   gtk_widget_set_can_focus (app->video_window, TRUE);
-  gtk_widget_set_double_buffered (app->video_window, FALSE);
   gtk_widget_add_events (app->video_window,
       GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
       | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
@@ -2637,14 +2632,17 @@
       "playback-test");
   gtk_statusbar_push (GTK_STATUSBAR (app->statusbar), app->status_id,
       "Stopped");
-  hbox = gtk_hbox_new (FALSE, 0);
-  vbox = gtk_vbox_new (FALSE, 0);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
 
   /* media controls */
-  play_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
-  pause_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PAUSE);
-  stop_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
+  play_button = gtk_button_new_from_icon_name ("media-playback-start",
+      GTK_ICON_SIZE_BUTTON);
+  pause_button = gtk_button_new_from_icon_name ("media-playback-pause",
+      GTK_ICON_SIZE_BUTTON);
+  stop_button = gtk_button_new_from_icon_name ("media-playback-stop",
+      GTK_ICON_SIZE_BUTTON);
 
   /* seek expander */
   {
@@ -2806,7 +2804,7 @@
     GtkWidget *step_button, *shuttle_checkbox;
 
     step = gtk_expander_new ("step options");
-    hbox = gtk_hbox_new (FALSE, 0);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
     app->step_format_combo = gtk_combo_box_text_new ();
     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (app->step_format_combo),
@@ -2832,7 +2830,9 @@
     gtk_box_pack_start (GTK_BOX (hbox), app->step_rate_spinbutton, FALSE, FALSE,
         2);
 
-    step_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_FORWARD);
+    step_button =
+        gtk_button_new_from_icon_name ("media-seek-forward",
+        GTK_ICON_SIZE_BUTTON);
     gtk_button_set_label (GTK_BUTTON (step_button), "Step");
     gtk_box_pack_start (GTK_BOX (hbox), step_button, FALSE, FALSE, 2);
 
@@ -2848,7 +2848,7 @@
 
     adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (0.0, -3.00, 4.0, 0.1, 1.0, 1.0));
-    app->shuttle_scale = gtk_hscale_new (adjustment);
+    app->shuttle_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
     gtk_scale_set_digits (GTK_SCALE (app->shuttle_scale), 2);
     gtk_scale_set_value_pos (GTK_SCALE (app->shuttle_scale), GTK_POS_TOP);
     g_signal_connect (app->shuttle_scale, "value-changed",
@@ -3001,14 +3001,15 @@
     GtkWidget *vbox, *frame;
 
     colorbalance = gtk_expander_new ("color balance options");
-    vbox = gtk_vbox_new (FALSE, 0);
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
     /* contrast scale */
     frame = gtk_frame_new ("Contrast");
     adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (N_GRAD / 2.0, 0.00, N_GRAD, 0.1,
             1.0, 1.0));
-    app->contrast_scale = gtk_hscale_new (adjustment);
+    app->contrast_scale =
+        gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
     gtk_scale_set_draw_value (GTK_SCALE (app->contrast_scale), FALSE);
     g_signal_connect (app->contrast_scale, "value-changed",
         G_CALLBACK (colorbalance_value_changed), app);
@@ -3020,7 +3021,8 @@
     adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (N_GRAD / 2.0, 0.00, N_GRAD, 0.1,
             1.0, 1.0));
-    app->brightness_scale = gtk_hscale_new (adjustment);
+    app->brightness_scale =
+        gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
     gtk_scale_set_draw_value (GTK_SCALE (app->brightness_scale), FALSE);
     g_signal_connect (app->brightness_scale, "value-changed",
         G_CALLBACK (colorbalance_value_changed), app);
@@ -3032,7 +3034,7 @@
     adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (N_GRAD / 2.0, 0.00, N_GRAD, 0.1,
             1.0, 1.0));
-    app->hue_scale = gtk_hscale_new (adjustment);
+    app->hue_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
     gtk_scale_set_draw_value (GTK_SCALE (app->hue_scale), FALSE);
     g_signal_connect (app->hue_scale, "value-changed",
         G_CALLBACK (colorbalance_value_changed), app);
@@ -3044,7 +3046,8 @@
     adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (N_GRAD / 2.0, 0.00, N_GRAD, 0.1,
             1.0, 1.0));
-    app->saturation_scale = gtk_hscale_new (adjustment);
+    app->saturation_scale =
+        gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
     gtk_scale_set_draw_value (GTK_SCALE (app->saturation_scale), FALSE);
     g_signal_connect (app->saturation_scale, "value-changed",
         G_CALLBACK (colorbalance_value_changed), app);
@@ -3057,7 +3060,7 @@
   /* seek bar */
   adjustment =
       GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.00, N_GRAD, 0.1, 1.0, 1.0));
-  app->seek_scale = gtk_hscale_new (adjustment);
+  app->seek_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
   gtk_scale_set_digits (GTK_SCALE (app->seek_scale), 2);
   gtk_scale_set_value_pos (GTK_SCALE (app->seek_scale), GTK_POS_RIGHT);
   gtk_range_set_show_fill_level (GTK_RANGE (app->seek_scale), TRUE);
@@ -3078,7 +3081,7 @@
 
     playbin = gtk_expander_new ("playbin options");
     /* the playbin panel controls for the video/audio/subtitle tracks */
-    panel = gtk_hbox_new (FALSE, 0);
+    panel = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     app->video_combo = gtk_combo_box_text_new ();
     app->audio_combo = gtk_combo_box_text_new ();
     app->text_combo = gtk_combo_box_text_new ();
@@ -3187,8 +3190,9 @@
     g_signal_connect (G_OBJECT (app->volume_spinbutton), "value-changed",
         G_CALLBACK (volume_spinbutton_changed_cb), app);
     /* playbin panel for snapshot */
-    boxes2 = gtk_hbox_new (FALSE, 0);
-    shot_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
+    boxes2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+    shot_button =
+        gtk_button_new_from_icon_name ("document-save", GTK_ICON_SIZE_BUTTON);
     gtk_widget_set_tooltip_text (shot_button,
         "save a screenshot .png in the current directory");
     g_signal_connect (G_OBJECT (shot_button), "clicked", G_CALLBACK (shot_cb),
@@ -3291,7 +3295,7 @@
     gtk_grid_attach (GTK_GRID (boxes3), app->subtitle_fontdesc_button, 1, 5, 1,
         1);
 
-    pb2vbox = gtk_vbox_new (FALSE, 0);
+    pb2vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     gtk_box_pack_start (GTK_BOX (pb2vbox), panel, FALSE, FALSE, 2);
     gtk_box_pack_start (GTK_BOX (pb2vbox), boxes, FALSE, FALSE, 2);
     gtk_box_pack_start (GTK_BOX (pb2vbox), boxes2, FALSE, FALSE, 2);
@@ -3319,7 +3323,8 @@
   gtk_box_pack_start (GTK_BOX (vbox), step, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (vbox), navigation, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (vbox), colorbalance, FALSE, FALSE, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 2);
+  gtk_box_pack_start (GTK_BOX (vbox),
+      gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (vbox), app->seek_scale, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (vbox), app->statusbar, FALSE, FALSE, 2);
 
diff --git a/tests/examples/playrec/playrec.c b/tests/examples/playrec/playrec.c
index dd803a1..adc8cec 100644
--- a/tests/examples/playrec/playrec.c
+++ b/tests/examples/playrec/playrec.c
@@ -26,9 +26,8 @@
 
 #include <gst/gst.h>
 
-/* Define to run the asynchronous version. This requires 0.10.31 of the
- * GStreamer core. The async version has the benefit that it doesn't block the
- * main thread but it produces slightly less clear code. */
+/* Define to run the asynchronous version, which has the benefit that it doesn't
+ * block the main thread but it produces slightly less clear code. */
 #define ASYNC_VERSION
 
 static GMainLoop *loop;
diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c
index bd1a5b9..d3f88e0 100644
--- a/tests/examples/seek/jsseek.c
+++ b/tests/examples/seek/jsseek.c
@@ -24,9 +24,6 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GDK_DISABLE_DEPRECATION_WARNINGS
 
 #include <glib.h>
 #include <glib/gstdio.h>
@@ -2651,7 +2648,7 @@
 main (int argc, char **argv)
 {
   GtkWidget *window, *hbox, *vbox, *panel, *expander, *pb2vbox, *boxes,
-      *flagtable, *boxes2, *step;
+      *flaggrid, *boxes2, *step;
   GtkWidget *play_button, *pause_button, *stop_button, *shot_button;
   GtkWidget *accurate_checkbox, *key_checkbox, *loop_checkbox, *flush_checkbox;
   GtkWidget *scrub_checkbox, *play_scrub_checkbox;
@@ -2727,20 +2724,22 @@
   video_window = gtk_drawing_area_new ();
   g_signal_connect (video_window, "draw", G_CALLBACK (draw_cb), NULL);
   g_signal_connect (video_window, "realize", G_CALLBACK (realize_cb), NULL);
-  gtk_widget_set_double_buffered (video_window, FALSE);
 
   statusbar = gtk_statusbar_new ();
   status_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "seek");
   gtk_statusbar_push (GTK_STATUSBAR (statusbar), status_id, "Stopped");
-  hbox = gtk_hbox_new (FALSE, 0);
-  vbox = gtk_vbox_new (FALSE, 0);
-  flagtable = gtk_table_new (4, 2, FALSE);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  flaggrid = gtk_grid_new ();
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
 
   /* media controls */
-  play_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
-  pause_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PAUSE);
-  stop_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
+  play_button = gtk_button_new_from_icon_name ("media-playback-start",
+      GTK_ICON_SIZE_BUTTON);
+  pause_button = gtk_button_new_from_icon_name ("media-playback-pause",
+      GTK_ICON_SIZE_BUTTON);
+  stop_button = gtk_button_new_from_icon_name ("media-playback-stop",
+      GTK_ICON_SIZE_BUTTON);
 
   /* seek flags */
   accurate_checkbox = gtk_check_button_new_with_label ("Accurate Seek");
@@ -2777,7 +2776,7 @@
     GtkWidget *hbox;
 
     step = gtk_expander_new ("step options");
-    hbox = gtk_hbox_new (FALSE, 0);
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
     format_combo = gtk_combo_box_text_new ();
     gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (format_combo),
@@ -2798,7 +2797,8 @@
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (step_rate_spinbutton), 1.0);
     gtk_box_pack_start (GTK_BOX (hbox), step_rate_spinbutton, FALSE, FALSE, 2);
 
-    step_button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_FORWARD);
+    step_button = gtk_button_new_from_icon_name ("media-seek-forward",
+        GTK_ICON_SIZE_BUTTON);
     gtk_button_set_label (GTK_BUTTON (step_button), "Step");
     gtk_box_pack_start (GTK_BOX (hbox), step_button, FALSE, FALSE, 2);
 
@@ -2814,7 +2814,8 @@
 
     shuttle_adjustment =
         GTK_ADJUSTMENT (gtk_adjustment_new (0.0, -3.00, 4.0, 0.1, 1.0, 1.0));
-    shuttle_hscale = gtk_hscale_new (shuttle_adjustment);
+    shuttle_hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL,
+        shuttle_adjustment);
     gtk_scale_set_digits (GTK_SCALE (shuttle_hscale), 2);
     gtk_scale_set_value_pos (GTK_SCALE (shuttle_hscale), GTK_POS_TOP);
     g_signal_connect (shuttle_hscale, "value_changed",
@@ -2830,7 +2831,7 @@
   /* seek bar */
   adjustment =
       GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.00, 100.0, 0.1, 1.0, 1.0));
-  hscale = gtk_hscale_new (adjustment);
+  hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
   gtk_scale_set_digits (GTK_SCALE (hscale), 2);
   gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_RIGHT);
   gtk_range_set_show_fill_level (GTK_RANGE (hscale), TRUE);
@@ -2845,7 +2846,7 @@
 
   if (pipeline_type == 16) {
     /* the playbin panel controls for the video/audio/subtitle tracks */
-    panel = gtk_hbox_new (FALSE, 0);
+    panel = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     video_combo = gtk_combo_box_text_new ();
     audio_combo = gtk_combo_box_text_new ();
     text_combo = gtk_combo_box_text_new ();
@@ -2862,7 +2863,7 @@
     g_signal_connect (G_OBJECT (text_combo), "changed",
         G_CALLBACK (text_combo_cb), pipeline);
     /* playbin panel for flag checkboxes and volume/mute */
-    boxes = gtk_hbox_new (FALSE, 0);
+    boxes = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     vis_checkbox = gtk_check_button_new_with_label ("Vis");
     video_checkbox = gtk_check_button_new_with_label ("Video");
     audio_checkbox = gtk_check_button_new_with_label ("Audio");
@@ -2906,8 +2907,9 @@
     g_signal_connect (G_OBJECT (volume_spinbutton), "value_changed",
         G_CALLBACK (volume_spinbutton_changed_cb), pipeline);
     /* playbin panel for snapshot */
-    boxes2 = gtk_hbox_new (FALSE, 0);
-    shot_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
+    boxes2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+    shot_button = gtk_button_new_from_icon_name ("document-save",
+        GTK_ICON_SIZE_BUTTON);
     gtk_widget_set_tooltip_text (shot_button,
         "save a screenshot .png in the current directory");
     g_signal_connect (G_OBJECT (shot_button), "clicked", G_CALLBACK (shot_cb),
@@ -2936,22 +2938,20 @@
   gtk_box_pack_start (GTK_BOX (hbox), play_button, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (hbox), pause_button, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX (hbox), stop_button, FALSE, FALSE, 2);
-  gtk_box_pack_start (GTK_BOX (hbox), flagtable, FALSE, FALSE, 2);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), accurate_checkbox, 0, 1, 0,
-      1);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), flush_checkbox, 1, 2, 0, 1);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), loop_checkbox, 2, 3, 0, 1);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), key_checkbox, 0, 1, 1, 2);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), scrub_checkbox, 1, 2, 1, 2);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), play_scrub_checkbox, 2, 3,
-      1, 2);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), skip_checkbox, 3, 4, 0, 1);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), rate_label, 4, 5, 0, 1);
-  gtk_table_attach_defaults (GTK_TABLE (flagtable), rate_spinbutton, 4, 5, 1,
-      2);
+  gtk_box_pack_start (GTK_BOX (hbox), flaggrid, FALSE, FALSE, 2);
+  gtk_grid_attach (GTK_GRID (flaggrid), accurate_checkbox, 0, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), flush_checkbox, 1, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), loop_checkbox, 2, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), key_checkbox, 0, 1, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), scrub_checkbox, 1, 1, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), play_scrub_checkbox, 2, 1, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), skip_checkbox, 3, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), rate_label, 4, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (flaggrid), rate_spinbutton, 4, 1, 1, 1);
+
   if (panel && boxes && boxes2) {
     expander = gtk_expander_new ("playbin options");
-    pb2vbox = gtk_vbox_new (FALSE, 0);
+    pb2vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     gtk_box_pack_start (GTK_BOX (pb2vbox), panel, FALSE, FALSE, 2);
     gtk_box_pack_start (GTK_BOX (pb2vbox), boxes, FALSE, FALSE, 2);
     gtk_box_pack_start (GTK_BOX (pb2vbox), boxes2, FALSE, FALSE, 2);
diff --git a/tests/examples/seek/scrubby.c b/tests/examples/seek/scrubby.c
index 7ba3600..c5c8d67 100644
--- a/tests/examples/seek/scrubby.c
+++ b/tests/examples/seek/scrubby.c
@@ -1,9 +1,28 @@
+/* GStreamer
+ *
+ * scrubby.c: sample application to change the playback speed dynamically
+ *
+ * Copyright (C) 2005 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., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GDK_DISABLE_DEPRECATION_WARNINGS
 #include <stdlib.h>
 #include <glib.h>
 #include <gtk/gtk.h>
@@ -28,9 +47,11 @@
 static guint schanged_id = 0;
 
 #define SOURCE "filesrc"
-#define ASINK "alsasink"
+#define ASINK   "autoaudiosink"
+//#define ASINK "alsasink"
 //#define ASINK "osssink"
-#define VSINK "xvimagesink"
+#define VSINK   "autovideosink"
+//#define VSINK "xvimagesink"
 //#define VSINK "ximagesink"
 //#define VSINK "aasink"
 //#define VSINK "cacasink"
@@ -66,34 +87,6 @@
   return element;
 }
 
-static void
-dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data)
-{
-  dyn_link *connect = (dyn_link *) data;
-
-  if (connect->padname == NULL ||
-      !strcmp (gst_pad_get_name (newpad), connect->padname)) {
-    if (connect->bin)
-      gst_bin_add (GST_BIN (pipeline), connect->bin);
-    gst_pad_link (newpad, connect->target);
-  }
-}
-
-static void
-setup_dynamic_link (GstElement * element, const gchar * padname,
-    GstPad * target, GstElement * bin)
-{
-  dyn_link *connect;
-
-  connect = g_new0 (dyn_link, 1);
-  connect->padname = g_strdup (padname);
-  connect->target = target;
-  connect->bin = bin;
-
-  g_signal_connect (G_OBJECT (element), "pad-added", G_CALLBACK (dynamic_link),
-      connect);
-}
-
 static GstElement *
 make_wav_pipeline (const gchar * location)
 {
@@ -108,14 +101,8 @@
 
   g_object_set (G_OBJECT (src), "location", location, NULL);
 
-  gst_bin_add (GST_BIN (pipeline), src);
-  gst_bin_add (GST_BIN (pipeline), decoder);
-  gst_bin_add (GST_BIN (pipeline), audiosink);
-
-  gst_element_link (src, decoder);
-
-  setup_dynamic_link (decoder, "src", gst_element_get_static_pad (audiosink,
-          "sink"), NULL);
+  gst_bin_add_many (GST_BIN (pipeline), src, decoder, audiosink, NULL);
+  gst_element_link_many (src, decoder, audiosink, NULL);
 
   return pipeline;
 }
@@ -124,11 +111,12 @@
 make_playerbin_pipeline (const gchar * location)
 {
   GstElement *player;
+  const gchar *uri = g_filename_to_uri (location, NULL, NULL);
 
   player = gst_element_factory_make ("playbin", "player");
   g_assert (player);
 
-  g_object_set (G_OBJECT (player), "uri", location, NULL);
+  g_object_set (G_OBJECT (player), "uri", uri, NULL);
 
   return player;
 }
@@ -198,7 +186,7 @@
     GST_DEBUG ("seek because of slider move");
 
     if (do_seek (widget, TRUE, TRUE)) {
-      g_source_remove (changed_id);
+      g_signal_handler_disconnect (hscale, changed_id);
       changed_id = 0;
     }
   }
@@ -320,7 +308,7 @@
   GST_DEBUG ("stop seek");
 
   if (changed_id) {
-    g_source_remove (changed_id);
+    g_signal_handler_disconnect (hscale, changed_id);
     changed_id = 0;
   }
 
@@ -337,8 +325,6 @@
   gst_element_get_state (pipeline, &state, NULL, GST_CLOCK_TIME_NONE);
   if (state != GST_STATE_PLAYING) {
     g_print ("PLAY pipeline\n");
-    gst_element_set_state (pipeline, GST_STATE_PAUSED);
-    gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
     gst_element_set_state (pipeline, GST_STATE_PLAYING);
     update_id =
         g_timeout_add (UPDATE_INTERVAL, (GSourceFunc) update_scale, pipeline);
@@ -494,8 +480,8 @@
 
   /* initialize gui elements ... */
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  hbox = gtk_hbox_new (FALSE, 0);
-  vbox = gtk_vbox_new (FALSE, 0);
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
   play_button = gtk_button_new_with_label ("play");
   pause_button = gtk_button_new_with_label ("pause");
   stop_button = gtk_button_new_with_label ("stop");
@@ -503,12 +489,12 @@
   adjustment =
       GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, (gdouble) RANGE_PREC, 0.1,
           1.0, 1.0));
-  hscale = gtk_hscale_new (adjustment);
+  hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
   gtk_scale_set_digits (GTK_SCALE (hscale), 2);
 
   sadjustment =
       GTK_ADJUSTMENT (gtk_adjustment_new (1.0, 0.0, 5.0, 0.1, 1.0, 0.0));
-  shscale = gtk_hscale_new (sadjustment);
+  shscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, sadjustment);
   gtk_scale_set_digits (GTK_SCALE (shscale), 2);
 
   schanged_id =
diff --git a/tests/icles/test-colorkey.c b/tests/icles/test-colorkey.c
index 2e6c782..62b041d 100644
--- a/tests/icles/test-colorkey.c
+++ b/tests/icles/test-colorkey.c
@@ -23,11 +23,6 @@
 #include "config.h"
 #endif
 
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
-#define GLIB_DISABLE_DEPRECATION_WARNINGS
-#define GDK_DISABLE_DEPRECATION_WARNINGS
-
 #include <stdlib.h>
 #include <string.h>
 
@@ -41,7 +36,7 @@
 static GtkWidget *video_window = NULL;
 static GstElement *sink = NULL;
 static gulong embed_xid = 0;
-static GdkColor trans_color;
+static GdkRGBA trans_color;
 static gboolean trans_color_set = FALSE;
 
 static void
@@ -62,7 +57,7 @@
     guint x, y;
     guint h = allocation.height * 0.75;
 
-    gdk_cairo_set_source_color (cr, &trans_color);
+    gdk_cairo_set_source_rgba (cr, &trans_color);
     cairo_rectangle (cr, 0, 0, allocation.width, h);
     cairo_fill (cr);
 
@@ -242,7 +237,6 @@
   g_signal_connect (G_OBJECT (video_window), "draw",
       G_CALLBACK (draw_cb), NULL);
   g_signal_connect (video_window, "realize", G_CALLBACK (realize_cb), NULL);
-  gtk_widget_set_double_buffered (video_window, FALSE);
   gtk_container_add (GTK_CONTAINER (window), video_window);
 
   /* show the gui and play */
diff --git a/tests/icles/test-videooverlay.c b/tests/icles/test-videooverlay.c
index 191c30d..2cd59ee 100644
--- a/tests/icles/test-videooverlay.c
+++ b/tests/icles/test-videooverlay.c
@@ -22,8 +22,8 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
- * with newer GTK versions (>= 3.3.0) */
+/* Disable deprecation warnings because we need to use
+ * gtk_widget_set_double_buffered () or display will flicker */
 #define GDK_DISABLE_DEPRECATION_WARNINGS
 
 #include <stdlib.h>
@@ -97,15 +97,17 @@
 handle_draw_cb (GtkWidget * widget, cairo_t * cr, gpointer user_data)
 {
   GstVideoRectangle *r = &anim_state.rect;
-  GtkStyle *style;
+  GtkStyleContext *style;
+  GdkRGBA color;
   int width, height;
 
   width = gtk_widget_get_allocated_width (widget);
   height = gtk_widget_get_allocated_height (widget);
 
-  style = gtk_widget_get_style (widget);
+  style = gtk_widget_get_style_context (widget);
 
-  gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
+  gtk_style_context_get_color (style, 0, &color);
+  gdk_cairo_set_source_rgba (cr, &color);
 
   /* we should only redraw outside of the video rect! */
   cairo_rectangle (cr, 0, 0, r->x, height);
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 74d11ca..d6da6e2 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -28,14 +28,3 @@
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
 
 AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-
-Android.mk: Makefile.am
-	androgenizer -:PROJECT gst-discoverer-@GST_API_VERSION@ \
-	 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:EXECUTABLE gst-discoverer-@GST_API_VERSION@ -:TAGS eng debug \
-	 -:SOURCES $(gst_discoverer_@GST_API_VERSION@_SOURCES) \
-	 -:CFLAGS $(DEFS) $(AM_CFLAGS) \
-	 -:LDFLAGS -lgstpbutils-@GST_API_VERSION@ -lgstvideo-@GST_API_VERSION@ \
-	 	   $(GST_BASE_LIBS) $(GST_LIBS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 2b515db..4ebcb0b 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -962,17 +962,6 @@
 	uninstall-binPROGRAMS uninstall-man uninstall-man1
 
 
-Android.mk: Makefile.am
-	androgenizer -:PROJECT gst-discoverer-@GST_API_VERSION@ \
-	 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-	 -:EXECUTABLE gst-discoverer-@GST_API_VERSION@ -:TAGS eng debug \
-	 -:SOURCES $(gst_discoverer_@GST_API_VERSION@_SOURCES) \
-	 -:CFLAGS $(DEFS) $(AM_CFLAGS) \
-	 -:LDFLAGS -lgstpbutils-@GST_API_VERSION@ -lgstvideo-@GST_API_VERSION@ \
-	 	   $(GST_BASE_LIBS) $(GST_LIBS) \
-	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
-	> $@
-
 # 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/tools/gst-play.c b/tools/gst-play.c
index 860e451..8d2bfe9 100644
--- a/tools/gst-play.c
+++ b/tools/gst-play.c
@@ -29,6 +29,7 @@
 #include <gst/gst.h>
 #include <gst/gst-i18n-app.h>
 #include <gst/audio/audio.h>
+#include <gst/video/video.h>
 #include <gst/pbutils/pbutils.h>
 #include <gst/math-compat.h>
 #include <stdlib.h>
@@ -95,6 +96,9 @@
 static void gst_play_printf (const gchar * format, ...) G_GNUC_PRINTF (1, 2);
 /* *INDENT-ON* */
 
+static void keyboard_cb (const gchar * key_input, gpointer user_data);
+static void relative_seek (GstPlay * play, gdouble percent);
+
 static void
 gst_play_printf (const gchar * format, ...)
 {
@@ -367,6 +371,61 @@
       }
       break;
     }
+    case GST_MESSAGE_ELEMENT:
+    {
+      GstNavigationMessageType mtype = gst_navigation_message_get_type (msg);
+      if (mtype == GST_NAVIGATION_MESSAGE_EVENT) {
+        GstEvent *ev;
+
+        if (gst_navigation_message_parse_event (msg, &ev)) {
+          GstNavigationEventType e_type = gst_navigation_event_get_type (ev);
+          switch (e_type) {
+            case GST_NAVIGATION_EVENT_KEY_PRESS:
+            {
+              const gchar *key;
+
+              if (gst_navigation_event_parse_key_event (ev, &key)) {
+                GST_INFO ("Key press: %s", key);
+
+                if (strcmp (key, "Left") == 0)
+                  key = GST_PLAY_KB_ARROW_LEFT;
+                else if (strcmp (key, "Right") == 0)
+                  key = GST_PLAY_KB_ARROW_RIGHT;
+                else if (strcmp (key, "Up") == 0)
+                  key = GST_PLAY_KB_ARROW_UP;
+                else if (strcmp (key, "Down") == 0)
+                  key = GST_PLAY_KB_ARROW_DOWN;
+                else if (strcmp (key, "space") == 0)
+                  key = " ";
+                else if (strlen (key) > 1)
+                  break;
+
+                keyboard_cb (key, user_data);
+              }
+              break;
+            }
+            case GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS:
+            {
+              gint button;
+              if (gst_navigation_event_parse_mouse_button_event (ev, &button,
+                      NULL, NULL)) {
+                if (button == 4) {
+                  /* wheel up */
+                  relative_seek (play, +0.08);
+                } else if (button == 5) {
+                  /* wheel down */
+                  relative_seek (play, -0.01);
+                }
+              }
+              break;
+            }
+            default:
+              break;
+          }
+        }
+      }
+      break;
+    }
     default:
       if (gst_is_missing_plugin_message (msg)) {
         gchar *desc;
diff --git a/win32/common/libgstvideo.def b/win32/common/libgstvideo.def
index fcf7194..ba58325 100644
--- a/win32/common/libgstvideo.def
+++ b/win32/common/libgstvideo.def
@@ -30,8 +30,10 @@
 	gst_navigation_message_get_type
 	gst_navigation_message_new_angles_changed
 	gst_navigation_message_new_commands_changed
+	gst_navigation_message_new_event
 	gst_navigation_message_new_mouse_over
 	gst_navigation_message_parse_angles_changed
+	gst_navigation_message_parse_event
 	gst_navigation_message_parse_mouse_over
 	gst_navigation_message_type_get_type
 	gst_navigation_query_get_type
@@ -49,6 +51,7 @@
 	gst_navigation_send_key_event
 	gst_navigation_send_mouse_event
 	gst_video_alignment_reset
+	gst_video_alpha_mode_get_type
 	gst_video_blend
 	gst_video_blend_scale_linear_RGBA
 	gst_video_buffer_pool_get_type
@@ -57,6 +60,7 @@
 	gst_video_chroma_flags_get_type
 	gst_video_chroma_from_string
 	gst_video_chroma_method_get_type
+	gst_video_chroma_mode_get_type
 	gst_video_chroma_resample
 	gst_video_chroma_resample_free
 	gst_video_chroma_resample_get_info
@@ -80,6 +84,7 @@
 	gst_video_color_transfer_decode
 	gst_video_color_transfer_encode
 	gst_video_colorimetry_from_string
+	gst_video_colorimetry_is_equal
 	gst_video_colorimetry_matches
 	gst_video_colorimetry_to_string
 	gst_video_convert_sample
@@ -166,6 +171,7 @@
 	gst_video_frame_map
 	gst_video_frame_map_id
 	gst_video_frame_unmap
+	gst_video_gamma_mode_get_type
 	gst_video_gl_texture_upload_meta_api_get_type
 	gst_video_gl_texture_upload_meta_get_info
 	gst_video_gl_texture_upload_meta_upload
@@ -177,7 +183,10 @@
 	gst_video_info_is_equal
 	gst_video_info_set_format
 	gst_video_info_to_caps
+	gst_video_interlace_mode_from_string
 	gst_video_interlace_mode_get_type
+	gst_video_interlace_mode_to_string
+	gst_video_matrix_mode_get_type
 	gst_video_meta_api_get_type
 	gst_video_meta_get_info
 	gst_video_meta_map
@@ -226,6 +235,7 @@
 	gst_video_overlay_set_render_rectangle
 	gst_video_overlay_set_window_handle
 	gst_video_pack_flags_get_type
+	gst_video_primaries_mode_get_type
 	gst_video_region_of_interest_meta_api_get_type
 	gst_video_region_of_interest_meta_get_info
 	gst_video_resampler_clear