Imported Upstream version 1.3.3
diff --git a/ChangeLog b/ChangeLog
index 9824c9e..4f5512e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,2713 @@
-=== release 1.3.2 ===
+=== release 1.3.3 ===
 
-2014-05-21  Sebastian Dröge <slomo@coaxion.net>
+2014-06-22  Sebastian Dröge <slomo@coaxion.net>
 
 	* configure.ac:
-	  releasing 1.3.2
+	  releasing 1.3.3
+
+2014-06-22 18:58:51 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/gl/Makefile.am:
+	  gl: Need to link to new badvideo library for the video aggregator base class
+
+2014-06-22 18:51:45 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/video/Makefile.am:
+	  video: Link with $(LIBM) for rint() and others
+
+2014-06-22 14:25:42 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* po/da.po:
+	* po/de.po:
+	* po/hu.po:
+	* po/id.po:
+	* po/nl.po:
+	* po/pl.po:
+	* po/ru.po:
+	* po/sr.po:
+	* po/uk.po:
+	  po: Update translations
+
+2014-06-20 08:20:55 -0600  Thomas Bluemel <tbluemel@control4.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: Fix decrypting fragments
+	  Only reset the decryption engine on the first buffer of a fragment,
+	  not again for the second buffer.  This fixes corrupting the second
+	  buffer of a fragment.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731968
+
+2014-06-22 14:12:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/rawparse/gstrawparse.c:
+	  rawparse: Use the pad passed to us directly for default event handling
+
+2014-06-19 17:24:26 +0900  Justin Joy <justin.joy.9to5@gmail.com>
+
+	* gst/rawparse/gstrawparse.c:
+	  rawparse: default query should be forward on target pad
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731899
+
+2014-06-22 12:32:35 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: fix up comment
+
+2014-06-22 09:44:24 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/Makefile.am:
+	* gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h:
+	* gst-libs/gst/gl/gstglapi.h:
+	* gst-libs/gst/gl/gstgles2.h:
+	  gl: move gles2 compat header to glprototypes
+
+2014-06-22 09:36:34 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglbufferpool.h:
+	  glbufferpool: provide a consistent API regardless of platform
+
+2014-06-22 09:22:23 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gl.h:
+	  gl: mark library as API unstable
+
+2014-06-21 16:57:34 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/uridownloader/gsturidownloader.h:
+	  libs:uridownloader: Properly declare APIs as UNSTABLE
+
+2014-06-21 16:52:51 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/Makefile.am:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	  libs:video: Properly declare APIs as UNSTABLE
+
+2014-06-21 16:51:01 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/Makefile.am:
+	* gst-libs/gst/base/gstaggregator.h:
+	  libs:base: Properly declare APIs as UNSTABLE
+
+2014-06-21 16:57:18 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: Fix compiler warning
+	  gstwaylandsink.c:480:14: error: comparison of constant -1 with expression of
+	  type 'enum wl_shm_format' is always false
+	  [-Werror,-Wtautological-constant-out-of-range-compare]
+	  if (format == -1)
+	  ~~~~~~ ^  ~~
+
+2014-06-21 16:55:05 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Update comments to the new reality and remove unused variables
+
+2014-06-21 15:40:58 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/Makefile.am:
+	  libs:video: Add -I$(top_srcdir)/gst-libs to fix distcheck
+
+2014-06-21 15:26:14 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/Makefile.am:
+	  libs:base: Fix includedir
+
+2014-06-21 13:45:13 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/base/gstaggregator.c:
+	  aggregator: Fix requested pad name
+
+2014-06-20 22:02:07 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	  libs: videoaggregato: Do not import videoconvert.h in gstvideoaggregatorpad.h
+	  + Add a Private structure to the GstVideoAggregatorPad
+	  + Add some padding
+
+2014-06-20 21:18:58 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/Makefile.am:
+	  Final fix compilation
+
+2014-06-20 20:11:07 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* Makefile.am:
+	  build: remove gst-libs/gst/video/ from CRUFT_DIRS
+	  It was gone, but now it's back.
+
+2014-06-20 20:23:30 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* gst-libs/gst/video/Makefile.am:
+	  libs:video:Fix compilation
+
+2014-06-20 11:10:45 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gl/gstglvideomixer.c:
+	  gl:glvideomixer: Add the Compositor in the element metadata class
+	  So it is possible to pick one compositing element from the registry
+
+2014-05-22 19:46:02 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* configure.ac:
+	* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* gst/compositor/Makefile.am:
+	* gst/compositor/blend.c:
+	* gst/compositor/blend.h:
+	* gst/compositor/blendorc.h:
+	* gst/compositor/compositor.c:
+	* gst/compositor/compositor.h:
+	* gst/compositor/compositororc-dist.c:
+	* gst/compositor/compositororc-dist.h:
+	* gst/compositor/compositororc.orc:
+	* gst/compositor/compositorpad.h:
+	* tests/check/Makefile.am:
+	* tests/check/elements/compositor.c:
+	  compositor: Add a new compositor based on the new GstVideoAggregator base class
+	  It is a replacement for videomixer with a similare API
+	  Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731919
+
+2014-06-10 11:26:53 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* ext/gl/gstglmosaic.c:
+	* ext/gl/gstglvideomixer.c:
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglmixer.h:
+	* gst-libs/gst/gl/gstglmixerpad.h:
+	  gl: Port glmixer to the GstVideoAggregator baseclass
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731921
+
+2014-06-03 19:00:34 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* configure.ac:
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/Makefile.am:
+	* gst-libs/gst/video/Makefile.am:
+	* gst-libs/gst/video/bad-video-orc-dist.c:
+	* gst-libs/gst/video/bad-video-orc-dist.h:
+	* gst-libs/gst/video/bad-video-orc.orc:
+	* gst-libs/gst/video/gstcms.c:
+	* gst-libs/gst/video/gstcms.h:
+	* gst-libs/gst/video/gstvideoaggregator.c:
+	* gst-libs/gst/video/gstvideoaggregator.h:
+	* gst-libs/gst/video/gstvideoaggregatorpad.h:
+	* gst-libs/gst/video/videoconvert.c:
+	* gst-libs/gst/video/videoconvert.h:
+	* pkgconfig/gstreamer-bad-video-uninstalled.pc.in:
+	* pkgconfig/gstreamer-bad-video.pc.in:
+	  videoaggregator: Create a new GstVideoAggregator baseclass
+	  This base class has been added to a newly created libgstbadvideo library
+	  Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731918
+
+2014-05-22 19:44:37 +0200  Thibault Saunier <tsaunier@gnome.org>
+
+	* configure.ac:
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/Makefile.am:
+	* gst-libs/gst/base/Makefile.am:
+	* gst-libs/gst/base/gstaggregator.c:
+	* gst-libs/gst/base/gstaggregator.h:
+	* pkgconfig/gstreamer-bad-base-uninstalled.pc.in:
+	* pkgconfig/gstreamer-bad-base.pc.in:
+	* tests/check/Makefile.am:
+	* tests/check/libs/aggregator.c:
+	  aggregator: Add new GstAggregator base class
+	  This base class has been added to a newly created libgstbadbase library
+	  Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731917
+
+2014-06-20 14:59:12 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Clear exceptions also when we did not provide a GError
+
+2014-06-19 11:26:41 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Also don't report warnings for queue/dequeue errors during flushing in error cases
+	  ... and fix a case where we released an invalid buffer index.
+
+2014-06-19 11:15:56 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Don't consider input buffer queueing failures as an error during flushing
+
+2014-06-19 11:12:47 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Clean up flushing code and don't consider output buffer releasing failures during flushing as an error
+
+2014-06-19 09:57:25 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/uridownloader/gsturidownloader.c:
+	  uridownloader: Include the debug string in the error messages we propagate from t source
+
+2014-06-19 09:56:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Include the debug string in the error messages we propagate from the source
+
+2014-06-19 09:54:10 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Include a more descriptive error message
+
+2014-06-19 09:53:00 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/gsthlsdemux.h:
+	  hlsdemux: Propagate error messages from the source element up in the hierarchy
+	  Instead of inventing our own generic error strings which are mostly useless.
+
+2014-06-19 09:40:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Directly convert GErrors to error messages
+	  This will make sure that we don't leak debug information into the actual
+	  error message string and keep it behind the debug string.
+
+2014-06-17 11:48:12 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  gstsrtpenc: unref event when needed
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731768
+
+2014-06-18 15:36:09 +0200  Wim Taymans <wtaymans@redhat.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	  srtpenc: improve property comments
+	  Add a Note to the allow-repeat-tx property because it is potentially
+	  insecure when used incorrectly.
+	  Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731714
+
+2014-06-13 11:15:25 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/srtp/gstsrtpenc.c:
+	* ext/srtp/gstsrtpenc.h:
+	  gstsrtpenc: add allow-repeat-tx property
+
+2014-05-27 12:40:09 +0200  Lubosz Sarnecki <lubosz@gmail.com>
+
+	* configure.ac:
+	* docs/plugins/gst-plugins-bad-plugins-sections.txt:
+	* ext/gl/Makefile.am:
+	* ext/gl/gstgltransformation.c:
+	* ext/gl/gstgltransformation.h:
+	* ext/gl/gstopengl.c:
+	  opengl: add element for transforming video geometry
+	  * add graphene as soft dependency for linear algebra
+
+2014-06-18 10:13:10 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/pnm/Makefile.am:
+	  pnm: link against libgstbase for GstAdapter
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730523
+
+2014-06-17 23:20:04 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglframebuffer.c:
+	  glframebuffer: don't segfault needlessly with GLES2
+	  gst_gl_framebuffer_use_v2 was using a function that is not available
+	  with GLES2
+
+2014-06-16 20:36:09 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglfiltershader.c:
+	* ext/gl/gstglfiltershader.h:
+	  glfiltershader: port to GLES2
+	  Provide a time variable
+
+2014-06-17 13:48:10 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  win32: update exports for changed h264 codec parser API
+
+2014-06-17 12:50:17 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/pnm/gstpnmdec.c:
+	* gst/pnm/gstpnmutils.c:
+	  pnmdec: Added PBM Support
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730523
+
+2014-06-17 13:15:06 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/wayland/wayland.h:
+	  wayland: add unstable API guards to wayland library header
+
+2014-06-17 13:11:29 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/wayland/Makefile.am:
+	  gst-libs: fix uninstalled build of new wayland lib
+
+2014-06-16 18:53:53 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wldisplay.c:
+	  waylandsink/wldisplay: verify that all the required interfaces have been found on the compositor
+	  This allows waylandsink to fail gracefully before going to READY
+	  in case one of the required interfaces does not exist. Not all
+	  interfaces are necessary for all modes of operation, but it is
+	  better imho to fail before going to READY if at least one feature
+	  is not supported, than to fail and/or crash at some later point.
+	  In the future we may want to relax this restriction and allow certain
+	  interfaces not to be present under certain circumstances, for example
+	  if there is an alternative similar interface available (for instance,
+	  xdg_shell instead of wl_shell), but for now let's require them all.
+	  Weston supports them all, which is enough for us now. Other compositors
+	  should really implement them if they don't already. I don't like the
+	  idea of supporting many different compositors with different sets of
+	  interfaces implemented. wl_subcompositor, wl_shm and wl_scaler are
+	  really essential for having a nice video sink. Enough said.
+
+2014-06-16 18:03:51 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: remove the buffer from the surface when going PAUSED -> READY
+	  This essentially hides the video and allows the application to
+	  potentially draw a black background or whatever else it wants.
+	  This allows to differentiate the "paused" and "stopped" modes
+	  from the user's point of view.
+	  Also reworded a comment there to make my thinking more clear,
+	  since the "reason for keeping the display around" is not really
+	  the exposed() calls, as there is no buffer shown in READY/NULL
+	  anymore.
+
+2014-06-12 17:43:40 +0200  Arnaud Vrac <avrac@freebox.fr>
+
+	* configure.ac:
+	* pkgconfig/Makefile.am:
+	* pkgconfig/gstreamer-wayland-uninstalled.pc.in:
+	* pkgconfig/gstreamer-wayland.pc.in:
+	  wayland: install .pc file
+
+2014-06-13 16:37:38 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlwindow.c:
+	  waylandsink/wlwindow: do not commit a resize when it happens due to a video info change
+	  1) We know that gst_wayland_sink_render() will commit the surface
+	  in the same thread a little later, as gst_wl_window_set_video_info()
+	  is always called from there, so we can save the compositor from
+	  some extra calculations.
+	  2) We should not commit a resize with the new video info while we are still
+	  showing the buffer of the previous video, with the old caps, as that
+	  would probably be a visible resize glitch.
+
+2014-06-13 16:29:32 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlwindow.c:
+	  waylandsink/wlwindow: take into account the video aspect ratio when determining the size of the surface
+
+2014-06-13 15:58:08 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: improve the way the video size is passed to wlwindow and also improve the code for window creation
+
+2014-06-06 12:49:56 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* gst-libs/gst/wayland/wayland.c:
+	* gst-libs/gst/wayland/wayland.h:
+	  waylandsink: rename pause/resume_rendering to begin/end_geometry_change and update their documentation
+
+2014-05-29 12:27:46 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: remove the manual synchronization from pause/resume_rendering and use subsurface sync/desync
+	  Previously, in order to change the surface size we had to let the pipeline
+	  redraw it, which at first also involved re-negotiating caps, etc, so a
+	  synchronization with the pipeline was absolutely necessary.
+	  At the moment, we are using wl_viewport, which separates the surface size
+	  from the buffer size and it also allows us to commit a surface resize without
+	  attaching a new buffer, so it is enough to just do:
+	  gst_wayland_video_pause_rendering():
+	  wl_subsurface_set_sync()
+	  gst_video_overlay_set_render_rectangle():
+	  wl_subsurface_set_position()
+	  wl_viewport_set_destination()
+	  wl_surface_damage()
+	  wl_surface_commit()
+	  ... commit the parent surface ...
+	  gst_wayland_video_resume_rendering():
+	  wl_subsurface_set_desync()
+	  This is enough to synchronize a surface resize and the pipeline can continue
+	  drawing independently. Now of course, the names pause/resume_rendering are
+	  bad. I will rename them in another commit.
+
+2014-06-06 12:10:24 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: protect access to properties with the OBJECT_LOCK
+
+2014-06-06 12:04:44 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: protect access to the display with a new display_lock
+	  Access is protected only for setting/creating/destroying the display
+	  handle. set_caps() for example is not protected because it cannot be
+	  called before changing state to READY, at which point there will be
+	  a display handle available and which cannot change by any thread at
+	  that point
+
+2014-06-06 10:35:20 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: remove the OBJECT_LOCK from set_caps()
+	  It's not really necessary, this method is protected from GstBaseSink with the PREROLL_LOCK
+
+2014-05-28 13:10:43 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: Replace the OBJECT_LOCK with a private render_lock to lock render operations
+	  This is because:
+	  * GST_ELEMENT_WARNING/ERROR do lock the OBJECT_LOCK and we deadlock instantly
+	  * In future commits I want to make use of GstBaseSink functions that also
+	  lock the OBJECT_LOCK inside this code
+
+2014-05-26 14:13:56 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: move surface resizing logic to the GstWlWindow and make it be called from the main thread
+
+2014-05-26 12:54:10 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: cleanup GstWlWindow a bit after the overlaying semantics change
+	  * own_surface is not needed anymore
+	  * gst_wl_window_from_surface is not used externally anymore
+	  * many initializations to 0 are not needed (GObject does them)
+
+2014-05-26 11:34:51 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* gst-libs/gst/wayland/wayland.c:
+	* gst-libs/gst/wayland/wayland.h:
+	  wayland: remove gst_wayland_video_set_surface_size()
+	  Not needed anymore, since we use gst_video_overlay_set_render_rectangle()
+
+2014-05-23 18:18:32 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: create and maintain the subsurface inside the sink
+	  This means that the given surface in set_window_handle can now be
+	  the window's top-level surface on top of which waylandsink creates
+	  its own subsurface for rendering the video.
+	  This has many advantages:
+	  * We can maintain aspect ratio by overlaying the subsurface in
+	  the center of the given area and fill the parent surface's area
+	  black in case we need to draw borders (instead of adding another
+	  subsurface inside the subsurface given from the application,
+	  so, less subsurfaces)
+	  * We can more easily support toolkits without subsurfaces (see gtk)
+	  * We can get properly use gst_video_overlay_set_render_rectangle
+	  as our api to set the video area size from the application and
+	  therefore remove gst_wayland_video_set_surface_size.
+
+2014-05-23 13:09:27 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* gst-libs/gst/wayland/wayland.c:
+	* gst-libs/gst/wayland/wayland.h:
+	  wayland: add public API for creating & using the display handle GstContext
+
+2014-05-21 18:27:28 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlwindow.c:
+	* gst-libs/gst/wayland/wayland.h:
+	  waylandsink: get the external display handle using GstContext
+	  This drops the ugly GstWaylandWindowHandle structure and is much
+	  more elegant because we can now request the display separately
+	  from the window handle. Therefore the window handle can be requested
+	  in render(), i.e. when it is really needed and we can still open
+	  the correct display for getting caps and creating the pool earlier.
+	  This change also separates setting the wl_surface from setting its size.
+	  Applications should do that by calling two functions in sequence:
+	  gst_video_overlay_set_window_handle (overlay, surface);
+	  gst_wayland_video_set_surface_size (overlay, w, h);
+
+2014-05-21 13:14:15 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: drop width/height arguments from gst_wl_window_new_from_surface()
+
+2014-05-22 10:10:51 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wldisplay.h:
+	* ext/wayland/wlvideoformat.h:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: add G_BEGIN/END_DECLS on all headers for consistency
+
+2014-05-21 12:58:10 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: fix assertion failure when stopping immediately after starting, without displaying anything
+	  This was triggered in scenarios like
+	  filesrc location=nonexistent_file ! decodebin ! waylandsink
+
+2014-05-21 11:55:45 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/scaler.xml:
+	* ext/wayland/wldisplay.c:
+	  waylandsink: Update wl_scaler to version 2
+
+2014-05-20 19:04:16 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* gst-libs/gst/wayland/Makefile.am:
+	  wayland/Makefile.am: link with gstvideo to avoid introspection errors
+
+2014-05-20 19:03:39 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	  waylandsink/Makefile.am: Fix scaler-client-protocol.h generation
+
+2014-03-13 13:13:08 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlvideoformat.c:
+	* ext/wayland/wlvideoformat.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: remove unused functions
+
+2014-03-12 19:25:06 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: Add myself to the authors list
+
+2014-03-12 17:03:10 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wldisplay.c:
+	  waylandsink/wldisplay: bind to the latest available wl_compositor version
+
+2014-03-12 14:28:44 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: create/destroy the display when entering/leaving the READY state instead of PAUSED
+	  This is the only way to get the negotiation working with the dynamic
+	  detection of formats from the display, because the pipeline needs
+	  to know the supported formats in the READY state and the supported
+	  formats can only be known if we open the display.
+	  Unfortunately,in wayland we cannot have a separate connection to
+	  the display from the rest of the application, so we need to ask for a
+	  window handle when going to READY in order to get the display from it.
+	  And since it's too early to create a top level window from the state
+	  change to READY, create it in render() when there is no other window.
+	  This also changes set_window_handle() to not support window handle
+	  changes in PAUSED/PLAYING (because it's complex to handle and useless
+	  in practice) and make sure that there is always a valid display pointer
+	  around in the READY state.
+
+2014-03-12 14:13:49 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: Support all video formats supported by the display
+
+2014-03-12 13:54:44 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: fix crash in case there is no pool because of a caps negotiation error
+
+2014-03-11 19:47:52 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlwindow.c:
+	  waylandsink: set an empty input region on the video surface
+
+2014-03-11 19:46:56 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlwindow.c:
+	  waylandsink/wlwindow: reuse code between the two constructors
+
+2014-03-11 18:45:23 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: increase debug messages
+
+2014-03-11 17:48:46 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: Use a boolean in combination with render_cond to comply with GCond's usage documentation
+
+2014-03-11 17:45:05 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: Implement expose() and handle resizing properly in non-PLAYING states
+
+2014-03-11 13:14:00 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: Use wl_scaler/wl_viewport to scale the surface in the compositor/hardware
+
+2014-03-11 13:05:56 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* configure.ac:
+	* ext/wayland/.gitignore:
+	* ext/wayland/Makefile.am:
+	* ext/wayland/scaler.xml:
+	  waylandsink: Build bindings for the unstable wl_scaler spec
+
+2014-03-10 13:50:06 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: Set external surfaces and their child objects to use our own event queue
+	  This fixes weird freezes because of frame_redraw_callback() not being
+	  called from the main thread when it should with weston's toy toolkit.
+	  It's also safer to know that frame_redraw_callback() will always be
+	  called from our display thread... Otherwise it could be called after
+	  the sink has been destroyed for example.
+
+2014-03-07 17:25:00 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: Wait for the frame_cb to redraw and drop frames meanwhile
+	  We are not supposed to redraw until we receive a frame callback and this
+	  is especially useful to avoid allocating too many buffers while the
+	  window is not visible, because the compositor may not call wl_buffer.release
+	  until the window becomes visible (ok, this is a wayland bug, but...).
+
+2014-03-07 16:16:30 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	  waylandsink: Handle wl_buffer::release and don't reuse buffers that are not released
+	  This is achieved by adding an extra reference on the buffers, which does
+	  not allow them to return to the pool. When they are released, this reference
+	  is dropped.
+	  The rest complexity of this patch (hash table, mutex, flag, explicit release calls)
+	  merely exists to allow a safe, guaranteed and deadlock-free destruction sequence.
+	  See the added comment on gstwaylandsink.c for details.
+
+2014-03-06 17:03:50 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	  waylandsink/waylandpool: remove useless munmap call
+	  This data pointer is part of a bigger mmap'ed region,
+	  it has not been returned from mmap itself.
+
+2014-02-28 13:37:30 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink/waylandpool: call the start/stop methods of the parent class
+	  start() makes sure that the minimum ammount of buffers requested is allocated.
+	  stop() makes sure that buffers are actually destroyed and prevents
+	  filling the file system when resizing the surface a lot, because the
+	  wayland-shm-* files will stay on the file system as long as the wl_buffers
+	  created out of them are alive.
+
+2014-02-28 13:36:43 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink/waylandpool: unlink mmaped shm files so that they don't remain on the file system
+
+2014-02-28 11:48:30 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	* gst-libs/gst/wayland/wayland.h:
+	  waylandsink: implement the GstVideoOverlay & GstWaylandVideo interfaces
+	  This is the initial implementation, without the GstVideoOverlay.expose()
+	  method. It only implements using an external (sub)surface and resizing
+	  it with GstWaylandVideo.
+
+2014-02-14 16:08:56 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: implement with stubs the GstWaylandVideo & GstVideoOverlay interfaces
+
+2013-05-06 13:16:02 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* configure.ac:
+	* gst-libs/gst/Makefile.am:
+	* gst-libs/gst/wayland/Makefile.am:
+	* gst-libs/gst/wayland/wayland.c:
+	* gst-libs/gst/wayland/wayland.h:
+	  wayland: Add new gst-wayland library containing a new GstWaylandVideo interface
+	  This interface is needed to be able to embed waylandsink into
+	  other wayland surfaces. Due to the special nature of wayland,
+	  GstVideoOverlay is not enough for this job.
+
+2014-02-26 18:35:29 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	  waylandsink: handle the list of supported formats properly
+	  enum wl_shm_format is not a flags enum, as it may have been in the past,
+	  so multiple formats cannot be stored in a bitfield. Use an array instead.
+
+2014-02-26 17:41:11 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/wlvideoformat.c:
+	  waylandsink/wlvideoformat: add mappings for many common formats
+
+2014-02-26 16:20:41 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: unref the buffer pool
+
+2014-02-26 16:11:29 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	  waylandsink/waylandpool: ref the display instead of the sink to avoid cyclic references
+	  The reference to the sink is not really needed anyway in waylandpool,
+	  what matters basically is that the display is active as long as the
+	  pool is active, so we really want to reference the display object
+	  instead of the sink.
+
+2014-02-26 14:56:21 +0200  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: make the display property useful
+	  Let the display property control the name of the display,
+	  like in x(v)imagesink.
+
+2014-02-14 17:20:42 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	  waylandsink: access sink->pool in a more atomic fashion
+
+2014-02-14 16:33:10 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: remove the useless wayland_lock
+
+2014-02-13 13:28:40 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wlvideoformat.c:
+	* ext/wayland/wlwindow.c:
+	  waylandsink: apply the same debug category to all the subobjects
+
+2014-02-13 13:15:31 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wlvideoformat.c:
+	* ext/wayland/wlwindow.c:
+	  waylandsink: cleanup header includes
+
+2014-02-13 11:59:45 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wlwindow.c:
+	* ext/wayland/wlwindow.h:
+	  waylandsink: split window-related code out to a new GstWlWindow class
+	  GstWlWindow also has API ready to support subsurfaces.
+
+2014-02-13 11:32:00 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	  waylandsink: remove callback and redraw_pending variables from the window structure
+
+2014-02-13 10:51:59 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink/waylandpool: improve debug message
+
+2014-02-13 10:37:01 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink/waylandpool: find the video format from the GstVideoInfo instead of accessing the sink
+	  For the sake of isolation only. The format should be the same.
+
+2014-02-13 10:29:08 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	  waylandsink/waylandpool: refactor code
+	  * make use of GstBufferPool::start/stop functions to allocate/deallocate memory
+	  * get rid of struct shm_pool and do all operations cleanly inside WaylandBufferPool
+	  * store a GstVideoInfo during configuration instead of the width & height
+	  and use the stride from the video info instead of hardcoding its value
+
+2014-02-13 10:02:54 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/wlvideoformat.c:
+	* ext/wayland/wlvideoformat.h:
+	  waylandsink: split video format related functions out to a separate file
+
+2014-02-12 15:16:08 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink/waylandpool: move code around for better readability
+
+2014-02-12 14:41:52 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	  waylandsink: move struct shm_pool and its related functions to waylandpool.c
+	  And also make the instance of this struct to be owned by the buffer
+	  pool instead of the element, for the sake of isolation
+
+2013-05-14 19:35:33 +0300  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/waylandpool.c:
+	  waylandsink: Use XDG_RUNTIME_DIR instead of /tmp for the shm file
+
+2014-02-12 14:15:52 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/waylandpool.h:
+	  waylandsink: remove unused variables
+
+2014-02-12 11:28:40 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/Makefile.am:
+	* ext/wayland/gstwaylandsink.c:
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/waylandpool.c:
+	* ext/wayland/wldisplay.c:
+	* ext/wayland/wldisplay.h:
+	  waylandsink: process display events in a separate thread
+	  This also moves the display-related code into a new GstWlDisplay class,
+	  which takes care of the new thread
+
+2014-02-04 16:32:31 +0100  George Kiagiadakis <george.kiagiadakis@collabora.com>
+
+	* ext/wayland/gstwaylandsink.h:
+	* ext/wayland/waylandpool.h:
+	  waylandsink: tidy up the header files
+
+2014-06-12 16:38:35 +0530  Sanjay NM <sanjay.nm@samsung.com>
+
+	* gst/pnm/gstpnmdec.c:
+	* gst/pnm/gstpnmdec.h:
+	  pnmdec: use GstVideoDecoder Class
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731400
+
+2014-06-16 07:42:37 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Don't overwrite original seek value
+	  In accurate mode, we'll be using start to fill in the seek segment,
+	  therefore don't overwrite it with the shifted seek position.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731698
+
+2014-06-15 15:18:46 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: silence incorrect number of arguments in format warning
+
+2014-06-15 15:17:07 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstgldownload.c:
+	  gldownload: plug a memory leak
+
+2014-06-15 13:59:07 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: wire up the alpha pad property
+
+2014-06-15 13:44:04 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglvideomixer.c:
+	  glvideomixer: support input frame scaling
+
+2014-06-15 12:26:21 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglvideomixer.c:
+	* ext/gl/gstglvideomixer.h:
+	  glvideomixer: add positioning of input streams
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729798
+
+2014-06-15 12:24:38 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglmixer.h:
+	  glmixer: allow the subclass to choose the sink pad type
+	  Allows custom properties to be placed on the sink pads by subclasses
+
+2014-06-13 11:46:19 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: live: handle pcr/dts discrepancies some more
+	  When wrapover/reset occur, we end up with a small window of time where
+	  the PTS/DTS will still be using the previous/next time-range.
+	  In order not to return bogus values, return GST_CLOCK_TIME_NONE if the
+	  PTS/DTS value to convert differs by more than 15s against the last seen
+	  PCR
+	  https://bugzilla.gnome.org/show_bug.cgi?id=674536
+
+2014-06-13 10:37:46 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Fix wraparound detection issue
+	  Using 32bit unsigned values for corrected pcr/offset meant that we
+	  potentially ended up in bogus values
+	  Furthermore, refpcr - refpcroffset could end up being negative, which
+	  PCRTIME_TO_GSTTIME() can't handle (and returned a massive positive value)
+
+2014-06-13 11:26:38 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	  docs: add gsteglimagememory
+
+2014-06-13 09:55:42 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	  docs: add glframebuffer object
+
+2014-06-13 09:52:01 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	  docs: misc adds for gl functions
+
+2014-06-13 09:41:51 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-docs.sgml:
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	  docs: add gluploadmeta object
+
+2014-06-13 09:32:56 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	  docs: update for some gl function name changes
+
+2014-06-12 23:14:45 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglfilterapp.c:
+	* ext/gl/gstglfilterapp.h:
+	  glfilterapp: actually emit the client-draw signal
+
+2014-06-12 23:13:11 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/generic/cube/main.cpp:
+	* tests/examples/gl/generic/cubeyuv/main.cpp:
+	* tests/examples/gl/generic/doublecube/main.cpp:
+	* tests/examples/gl/generic/recordgraphic/main.cpp:
+	  gl/examples: update for TEXTURE_2D change
+
+2014-05-30 16:52:09 +0200  Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+
+	* gst/mpegtsdemux/Makefile.am:
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mpegtsdemux/tsdemux.h:
+	  tsdemux: implement proper seeking for h264 streams.
+	  Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
+	  From a high level perspective, the new process for seeking h264
+	  streams is as follows:
+	  1) Rewind the stream until we find the first I-slice of a frame,
+	  and mark its offset in the stream.
+	  2) Rewind the stream until we find SPS and PPS informations,
+	  to make sure the subsequent parser is up to date.
+	  3) Accumulate optionnal SEI NAL units on the way.
+	  4) Push the SPS, PPS and SEI units before the new keyframe.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=675132
+
+2014-06-12 10:14:27 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: do not try to close negative file descriptors
+	  Interestingly, Coverity implies that close takes an unsigned
+	  argument, while my close(2) man page shows it taking a signed
+	  argument. I guess it may be platforms specific.
+	  Coverity 1214602
+
+2014-06-12 10:17:10 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/hls/m3u8.c:
+	  hls: fix build with GLib 2.32
+	  Provide internal copy of g_list_copy_deep() until we
+	  bump the GLib requirement.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731555
+
+2014-06-12 10:00:55 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* gst/aiff/aiffparse.c:
+	  aiffparse: bail out early when bytes per sample is not set
+	  This should always be set for valid files when we get there,
+	  and checking this avoids having ad hoc checks further down
+	  in several places.
+	  Coverity 1139698
+
+2014-06-11 15:11:40 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers: h264: fix quantization matrix conversion routine names.
+	  Fix routine names for zigzag/raster scan order conversion routines for
+	  quantization matrices. This ought to use the gst_h264_quant_matrix_*()
+	  naming convention instead of gst_h264_video_quant_matrix_*(), which
+	  derived from the MPEG-2 function names.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731524
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2014-05-26 18:29:21 +0200  Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+	* gst-libs/gst/codecparsers/gstmpeg4parser.c:
+	* gst-libs/gst/codecparsers/gstmpeg4parser.h:
+	* gst-libs/gst/codecparsers/gstvp8parser.h:
+	  codecparsers: add C++ guards for MPEG-4 and VP8 parsers.
+	  Fix MPEG-4 and VP8 APIs to export their external symbols as pure C
+	  symbols, i.e. un-mangled for C++.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731522
+	  Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+2014-06-12 14:58:47 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmixer.c:
+	* gst-libs/gst/gl/gstglmixer.h:
+	  glmixer: send the stream-start event
+	  and the caps event after.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730944
+
+2014-06-12 13:37:51 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/generic/cube/Makefile.am:
+	* tests/examples/gl/generic/cubeyuv/Makefile.am:
+	* tests/examples/gl/generic/doublecube/Makefile.am:
+	* tests/examples/gl/generic/recordgraphic/Makefile.am:
+	* tests/examples/gl/sdl/Makefile.am:
+	  gl/examples: add GST_PLUGINS_BASE_CFLAGS
+
+2014-06-12 13:15:10 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/generic/doublecube/main.cpp:
+	  gl/examples: remove spurious include for doublecube example
+
+2014-06-12 13:06:31 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/clutter/Makefile.am:
+	* tests/examples/gl/cocoa/Makefile.am:
+	* tests/examples/gl/generic/cube/Makefile.am:
+	* tests/examples/gl/generic/cubeyuv/Makefile.am:
+	* tests/examples/gl/generic/doublecube/Makefile.am:
+	* tests/examples/gl/generic/recordgraphic/Makefile.am:
+	* tests/examples/gl/gtk/Makefile.am:
+	* tests/examples/gl/gtk/filtervideooverlay/Makefile.am:
+	* tests/examples/gl/gtk/fxtest/Makefile.am:
+	* tests/examples/gl/gtk/gtkvideooverlay/Makefile.am:
+	* tests/examples/gl/gtk/switchvideooverlay/Makefile.am:
+	* tests/examples/gl/sdl/Makefile.am:
+	  gl/examples: add the srcdir and builddir includes
+	  And remove references to $(GST_PLUGINS_GL_*)
+
+2014-06-12 12:49:42 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglfilterapp.c:
+	* ext/gl/gstglfilterapp.h:
+	* gst-libs/gst/gl/gstglutils.h:
+	* tests/examples/gl/generic/recordgraphic/main.cpp:
+	  glfilterapp: remove the reshape/draw properties
+	  The reshape property was never used.
+	  Replace the draw property with a signal.
+	  Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=704507
+
+2014-06-12 12:14:35 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmixer.c:
+	  glmixer: lock the size of mix->frames to the number of pads
+	  Fixes a segfault with decodebin ! glmixer where the request pads on
+	  both sides were being requested after the state change to PAUSED.
+	  Also fixes dynamically adding and removing pads while glmixer is
+	  in a state >= PAUSED.
+
+2014-06-12 12:09:56 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/examples/gl/generic/cube/main.cpp:
+	* tests/examples/gl/generic/cubeyuv/main.cpp:
+	* tests/examples/gl/generic/doublecube/main.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/mousevideooverlay/pipeline.h:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.cpp:
+	* tests/examples/gl/qt/qglwidgetvideooverlay/pipeline.h:
+	  gl/examples: Port to using signals instead of properties
+	  Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=704507
+
+2014-06-01 15:02:52 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  glimagesink: replace pointer properties with signals
+	  Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=704507
+
+2014-06-11 09:38:00 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Use first group for handling reference pcr
+	  If _set_current_pcr_offset gets called after a flushing seek, we ended
+	  up using the current group for delta calculation ... whereas we should
+	  be using the first group to calculate shifts.
+	  Also add an early exit if there are no changes to apply
+
+2014-06-10 14:50:10 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Remove unused variable
+	  The seeksegment was no longer used since the switch to calculating segments
+	  when we see data.
+
+2014-06-10 14:27:53 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Fix debug statement
+
+2014-06-10 14:27:01 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Fix duration evaluation in push mode
+	  When working in push mode, we need to be able to evaluate the duration
+	  based on a single group of observations.
+	  To do that we use the current group values
+
+2014-06-02 11:07:01 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketizer: Handle early PTS conversion
+	  When handling the PTS/DTS conversion in new groups, there's a possibility
+	  that the PTS might be smaller than the first PCR value observed, due to
+	  re-ordering.
+	  When using the current group, only apply the wraparound correction when we
+	  are certain it is one (i.e. differs by more than a second) and not when it's
+	  just a small difference (like out-of-order PTS).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731088
+
+2014-06-09 10:10:01 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst/gdp/dataprotocol.c:
+	  gdp: don't print already-freed string
+	  CID 1221987
+
+2014-06-09 10:56:48 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/speed/gstspeed.c:
+	  speed: Fix position query some more
+	  Forgot to remove code in 16fd917632c0992349ca28cf9108e9562c493ad7
+	  CID #1139677
+
+2014-06-07 07:13:59 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  mpegtsdemux: Fix sticky event handling
+	  When we receive sticky events from upstream, always return TRUE.
+	  Fixes the issue where we receive custom sticky events (such as "uri")
+	  and no pads are created yet.
+
+2014-06-04 18:34:44 +0100  Damian Ziobro <damian@xmementoit.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Improve parsing quoted key URIs and apply it for I-frame-based stream URI
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730830
+
+2014-06-06 13:08:04 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: Don't store the current key in the playlist
+	  It's per fragment and applying to all following fragments
+	  until the next key is specified.
+
+2014-06-06 13:04:04 +0300  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Fix compiler warnings
+
+2014-05-30 16:34:18 -0600  Thomas Bluemel <tbluemel@control4.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: Reload the variant playlist if refreshing a playlist or downloading a fragment fails
+	  This can happen if the playlists have moved due to the variant playlist
+	  now being redirected to another target. This currently only works as long
+	  as the referenced playlists don't change in relation to the variant
+	  playlist, and the new location is purely due to a new path triggered by a
+	  new redirection target of the variant playlist, or a new redirection
+	  target of the playlist itself.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731164
+
+2014-06-05 16:45:12 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* ext/schroedinger/gstschroenc.c:
+	  schroenc: Use an arbitrary framerate if none if given
+	  The schro encoder always requires a framerate, but some source material,
+	  such as RTP doesn't have a fixed one, so just fake it.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729054
+
+2014-06-04 14:35:51 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: drop redundant assignment
+
+2014-06-04 01:02:20 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: improve timeout handing at locking loop
+	  New approach attempts to be more accurate by measuring
+	  the elapsed time by iteration. Also:
+	  * Use a 10 seconds default timeout and a half a second
+	  polling step. New values should better match the tuning
+	  process on real-life scenarios.
+	  * Correct elapsed_time computation.
+	  * Add _retry_ioctl() to avoid bailing out on temporary
+	  ioctl EINTR failures (no need to check for EAGAIN cause
+	  we are opening the frontend on blocking mode)
+	  * Small corrections to fail condition handling
+
+2014-06-05 18:43:30 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstgldisplay.c:
+	  gl/wayland: create a dummy display instead of an EGLDisplay
+	  Currently, GstGLWindowWaylandEGL holds the wayland display connection
+	  If we create the EGLDisplay at the GstDisplay creation time, then
+	  libEGL will internally open another connection to the wayland server.
+	  These two display connections are unable to communicate resulting in
+	  no window output/display and hangs inside libEGL.
+	  Eventually we will move the wl_display from GstGLWindow to GstGLDisplay.
+
+2014-06-05 09:40:38 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/rtmp/gstrtmp.c:
+	  rtmp: proxy logging from librtmp
+	  Helps with debugging various librtmp issues
+
+2014-06-05 08:29:50 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* ext/rtmp/gstrtmpsrc.c:
+	  rtmpsrc: Fix position querying
+	  It's the position we're querying, not the duration :)
+
+2014-06-04 21:39:48 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Remove extraneous extra parameter from check_pending_buffers function
+
+2014-06-04 21:31:21 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsdemux/mpegtspacketizer.c:
+	  mpegtspacketiser: Always initialise packet AFC flags and PCR fields
+	  Also fix a slight typo in a comment about the smoothing algorithm
+
+2014-05-23 15:07:19 +1000  Jan Schmidt <jan@centricular.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: Reset pending_ts on a discont, to re-measure initial timestamps
+	  Since all the other timestamp tracking now gets reset on a discont,
+	  it makes sense to wait for a PCR and timestamp buffers like when
+	  playback first starts
+
+2014-03-21 22:16:41 -0700  Aleix Conchillo Flaqué <aleix@oblong.com>
+
+	* ext/srtp/gstsrtpdec.c:
+	* ext/srtp/gstsrtpdec.h:
+	* ext/srtp/gstsrtpenc.c:
+	* ext/srtp/gstsrtpenc.h:
+	  srtp: add support for rollover counters and replay protection window size
+	  We add a new signal, get-rollover-counter, to the SRTP encoder. Given a
+	  ssrc the signal will return the currently internal SRTP rollover counter
+	  for the given stream.
+	  For the SRTP decoder we have a new SRTP caps parameter "roc" that needs
+	  to be set when a new SRTP stream is created for a given SSRC.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=726861
+
+2013-10-14 16:14:42 +0200  Michael Olbrich <m.olbrich@pengutronix.de>
+
+	* gst/liveadder/liveadder.c:
+	  liveadder: handle gap buffer flag
+	  Remove GAP flag unless both sides have gap data, ignore
+	  incoming data if it is gap data.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=722397
+
+2014-05-25 21:43:22 +0100  Matthieu Bouron <matthieu.bouron@collabora.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: improve state change debug message
+
+2014-06-03 13:59:51 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: always release the previous buffer
+	  Fixes the case where _perform_with_buffer() is called without
+	  intervening calls to _release_buffer() as is the case on start up
+	  with glimagesink.
+	  Also release the buffer when reseting the upload.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731107
+
+2014-06-02 21:51:38 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* tests/check/elements/shm.c:
+	  tests: Take account of memory alignment in shm test
+
+2014-06-02 21:43:56 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* gst/gdp/dataprotocol.c:
+	  gdp: Fail gracefully if event can't be parsed
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731093
+
+2014-06-02 21:43:34 -0400  Olivier Crête <olivier.crete@collabora.com>
+
+	* sys/shm/gstshmsink.c:
+	  shmsink: Allocate enough memory to do alignment
+	  https://bugzilla.gnome.org/show_bug.cgi?id=731093
+
+2014-06-02 12:39:49 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Actually print the stacktrace into the error string
+
+2014-06-02 11:28:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Clear the exception before trying to call Java methods to convert it to a string
+
+2014-06-02 11:16:32 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Fix crashes when loading the plugin in a standalone application on Android >= 4.4
+	  Check if libnativehelper is loaded in the process and if
+	  it has these awful wrappers for JNI_CreateJavaVM and
+	  JNI_GetCreatedJavaVMs that crash the app if you don't
+	  create a JniInvocation instance first. If it isn't we
+	  just fail here and don't initialize anything.
+	  See this code for reference:
+	  https://android.googlesource.com/platform/libnativehelper/+/master/JniInvocation.cpp
+
+2014-06-02 10:11:58 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/speed/gstspeed.c:
+	  speed: make position query able to convert bytes to time
+	  (same as 744c58d71b21475d2edd5b9334e277cfa4c53260 but for the
+	  position query)
+	  It was only querying in time, but then trying to use dead bytes
+	  to time conversion code.
+	  Coverity 1139677
+
+2014-06-02 09:42:33 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	  mpegdemux: avoid crashing in pathological case
+	  (Identical to commit 612cdeec80da95b12f9fad928419c7de2be20d68 which
+	  was for resindvd)
+	  When we'd see an unknown stream type, then a SDDS stream.
+	  Then we'd get to the end of the switch with a NULL temp stream
+	  pointer, and dereference it.
+	  Coverity 1139708
+
+2014-06-02 09:23:39 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: Handle (unlikely) NULL return of gl->GetString (GL_VERSION) more gracefully
+	  CID 1219858
+
+2014-06-02 08:22:15 +0200  Edward Hervey <edward@collabora.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	  mpegts: Remove unneeded NULL check
+	  Allocating those structures is done in all code paths leading there
+	  CID #1219860
+	  CID #1219861
+	  CID #1219862
+	  CID #1219863
+	  CID #1219864
+
+2014-06-01 10:43:49 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* ext/mpeg2enc/gstmpeg2encoptions.cc:
+	  mpeg2enc: increase max. allowed value for bitrate property
+	  For DVD the limit is around 10Mbit/s, but for e.g. ATSC
+	  it could be much higher.
+
+2014-05-25 13:05:49 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* sys/dvb/dvbbasebin.c:
+	  dvbbasebin: better error handling in case tsparse is missing
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730641
+
+2014-05-30 17:35:49 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	  dvbbasebin: add prop setup code for guint64
+	  Needed since we are now proxying tuning-timeout
+	  from dvbsrc.
+
+2014-05-20 07:34:56 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/MotionCells.cpp:
+	* ext/opencv/gstmotioncells.c:
+	  motioncells: improve logging
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730141
+
+2014-05-20 07:29:16 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/MotionCells.cpp:
+	  motioncells: make framedrop work at 30 fps too
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730141
+
+2014-05-20 07:25:20 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* ext/opencv/gstmotioncells.c:
+	* ext/opencv/motioncells_wrapper.cpp:
+	  motioncells: use standard macro for boolean
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730141
+
+2014-05-20 07:18:39 +0200  Nicola Murino <nicola.murino@gmail.com>
+
+	* configure.ac:
+	  opencv: make the plugin compile with all 2.4.x versions
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730141
+
+2014-05-26 22:34:01 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/camconditionalaccess.c:
+	* sys/dvb/camdevice.c:
+	* sys/dvb/camswclient.c:
+	  dvb/cam*: use g_strerror and other few nits
+
+2014-05-30 11:00:06 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	  dvbbasebin: fix dvbsrc signal proxying
+	  https://bugzilla.gnome.org/show_bug.cgi?id=641204
+
+2014-05-30 00:49:49 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	* sys/dvb/dvbbasebin.c:
+	  dvbbasebin: proxy new props/signals from dvbsrc
+	  Proxy tuning start/done/fail signals and tuning-timeout
+	  property.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=641204
+
+2014-05-01 18:25:05 -0400  Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
+
+	  dvbsrc: smarten up tuning logic
+	  * Drop remaining sleep() logic in favor of polling
+	  * Use best guess delivery system if none is set
+	  * Make tuning/locking timeout configurable
+	  * Add signals for tuning start, done and fail
+	  * Drop gst_dvbsrc_frontend_status(). It was used only
+	  for signal LOCK checking. This is now part of the
+	  tuning/locking loop
+	  * Break up frontend configuration and tuning
+	  on separate functions
+	  Plus:
+	  * Add some more useful DEBUG/TRACE messages
+	  * Move over misplaced DVB API message
+	  * Fix wrong comment for default DVB buffer size (http://linuxtv.org/downloads/v4l-dvb-apis/dmx_fcalls.html#DMX_SET_BUFFER_SIZE)
+	  This patch builds up on previous work done by
+	  Fabrizio (Misto) Milo <mistobaan@gmail.com>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=641204
+
+2014-05-30 16:35:30 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: Add exceptions from the Java API to error messages, and post more error/warning messages overall
+
+2014-05-30 15:24:48 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	  androidmedia: Add a GError argument to all amc methods and catch exceptions there
+
+2014-05-30 15:24:15 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Describe exceptions happening when scanning all codecs
+
+2014-05-30 12:19:22 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Add API to convert an exception into a string
+
+2014-05-30 12:40:08 +0200  Jorge Zapata <jorgeluis.zapata@gmail.com>
+
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	  Release the codec before freeing it
+	  On Samsung Galaxy S4 it is impossible to have more than one
+	  hardware decoder at the same time. If we do not release it
+	  explicitly the GC only releases it whenever the whole application
+	  is finished not whenever the activity is finished and thus a player
+	  will not be able to work correctly
+
+2014-05-30 02:10:25 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/camerabin2/gstcamerabin2.c:
+	  camerabin: fix structure handling in preview message
+	  Avoid trying to modify the message structure as it isn't mutable.
+	  Use a copy and post a new message if necessary.
+	  Fixes failing tests.
+
+2014-05-30 12:23:09 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  glmemory: remove uneeded gl api ifdefs
+
+2014-05-30 11:51:01 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  glwindow_x11: allow expose events to redraw our window
+	  otherwise we will not update the window contents on low framerate
+	  streams until the next buffer
+	  https://bugzilla.gnome.org/show_bug.cgi?id=723529
+
+2014-05-30 11:46:00 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: unref the old buffer outside the lock
+	  it could very well deadlock
+	  https://bugzilla.gnome.org/show_bug.cgi?id=723529
+
+2014-05-30 11:35:04 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* ext/gl/gstglimagesink.h:
+	  Revert "[880/906] glimagesink: remove unused stored_buffer field"
+	  This reverts commit af3a68db7dc473fb6903c18966b39e4c3f1464d7.
+	  Conflicts:
+	  ext/gl/gstglimagesink.c
+	  https://bugzilla.gnome.org/show_bug.cgi?id=723529
+
+2014-05-30 10:46:25 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: fix up assertion
+	  error: 'return' with no value, in function returning non-void
+
+2014-05-30 10:27:14 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/effects/gstgleffectidentity.c:
+	* ext/gl/effects/gstgleffectmirror.c:
+	* ext/gl/effects/gstgleffectsqueeze.c:
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/glprototypes/base.h:
+	* gst-libs/gst/gl/glprototypes/blending.h:
+	* gst-libs/gst/gl/glprototypes/eglimage.h:
+	* gst-libs/gst/gl/glprototypes/fbo.h:
+	* gst-libs/gst/gl/glprototypes/fixedfunction.h:
+	* gst-libs/gst/gl/glprototypes/gles.h:
+	* gst-libs/gst/gl/glprototypes/opengl.h:
+	* gst-libs/gst/gl/glprototypes/shaders.h:
+	* gst-libs/gst/gl/gstglapi.c:
+	* gst-libs/gst/gl/gstglapi.h:
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglfeature.c:
+	* gst-libs/gst/gl/gstglfeature.h:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglshader.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	* gst-libs/gst/gl/gstglutils.c:
+	* gst-libs/gst/gl/gstglwindow.c:
+	  glfeature: remove GST_GL_API_GLES3
+	  instead check the gl version using gst_gl_context_check_gl_version()
+
+2014-05-30 10:25:18 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: check for GLES versions
+
+2014-05-29 20:35:48 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* gst-libs/gst/gl/gstglcontext.h:
+	  gl/context: add check_gl_version
+
+2014-05-29 17:09:26 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: Try GLX support before EGL support
+	  If available, glx has got a better chance of being the Gl platform
+	  we want to use compared to EGL
+
+2014-05-29 16:59:28 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	* gst-libs/gst/gl/gstglcontext.c:
+	  glcontext: Try to open lib{EGL|GL|GLESv2}.so.1 before lib{EGL|GL|GLESv2}
+	  Fixes issues with .so (without numbering) being installed for development
+	  (such as from mesa-dev) but actual driver (with numbering) coming from
+	  some other place (like nvidia drivers)
+
+2014-05-29 16:01:22 +0200  Christian Fredrik Kalager Schaller <uraeus@linuxrising.org>
+
+	* gst-plugins-bad.spec.in:
+	  Update spec file with latest changes
+
+2014-05-29 12:30:13 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	  atsc-section: Fix annotation
+
+2014-05-29 12:29:52 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  dvb-descriptor: Fix multilingual service name parsing
+	  the provider and service name was inverted
+
+2014-05-28 16:47:53 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add parential rating descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730854
+
+2014-05-28 16:47:28 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add ca iddentifier descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730854
+
+2014-05-28 12:23:50 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add stream identifier descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730854
+
+2014-05-28 12:23:12 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add content descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730854
+
+2014-05-28 12:19:43 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add component descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730854
+
+2014-05-29 11:55:51 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: factor dumping code
+	  We can just re-use the new function instead of having two duplicates
+
+2014-05-29 10:50:58 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add linkage descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730901
+
+2014-05-28 20:42:05 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  mpegts: bugfix mobile hand over linkage parse missmatch
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730901
+
+2014-05-28 16:34:08 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  mpegts: atsc: add missing field to ETT table
+	  Set the subtable_extension as ett_table_id_extension
+	  for ETT tables as it is used by it
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-28 15:59:23 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/gstmpegtssection.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  mpegts: atsc: add atsc's EIT table parsing
+	  ATSC has its own version of the EIT table (DVB also has one).
+	  This patch adds parsing for the ATSC EIT table and also fixed
+	  the section identification to mark it as the ATSC one.
+	  The implementation aws refactored to reuse some common internal
+	  structures from ETT.
+	  Also adds its dumping function to ts-parser example
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-22 17:49:39 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* tests/check/libs/mpegts.c:
+	  tests: mpegts: add test for STT parsing
+	  Specially for the time to UTC datetime conversion
+	  Example taken from the A65 spec
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-22 01:47:48 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/gstmpegtssection.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  mpegts: atsc: add STT table parsing
+	  Adds the system time table structure and functions for convenient parsing of
+	  it and for getting the UTC datetime that it represents. Also adds its
+	  information dumping to the ts-parser example
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-19 16:20:44 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	  mpegts: atsc: add encoding conversion for UTF-16 ETT strings
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-19 14:50:13 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: mpegts: add function to dump ETT tables
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-19 13:46:03 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/gstmpegtssection.h:
+	  mpegts: atsc: add ETT structures and parsing
+	  ETT (extended text table) contains ATSC text information with descriptions
+	  of virtual channels and events. The text can be internationalized and also
+	  compressed.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-16 15:39:48 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mpegtsdemux/mpegtsbase.c:
+	  tsbase: parse the mgt and add listed EIT/ETT pids to the known psi
+	  This will make tsbase also parse the EITs and ETTs from ATSC streams that have
+	  their pids reported on the MGT and post to the bus
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-15 12:31:05 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/gstmpegtssection.h:
+	* tests/examples/mpegts/ts-parser.c:
+	  mpegts: add atsc MGT section parsing
+	  Add a parsing function for MGT and also detect the EIT tables
+	  for ATSC, the EIT pids are reported inside the MGT and we are still
+	  only relying only on the table id for detecting it. In the future we
+	  would want to also check the pid and compare with whatever the MGT
+	  previously reported to confirm that it is indeed the EIT.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730435
+
+2014-05-23 01:41:18 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst-libs/gst/mpegts/gst-atsc-section.c:
+	* gst-libs/gst/mpegts/gst-atsc-section.h:
+	* gst-libs/gst/mpegts/gstmpegtssection.c:
+	* gst-libs/gst/mpegts/gstmpegtssection.h:
+	  mpegts: atsc: rename TVCT to VCT as it is the same as CVCT
+	  Make the ATSC section parse handle both TVCT and CVCT as they are
+	  nearly the same struct (CVCT uses 2 reserved bits that are ignored
+	  in TVCT).
+	  This is changing the glib type and the struct name but TVCT wasn't
+	  released in a stable package yet so there should be no problem.
+	  Also includes some parsing fixes and changes short_name to be
+	  directly stored as utf8 rather than utf16
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730642
+
+2014-05-28 13:11:05 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: ts-parser: add TVCT and CVCT tables dumping
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730642
+
+2014-05-29 10:37:02 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  glupload: Fix assertion after API changes
+
+2014-05-29 18:33:10 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl/colorconvert: keep our private pointer
+	  again, avoid to much trigger
+
+2014-05-29 18:32:48 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/check/libs/gstglupload.c:
+	  tests: update for glupload changes
+
+2014-05-29 17:29:41 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	  gl/colorconvert: use GstObject's lock instead of our own
+
+2014-05-29 17:12:03 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl/colorconvert: remove unnecassary pointer inderection
+
+2014-05-29 16:45:37 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl/upload: re add the upload meta to the private struct
+	  try and avoid being to trigger happy
+
+2014-05-29 16:29:09 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl/upload: small code cleanup and gst-indent
+
+2014-05-29 16:22:52 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstgldownload.h:
+	  gl/download: use GstObject's lock instead of out own
+
+2014-05-29 16:20:30 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	  gl/upload: use GstObject's lock instead of our own
+
+2014-05-29 16:18:08 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  gl/filter: also remove the width/height in transform_caps
+	  allows scaling in the filters
+
+2014-05-29 16:11:20 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl/colorconvert: optimise the same format case
+	  simply return the input buffer unchanged
+
+2014-05-29 16:07:40 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl/colorconvert: fix YUY2/UYVY download for RG/LA textures
+
+2014-05-29 15:50:56 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	  gl/colorconvert: allocate output buffers
+	  Allows the nop optimisation by simply reffing the input buffer.
+
+2014-05-28 16:18:13 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Avoid shadowing main loop variable
+	  We end up with interesting results otherwise :)
+
+2014-05-28 15:53:21 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for private-data-specifier and frequency-list
+
+2014-05-28 15:52:49 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  mpegts: Make some fields optional
+	  Some people might just not care about the contents
+
+2014-05-28 15:52:03 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  mpegts: Update docs for DVB frequency list
+
+2014-05-28 23:21:07 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* tests/check/libs/gstglupload.c:
+	  tests: update for recent glupload changes
+	  GstGLUploadMeta object is now the GstVideoGLTextureUploadMeta
+	  provider.
+
+2014-05-28 12:56:24 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/smoothstreaming/gstmssdemux.c:
+	  mssdemux: Always use the redirect target to resolve relative URIs
+	  But redownload the playlists from the original URI if it's not
+	  a permanent redirect.
+
+2014-05-28 12:43:43 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/dash/gstdashdemux.c:
+	* ext/dash/gstmpdparser.c:
+	* ext/dash/gstmpdparser.h:
+	  dashdemux: Always use the redirect target to resolve relative URIs
+	  But redownload the playlists from the original URI if it's not
+	  a permanent redirect.
+
+2014-05-28 12:44:38 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	  hlsdemux: Don't set base URI if there was no redirect
+
+2014-05-28 09:18:49 +0100  Damian Ziobro <damian@xmementoit.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Make parsing of "-quoted key URIs more resilient
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730830
+
+2014-05-28 10:19:40 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ext/hls/gsthlsdemux.c:
+	* ext/hls/m3u8.c:
+	* ext/hls/m3u8.h:
+	  hlsdemux: Always use the redirect target to resolve relative URIs
+	  But redownload the playlists from the original URI if it's not
+	  a permanent redirect.
+
+2014-05-28 09:42:44 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/uridownloader/gstfragment.c:
+	* gst-libs/gst/uridownloader/gstfragment.h:
+	* gst-libs/gst/uridownloader/gsturidownloader.c:
+	  uridownloader: Store URI and redirect target in the downloaded fragments
+
+2014-05-28 07:40:19 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gstmpegtsdescriptor.c:
+	  mpegts: Fix Logical Channel Descriptor parsing
+	  No wonder we were getting garbage ...
+
+2014-05-27 20:37:26 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: add terrestrial delivery system descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730847
+
+2014-05-27 20:32:42 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  example: ts-parser: printing enum types
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730847
+
+2014-05-28 14:43:43 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglupload.h:
+	  gl/upload: fix incorrect type in macros
+
+2014-05-28 14:40:10 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* ext/gl/gstglimagesink.c:
+	* gst-libs/gst/gl/Makefile.am:
+	* gst-libs/gst/gl/gl.h:
+	* gst-libs/gst/gl/gstgl_fwd.h:
+	* gst-libs/gst/gl/gstglbufferpool.c:
+	* gst-libs/gst/gl/gstglbufferpool.h:
+	* gst-libs/gst/gl/gstglfilter.c:
+	* gst-libs/gst/gl/gstglupload.c:
+	* gst-libs/gst/gl/gstglupload.h:
+	* gst-libs/gst/gl/gstgluploadmeta.c:
+	* gst-libs/gst/gl/gstgluploadmeta.h:
+	  gl/upload: add GstGLUploadMeta object
+	  That simply deals with the provider aspect of GstVideoGLTextureUploadMeta.
+
+2014-05-27 17:34:05 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add DVB Extended event parsing
+
+2014-05-27 17:32:52 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: Ensure NULL-terminated language code
+	  Yup, it breaks API and ABI, I know. But let's avoid people and bindings
+	  printing out garbage
+
+2014-05-27 17:25:25 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: Fix Extended DVB descriptor parsing
+	  We were over-reading data, and the nb_items field isn't needed,
+	  it's a property of the GPtrArray
+
+2014-05-28 00:56:05 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/win32/gstglwindow_win32.c:
+	  gl/win32: make send_message reentrant
+	  I could not find a comparable win32API function so keep the running
+	  thread pointer to compare against.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730782
+
+2014-05-27 16:17:39 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  mpegts: Fix usage of memcpy
+	  source and destination were inverted
+
+2014-05-26 20:38:45 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB multilingual component descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-05-26 20:38:19 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB multilingual service name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-05-26 20:37:53 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB multilingual bouquet name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-05-26 20:37:21 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB multilingual network name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-04-17 18:20:39 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add multilingual component descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-04-17 18:20:03 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add multilingual service name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-04-17 18:10:51 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add multilingual bouquet name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-04-17 18:07:52 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add multilingual network name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728429
+
+2014-05-27 10:21:45 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	  tsdemux: add/remove pads to flowcombiner differently due to streaming nature
+	  Due to mpegts streaming nature some pads are created but are only added
+	  later to the element. This can cause a scenario where the first stream
+	  doesn't have an available decoder (while the next ones still pending
+	  would have) and tsdemux will fail with not-linked as the first stream
+	  added wouldn't be linked.
+	  To avoid this tsdemux needs to add pads to the flowcombiner
+	  when they are created instead of only when adding them to the
+	  element.
+
+2014-05-27 13:56:34 +0100  Tim-Philipp Müller <tim@centricular.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: fix compiler warning
+	  gstglcolorconvert.c:1133:11: error: 'j' may be used uninitialized in this function
+	  Was used uninitialized when jumping to out label
+	  in error case.
+
+2014-05-27 18:20:29 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglcolorconvert.h:
+	* gst-libs/gst/gl/gstgldownload.c:
+	* gst-libs/gst/gl/gstgldownload.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl/colorconvert: operate on buffers instead of memories
+
+2014-05-27 07:42:14 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mxf/mxfdemux.c:
+	* gst/mxf/mxfdemux.h:
+	  mxfdemux: remove unread last_flow variable
+	  it isn't necessary anymore and is already unused
+
+2014-05-27 11:28:27 +0100  Julien Isorce <julien.isorce@collabora.co.uk>
+
+	* ext/gl/gstglimagesink.c:
+	  glimagesink: make it actually honor show-preroll-frame property
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730802
+
+2014-05-27 12:08:50 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst/mxf/mxfdemux.c:
+	  mxfdemux: Compare positions to find the earliest pad, not flow returns
+
+2014-05-27 08:54:20 +0100  Julien Isorce <julien.isorce@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.h:
+	  gl: add missing cgl and eagl context type
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729245
+
+2014-05-27 08:46:16 +0100  Julien Isorce <julien.isorce@gmail.com>
+
+	* configure.ac:
+	* gst-libs/gst/gl/gstglcontext.c:
+	* tests/examples/gl/qt/qglwtextureshare/glcontextid.h:
+	* tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp:
+	  gl: rename platform cocoa to cgl
+	  Before:
+	  GST_GL_PLATFORM=cocoa GST_GL_WINDOW=cocoa
+	  gst-launch-1.0 videotestsrc ! glimagesink
+	  After:
+	  GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa
+	  gst-launch-1.0 videotestsrc ! glimagesink
+	  but still pass --enable-cocoa to configure script
+	  because currently it can only be used with cocoa API.
+	  We could later have cgl/gstglcontext_cgl.h that manages
+	  a CGLContextObj directly and cocoa/gstglcontext_cocoa.h
+	  would just wrap it.
+	  So that it could be used with other Apple's window APIs.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729245
+
+2014-05-27 08:51:09 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	  Revert "androidmedia: Place some const keywords in a few places"
+	  This reverts commit 3078b3a34c1f75b86bd629df1cd7c089a0f69999.
+	  gst_video_frame_map() doesn't take a const GstVideoInfo*, so
+	  all this is rather useless.
+
+2014-05-27 13:55:15 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmixer.c:
+	  gl/mixer: don't segfault when we don't have a buffer
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729257
+
+2014-05-27 13:04:39 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/x11/gstglwindow_x11.c:
+	  gl/window_x11: avoid BadDrawable error on shutdown
+
+2014-05-26 17:34:40 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mxf/mxfdemux.c:
+	* gst/mxf/mxfdemux.h:
+	  mxfdemux: use GstFlowCombiner
+	  Removes flow return combination code to use the newly added GstFlowCombiner
+	  https://bugzilla.gnome.org/show_bug.cgi?id=709224
+
+2014-05-26 17:18:01 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mpegdemux/gstmpegdemux.c:
+	* gst/mpegdemux/gstmpegdemux.h:
+	  mpegdemux: use GstFlowCombiner
+	  Removes flow return combination code to use the newly added GstFlowCombiner
+	  https://bugzilla.gnome.org/show_bug.cgi?id=709224
+
+2014-05-23 18:26:57 -0300  Thiago Santos <ts.santos@sisa.samsung.com>
+
+	* gst/mpegtsdemux/tsdemux.c:
+	* gst/mpegtsdemux/tsdemux.h:
+	  tsdemux: use GstFlowCombiner
+	  Removes flow return combination code to use the newly added GstFlowCombiner
+
+2014-05-27 10:47:25 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/egl/gstglcontext_egl.c:
+	  gl/context_egl: pass the vars in the right order to DestroySurface
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728514
+
+2014-05-26 16:31:11 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	  androidmedia: Place some const keywords in a few places
+
+2013-11-13 18:41:33 +0800  Chen Jie <chenj@lemote.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideodec.h:
+	* sys/androidmedia/gstamcvideoenc.c:
+	* sys/androidmedia/gstamcvideoenc.h:
+	  androidmedia: add gst_amc_color_format_copy
+	  gst_amc_color_format_copy will copy in/out a frame resides at a
+	  GstAmcBuffer. Lots of codes in gst_amc_video_*_fill_buffer are moved to
+	  this new function.
+
+2013-10-08 21:11:48 +0800  Chen Jie <chenj@lemote.com>
+
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamc.h:
+	* sys/androidmedia/gstamcaudiodec.c:
+	* sys/androidmedia/gstamcvideodec.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	  androidmedia: move create_src|sink_caps to gstamc.c
+	  Some hack logic needs also to be present in create_src|sink_caps, for
+	  working around some broken codecs. These hacks are hidden
+	  in color_format/video_format conversion -- the prototypes of these
+	  functions are also changed to include more args for hack judgement.
+	  Also in case of multi-color_formats mapped to one video_format, then
+	  map that video_format back will not give the original color_format, which
+	  causes gst_amc_codec_configure failed with something like
+	  'does not support color format N'.
+	  The new prototype involves with GstAmcCodecInfo and mime, which
+	  ensures the converted color_format is supported by the codec.
+	  A COLOR_FormatYCbYCr to GST_VIDEO_FORMAT_YUY2 mapping is also added, in
+	  order to work around bugs in OMX.k3.video.decoder.avc(which incorrectly
+	  reports supporting COLOR_FormatYCbYCr, which is actually
+	  COLOR_FormatYUV420SemiPlanar). There are already hacks for this in
+	  gst_amc_video_format_to_color_format, gst_amc_color_format_to_video_format
+	  and gst_amc_color_format_info_set, but the codec will still not work(be
+	  ignored because of "has unknown color formats") without adding this mapping.
+
+2014-04-11 15:14:17 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* sys/dvb/parsechannels.c:
+	  dvb: parsechannels: add delsys property
+	  Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
+	  https://bugzilla.gnome.org/show_bug.cgi?id=709414
+
+2014-05-26 13:29:53 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* win32/common/libgstcodecparsers.def:
+	  win32: update .def for new symbols
+
+2014-04-11 15:38:16 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: map SYS_DVBC_ANNEX_A SYS_DVBC_ANNEX_AC for DVB API < 5.6
+	  https://bugzilla.gnome.org/show_bug.cgi?id=721869
+
+2014-04-15 09:31:02 +0100  Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: fix typo in testing flag
+	  % instead of &
+	  https://bugzilla.gnome.org/show_bug.cgi?id=721869
+
+2014-05-25 15:16:13 +0800  Chen Jie <chenj@lemote.com>
+
+	* sys/androidmedia/gstamcvideoenc.c:
+	  amcvideoenc: Unit of bitrate property is now bit/sec
+	  https://bugzilla.gnome.org/show_bug.cgi?id=705129
+
+2014-05-26 11:55:31 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB Bouquet Name parsing
+
+2014-05-26 11:54:50 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	  mpegts: Fix Bouquet Name parsing
+	  the field is not length prefixed
+
+2014-05-26 11:42:46 +0200  Edward Hervey <bilboed@bilboed.com>
+
+	* tests/examples/mpegts/ts-parser.c:
+	  examples: Add support for DVB Service List descriptor
+
+2014-04-17 14:56:23 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add bouquet name descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728364
+
+2014-04-17 14:55:29 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add stuffing descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728364
+
+2014-04-17 14:54:28 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.c:
+	* gst-libs/gst/mpegts/gst-dvb-descriptor.h:
+	  mpegts: add service list descriptor
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728364
+
+2014-05-10 18:32:28 +0200  Miguel París Díaz <mparisdiaz@gmail.com>
+
+	* ext/opus/gstopusenc.c:
+	  opusenc: Use aux vars to minimize critical region
+	  This avoid dead lock between gst_audio_encoder_finish_frame() and
+	  gst_opus_enc_get_property().
+	  Also, now bytes var is set into protected section.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729882
+
+2014-05-24 19:51:12 +0200  Stefan Ringel <linuxtv@stefanringel.de>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: Add missing tone ioctl
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730692
+
+2014-05-25 09:03:32 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
+
+	* gst-libs/gst/gl/gstglfilter.c:
+	  glfilter: Remove format information to allow color convert again
+	  We also need to remove the format information,  as glfilter can do
+	  color convertion. This code was imported from videoconvert.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729861
+
+2014-05-25 11:44:57 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl/memory: allocate the correct memory size
+	  and avoid wasting resources we will never need
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730703
+
+2014-05-23 23:02:32 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  glcolorconvert: Fix YUY2 and UYVY support with luminance_alpha
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730666
+
+2013-12-03 12:09:58 +0100  Jorge Zapata <jorgeluis.zapata@gmail.com>
+
+	* sys/androidmedia/gstamc-constants.h:
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: Add a new QCOM color format
+	  It is a NV12 based, aligned to 32 bytes
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730635
+
+2014-05-23 15:00:42 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* sys/androidmedia/gstamc.c:
+	  androidmedia: First try to get symbols from the current program, then load libdvm
+	  If the application is using the new ART runtime it will otherwise
+	  load dalvik and start a dalvik VM next to the ART VM.
+	  Does not work very well obviously.
+
+2013-04-01 07:49:01 +0000  Chen Jie <chenj@lemote.com>
+
+	* sys/androidmedia/Makefile.am:
+	* sys/androidmedia/gstamc.c:
+	* sys/androidmedia/gstamcvideoenc.c:
+	* sys/androidmedia/gstamcvideoenc.h:
+	  androidmedia: add support for video encoding
+	  https://bugzilla.gnome.org/show_bug.cgi?id=705129
+
+2014-05-23 12:07:50 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl/memory: provide compatability defines
+	  fixes build on android/OS X
+
+2014-05-23 11:01:06 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	  gl/colorconvert: remove scratch texture for YUY2/UYVY
+	  We can get all our data from the one RG/LA texture with some shader magic.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728890
+
+2014-05-23 10:59:05 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl/memory: RGBA/UNSIGNED_BYTE only format supported by ReadPixels GLES2
+	  Error out in case we attempt to read with any other invalid format.
+
+2014-05-23 10:57:24 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglmemory.c:
+	  gl/memory: generate textures with a sized internal format
+	  Required in order to generate RG and RED textured with GLES3.
+
+2014-05-21 21:47:45 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcolorconvert.c:
+	* gst-libs/gst/gl/gstglmemory.c:
+	* gst-libs/gst/gl/gstglmemory.h:
+	* gst-libs/gst/gl/gstglupload.c:
+	  gl/memory: implement GL_EXT_texture_rg support
+	  Which is used by default over the Luminance formats due to it
+	  being color renderable with fbos (and deprecation/removal with
+	  GL 3.x).
+	  https://bugzilla.gnome.org/show_bug.cgi?id=729750
+	  https://bugzilla.gnome.org/show_bug.cgi?id=704222
+	  https://bugzilla.gnome.org/show_bug.cgi?id=728890
+
+2014-05-22 11:50:16 -0400  Nicolas Dufresne <nicolas.dufresne@collabora.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  Revert "h264parser: Remove unused fps_num/fps_den fields"
+	  This breaks the build since mss has not been ported.
+	  This reverts commit aeb6a520742fd82888e41ea23f9a39add51125a0.
+
+2014-05-22 16:12:01 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  h264parser: Remove unused fps_num/fps_den fields
+	  Instead the newly added function should be used to calculate
+	  the framerate properly.
+
+2014-05-19 17:52:38 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: use new gst_h264_video_calculate_framerate() to get framerate
+	  https://bugzilla.gnome.org/show_bug.cgi?id=723352
+
+2014-05-19 17:43:54 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* docs/libs/gst-plugins-bad-libs-sections.txt:
+	* gst-libs/gst/codecparsers/gsth264parser.c:
+	* gst-libs/gst/codecparsers/gsth264parser.h:
+	  codecparsers_h264: add gst_h264_video_calculate_framerate()
+	  Add a new function to calculate video stream framerate which rely on
+	  SPS, slice header and pic timing using formula:
+	  time_scale                1                         1
+	  fps = -----------------  x  ---------------  x  ------------------------
+	  num_units_in_tick     DeltaTfiDivisor     (field_pic_flag ? 2 : 1)
+	  See section E2.1 of H264 specification for definition of variables.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=723352
+
+2014-05-21 21:44:40 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstglcontext.c:
+	  gl/context: add gl extension checking to check_feature()
+	  Useful for extensions that do not define any new GL API entrypoints
+	  but can still modify behaviour when used.
+
+2014-05-21 20:36:37 +1000  Matthew Waters <ystreet00@gmail.com>
+
+	* gst-libs/gst/gl/gstgldownload.c:
+	  gl/download: fixup YUY2/UYVY download
+	  Regression from 2da979831ec3b1a8d993eb6f2d3999c5810c4d67 as it did
+	  not update the download code to reflect the change in texture format.
+
+2014-05-19 11:48:55 +0200  Aurélien Zanelli <aurelien.zanelli@parrot.com>
+
+	* gst/videoparsers/gsth264parse.c:
+	  h264parse: set field_pic_flag when parsing a slice header
+	  field_pic_flag was used but never set to other value than its default
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730363
+
+2014-05-22 11:54:40 +0100  Damian Ziobro <ziobro.damian@gmail.com>
+
+	* ext/hls/m3u8.c:
+	  hlsdemux: Fix storing of the IV based on the media sequence number
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730574
+
+2014-05-22 12:23:57 +0200  Michael Olbrich <m.olbrich@pengutronix.de>
+
+	* sys/dvb/gstdvbsrc.c:
+	  dvbsrc: fix building with newer kernel headers
+	  c400eef3772b7dc470eefae02a1288c2b125e25c introduced some defines to handle
+	  older kernel headers. However, the check is done before the corresponding
+	  kernel header (dvb/frontend.h) is included. As a result the macros are
+	  always defined with results in 'redefined' errors with newer kernel
+	  headers.
+	  Move the check after the include to fix this.
+	  https://bugzilla.gnome.org/show_bug.cgi?id=730570
+
+2014-05-21 13:23:30 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* configure.ac:
+	  Back to development
+
+=== release 1.3.2 ===
+
+2014-05-21 13:06:35 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* ChangeLog:
+	* NEWS:
+	* RELEASE:
+	* common:
+	* configure.ac:
+	* docs/plugins/gst-plugins-bad-plugins.args:
+	* docs/plugins/gst-plugins-bad-plugins.hierarchy:
+	* docs/plugins/gst-plugins-bad-plugins.interfaces:
+	* docs/plugins/gst-plugins-bad-plugins.signals:
+	* docs/plugins/inspect-build.stamp:
+	* docs/plugins/inspect.stamp:
+	* docs/plugins/inspect/plugin-accurip.xml:
+	* docs/plugins/inspect/plugin-adpcmdec.xml:
+	* docs/plugins/inspect/plugin-adpcmenc.xml:
+	* docs/plugins/inspect/plugin-asfmux.xml:
+	* docs/plugins/inspect/plugin-assrender.xml:
+	* docs/plugins/inspect/plugin-audiovisualizers.xml:
+	* docs/plugins/inspect/plugin-autoconvert.xml:
+	* docs/plugins/inspect/plugin-bayer.xml:
+	* docs/plugins/inspect/plugin-bz2.xml:
+	* docs/plugins/inspect/plugin-camerabin.xml:
+	* docs/plugins/inspect/plugin-chromaprint.xml:
+	* docs/plugins/inspect/plugin-coloreffects.xml:
+	* docs/plugins/inspect/plugin-curl.xml:
+	* docs/plugins/inspect/plugin-dataurisrc.xml:
+	* docs/plugins/inspect/plugin-debugutilsbad.xml:
+	* docs/plugins/inspect/plugin-dtsdec.xml:
+	* docs/plugins/inspect/plugin-dvb.xml:
+	* docs/plugins/inspect/plugin-dvbsuboverlay.xml:
+	* docs/plugins/inspect/plugin-dvdspu.xml:
+	* docs/plugins/inspect/plugin-faac.xml:
+	* docs/plugins/inspect/plugin-faad.xml:
+	* docs/plugins/inspect/plugin-festival.xml:
+	* docs/plugins/inspect/plugin-fieldanalysis.xml:
+	* docs/plugins/inspect/plugin-flite.xml:
+	* docs/plugins/inspect/plugin-fragmented.xml:
+	* docs/plugins/inspect/plugin-frei0r.xml:
+	* docs/plugins/inspect/plugin-gaudieffects.xml:
+	* docs/plugins/inspect/plugin-gdp.xml:
+	* docs/plugins/inspect/plugin-geometrictransform.xml:
+	* docs/plugins/inspect/plugin-gmedec.xml:
+	* docs/plugins/inspect/plugin-gsm.xml:
+	* docs/plugins/inspect/plugin-gstsiren.xml:
+	* docs/plugins/inspect/plugin-id3tag.xml:
+	* docs/plugins/inspect/plugin-inter.xml:
+	* docs/plugins/inspect/plugin-interlace.xml:
+	* docs/plugins/inspect/plugin-jpegformat.xml:
+	* docs/plugins/inspect/plugin-liveadder.xml:
+	* docs/plugins/inspect/plugin-mimic.xml:
+	* docs/plugins/inspect/plugin-mms.xml:
+	* docs/plugins/inspect/plugin-modplug.xml:
+	* docs/plugins/inspect/plugin-mpeg2enc.xml:
+	* docs/plugins/inspect/plugin-mpegpsdemux.xml:
+	* docs/plugins/inspect/plugin-mpegtsdemux.xml:
+	* docs/plugins/inspect/plugin-mpegtsmux.xml:
+	* docs/plugins/inspect/plugin-mpg123.xml:
+	* docs/plugins/inspect/plugin-mplex.xml:
+	* docs/plugins/inspect/plugin-neon.xml:
+	* docs/plugins/inspect/plugin-ofa.xml:
+	* docs/plugins/inspect/plugin-openal.xml:
+	* docs/plugins/inspect/plugin-opencv.xml:
+	* docs/plugins/inspect/plugin-opus.xml:
+	* docs/plugins/inspect/plugin-pcapparse.xml:
+	* docs/plugins/inspect/plugin-pnm.xml:
+	* docs/plugins/inspect/plugin-rawparse.xml:
+	* docs/plugins/inspect/plugin-removesilence.xml:
+	* docs/plugins/inspect/plugin-resindvd.xml:
+	* docs/plugins/inspect/plugin-rfbsrc.xml:
+	* docs/plugins/inspect/plugin-schro.xml:
+	* docs/plugins/inspect/plugin-sdp.xml:
+	* docs/plugins/inspect/plugin-segmentclip.xml:
+	* docs/plugins/inspect/plugin-shm.xml:
+	* docs/plugins/inspect/plugin-smooth.xml:
+	* docs/plugins/inspect/plugin-soundtouch.xml:
+	* docs/plugins/inspect/plugin-spandsp.xml:
+	* docs/plugins/inspect/plugin-speed.xml:
+	* docs/plugins/inspect/plugin-subenc.xml:
+	* docs/plugins/inspect/plugin-videoparsersbad.xml:
+	* docs/plugins/inspect/plugin-voaacenc.xml:
+	* docs/plugins/inspect/plugin-voamrwbenc.xml:
+	* docs/plugins/inspect/plugin-waylandsink.xml:
+	* docs/plugins/inspect/plugin-y4mdec.xml:
+	* docs/plugins/inspect/plugin-zbar.xml:
+	* gst-plugins-bad.doap:
+	* gst/bayer/gstbayerorc-dist.c:
+	* win32/common/config.h:
+	  Release 1.3.2
+
+2014-05-21 12:42:56 +0200  Sebastian Dröge <sebastian@centricular.com>
+
+	* po/af.po:
+	* po/az.po:
+	* po/bg.po:
+	* po/ca.po:
+	* po/cs.po:
+	* po/da.po:
+	* po/de.po:
+	* po/el.po:
+	* po/en_GB.po:
+	* po/eo.po:
+	* po/es.po:
+	* po/eu.po:
+	* po/fi.po:
+	* po/fr.po:
+	* po/gl.po:
+	* po/hr.po:
+	* po/hu.po:
+	* po/id.po:
+	* po/it.po:
+	* po/ja.po:
+	* po/ky.po:
+	* po/lt.po:
+	* po/lv.po:
+	* po/mt.po:
+	* po/nb.po:
+	* po/nl.po:
+	* po/or.po:
+	* po/pl.po:
+	* po/pt_BR.po:
+	* po/ro.po:
+	* po/ru.po:
+	* po/sk.po:
+	* po/sl.po:
+	* po/sq.po:
+	* po/sr.po:
+	* po/sv.po:
+	* po/tr.po:
+	* po/uk.po:
+	* po/vi.po:
+	* po/zh_CN.po:
+	  Update .po files
 
 2014-05-21 19:47:22 +1000  Matthew Waters <ystreet00@gmail.com>
 
diff --git a/Makefile.am b/Makefile.am
index 53b75e5..3eb1bca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -102,7 +102,6 @@
 	$(top_srcdir)/gst-libs/gst/baseparse \
 	$(top_srcdir)/gst-libs/gst/egl \
 	$(top_srcdir)/gst-libs/gst/signalprocessor \
-	$(top_srcdir)/gst-libs/gst/video \
 	$(top_srcdir)/tests/examples/scaletempo \
 	$(top_srcdir)/tests/examples/shapewipe \
 	$(top_srcdir)/tests/examples/switch \
diff --git a/Makefile.in b/Makefile.in
index 9485e4f..e89b803 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -356,6 +356,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -442,6 +444,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -733,6 +736,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 SUBDIRS = \
 	gst-libs gst sys ext pkgconfig \
@@ -821,7 +825,6 @@
 	$(top_srcdir)/gst-libs/gst/baseparse \
 	$(top_srcdir)/gst-libs/gst/egl \
 	$(top_srcdir)/gst-libs/gst/signalprocessor \
-	$(top_srcdir)/gst-libs/gst/video \
 	$(top_srcdir)/tests/examples/scaletempo \
 	$(top_srcdir)/tests/examples/shapewipe \
 	$(top_srcdir)/tests/examples/switch \
diff --git a/NEWS b/NEWS
index 692e58d..b4f0a58 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-This is GStreamer Bad Plugins 1.3.2
+This is GStreamer Bad Plugins 1.3.3
 
 Changes since 1.2:
 
@@ -30,6 +30,10 @@
    caps.
  • GstCollectPads has support for flushing and a default handler for
    SEEK events now.
+ • New GstFlowAggregator helper object that simplifies handling of
+   flow returns in elements with multiple source pads. Additionally
+   GstPad now always stores the last flow return and provides an
+   API to retrieve it.
  • GstSegment has new API to offset the running time by a specific
    value and this is used in GstPad to allow positive and negative
    offsets in gst_pad_set_offset() in all situations.
@@ -43,6 +47,7 @@
  • Support for tiled, raw video formats has been added.
  • GstVideoDecoder and GstAudioDecoder have API to help aggregating tag
    events and merge custom tags into them consistently.
+ • GstBufferPool has support for flushing now.
  • playbin/playsink has support for application provided audio and video
    filters.
  • GstDiscoverer has new and simplified API to get details about missing
@@ -54,6 +59,10 @@
    DispManX (Raspberry Pi), EAGL (iOS), WGL (Windows) and generic X11,
    Wayland and EGL platforms.
    This replaces eglglessink and also is supposed to replace osxvideosink.
+ • New GstAggregator base class in gst-plugins-bad. This is supposed to
+   replace GstCollectPads in the future and fix long-known shortcomings
+   in its API. Together with the base class some elements are provided
+   already, like a videomixer (compositor).
 
 
 Major changes:
@@ -97,7 +106,8 @@
    ∘ dvbsrc supports more delivery mechanisms and other features
      now, including DVB S2 and T2 support.
    ∘ The MPEGTS library has support for many more descriptors.
-   ∘ Major improvements to tsdemux, especially time related.
+   ∘ Major improvements to tsdemux and tsparse, especially time and
+     seeking related.
    ∘ souphttpsrc now has support for keep-alive connections,
      compression, configurable number of retries and configuration
      for SSL certificate validation.
@@ -110,9 +120,16 @@
      finish.
    ∘ videoflip can automatically flip based on the orientation tag.
    ∘ openjpeg supports the OpenJPEG2 API.
+   ∘ waylandsink was refactored and should be more useful now. It also
+     includes a small library which most likely is going to be removed
+     in the future and will result in extensions to the GstVideoOverlay
+     interface.
    ∘ gst-rtsp-server supports SRTP and MIKEY now.
+   ∘ gst-libav encoders are now negotiating any profile/level settings
+     with downstream via caps.
    ∘ Lots of fixes for coverity warnings all over the place.
-   ∘ 400+ fixed bug reports, and many other bug fixes and other
+   ∘ Negotiation related performance improvements.
+   ∘ 500+ fixed bug reports, and many other bug fixes and other
      improvements everywhere that had no bug report.
 
 Things to look out for:
@@ -120,3 +137,5 @@
    element.
  • The mfcdec element was removed and replaced by v4l2videodec.
  • osxvideosink is only available in OS X 10.6 or newer.
+ • The GstDeviceMonitor API will likely change slightly before the
+   1.4.0 release.
diff --git a/RELEASE b/RELEASE
index 650777d..86b84db 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,8 +1,8 @@
 
-Release notes for GStreamer Bad Plugins 1.3.2
+Release notes for GStreamer Bad Plugins 1.3.3
 
 
-The GStreamer team is pleased to announce the second release of the unstable
+The GStreamer team is pleased to announce the third release of the unstable
 1.3 release series. The 1.3 release series is adding new features on top of
 the 1.0 and 1.2 series and is part of the API and ABI-stable 1.x release
 series of the GStreamer multimedia framework. The unstable 1.3 release series
@@ -10,23 +10,16 @@
 API can still change until that point.
 
 
+This is hopefully the last 1.3 development release and will be followed by
+the first 1.4.0 release candidate (1.3.90) in 1-2 weeks. Which then hopefully
+is followed by 1.4.0 soonish in early July.
+
 
 Binaries for Android, iOS, Mac OS X and Windows will be provided separately
 during the unstable 1.3 release series.
 
 
 
-The versioning scheme that is used in general is that 1.x.y is API and
-ABI backwards compatible with previous 1.x.y releases. If x is an even
-number it is a stable release series and all releases in this series
-will only contain important bugfixes, e.g. the 1.0 series with 1.0.7. If
-x is odd it is a development release series that will lead to the next
-stable release series 1.x+1 and contains new features and bigger
-changes. During the development release series, new API can still
-change.
-
-
-
 "That an accusation?"
 
 
@@ -75,22 +68,70 @@
 
 Bugs fixed in this release
      
-      * 721685 : mpegtsmux: Remove unused data in TsMuxSection
-      * 723167 : curlsftpsink: allow remote host authentication by public key fingerprint
-      * 726666 : gl: error: redundant redeclaration of numerous GL functions
-      * 728234 : gl: Don't unconditonally use EGL extensions
-      * 729542 : glimagesink: pool may never be activated, which leads to crash
-      * 729588 : glimagesink: cannot play 1080p on RPI
-      * 729614 : PNM Encoder is Encoding 0 x 0 images
-      * 729658 : gl: wrong negotiated caps when using eglimage
-      * 729742 : glcolorconvert: Should set alpha to 1 if source is opaque
-      * 729743 : glcolorconvert: Should preserve alpha channel when doing AYUV - > ARGB
+      * 731918 : videoaggregator: Add a new base class that aggregates video streams
+      * 731921 : gl: Port glmixer to the GstVideoAggregator baseclass
+      * 723352 : codecparsers_h264: Framerate estimation enhancement
+      * 675132 : tsdemux: implement proper seeking with binary search and keyframe detection
+      * 674536 : tsdemux: Freeze on pts-wrap with streaming sources
+      * 704507 : glimagesink: Replace pointer properties with signals
+      * 705129 : androidmedia: add support for video encoding
+      * 709414 : dvbsrc: Uses deprecated field frontend type and add DVB S2/T2 support
+      * 721035 : tsdemux: fails to seek on the attached file (regression)
+      * 721869 : dvbsrc needs to conditionally build for older dvb headers
+      * 722397 : liveadder: handle gap buffer flag
+      * 723529 : glimagesink: only draws on buffer push
+      * 726193 : waylandsink: subsurface & scaling support, plus many other improvements
+      * 726861 : srtp: add support for rollover counter
+      * 728364 : mpegts: add service list, stuffing and bouquet name descriptors
+      * 728429 : mpegts: add multilingual descriptors
+      * 728514 : glimagesink fails with gst-sdk android tutorial-5 / tutorial-4
+      * 728890 : GstGLUpload: wrong colors for YUY2 and UYVY on GLES
+      * 729054 : schroenc: Does not handle variable framerate streams
+      * 729245 : gl: rename platform cocoa to cgl to be more consistent with context type
+      * 729257 : glvideomixer: segfault in gst_gl_video_mixer_callback when accessing frame info
+      * 729278 : gl: avoid using an extra FBO pass in some basic cases
+      * 729750 : gl: GL_FRAMEBUFFER_UNSUPPORTED with GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
+      * 729798 : glvideomixer: Does not support positioning of input streams
       * 729861 : glfilter: lose some caps informations like the framerate
-      * 729896 : glupload: Ignores stride when uploading raw data
-      * 730069 : gl: Crash when setting invalid GST_GL_PLATFORM
-      * 730133 : motioncells:fix memleak
-      * 730459 : curlsshsink: post error on bus in element, not transfer  thread
-      * 729551 : GstGLDisplay: mix platform and window
+      * 729882 : opusenc: use aux vars to minimize critical region
+      * 730141 : motioncells improvements
+      * 730231 : gl*: No libGLU with NVIDIA binary drivers
+      * 730363 : h264parse: set field_pic_flag when parsing a slice header
+      * 730435 : mpegts: add support for ATSC tables MGT / ETT / EIT / STT
+      * 730523 : pnmdec: PBM (Bitmap) decoding support is not present
+      * 730570 : dvbsrc: fix building with newer kernel headers
+      * 730574 : hlsdemux: Saving IV from media sequence number is done out of file- > iv structure
+      * 730635 : androidmedia: Add a new QCOM color format
+      * 730641 : dvbbasebin: criticals/crash if tsparse is missing
+      * 730642 : mpegts: atsc: rename TVCT to VCT as it is the same as CVCT
+      * 730666 : gl: YUY2 conversion broken in GLES2
+      * 730692 : dvbsrc: Add missing tone ioctl
+      * 730703 : gl: Freshly allocated memory is twice the expected size
+      * 730782 : glimagesink: cannot create window and stalls
+      * 730802 : glimagesink: should honor " show-preroll-frame " property inherited from GstVideoSink
+      * 730830 : hlsdemux: Remove \ " sign from decryption KEY url does not always work
+      * 730847 : example: ts-parser: add terrestrial delivery system descriptor
+      * 730854 : example: ts-parser: add component, content, stream id, ca id, parential rating descriptors
+      * 730901 : example: ts-parser: add linkage descriptor
+      * 730944 : glvideomixer: Got data flow before stream-start event
+      * 731088 : tsdemux: missing audio after seeking in mpeg transport stream (regression)
+      * 731107 : glimagesink: Failed to create window surface: EGL_BAD_ALLOC
+      * 731164 : hlsdemux: Attempt to reload variant playlist if refreshing playlist or downloading fragments failed
+      * 731250 : dvbsrc: tuning/locking logic improvements
+      * 731400 : pnmdec: PNMDecoder gives sticky event warning
+      * 731522 : codecparsers: add C++ guards for MPEG-4 and VP8 parsers
+      * 731524 : codecparsers: h264: fix quantization matrix conversion  routine names
+      * 731555 : gst-plugins-bad requires glib > = 2.34.0
+      * 731698 : tsdemux : latest patch for accurate seeking of h264 streams has been incorrectly merged.
+      * 731707 : tsdemux: remove unused const variables
+      * 731714 : gstsrtpenc: add allow-repeat-tx property
+      * 731722 : OpenGL: Add an element for transforming video geometry
+      * 731768 : gstsrtpenc: unref event when needed
+      * 731899 : rawparser doesn't forward custom query
+      * 731917 : aggregator: Add a new base class for mixers and muxers
+      * 731919 : compositor: Add a new compositor based on the new GstVideoAggregator base class
+      * 731968 : hlsdemux: Fix decrypting fragments
+      * 641204 : dvbsrc: Faster tuning logic: Use poll instead of artificial usleep
 
 ==== Download ====
 
@@ -127,20 +168,36 @@
         
 Contributors to this release
     
+      * Aleix Conchillo Flaqué
+      * Arnaud Vrac
       * Aurélien Zanelli
+      * Chen Jie
+      * Christian Fredrik Kalager Schaller
+      * Damian Ziobro
       * Edward Hervey
-      * Jesper Larsen
+      * George Kiagiadakis
+      * Gwenole Beauchesne
+      * Jan Schmidt
+      * Jorge Zapata
       * Julien Isorce
-      * L. Sorin
-      * Luis de Bethencourt
+      * Justin Joy
+      * Lubosz Sarnecki
+      * Mathieu Duponchelle
       * Matthew Waters
+      * Matthieu Bouron
+      * Michael Olbrich
+      * Miguel París Díaz
       * Nicola Murino
       * Nicolas Dufresne
       * Olivier Crête
       * Reynaldo H. Verdejo Pinochet
       * Sanjay NM
       * Sebastian Dröge
+      * Stefan Ringel
       * Thiago Santos
+      * Thibault Saunier
+      * Thomas Bluemel
       * Tim-Philipp Müller
+      * Vincent Penquerc'h
       * Wim Taymans
  
\ No newline at end of file
diff --git a/common/Makefile.in b/common/Makefile.in
index 61e365b..fa433bb 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -319,6 +319,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -405,6 +407,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -696,6 +699,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = m4
 EXTRA_DIST = \
 	ChangeLog \
diff --git a/common/m4/Makefile.in b/common/m4/Makefile.in
index 1529851..66dc416 100644
--- a/common/m4/Makefile.in
+++ b/common/m4/Makefile.in
@@ -258,6 +258,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -344,6 +346,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -635,6 +638,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
 	README \
 	as-ac-expand.m4 \
diff --git a/config.h.in b/config.h.in
index 80e0b53..48f44f6 100644
--- a/config.h.in
+++ b/config.h.in
@@ -268,6 +268,9 @@
 /* Define to 1 if you have the `gmtime_r' function. */
 #undef HAVE_GMTIME_R
 
+/* Use graphene */
+#undef HAVE_GRAPHENE
+
 /* Define to enable GSettings plugin (used by gsettings). */
 #undef HAVE_GSETTINGS
 
diff --git a/configure b/configure
index b2ad0b4..643d812 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GStreamer Bad Plug-ins 1.3.2.
+# Generated by GNU Autoconf 2.69 for GStreamer Bad Plug-ins 1.3.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='GStreamer Bad Plug-ins'
 PACKAGE_TARNAME='gst-plugins-bad'
-PACKAGE_VERSION='1.3.2'
-PACKAGE_STRING='GStreamer Bad Plug-ins 1.3.2'
+PACKAGE_VERSION='1.3.3'
+PACKAGE_STRING='GStreamer Bad Plug-ins 1.3.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer'
 PACKAGE_URL=''
 
@@ -888,6 +888,7 @@
 USE_WEBP_TRUE
 WEBP_LIBS
 WEBP_CFLAGS
+wayland_scanner
 USE_WAYLAND_FALSE
 USE_WAYLAND_TRUE
 WAYLAND_LIBS
@@ -1185,6 +1186,8 @@
 USE_PLUGIN_AUTOCONVERT_TRUE
 USE_PLUGIN_AUDIOVISUALIZERS_FALSE
 USE_PLUGIN_AUDIOVISUALIZERS_TRUE
+USE_PLUGIN_COMPOSITOR_FALSE
+USE_PLUGIN_COMPOSITOR_TRUE
 USE_PLUGIN_AUDIOMIXER_FALSE
 USE_PLUGIN_AUDIOMIXER_TRUE
 USE_PLUGIN_AUDIOFXBAD_FALSE
@@ -1244,6 +1247,11 @@
 SDL_CLUTTER
 SDL_LIBS
 SDL_CFLAGS
+HAVE_GRAPHENE_FALSE
+HAVE_GRAPHENE_TRUE
+HAVE_GRAPHENE
+GRAPHENE_LIBS
+GRAPHENE_CFLAGS
 HAVE_XCOMPOSITE_FALSE
 HAVE_XCOMPOSITE_TRUE
 XCOMPOSITE_LIBS
@@ -1628,6 +1636,7 @@
 enable_asfmux
 enable_audiofxbad
 enable_audiomixer
+enable_compositor
 enable_audiovisualizers
 enable_autoconvert
 enable_bayer
@@ -1846,6 +1855,8 @@
 CLUTTER_X11_LIBS
 XCOMPOSITE_CFLAGS
 XCOMPOSITE_LIBS
+GRAPHENE_CFLAGS
+GRAPHENE_LIBS
 SDL_CFLAGS
 SDL_LIBS
 GMODULE_EXPORT_CFLAGS
@@ -2515,7 +2526,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GStreamer Bad Plug-ins 1.3.2 to adapt to many kinds of systems.
+\`configure' configures GStreamer Bad Plug-ins 1.3.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2590,7 +2601,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GStreamer Bad Plug-ins 1.3.2:";;
+     short | recursive ) echo "Configuration of GStreamer Bad Plug-ins 1.3.3:";;
    esac
   cat <<\_ACEOF
 
@@ -2642,6 +2653,7 @@
   --disable-asfmux        disable dependency-less asfmux plugin
   --disable-audiofxbad    disable dependency-less audiofxbad plugin
   --disable-audiomixer    disable dependency-less audiomixer plugin
+  --disable-compositor    disable dependency-less compositor plugin
   --disable-audiovisualizers
                           disable dependency-less audiovisualizers plugin
   --disable-autoconvert   disable dependency-less autoconvert plugin
@@ -2931,6 +2943,10 @@
               C compiler flags for XCOMPOSITE, overriding pkg-config
   XCOMPOSITE_LIBS
               linker flags for XCOMPOSITE, overriding pkg-config
+  GRAPHENE_CFLAGS
+              C compiler flags for GRAPHENE, overriding pkg-config
+  GRAPHENE_LIBS
+              linker flags for GRAPHENE, overriding pkg-config
   SDL_CFLAGS  C compiler flags for SDL, overriding pkg-config
   SDL_LIBS    linker flags for SDL, overriding pkg-config
   GMODULE_EXPORT_CFLAGS
@@ -3199,7 +3215,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GStreamer Bad Plug-ins configure 1.3.2
+GStreamer Bad Plug-ins configure 1.3.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -4172,7 +4188,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GStreamer Bad Plug-ins $as_me 1.3.2, which was
+It was created by GStreamer Bad Plug-ins $as_me 1.3.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5154,7 +5170,7 @@
 
 # Define the identity of the package.
  PACKAGE='gst-plugins-bad'
- VERSION='1.3.2'
+ VERSION='1.3.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5365,9 +5381,9 @@
 
 
 
-  PACKAGE_VERSION_MAJOR=$(echo 1.3.2 | cut -d'.' -f1)
-  PACKAGE_VERSION_MINOR=$(echo 1.3.2 | cut -d'.' -f2)
-  PACKAGE_VERSION_MICRO=$(echo 1.3.2 | cut -d'.' -f3)
+  PACKAGE_VERSION_MAJOR=$(echo 1.3.3 | cut -d'.' -f1)
+  PACKAGE_VERSION_MINOR=$(echo 1.3.3 | cut -d'.' -f2)
+  PACKAGE_VERSION_MICRO=$(echo 1.3.3 | cut -d'.' -f3)
 
 
 
@@ -5378,7 +5394,7 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5
 $as_echo_n "checking nano version... " >&6; }
 
-  NANO=$(echo 1.3.2 | cut -d'.' -f4)
+  NANO=$(echo 1.3.3 | cut -d'.' -f4)
 
   if test x"$NANO" = x || test "x$NANO" = "x0" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5
@@ -10035,10 +10051,10 @@
 done
 
 
-  GST_CURRENT=302
+  GST_CURRENT=303
   GST_REVISION=0
-  GST_AGE=302
-  GST_LIBVERSION=302:0:302
+  GST_AGE=303
+  GST_LIBVERSION=303:0:303
 
 
 
@@ -14363,8 +14379,8 @@
 
 
 
-GST_REQ=1.3.2
-GSTPB_REQ=1.3.2
+GST_REQ=1.3.3
+GSTPB_REQ=1.3.3
 
 
 
@@ -26641,6 +26657,96 @@
 fi
 
 
+HAVE_GRAPHENE=NO
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GRAPHENE" >&5
+$as_echo_n "checking for GRAPHENE... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GRAPHENE_CFLAGS"; then
+        pkg_cv_GRAPHENE_CFLAGS="$GRAPHENE_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"graphene-1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "graphene-1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GRAPHENE_CFLAGS=`$PKG_CONFIG --cflags "graphene-1.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$GRAPHENE_LIBS"; then
+        pkg_cv_GRAPHENE_LIBS="$GRAPHENE_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"graphene-1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "graphene-1.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GRAPHENE_LIBS=`$PKG_CONFIG --libs "graphene-1.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+	pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GRAPHENE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "graphene-1.0"`
+        else
+	        GRAPHENE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "graphene-1.0"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GRAPHENE_PKG_ERRORS" >&5
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                HAVE_GRAPHENE=no
+elif test $pkg_failed = untried; then
+	HAVE_GRAPHENE=no
+else
+	GRAPHENE_CFLAGS=$pkg_cv_GRAPHENE_CFLAGS
+	GRAPHENE_LIBS=$pkg_cv_GRAPHENE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_GRAPHENE=yes
+fi
+if test "x$HAVE_GRAPHENE" = "xyes"; then
+
+$as_echo "#define HAVE_GRAPHENE 1 " >>confdefs.h
+
+fi
+
+
+
+ if test "x$HAVE_GRAPHENE" = "xyes"; then
+  HAVE_GRAPHENE_TRUE=
+  HAVE_GRAPHENE_FALSE='#'
+else
+  HAVE_GRAPHENE_TRUE='#'
+  HAVE_GRAPHENE_FALSE=
+fi
+
+
+
 HAVE_SDL=NO
 if test "x$BUILD_EXAMPLES" = "xyes"; then
 
@@ -29256,6 +29362,49 @@
 
 
 
+  GST_PLUGINS_ALL="$GST_PLUGINS_ALL compositor"
+
+
+
+  # Check whether --enable-compositor was given.
+if test "${enable_compositor+set}" = set; then :
+  enableval=$enable_compositor;
+      case "${enableval}" in
+        yes) gst_use_compositor=yes ;;
+        no) gst_use_compositor=no ;;
+        *) as_fn_error $? "bad value ${enableval} for --enable-compositor" "$LINENO" 5 ;;
+       esac
+
+else
+  gst_use_compositor=yes
+fi
+
+  if test x$gst_use_compositor = xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: disabling dependency-less plugin compositor" >&5
+$as_echo "$as_me: disabling dependency-less plugin compositor" >&6;}
+    WITHOUT_PLUGINS="$WITHOUT_PLUGINS compositor"
+  fi
+
+
+    if [ -z "$WITH_PLUGINS" ] || echo " $WITH_PLUGINS " | tr , ' ' | grep -i " compositor " > /dev/null; then
+    GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED compositor"
+  fi
+    if echo " $WITHOUT_PLUGINS " | tr , ' ' | grep -i " compositor " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ compositor / /'`
+  fi
+    if echo " $GST_PLUGINS_NONPORTED " | tr , ' ' | grep -i " compositor " > /dev/null; then
+    GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ compositor / /'`
+  fi
+   if echo " $GST_PLUGINS_SELECTED " | grep -i " compositor " > /dev/null; then
+  USE_PLUGIN_COMPOSITOR_TRUE=
+  USE_PLUGIN_COMPOSITOR_FALSE='#'
+else
+  USE_PLUGIN_COMPOSITOR_TRUE='#'
+  USE_PLUGIN_COMPOSITOR_FALSE=
+fi
+
+
+
   GST_PLUGINS_ALL="$GST_PLUGINS_ALL audiovisualizers"
 
 
@@ -34085,7 +34234,7 @@
 GST_GL_HAVE_PLATFORM_EGL=0
 GST_GL_HAVE_PLATFORM_GLX=0
 GST_GL_HAVE_PLATFORM_WGL=0
-GST_GL_HAVE_PLATFORM_COCOA=0
+GST_GL_HAVE_PLATFORM_CGL=0
 GST_GL_HAVE_PLATFORM_EAGL=0
 
 if test "x$USE_EGL" = "xyes"; then
@@ -34101,8 +34250,8 @@
   GST_GL_HAVE_PLATFORM_WGL=1
 fi
 if test "x$USE_COCOA" = "xyes"; then
-  GL_PLATFORMS="cocoa $GL_PLATFORMS"
-  GST_GL_HAVE_PLATFORM_COCOA=1
+  GL_PLATFORMS="cgl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_CGL=1
 fi
 if test "x$USE_EAGL" = "xyes"; then
   GL_PLATFORMS="eagl $GL_PLATFORMS"
@@ -34113,7 +34262,7 @@
 #define GST_GL_HAVE_PLATFORM_EGL $GST_GL_HAVE_PLATFORM_EGL
 #define GST_GL_HAVE_PLATFORM_GLX $GST_GL_HAVE_PLATFORM_GLX
 #define GST_GL_HAVE_PLATFORM_WGL $GST_GL_HAVE_PLATFORM_WGL
-#define GST_GL_HAVE_PLATFORM_COCOA $GST_GL_HAVE_PLATFORM_COCOA
+#define GST_GL_HAVE_PLATFORM_CGL $GST_GL_HAVE_PLATFORM_CGL
 #define GST_GL_HAVE_PLATFORM_EAGL $GST_GL_HAVE_PLATFORM_EAGL
 "
 
@@ -39097,12 +39246,12 @@
         pkg_cv_WAYLAND_CFLAGS="$WAYLAND_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client >= 1.0.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-client >= 1.0.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client >= 1.4.0 wayland-scanner\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "wayland-client >= 1.4.0 wayland-scanner") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "wayland-client >= 1.0.0" 2>/dev/null`
+  pkg_cv_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "wayland-client >= 1.4.0 wayland-scanner" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -39115,12 +39264,12 @@
         pkg_cv_WAYLAND_LIBS="$WAYLAND_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client >= 1.0.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "wayland-client >= 1.0.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client >= 1.4.0 wayland-scanner\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "wayland-client >= 1.4.0 wayland-scanner") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WAYLAND_LIBS=`$PKG_CONFIG --libs "wayland-client >= 1.0.0" 2>/dev/null`
+  pkg_cv_WAYLAND_LIBS=`$PKG_CONFIG --libs "wayland-client >= 1.4.0 wayland-scanner" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -39139,9 +39288,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-client >= 1.0.0"`
+	        WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-client >= 1.4.0 wayland-scanner"`
         else
-	        WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-client >= 1.0.0"`
+	        WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-client >= 1.4.0 wayland-scanner"`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$WAYLAND_PKG_ERRORS" >&5
@@ -39202,6 +39351,47 @@
 
 
 
+# Extract the first word of "wayland-scanner", so it can be a program name with args.
+set dummy wayland-scanner; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_wayland_scanner+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $wayland_scanner in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_wayland_scanner="$wayland_scanner" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_wayland_scanner="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+wayland_scanner=$ac_cv_path_wayland_scanner
+if test -n "$wayland_scanner"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wayland_scanner" >&5
+$as_echo "$wayland_scanner" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
 echo
 { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: WebP ***" >&5
 $as_echo "$as_me: *** checking feature: WebP ***" >&6;}
@@ -44668,12 +44858,12 @@
         pkg_cv_OPENCV_CFLAGS="$OPENCV_CFLAGS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.0.0 opencv <= 2.4.8 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv <= 2.4.8 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.0.0 opencv < 2.5.0 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv < 2.5.0 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OPENCV_CFLAGS=`$PKG_CONFIG --cflags "opencv >= 2.0.0 opencv <= 2.4.8 " 2>/dev/null`
+  pkg_cv_OPENCV_CFLAGS=`$PKG_CONFIG --cflags "opencv >= 2.0.0 opencv < 2.5.0 " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -44686,12 +44876,12 @@
         pkg_cv_OPENCV_LIBS="$OPENCV_LIBS"
     else
         if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.0.0 opencv <= 2.4.8 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv <= 2.4.8 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"opencv >= 2.0.0 opencv < 2.5.0 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "opencv >= 2.0.0 opencv < 2.5.0 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OPENCV_LIBS=`$PKG_CONFIG --libs "opencv >= 2.0.0 opencv <= 2.4.8 " 2>/dev/null`
+  pkg_cv_OPENCV_LIBS=`$PKG_CONFIG --libs "opencv >= 2.0.0 opencv < 2.5.0 " 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -44710,9 +44900,9 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "opencv >= 2.0.0 opencv <= 2.4.8 "`
+	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "opencv >= 2.0.0 opencv < 2.5.0 "`
         else
-	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "opencv >= 2.0.0 opencv <= 2.4.8 "`
+	        OPENCV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "opencv >= 2.0.0 opencv < 2.5.0 "`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$OPENCV_PKG_ERRORS" >&5
@@ -54309,7 +54499,7 @@
 $MKDIR_P tests/check/orc
 
 
-ac_config_files="$ac_config_files Makefile common/Makefile common/m4/Makefile gst-plugins-bad.spec gst/Makefile gst/accurip/Makefile gst/adpcmdec/Makefile gst/adpcmenc/Makefile gst/aiff/Makefile gst/asfmux/Makefile gst/audiofxbad/Makefile gst/audiomixer/Makefile gst/audiovisualizers/Makefile gst/autoconvert/Makefile gst/bayer/Makefile gst/camerabin2/Makefile gst/cdxaparse/Makefile gst/coloreffects/Makefile gst/dataurisrc/Makefile gst/dccp/Makefile gst/debugutils/Makefile gst/dvbsuboverlay/Makefile gst/dvdspu/Makefile gst/faceoverlay/Makefile gst/festival/Makefile gst/fieldanalysis/Makefile gst/freeverb/Makefile gst/frei0r/Makefile gst/gaudieffects/Makefile gst/geometrictransform/Makefile gst/gdp/Makefile gst/hdvparse/Makefile gst/id3tag/Makefile gst/inter/Makefile gst/interlace/Makefile gst/ivfparse/Makefile gst/ivtc/Makefile gst/jp2kdecimator/Makefile gst/jpegformat/Makefile gst/librfb/Makefile gst/liveadder/Makefile gst/midi/Makefile gst/mpegdemux/Makefile gst/mpegtsdemux/Makefile gst/mpegtsmux/Makefile gst/mpegtsmux/tsmux/Makefile gst/mpegpsmux/Makefile gst/mve/Makefile gst/mxf/Makefile gst/nuvdemux/Makefile gst/patchdetect/Makefile gst/pcapparse/Makefile gst/pnm/Makefile gst/rawparse/Makefile gst/real/Makefile gst/removesilence/Makefile gst/sdi/Makefile gst/sdp/Makefile gst/segmentclip/Makefile gst/siren/Makefile gst/smooth/Makefile gst/speed/Makefile gst/subenc/Makefile gst/stereo/Makefile gst/tta/Makefile gst/videofilters/Makefile gst/videomeasure/Makefile gst/videoparsers/Makefile gst/videosignal/Makefile gst/vmnc/Makefile gst/y4m/Makefile gst/yadif/Makefile gst-libs/Makefile gst-libs/gst/Makefile gst-libs/gst/basecamerabinsrc/Makefile gst-libs/gst/gl/Makefile gst-libs/gst/gl/android/Makefile gst-libs/gst/gl/cocoa/Makefile gst-libs/gst/gl/dispmanx/Makefile gst-libs/gst/gl/glprototypes/Makefile gst-libs/gst/gl/eagl/Makefile gst-libs/gst/gl/egl/Makefile gst-libs/gst/gl/wayland/Makefile gst-libs/gst/gl/win32/Makefile gst-libs/gst/gl/x11/Makefile gst-libs/gst/insertbin/Makefile gst-libs/gst/interfaces/Makefile gst-libs/gst/codecparsers/Makefile gst-libs/gst/mpegts/Makefile gst-libs/gst/uridownloader/Makefile sys/Makefile sys/dshowdecwrapper/Makefile sys/acmenc/Makefile sys/acmmp3dec/Makefile sys/androidmedia/Makefile sys/applemedia/Makefile sys/applemedia-nonpublic/Makefile sys/avc/Makefile sys/bluez/Makefile sys/d3dvideosink/Makefile sys/decklink/Makefile sys/directdraw/Makefile sys/directsound/Makefile sys/dshowsrcwrapper/Makefile sys/dshowvideosink/Makefile sys/dvb/Makefile sys/fbdev/Makefile sys/linsys/Makefile sys/opensles/Makefile sys/osxvideo/Makefile sys/qtwrapper/Makefile sys/shm/Makefile sys/uvch264/Makefile sys/vcd/Makefile sys/vdpau/Makefile sys/pvr2d/Makefile sys/wasapi/Makefile sys/wininet/Makefile sys/winks/Makefile sys/winscreencap/Makefile tests/Makefile tests/check/Makefile tests/files/Makefile tests/examples/Makefile tests/examples/camerabin2/Makefile tests/examples/directfb/Makefile tests/examples/gl/Makefile tests/examples/gl/cocoa/Makefile tests/examples/gl/clutter/Makefile tests/examples/gl/generic/Makefile tests/examples/gl/generic/cube/Makefile tests/examples/gl/generic/cubeyuv/Makefile tests/examples/gl/generic/doublecube/Makefile tests/examples/gl/generic/recordgraphic/Makefile tests/examples/gl/gtk/Makefile tests/examples/gl/gtk/gtkvideooverlay/Makefile tests/examples/gl/gtk/filternovideooverlay/Makefile tests/examples/gl/gtk/filtervideooverlay/Makefile tests/examples/gl/gtk/fxtest/Makefile tests/examples/gl/gtk/switchvideooverlay/Makefile tests/examples/gl/qt/Makefile tests/examples/gl/sdl/Makefile tests/examples/mpegts/Makefile tests/examples/mxf/Makefile tests/examples/opencv/Makefile tests/examples/uvch264/Makefile tests/icles/Makefile ext/voamrwbenc/Makefile ext/voaacenc/Makefile ext/assrender/Makefile ext/apexsink/Makefile ext/bz2/Makefile ext/chromaprint/Makefile ext/curl/Makefile ext/dash/Makefile ext/dc1394/Makefile ext/directfb/Makefile ext/wayland/Makefile ext/daala/Makefile ext/dts/Makefile ext/gl/Makefile ext/faac/Makefile ext/faad/Makefile ext/flite/Makefile ext/fluidsynth/Makefile ext/gsm/Makefile ext/hls/Makefile ext/kate/Makefile ext/ladspa/Makefile ext/lv2/Makefile ext/libmms/Makefile ext/libvisual/Makefile ext/Makefile ext/modplug/Makefile ext/mpeg2enc/Makefile ext/mpg123/Makefile ext/mimic/Makefile ext/mplex/Makefile ext/musepack/Makefile ext/mythtv/Makefile ext/nas/Makefile ext/neon/Makefile ext/ofa/Makefile ext/openal/Makefile ext/opencv/Makefile ext/openexr/Makefile ext/openjpeg/Makefile ext/openni2/Makefile ext/opus/Makefile ext/rsvg/Makefile ext/resindvd/Makefile ext/rtmp/Makefile ext/sbc/Makefile ext/schroedinger/Makefile ext/sdl/Makefile ext/smoothstreaming/Makefile ext/sndfile/Makefile ext/soundtouch/Makefile ext/spandsp/Makefile ext/sndio/Makefile ext/srtp/Makefile ext/teletextdec/Makefile ext/gme/Makefile ext/gsettings/Makefile ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml ext/spc/Makefile ext/timidity/Makefile ext/webp/Makefile ext/xvid/Makefile ext/zbar/Makefile po/Makefile.in docs/Makefile docs/plugins/Makefile docs/libs/Makefile docs/version.entities pkgconfig/Makefile pkgconfig/gstreamer-plugins-bad.pc pkgconfig/gstreamer-plugins-bad-uninstalled.pc pkgconfig/gstreamer-codecparsers.pc pkgconfig/gstreamer-codecparsers-uninstalled.pc pkgconfig/gstreamer-insertbin.pc pkgconfig/gstreamer-insertbin-uninstalled.pc pkgconfig/gstreamer-gl.pc pkgconfig/gstreamer-gl-uninstalled.pc pkgconfig/gstreamer-mpegts.pc pkgconfig/gstreamer-mpegts-uninstalled.pc tools/Makefile m4/Makefile"
+ac_config_files="$ac_config_files Makefile common/Makefile common/m4/Makefile gst-plugins-bad.spec gst/Makefile gst/accurip/Makefile gst/adpcmdec/Makefile gst/adpcmenc/Makefile gst/aiff/Makefile gst/asfmux/Makefile gst/audiofxbad/Makefile gst/audiomixer/Makefile gst/audiovisualizers/Makefile gst/autoconvert/Makefile gst/bayer/Makefile gst/camerabin2/Makefile gst/cdxaparse/Makefile gst/coloreffects/Makefile gst/dataurisrc/Makefile gst/dccp/Makefile gst/debugutils/Makefile gst/dvbsuboverlay/Makefile gst/dvdspu/Makefile gst/faceoverlay/Makefile gst/festival/Makefile gst/fieldanalysis/Makefile gst/freeverb/Makefile gst/frei0r/Makefile gst/gaudieffects/Makefile gst/geometrictransform/Makefile gst/gdp/Makefile gst/hdvparse/Makefile gst/id3tag/Makefile gst/inter/Makefile gst/interlace/Makefile gst/ivfparse/Makefile gst/ivtc/Makefile gst/jp2kdecimator/Makefile gst/jpegformat/Makefile gst/librfb/Makefile gst/liveadder/Makefile gst/midi/Makefile gst/mpegdemux/Makefile gst/mpegtsdemux/Makefile gst/mpegtsmux/Makefile gst/mpegtsmux/tsmux/Makefile gst/mpegpsmux/Makefile gst/mve/Makefile gst/mxf/Makefile gst/nuvdemux/Makefile gst/patchdetect/Makefile gst/pcapparse/Makefile gst/pnm/Makefile gst/rawparse/Makefile gst/real/Makefile gst/removesilence/Makefile gst/sdi/Makefile gst/sdp/Makefile gst/segmentclip/Makefile gst/siren/Makefile gst/smooth/Makefile gst/speed/Makefile gst/subenc/Makefile gst/stereo/Makefile gst/tta/Makefile gst/videofilters/Makefile gst/videomeasure/Makefile gst/videoparsers/Makefile gst/videosignal/Makefile gst/vmnc/Makefile gst/y4m/Makefile gst/yadif/Makefile gst/compositor/Makefile gst-libs/Makefile gst-libs/gst/Makefile gst-libs/gst/basecamerabinsrc/Makefile gst-libs/gst/gl/Makefile gst-libs/gst/gl/android/Makefile gst-libs/gst/gl/cocoa/Makefile gst-libs/gst/gl/dispmanx/Makefile gst-libs/gst/gl/glprototypes/Makefile gst-libs/gst/gl/eagl/Makefile gst-libs/gst/gl/egl/Makefile gst-libs/gst/gl/wayland/Makefile gst-libs/gst/gl/win32/Makefile gst-libs/gst/gl/x11/Makefile gst-libs/gst/insertbin/Makefile gst-libs/gst/interfaces/Makefile gst-libs/gst/codecparsers/Makefile gst-libs/gst/mpegts/Makefile gst-libs/gst/uridownloader/Makefile gst-libs/gst/wayland/Makefile gst-libs/gst/base/Makefile gst-libs/gst/video/Makefile sys/Makefile sys/dshowdecwrapper/Makefile sys/acmenc/Makefile sys/acmmp3dec/Makefile sys/androidmedia/Makefile sys/applemedia/Makefile sys/applemedia-nonpublic/Makefile sys/avc/Makefile sys/bluez/Makefile sys/d3dvideosink/Makefile sys/decklink/Makefile sys/directdraw/Makefile sys/directsound/Makefile sys/dshowsrcwrapper/Makefile sys/dshowvideosink/Makefile sys/dvb/Makefile sys/fbdev/Makefile sys/linsys/Makefile sys/opensles/Makefile sys/osxvideo/Makefile sys/qtwrapper/Makefile sys/shm/Makefile sys/uvch264/Makefile sys/vcd/Makefile sys/vdpau/Makefile sys/pvr2d/Makefile sys/wasapi/Makefile sys/wininet/Makefile sys/winks/Makefile sys/winscreencap/Makefile tests/Makefile tests/check/Makefile tests/files/Makefile tests/examples/Makefile tests/examples/camerabin2/Makefile tests/examples/directfb/Makefile tests/examples/gl/Makefile tests/examples/gl/cocoa/Makefile tests/examples/gl/clutter/Makefile tests/examples/gl/generic/Makefile tests/examples/gl/generic/cube/Makefile tests/examples/gl/generic/cubeyuv/Makefile tests/examples/gl/generic/doublecube/Makefile tests/examples/gl/generic/recordgraphic/Makefile tests/examples/gl/gtk/Makefile tests/examples/gl/gtk/gtkvideooverlay/Makefile tests/examples/gl/gtk/filternovideooverlay/Makefile tests/examples/gl/gtk/filtervideooverlay/Makefile tests/examples/gl/gtk/fxtest/Makefile tests/examples/gl/gtk/switchvideooverlay/Makefile tests/examples/gl/qt/Makefile tests/examples/gl/sdl/Makefile tests/examples/mpegts/Makefile tests/examples/mxf/Makefile tests/examples/opencv/Makefile tests/examples/uvch264/Makefile tests/icles/Makefile ext/voamrwbenc/Makefile ext/voaacenc/Makefile ext/assrender/Makefile ext/apexsink/Makefile ext/bz2/Makefile ext/chromaprint/Makefile ext/curl/Makefile ext/dash/Makefile ext/dc1394/Makefile ext/directfb/Makefile ext/wayland/Makefile ext/daala/Makefile ext/dts/Makefile ext/gl/Makefile ext/faac/Makefile ext/faad/Makefile ext/flite/Makefile ext/fluidsynth/Makefile ext/gsm/Makefile ext/hls/Makefile ext/kate/Makefile ext/ladspa/Makefile ext/lv2/Makefile ext/libmms/Makefile ext/libvisual/Makefile ext/Makefile ext/modplug/Makefile ext/mpeg2enc/Makefile ext/mpg123/Makefile ext/mimic/Makefile ext/mplex/Makefile ext/musepack/Makefile ext/mythtv/Makefile ext/nas/Makefile ext/neon/Makefile ext/ofa/Makefile ext/openal/Makefile ext/opencv/Makefile ext/openexr/Makefile ext/openjpeg/Makefile ext/openni2/Makefile ext/opus/Makefile ext/rsvg/Makefile ext/resindvd/Makefile ext/rtmp/Makefile ext/sbc/Makefile ext/schroedinger/Makefile ext/sdl/Makefile ext/smoothstreaming/Makefile ext/sndfile/Makefile ext/soundtouch/Makefile ext/spandsp/Makefile ext/sndio/Makefile ext/srtp/Makefile ext/teletextdec/Makefile ext/gme/Makefile ext/gsettings/Makefile ext/gsettings/org.freedesktop.gstreamer.default-elements.gschema.xml ext/spc/Makefile ext/timidity/Makefile ext/webp/Makefile ext/xvid/Makefile ext/zbar/Makefile po/Makefile.in docs/Makefile docs/plugins/Makefile docs/libs/Makefile docs/version.entities pkgconfig/Makefile pkgconfig/gstreamer-plugins-bad.pc pkgconfig/gstreamer-plugins-bad-uninstalled.pc pkgconfig/gstreamer-codecparsers.pc pkgconfig/gstreamer-codecparsers-uninstalled.pc pkgconfig/gstreamer-insertbin.pc pkgconfig/gstreamer-insertbin-uninstalled.pc pkgconfig/gstreamer-gl.pc pkgconfig/gstreamer-gl-uninstalled.pc pkgconfig/gstreamer-mpegts.pc pkgconfig/gstreamer-mpegts-uninstalled.pc pkgconfig/gstreamer-wayland.pc pkgconfig/gstreamer-wayland-uninstalled.pc pkgconfig/gstreamer-bad-base.pc pkgconfig/gstreamer-bad-base-uninstalled.pc pkgconfig/gstreamer-bad-video.pc pkgconfig/gstreamer-bad-video-uninstalled.pc tools/Makefile m4/Makefile"
 
 
 sed \
@@ -54644,6 +54834,10 @@
   as_fn_error $? "conditional \"HAVE_XCOMPOSITE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_GRAPHENE_TRUE}" && test -z "${HAVE_GRAPHENE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_GRAPHENE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_SDL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -54696,6 +54890,10 @@
   as_fn_error $? "conditional \"USE_PLUGIN_AUDIOMIXER\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_PLUGIN_COMPOSITOR_TRUE}" && test -z "${USE_PLUGIN_COMPOSITOR_FALSE}"; then
+  as_fn_error $? "conditional \"USE_PLUGIN_COMPOSITOR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${USE_PLUGIN_AUDIOVISUALIZERS_TRUE}" && test -z "${USE_PLUGIN_AUDIOVISUALIZERS_FALSE}"; then
   as_fn_error $? "conditional \"USE_PLUGIN_AUDIOVISUALIZERS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -56081,7 +56279,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GStreamer Bad Plug-ins $as_me 1.3.2, which was
+This file was extended by GStreamer Bad Plug-ins $as_me 1.3.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -56147,7 +56345,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GStreamer Bad Plug-ins config.status 1.3.2
+GStreamer Bad Plug-ins config.status 1.3.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -56759,6 +56957,7 @@
     "gst/vmnc/Makefile") CONFIG_FILES="$CONFIG_FILES gst/vmnc/Makefile" ;;
     "gst/y4m/Makefile") CONFIG_FILES="$CONFIG_FILES gst/y4m/Makefile" ;;
     "gst/yadif/Makefile") CONFIG_FILES="$CONFIG_FILES gst/yadif/Makefile" ;;
+    "gst/compositor/Makefile") CONFIG_FILES="$CONFIG_FILES gst/compositor/Makefile" ;;
     "gst-libs/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/Makefile" ;;
     "gst-libs/gst/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/Makefile" ;;
     "gst-libs/gst/basecamerabinsrc/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/basecamerabinsrc/Makefile" ;;
@@ -56777,6 +56976,9 @@
     "gst-libs/gst/codecparsers/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/codecparsers/Makefile" ;;
     "gst-libs/gst/mpegts/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/mpegts/Makefile" ;;
     "gst-libs/gst/uridownloader/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/uridownloader/Makefile" ;;
+    "gst-libs/gst/wayland/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/wayland/Makefile" ;;
+    "gst-libs/gst/base/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/base/Makefile" ;;
+    "gst-libs/gst/video/Makefile") CONFIG_FILES="$CONFIG_FILES gst-libs/gst/video/Makefile" ;;
     "sys/Makefile") CONFIG_FILES="$CONFIG_FILES sys/Makefile" ;;
     "sys/dshowdecwrapper/Makefile") CONFIG_FILES="$CONFIG_FILES sys/dshowdecwrapper/Makefile" ;;
     "sys/acmenc/Makefile") CONFIG_FILES="$CONFIG_FILES sys/acmenc/Makefile" ;;
@@ -56913,6 +57115,12 @@
     "pkgconfig/gstreamer-gl-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-gl-uninstalled.pc" ;;
     "pkgconfig/gstreamer-mpegts.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-mpegts.pc" ;;
     "pkgconfig/gstreamer-mpegts-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-mpegts-uninstalled.pc" ;;
+    "pkgconfig/gstreamer-wayland.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-wayland.pc" ;;
+    "pkgconfig/gstreamer-wayland-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-wayland-uninstalled.pc" ;;
+    "pkgconfig/gstreamer-bad-base.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-bad-base.pc" ;;
+    "pkgconfig/gstreamer-bad-base-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-bad-base-uninstalled.pc" ;;
+    "pkgconfig/gstreamer-bad-video.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-bad-video.pc" ;;
+    "pkgconfig/gstreamer-bad-video-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES pkgconfig/gstreamer-bad-video-uninstalled.pc" ;;
     "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
     "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
 
diff --git a/configure.ac b/configure.ac
index f39ed8c..fa06db3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 dnl initialize autoconf
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, cvs and prerelease does Werror too
-AC_INIT([GStreamer Bad Plug-ins],[1.3.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-bad])
+AC_INIT([GStreamer Bad Plug-ins],[1.3.3],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-bad])
 
 AG_GST_INIT
 
@@ -48,11 +48,11 @@
 dnl - interfaces added -> increment AGE
 dnl - interfaces removed -> AGE = 0
 dnl sets GST_LT_LDFLAGS
-AS_LIBTOOL(GST, 302, 0, 302)
+AS_LIBTOOL(GST, 303, 0, 303)
 
 dnl *** required versions of GStreamer stuff ***
-GST_REQ=1.3.2
-GSTPB_REQ=1.3.2
+GST_REQ=1.3.3
+GSTPB_REQ=1.3.3
 
 dnl *** autotools stuff ****
 
@@ -284,6 +284,18 @@
 fi
 AM_CONDITIONAL(HAVE_XCOMPOSITE, test "x$HAVE_XCOMPOSITE" = "xyes")
 
+dnl graphene-1.0 is optional and used in gltransformation
+HAVE_GRAPHENE=NO
+PKG_CHECK_MODULES(GRAPHENE, graphene-1.0, HAVE_GRAPHENE=yes, HAVE_GRAPHENE=no)
+if test "x$HAVE_GRAPHENE" = "xyes"; then
+  AC_DEFINE(HAVE_GRAPHENE, [1] , [Use graphene])
+fi
+AC_SUBST(HAVE_GRAPHENE)
+AC_SUBST(GRAPHENE_LIBS)
+AC_SUBST(GRAPHENE_CFLAGS)
+AM_CONDITIONAL(HAVE_GRAPHENE, test "x$HAVE_GRAPHENE" = "xyes")
+
+
 dnl sdl is optional and used in examples
 HAVE_SDL=NO
 if test "x$BUILD_EXAMPLES" = "xyes"; then
@@ -418,6 +430,7 @@
 AG_GST_CHECK_PLUGIN(asfmux)
 AG_GST_CHECK_PLUGIN(audiofxbad)
 AG_GST_CHECK_PLUGIN(audiomixer)
+AG_GST_CHECK_PLUGIN(compositor)
 AG_GST_CHECK_PLUGIN(audiovisualizers)
 AG_GST_CHECK_PLUGIN(autoconvert)
 AG_GST_CHECK_PLUGIN(bayer)
@@ -1174,7 +1187,7 @@
 GST_GL_HAVE_PLATFORM_EGL=0
 GST_GL_HAVE_PLATFORM_GLX=0
 GST_GL_HAVE_PLATFORM_WGL=0
-GST_GL_HAVE_PLATFORM_COCOA=0
+GST_GL_HAVE_PLATFORM_CGL=0
 GST_GL_HAVE_PLATFORM_EAGL=0
 
 if test "x$USE_EGL" = "xyes"; then
@@ -1190,8 +1203,8 @@
   GST_GL_HAVE_PLATFORM_WGL=1
 fi
 if test "x$USE_COCOA" = "xyes"; then
-  GL_PLATFORMS="cocoa $GL_PLATFORMS"
-  GST_GL_HAVE_PLATFORM_COCOA=1
+  GL_PLATFORMS="cgl $GL_PLATFORMS"
+  GST_GL_HAVE_PLATFORM_CGL=1
 fi
 if test "x$USE_EAGL" = "xyes"; then
   GL_PLATFORMS="eagl $GL_PLATFORMS"
@@ -1202,7 +1215,7 @@
 #define GST_GL_HAVE_PLATFORM_EGL $GST_GL_HAVE_PLATFORM_EGL
 #define GST_GL_HAVE_PLATFORM_GLX $GST_GL_HAVE_PLATFORM_GLX
 #define GST_GL_HAVE_PLATFORM_WGL $GST_GL_HAVE_PLATFORM_WGL
-#define GST_GL_HAVE_PLATFORM_COCOA $GST_GL_HAVE_PLATFORM_COCOA
+#define GST_GL_HAVE_PLATFORM_CGL $GST_GL_HAVE_PLATFORM_CGL
 #define GST_GL_HAVE_PLATFORM_EAGL $GST_GL_HAVE_PLATFORM_EAGL
 "
 
@@ -1966,11 +1979,13 @@
 dnl **** Wayland ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_WAYLAND, true)
 AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [
-  PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.0.0, [
+  PKG_CHECK_MODULES(WAYLAND, wayland-client >= 1.4.0 wayland-scanner, [
     HAVE_WAYLAND="yes" ], [ HAVE_WAYLAND="no"
   ])
 ])
 
+AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+
 dnl **** WebP ****
 translit(dnm, m, l) AM_CONDITIONAL(USE_WEBP, true)
 AG_GST_CHECK_FEATURE(WEBP, [WebP], webp , [
@@ -2487,7 +2502,7 @@
   dnl a new version and the no-backward-compatibility define. (There doesn't
   dnl seem to be a switch to suppress the warnings the cvcompat.h header
   dnl causes.)
-  PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv <= 2.4.8 , [
+  PKG_CHECK_MODULES(OPENCV, opencv >= 2.0.0 opencv < 2.5.0 , [
     AC_PROG_CXX
     AC_LANG([C++])
     OLD_CPPFLAGS=$CPPFLAGS
@@ -3188,6 +3203,7 @@
 gst/vmnc/Makefile
 gst/y4m/Makefile
 gst/yadif/Makefile
+gst/compositor/Makefile
 gst-libs/Makefile
 gst-libs/gst/Makefile
 gst-libs/gst/basecamerabinsrc/Makefile
@@ -3206,6 +3222,9 @@
 gst-libs/gst/codecparsers/Makefile
 gst-libs/gst/mpegts/Makefile
 gst-libs/gst/uridownloader/Makefile
+gst-libs/gst/wayland/Makefile
+gst-libs/gst/base/Makefile
+gst-libs/gst/video/Makefile
 sys/Makefile
 sys/dshowdecwrapper/Makefile
 sys/acmenc/Makefile
@@ -3342,6 +3361,12 @@
 pkgconfig/gstreamer-gl-uninstalled.pc
 pkgconfig/gstreamer-mpegts.pc
 pkgconfig/gstreamer-mpegts-uninstalled.pc
+pkgconfig/gstreamer-wayland.pc
+pkgconfig/gstreamer-wayland-uninstalled.pc
+pkgconfig/gstreamer-bad-base.pc
+pkgconfig/gstreamer-bad-base-uninstalled.pc
+pkgconfig/gstreamer-bad-video.pc
+pkgconfig/gstreamer-bad-video-uninstalled.pc
 tools/Makefile
 m4/Makefile
 )
diff --git a/docs/Makefile.in b/docs/Makefile.in
index e7b6310..ca9892f 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -318,6 +318,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -404,6 +406,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -695,6 +698,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @ENABLE_GTK_DOC_FALSE@PLUGIN_DOCS_DIRS = plugins
 @ENABLE_GTK_DOC_TRUE@@ENABLE_PLUGIN_DOCS_FALSE@PLUGIN_DOCS_DIRS = 
 @ENABLE_GTK_DOC_TRUE@@ENABLE_PLUGIN_DOCS_TRUE@PLUGIN_DOCS_DIRS = plugins
diff --git a/docs/libs/Makefile.in b/docs/libs/Makefile.in
index 7556f20..9f0f284 100644
--- a/docs/libs/Makefile.in
+++ b/docs/libs/Makefile.in
@@ -279,6 +279,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -365,6 +367,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -656,6 +659,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 
 # FIXME: fix the docs then remove this variable
 DOCS_ARE_INCOMPLETE_PLEASE_FIXME = yespleasedo
diff --git a/docs/libs/gst-plugins-bad-libs-docs.sgml b/docs/libs/gst-plugins-bad-libs-docs.sgml
index e5a0be8..54a078a 100644
--- a/docs/libs/gst-plugins-bad-libs-docs.sgml
+++ b/docs/libs/gst-plugins-bad-libs-docs.sgml
@@ -57,6 +57,18 @@
       <xi:include href="xml/gstinsertbin.xml" />
     </chapter>
 
+    <chapter id="base">
+      <title>GStreamer Base classes from gst-plugins-bad</title>
+      <xi:include href="xml/gstaggregator.xml" />
+      <xi:include href="xml/gstaggregatorpad.xml" />
+    </chapter>
+
+    <chapter id="video">
+      <title>Video helpers and baseclasses</title>
+      <xi:include href="xml/gstvideoaggregator.xml" />
+      <xi:include href="xml/gstvideoaggregatorpad.xml" />
+    </chapter>
+
     <chapter id="gl">
       <title>OpenGL Helper Library</title>
       <xi:include href="xml/gstglapi.xml"/>
@@ -69,11 +81,14 @@
       <xi:include href="xml/gstglcontextwgl.xml"/>
       <xi:include href="xml/gstgldisplay.xml"/>
       <xi:include href="xml/gstgldownload.xml"/>
+      <xi:include href="xml/gsteglimagememory.xml"/>
       <xi:include href="xml/gstglfilter.xml"/>
+      <xi:include href="xml/gstglframebuffer.xml"/>
       <xi:include href="xml/gstglmemory.xml"/>
       <xi:include href="xml/gstglmixer.xml"/>
       <xi:include href="xml/gstglshader.xml"/>
       <xi:include href="xml/gstglupload.xml"/>
+      <xi:include href="xml/gstgluploadmeta.xml"/>
       <xi:include href="xml/gstglutils.xml"/>
       <xi:include href="xml/gstglwindow.xml"/>
       <xi:include href="xml/gstglwindowandroid.xml"/>
diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt
index 50dba86..21c432e 100644
--- a/docs/libs/gst-plugins-bad-libs-sections.txt
+++ b/docs/libs/gst-plugins-bad-libs-sections.txt
@@ -40,10 +40,11 @@
 gst_h264_nal_parser_free
 gst_h264_parse_sps
 gst_h264_parse_pps
-gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster
-gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag
-gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster
-gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag
+gst_h264_quant_matrix_8x8_get_zigzag_from_raster
+gst_h264_quant_matrix_8x8_get_raster_from_zigzag
+gst_h264_quant_matrix_4x4_get_zigzag_from_raster
+gst_h264_quant_matrix_4x4_get_raster_from_zigzag
+gst_h264_video_calculate_framerate
 <SUBSECTION Standard>
 <SUBSECTION Private>
 </SECTION>
@@ -319,6 +320,25 @@
 gst_mpegts_descriptor_parse_dvb_stream_identifier
 <SUBSECTION ca_identifier>
 gst_mpegts_descriptor_parse_dvb_ca_identifier
+<SUBSECTION service_list>
+GstMpegTsDVBServiceListItem
+gst_mpegts_descriptor_parse_dvb_service_list
+<SUBSECTION stuffing>
+gst_mpegts_descriptor_parse_dvb_stuffing
+<SUBSECTION bouquet_name>
+gst_mpegts_descriptor_parse_dvb_bouquet_name
+<SUBSECTION multilingual_network_name>
+GstMpegTsDvbMultilingualNetworkNameItem
+gst_mpegts_descriptor_parse_dvb_multilingual_network_name
+<SUBSECTION multilingual_bouquet_name>
+GstMpegTsDvbMultilingualBouquetNameItem
+gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name
+<SUBSECTION multilingual_service_name>
+GstMpegTsDvbMultilingualServiceNameItem
+gst_mpegts_descriptor_parse_dvb_multilingual_service_name
+<SUBSECTION multilingual_component>
+GstMpegTsDvbMultilingualComponentItem
+gst_mpegts_descriptor_parse_dvb_multilingual_component
 <SUBSECTION Standard>
 GST_TYPE_MPEG_TSDVB_CODE_RATE
 gst_mpegts_dvb_code_rate_get_type
@@ -675,10 +695,18 @@
 <FILE>gstglapi</FILE>
 <TITLE>GstGLAPI</TITLE>
 GstGLAPI
-gst_gl_api_string
+gst_gl_api_to_string
+gst_gl_api_from_string
+GstGLPlatform
+gst_gl_platform_to_string
+gst_gl_platform_from_string
 gst_gl_check_extension
-GST_GL_CHECK_GL_VERSION
+GST_GL_API_GLES1_NAME
+GST_GL_API_GLES2_NAME
+GST_GL_API_OPENGL3_NAME
+GST_GL_API_OPENGL_NAME
 <SUBSECTION Private>
+GST_GL_CHECK_GL_VERSION
 GSTGLAPI
 GST_GL_EXT_BEGIN
 GST_GL_EXT_END
@@ -694,6 +722,7 @@
 GstGLBufferPoolClass
 gst_gl_buffer_pool_new
 <SUBSECTION Standard>
+gst_gl_buffer_pool_replace_last_buffer
 GstGLBufferPoolPrivate
 GST_GL_BUFFER_POOL
 GST_GL_BUFFER_POOL_CAST
@@ -710,7 +739,7 @@
 GstGLColorConvert
 GstGLColorConvertClass
 gst_gl_color_convert_new
-gst_gl_color_convert_init_format
+gst_gl_color_convert_set_format
 gst_gl_color_convert_perform
 <SUBSECTION Standard>
 GstGLColorConvertPrivate
@@ -731,6 +760,7 @@
 GstGLContextThreadFunc
 GstGLContext
 gst_gl_context_new
+gst_gl_context_new_wrapped
 gst_gl_context_create
 gst_gl_context_activate
 gst_gl_context_default_get_proc_address
@@ -741,8 +771,10 @@
 gst_gl_context_get_display
 gst_gl_context_get_gl_api
 gst_gl_context_get_gl_context
-gst_gl_context_get_platform
+gst_gl_context_get_gl_platform
 gst_gl_context_check_feature
+gst_gl_context_check_gl_version
+gst_gl_context_get_gl_version
 <SUBSECTION Standard>
 GST_GL_CONTEXT
 GST_GL_IS_CONTEXT
@@ -826,6 +858,7 @@
 <SECTION>
 <FILE>gstgldisplay</FILE>
 <TITLE>GstGLDisplay</TITLE>
+GST_GL_DISPLAY_CONTEXT_TYPE
 GstGLDisplayType
 GstGLDisplay
 gst_gl_display_new
@@ -882,6 +915,26 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstglframebuffer</FILE>
+<TITLE>GstGLFramebuffer</TITLE>
+GstGLFramebuffer
+GstGLFramebufferClass
+gst_gl_framebuffer_new
+gst_gl_framebuffer_generate
+gst_gl_framebuffer_delete
+gst_gl_framebuffer_use
+gst_gl_framebuffer_use_v2
+<SUBSECTION Standard>
+GST_GL_FRAMEBUFFER
+GST_IS_GL_FRAMEBUFFER
+GST_TYPE_GL_FRAMEBUFFER
+gst_gl_framebuffer_get_type
+GST_GL_FRAMEBUFFER_CLASS
+GST_IS_GL_FRAMEBUFFER_CLASS
+GST_GL_FRAMEBUFFER_GET_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>gstglmemory</FILE>
 GstGLAllocator
 GstGLAllocatorClass
@@ -901,6 +954,7 @@
 gst_gl_memory_copy_into_texture
 gst_gl_memory_setup_buffer
 gst_gl_memory_setup_wrapped
+gst_gl_texture_type_from_format
 gst_is_gl_memory
 <SUBSECTION Standard>
 GST_GL_ALLOCATOR
@@ -914,6 +968,21 @@
 </SECTION>
 
 <SECTION>
+<FILE>gsteglimagememory</FILE>
+<TITLE>GstEGLImageMemory</TITLE>
+gst_egl_image_memory_init
+gst_egl_image_memory_get_display
+gst_egl_image_memory_get_image
+gst_egl_image_memory_get_orientation
+gst_egl_image_memory_set_orientation
+gst_egl_image_memory_setup_buffer
+gst_is_egl_image_memory
+GST_EGL_IMAGE_MEMORY_TYPE
+GST_CAPS_FEATURE_MEMORY_EGL_IMAGE
+<SUBSECTION Standard>
+</SECTION>
+
+<SECTION>
 <FILE>gstglmixer</FILE>
 GstGLMixerPad
 GstGLMixerPadClass
@@ -927,6 +996,7 @@
 GstGLMixerProcessTextures
 GstGLMixerFrameData
 gst_gl_mixer_process_textures
+gst_gl_mixer_set_pad_type
 <SUBSECTION Standard>
 GstGLMixerPrivate
 GST_GL_MIXER
@@ -964,6 +1034,10 @@
 gst_gl_shader_is_compiled
 gst_gl_shader_compile
 gst_gl_shader_compile_and_check
+gst_gl_shader_compile_all_with_attribs_and_check
+gst_gl_shader_compile_with_default_f_and_check
+gst_gl_shader_compile_with_default_v_and_check
+gst_gl_shader_compile_with_default_vf_and_check
 gst_gl_shader_release
 gst_gl_shader_use
 gst_gl_shader_set_uniform_1i
@@ -1011,9 +1085,7 @@
 gst_gl_upload_new
 gst_gl_upload_set_format
 gst_gl_upload_get_format
-gst_gl_upload_add_video_gl_texture_upload_meta
 gst_gl_upload_perform_with_data
-gst_gl_upload_perform_with_memory
 gst_gl_upload_perform_with_gl_texture_upload_meta
 gst_gl_upload_perform_with_buffer
 gst_gl_upload_release_buffer
@@ -1030,6 +1102,26 @@
 </SECTION>
 
 <SECTION>
+<FILE>gstgluploadmeta</FILE>
+<TITLE>GstGLUploadMeta</TITLE>
+GstGLUploadMeta
+gst_gl_upload_meta_new
+gst_gl_upload_meta_set_format
+gst_gl_upload_meta_get_format
+gst_gl_upload_meta_add_to_buffer
+<SUBSECTION Standard>
+GST_GL_UPLOAD_META
+GST_GL_UPLOAD_META_CAST
+GST_GL_UPLOAD_META_CLASS
+GST_GL_UPLOAD_META_GET_CLASS
+gst_gl_upload_meta_get_type
+GST_IS_GL_UPLOAD_META
+GST_IS_GL_UPLOAD_META_CLASS
+GST_TYPE_GL_UPLOAD_META
+GstGLUploadMetaPrivate
+</SECTION>
+
+<SECTION>
 <FILE>gstglutils</FILE>
 <TITLE>Utilities</TITLE>
 GLCB
@@ -1052,6 +1144,7 @@
 gst_gl_context_set_error
 gst_gl_context_get_error
 gst_gl_context_clear_shader
+gst_gl_generate_texture_full
 </SECTION>
 
 <SECTION>
@@ -1197,3 +1290,69 @@
 GstGLWindowX11Private
 x11_event_source_new
 </SECTION>
+
+<SECTION>
+<FILE>gstaggregator</FILE>
+<TITLE>GstAggregator</TITLE>
+GstAggregator
+GstAggregatorClass
+gst_aggregator_finish_buffer
+gst_aggregator_set_src_caps
+gst_aggregator_iterate_sinkpads
+<SUBSECTION Standard>
+GST_IS_AGGREGATOR
+GST_IS_AGGREGATOR_CLASS
+GST_TYPE_AGGREGATOR
+GST_AGGREGATOR
+GST_AGGREGATOR_CLASS
+GST_AGGREGATOR_GET_CLASS
+gst_aggregator_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gstaggregatorpad</FILE>
+<TITLE>GstAggregatorPad</TITLE>
+GstAggregatorPad
+GstAggregatorPadClass
+gst_aggregator_pad_steal_buffer
+gst_aggregator_pad_get_buffer
+<SUBSECTION Standard>
+GST_IS_AGGREGATOR_PAD
+GST_IS_AGGREGATOR_PAD_CLASS
+GST_TYPE_AGGREGATOR_PAD
+GST_AGGREGATOR_PAD
+GST_AGGREGATOR_PAD_CLASS
+GST_AGGREGATOR_PAD_GET_CLASS
+gst_aggregator_pad_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gstvideoaggregator</FILE>
+<TITLE>GstVideoAggregator</TITLE>
+GstVideoAggregator
+GstVideoAggregatorClass
+<SUBSECTION Standard>
+GST_IS_VIDEO_AGGREGATOR
+GST_IS_VIDEO_AGGREGATOR_CLASS
+GST_TYPE_VIDEO_AGGREGATOR
+GST_VIDEO_AGGREGATOR
+GST_VIDEO_AGGREGATOR_CLASS
+GST_VIDEO_AGGREGATOR_GET_CLASS
+gst_videoaggregator_get_type
+GstVideoAggregatorPrivate
+</SECTION>
+
+<SECTION>
+<FILE>gstvideoaggregatorpad</FILE>
+<TITLE>GstVideoAggregatorPad</TITLE>
+GstVideoAggregatorPad
+GstVideoAggregatorPadClass
+<SUBSECTION Standard>
+GST_IS_VIDEO_AGGREGATOR_PAD
+GST_IS_VIDEO_AGGREGATOR_PADCLASS
+GST_TYPE_VIDEO_AGGREGATOR_PAD
+GST_VIDEO_AGGREGATOR_PAD
+GST_VIDEO_AGGREGATOR_PAD_CLASS
+GST_VIDEO_AGGREGATOR_PAD_GET_CLASS
+gst_videoaggregator_pad_get_type
+</SECTION>
diff --git a/docs/libs/html/GstAggregator.html b/docs/libs/html/GstAggregator.html
new file mode 100644
index 0000000..b1830b4
--- /dev/null
+++ b/docs/libs/html/GstAggregator.html
@@ -0,0 +1,417 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstAggregator</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
+<link rel="prev" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
+<link rel="next" href="GstAggregatorPad.html" title="GstAggregatorPad">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#GstAggregator.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#GstAggregator.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="base.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="GstAggregatorPad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="GstAggregator"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="GstAggregator.top_of_page"></a>GstAggregator</span></h2>
+<p>GstAggregator — manages a set of pads with the purpose of
+aggregating their buffers.</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="GstAggregator.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_return">
+<col class="functions_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstAggregator.html#gst-aggregator-finish-buffer" title="gst_aggregator_finish_buffer ()">gst_aggregator_finish_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstAggregator.html#gst-aggregator-set-src-caps" title="gst_aggregator_set_src_caps ()">gst_aggregator_set_src_caps</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstAggregator.html#gst-aggregator-iterate-sinkpads" title="gst_aggregator_iterate_sinkpads ()">gst_aggregator_iterate_sinkpads</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstAggregator.html#GstAggregator-struct" title="struct GstAggregator">GstAggregator</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstAggregator.html#GstAggregatorClass" title="struct GstAggregatorClass">GstAggregatorClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+        <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+            <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
+                <span class="lineart">╰──</span> GstAggregator
+                    <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregator.html" title="GstVideoAggregator">GstVideoAggregator</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.description"></a><h2>Description</h2>
+<p>Manages a set of pads with the purpose of aggregating their buffers.
+Control is given to the subclass when all pads have data.</p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+   Base class for mixers and muxers. Implementers should at least implement
+   the <code class="function">aggregate()</code> vmethod.
+ </p></li>
+<li class="listitem"><p>
+   When data is queued on all pads, tha aggregate vmethod is called.
+ </p></li>
+<li class="listitem"><p>
+   One can peek at the data on any given GstAggregatorPad with the
+   <a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-get-buffer" title="gst_aggregator_pad_get_buffer ()"><code class="function">gst_aggregator_pad_get_buffer()</code></a> method, and take ownership of it
+   with the <a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-steal-buffer" title="gst_aggregator_pad_steal_buffer ()"><code class="function">gst_aggregator_pad_steal_buffer()</code></a> method. When a buffer
+   has been taken with <code class="function">steal_buffer()</code>, a new buffer can be queued
+   on that pad.
+ </p></li>
+<li class="listitem"><p>
+   If the subclass wishes to push a buffer downstream in its aggregate
+   implementation, it should do so through the
+   <a class="link" href="GstAggregator.html#gst-aggregator-finish-buffer" title="gst_aggregator_finish_buffer ()"><code class="function">gst_aggregator_finish_buffer()</code></a> method. This method will take care
+   of sending and ordering mandatory events such as stream start, caps
+   and segment.
+ </p></li>
+<li class="listitem"><p>
+   Same goes for EOS events, which should not be pushed directly by the
+   subclass, it should instead return GST_FLOW_EOS in its aggregate
+   implementation.
+ </p></li>
+</ul></div>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-aggregator-finish-buffer"></a><h3>gst_aggregator_finish_buffer ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
+gst_aggregator_finish_buffer (<em class="parameter"><code><a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a> *agg</code></em>,
+                              <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
+<p>This method will take care of sending mandatory events before pushing
+the provided buffer.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.7.2.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>self</p></td>
+<td class="parameter_description"><p>The <a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>buffer</p></td>
+<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> to push.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-aggregator-set-src-caps"></a><h3>gst_aggregator_set_src_caps ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_aggregator_set_src_caps (<em class="parameter"><code><a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a> *agg</code></em>,
+                             <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
+<p>Sets the caps to be used on the src pad.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.7.3.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>self</p></td>
+<td class="parameter_description"><p>The <a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>caps</p></td>
+<td class="parameter_description"><p>The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to set later on the src pad.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-aggregator-iterate-sinkpads"></a><h3>gst_aggregator_iterate_sinkpads ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_aggregator_iterate_sinkpads (<em class="parameter"><code><a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a> *self</code></em>,
+                                 <em class="parameter"><code><span class="type">GstAggregatorPadForeachFunc</span> func</code></em>,
+                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
+<p>Iterate the sinkpads of aggregator to call a function on them.</p>
+<p>This method guarantees that <em class="parameter"><code>func</code></em>
+ will be called only once for each
+sink pad.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.7.4.6"></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>self</p></td>
+<td class="parameter_description"><p>The <a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>func</p></td>
+<td class="parameter_description"><p>The function to call.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>The data to pass to <em class="parameter"><code>func</code></em>
+.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstAggregator-struct"></a><h3>struct GstAggregator</h3>
+<pre class="programlisting">struct GstAggregator;</pre>
+<p>Collectpads object.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.8.2.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAggregatorClass"></a><h3>struct GstAggregatorClass</h3>
+<pre class="programlisting">struct GstAggregatorClass {
+  GstElementClass   parent_class;
+
+  GType             sinkpads_type;
+
+  GstFlowReturn     (*flush)          (GstAggregator    *  aggregator);
+
+  GstFlowReturn     (*clip)           (GstAggregator    *  agg,
+                                       GstAggregatorPad *  bpad,
+                                       GstBuffer        *  buf,
+                                       GstBuffer        ** outbuf);
+
+  /* sinkpads virtual methods */
+  gboolean          (*sink_event)     (GstAggregator    *  aggregate,
+                                       GstAggregatorPad *  bpad,
+                                       GstEvent         *  event);
+
+  gboolean          (*sink_query)     (GstAggregator    *  aggregate,
+                                       GstAggregatorPad *  bpad,
+                                       GstQuery         *  query);
+
+  /* srcpad virtual methods */
+  gboolean          (*src_event)      (GstAggregator    *  aggregate,
+                                       GstEvent         *  event);
+
+  gboolean          (*src_query)      (GstAggregator    *  aggregate,
+                                       GstQuery         *  query);
+
+  gboolean          (*src_activate)   (GstAggregator    *  aggregator,
+                                       GstPadMode          mode,
+                                       gboolean            active);
+
+  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator);
+
+  gboolean          (*stop)           (GstAggregator    *  aggregator);
+
+  gboolean          (*start)          (GstAggregator    *  aggregator);
+};
+</pre>
+<p>The aggregator base class will handle in a thread-safe way all manners of
+concurrent flushes, seeks, pad additions and removals, leaving to the
+subclass the responsibility of clipping buffers, and aggregating buffers in
+the way the implementor sees fit.</p>
+<p>It will also take care of event ordering (stream-start, segment, eos).</p>
+<p>Basically, a basic implementation will override <em class="parameter"><code>aggregate</code></em>
+, and call
+_finish_buffer from inside that function.</p>
+<div class="refsect3">
+<a name="id-1.2.7.2.8.3.7"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElementClass"><span class="type">GstElementClass</span></a> <em class="structfield"><code><a name="GstAggregatorClass.parent-class"></a>parent_class</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GstAggregatorClass.sinkpads-type"></a>sinkpads_type</code></em>;</p></td>
+<td class="struct_member_description"><p>Optional.
+The type of the pads that should be created when
+GstElement.request_new_pad is called.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.flush"></a>flush</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called after a succesful flushing seek, once all the flush
+stops have been received. Flush pad-specific data in
+<a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad"><span class="type">GstAggregatorPad</span></a>-&gt;flush.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.clip"></a>clip</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when a buffer is received on a sink pad, the task
+of clipping it and translating it to the current segment
+falls on the subclass.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.sink-event"></a>sink_event</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when an event is received on a sink pad, the subclass
+should always chain up.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.sink-query"></a>sink_query</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when a query is received on a sink pad, the subclass
+should always chain up.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-event"></a>src_event</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when an event is received on the src pad, the subclass
+should always chain up.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-query"></a>src_query</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when a query is received on the src pad, the subclass
+should always chain up.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-activate"></a>src_activate</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Called when the src pad is activated, it will start/stop its
+pad task right after that call.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.aggregate"></a>aggregate</code></em> ()</p></td>
+<td class="struct_member_description"><p>Mandatory.
+Called when buffers are queued on all sinkpads. Classes
+should iterate the GstElement-&gt;sinkpads and peek or steal
+buffers from the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/GstAggregatorPad.html"><span class="type">GstAggregatorPads</span></a>. If the subclass returns
+GST_FLOW_EOS, sending of the eos event will be taken care
+of. Once / if a buffer has been constructed from the
+aggregated buffers, the subclass should call _finish_buffer.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.stop"></a>stop</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Should be linked up first. Called when the
+element goes from PAUSED to READY. The subclass should free
+all resources and reset its state.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.start"></a>start</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Should be linked up first. Called when the element goes from
+READY to PAUSED. The subclass should get ready to process
+aggregated buffers.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="GstAggregator.see-also"></a><h2>See Also</h2>
+<p>gstcollectpads for historical reasons.</p>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/GstAggregatorPad.html b/docs/libs/html/GstAggregatorPad.html
new file mode 100644
index 0000000..f83a8ef
--- /dev/null
+++ b/docs/libs/html/GstAggregatorPad.html
@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstAggregatorPad</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
+<link rel="prev" href="GstAggregator.html" title="GstAggregator">
+<link rel="next" href="video.html" title="Video helpers and baseclasses">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#GstAggregatorPad.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#GstAggregatorPad.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstAggregator.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="video.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="GstAggregatorPad"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="GstAggregatorPad.top_of_page"></a>GstAggregatorPad</span></h2>
+<p>GstAggregatorPad</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="GstAggregatorPad.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_return">
+<col class="functions_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-steal-buffer" title="gst_aggregator_pad_steal_buffer ()">gst_aggregator_pad_steal_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-get-buffer" title="gst_aggregator_pad_get_buffer ()">gst_aggregator_pad_get_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstAggregatorPad.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstAggregatorPad.html#GstAggregatorPad-struct" title="struct GstAggregatorPad">GstAggregatorPad</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstAggregatorPad.html#GstAggregatorPadClass" title="struct GstAggregatorPadClass">GstAggregatorPadClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstAggregatorPad.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+        <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+            <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html">GstPad</a>
+                <span class="lineart">╰──</span> GstAggregatorPad
+                    <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">GstVideoAggregatorPad</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstAggregatorPad.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="GstAggregatorPad.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-aggregator-pad-steal-buffer"></a><h3>gst_aggregator_pad_steal_buffer ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
+gst_aggregator_pad_steal_buffer (<em class="parameter"><code><a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad"><span class="type">GstAggregatorPad</span></a> *pad</code></em>);</pre>
+<p>Steal the ref to the buffer currently queued in <em class="parameter"><code>pad</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.7.3.7.2.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>pad</p></td>
+<td class="parameter_description"><p>the pad to get buffer from</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.7.3.7.2.6"></a><h4>Returns</h4>
+<p> The buffer in <em class="parameter"><code>pad</code></em>
+or NULL if no buffer was
+queued. You should unref the buffer after usage. </p>
+<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-aggregator-pad-get-buffer"></a><h3>gst_aggregator_pad_get_buffer ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
+gst_aggregator_pad_get_buffer (<em class="parameter"><code><a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad"><span class="type">GstAggregatorPad</span></a> *pad</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.7.3.7.3.4"></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>pad</p></td>
+<td class="parameter_description"><p>the pad to get buffer from</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.7.3.7.3.5"></a><h4>Returns</h4>
+<p> A reference to the buffer in <em class="parameter"><code>pad</code></em>
+or
+NULL if no buffer was queued. You should unref the buffer after
+usage. </p>
+<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="GstAggregatorPad.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstAggregatorPad-struct"></a><h3>struct GstAggregatorPad</h3>
+<pre class="programlisting">struct GstAggregatorPad;</pre>
+<p>The implementation the GstPad to use with <a class="link" href="GstAggregator.html" title="GstAggregator"><span class="type">GstAggregator</span></a></p>
+<div class="refsect3">
+<a name="id-1.2.7.3.8.2.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstAggregatorPadClass"></a><h3>struct GstAggregatorPadClass</h3>
+<pre class="programlisting">struct GstAggregatorPadClass {
+  GstPadClass   parent_class;
+
+  GstFlowReturn (*flush)     (GstAggregatorPad * aggpad, GstAggregator * aggregator);
+};
+</pre>
+<div class="refsect3">
+<a name="id-1.2.7.3.8.3.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><span class="type">GstPadClass</span> <em class="structfield"><code><a name="GstAggregatorPadClass.parent-class"></a>parent_class</code></em>;</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorPadClass.flush"></a>flush</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional
+Called when the pad has received a flush stop, this is the place
+to flush any information specific to the pad, it allows for individual
+pads to be flushed while others might not be.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/GstGLBufferPool.html b/docs/libs/html/GstGLBufferPool.html
index 96a3432..38b9d98 100644
--- a/docs/libs/html/GstGLBufferPool.html
+++ b/docs/libs/html/GstGLBufferPool.html
@@ -91,7 +91,7 @@
 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBufferPool.html"><span class="returnvalue">GstBufferPool</span></a> *
 gst_gl_buffer_pool_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.3.7.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.3.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -106,7 +106,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.3.7.2.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.3.7.2.5"></a><h4>Returns</h4>
 <p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBufferPool.html"><span class="type">GstBufferPool</span></a> that allocates buffers with <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
 <p></p>
 </div>
diff --git a/docs/libs/html/GstGLColorConvert.html b/docs/libs/html/GstGLColorConvert.html
index c5f8571..bec61c5 100644
--- a/docs/libs/html/GstGLColorConvert.html
+++ b/docs/libs/html/GstGLColorConvert.html
@@ -50,7 +50,15 @@
 </tr>
 <tr>
 <td class="function_type">
-<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-set-format" title="gst_gl_color_convert_set_format ()">gst_gl_color_convert_set_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
 </td>
 <td class="function_name">
 <a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-perform" title="gst_gl_color_convert_perform ()">gst_gl_color_convert_perform</a> <span class="c_punctuation">()</span>
@@ -100,7 +108,7 @@
 formats using OpenGL Shaders.</p>
 <p>A <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a> can be created with <a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-new" title="gst_gl_color_convert_new ()"><code class="function">gst_gl_color_convert_new()</code></a>.</p>
 <p>For handling stride scaling in the shader, see
-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/GstGLColorConvert.html#gst-gl-color-convert-set-texture-scaling"><code class="function">gst_gl_color_convert_set_texture_scaling()</code></a>.</p>
+<code class="function">gst_gl_color_convert_set_texture_scaling()</code>.</p>
 </div>
 <div class="refsect1">
 <a name="GstGLColorConvert.functions_details"></a><h2>Functions</h2>
@@ -111,16 +119,15 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-color-convert-perform"></a><h3>gst_gl_color_convert_perform ()</h3>
-<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_color_convert_perform (<em class="parameter"><code><a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a> *convert</code></em>,
-                              <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a> *in_tex[GST_VIDEO_MAX_PLANES]</code></em>,
-                              <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a> *out_tex[GST_VIDEO_MAX_PLANES]</code></em>);</pre>
-<p>Converts the data contained in in_tex into out_tex using the formats
-specified by the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a>s passed to
-<code class="function">gst_gl_color_convert_set_format()</code></p>
+<a name="gst-gl-color-convert-set-format"></a><h3>gst_gl_color_convert_set_format ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_color_convert_set_format (<em class="parameter"><code><a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a> *convert</code></em>,
+                                 <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *in_info</code></em>,
+                                 <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *out_info</code></em>);</pre>
+<p>Initializes <em class="parameter"><code>convert</code></em>
+ with the information required for conversion.</p>
 <div class="refsect3">
-<a name="id-1.2.7.4.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.4.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -134,21 +141,53 @@
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>in_tex</p></td>
-<td class="parameter_description"><p>the texture ids for input formatted according to in_info</p></td>
+<td class="parameter_name"><p>in_info</p></td>
+<td class="parameter_description"><p>input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a></p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 <tr>
-<td class="parameter_name"><p>out_tex</p></td>
-<td class="parameter_description"><p>the texture ids for output formatted according to out_info</p></td>
+<td class="parameter_name"><p>out_info</p></td>
+<td class="parameter_description"><p>output <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-color-convert-perform"></a><h3>gst_gl_color_convert_perform ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a> *
+gst_gl_color_convert_perform (<em class="parameter"><code><a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a> *convert</code></em>,
+                              <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *inbuf</code></em>);</pre>
+<p>Converts the data contained by <em class="parameter"><code>inbuf</code></em>
+ using the formats specified by the
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a>s passed to <a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-set-format" title="gst_gl_color_convert_set_format ()"><code class="function">gst_gl_color_convert_set_format()</code></a></p>
+<div class="refsect3">
+<a name="id-1.2.9.4.7.4.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>convert</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert"><span class="type">GstGLColorConvert</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>inbuf</p></td>
+<td class="parameter_description"><p>the texture ids for input formatted according to in_info</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.4.7.3.6"></a><h4>Returns</h4>
-<p> whether the conversion was successful</p>
+<a name="id-1.2.9.4.7.4.6"></a><h4>Returns</h4>
+<p> a converted <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>%</p>
 <p></p>
 </div>
 </div>
diff --git a/docs/libs/html/GstGLContext.html b/docs/libs/html/GstGLContext.html
index 88c438c..7f373c0 100644
--- a/docs/libs/html/GstGLContext.html
+++ b/docs/libs/html/GstGLContext.html
@@ -70,6 +70,14 @@
 </tr>
 <tr>
 <td class="function_type">
+<a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-new-wrapped" title="gst_gl_context_new_wrapped ()">gst_gl_context_new_wrapped</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -150,12 +158,36 @@
 </tr>
 <tr>
 <td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="returnvalue">GstGLPlatform</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-platform" title="gst_gl_context_get_gl_platform ()">gst_gl_context_get_gl_platform</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
 <a class="link" href="GstGLContext.html#gst-gl-context-check-feature" title="gst_gl_context_check_feature ()">gst_gl_context_check_feature</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-check-gl-version" title="gst_gl_context_check_gl_version ()">gst_gl_context_check_gl_version</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-version" title="gst_gl_context_get_gl_version ()">gst_gl_context_get_gl_version</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -215,7 +247,7 @@
  and <em class="parameter"><code>data</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -245,7 +277,7 @@
 <p>Create a new <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> with the specified <em class="parameter"><code>display</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -260,13 +292,63 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.5.6"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p>
 <p></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-context-new-wrapped"></a><h3>gst_gl_context_new_wrapped ()</h3>
+<pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
+gst_gl_context_new_wrapped (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>,
+                            <em class="parameter"><code><span class="type">guintptr</span> handle</code></em>,
+                            <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> context_type</code></em>,
+                            <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> available_apis</code></em>);</pre>
+<p>Wraps an existing OpenGL context into a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>.</p>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.6.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>display</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>handle</p></td>
+<td class="parameter_description"><p>the OpenGL context to wrap</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>context_type</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> specifying the type of context in <em class="parameter"><code>handle</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>available_apis</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> containing the available OpenGL apis in <em class="parameter"><code>handle</code></em>
+</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.6.6"></a><h4>Returns</h4>
+<p> a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> wrapping <em class="parameter"><code>handle</code></em>
+</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-gl-context-create"></a><h3>gst_gl_context_create ()</h3>
 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_context_create (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
@@ -281,7 +363,7 @@
 of the error and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.</p>
 <p>Should only be called once.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.6.7"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.7.7"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -308,7 +390,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.6.8"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.7.8"></a><h4>Returns</h4>
 <p> whether the context could successfully be created</p>
 <p></p>
 </div>
@@ -324,7 +406,7 @@
 <p>In OpenGL terms, calls eglMakeCurrent or similar with this context and the
 currently set window.  See <a class="link" href="GstGLContext.html#gst-gl-context-set-window" title="gst_gl_context_set_window ()"><code class="function">gst_gl_context_set_window()</code></a> for details.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.7.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.8.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -346,7 +428,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.7.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.8.7"></a><h4>Returns</h4>
 <p> Whether the activation succeeded</p>
 <p></p>
 </div>
@@ -371,7 +453,7 @@
 <p>Platform specfic functions (names starting 'egl', 'glX', 'wgl', etc) can also
 be retreived using this method.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.9.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.10.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -393,7 +475,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.9.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.10.7"></a><h4>Returns</h4>
 <p> a function pointer or NULL</p>
 <p></p>
 </div>
@@ -404,7 +486,7 @@
 <pre class="programlisting"><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="returnvalue">GstGLWindow</span></a> *
 gst_gl_context_get_window (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.10.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.11.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -419,7 +501,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.10.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.11.5"></a><h4>Returns</h4>
 <p> the currently set window</p>
 <p></p>
 </div>
@@ -437,7 +519,7 @@
  is not
 already running.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.12.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -459,7 +541,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.11.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.12.6"></a><h4>Returns</h4>
 <p> Whether the window was successfully updated</p>
 <p></p>
 </div>
@@ -477,7 +559,7 @@
 </p>
 <p>MT-safe</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.12.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.13.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -511,7 +593,7 @@
 <pre class="programlisting"><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="returnvalue">GstGLDisplay</span></a> *
 gst_gl_context_get_display (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.13.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.14.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -526,7 +608,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.13.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.14.5"></a><h4>Returns</h4>
 <p> the <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> associated with this <em class="parameter"><code>context</code></em>
 </p>
 <p></p>
@@ -541,7 +623,7 @@
 <p>The currently available API may be limited by the <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> in use and/or
 the <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> chosen.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.14.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.15.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -556,7 +638,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.14.7"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.15.7"></a><h4>Returns</h4>
 <p> the currently available OpenGL api</p>
 <p></p>
 </div>
@@ -569,7 +651,7 @@
 <p>Gets the backing OpenGL context used by <em class="parameter"><code>context</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.15.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.16.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -584,7 +666,35 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.15.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.16.6"></a><h4>Returns</h4>
+<p> The platform specific backing OpenGL context</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-get-gl-platform"></a><h3>gst_gl_context_get_gl_platform ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="returnvalue">GstGLPlatform</span></a>
+gst_gl_context_get_gl_platform (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
+<p>Gets the OpenGL platform that used by <em class="parameter"><code>context</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.17.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>context</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a>:</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.17.6"></a><h4>Returns</h4>
 <p> The platform specific backing OpenGL context</p>
 <p></p>
 </div>
@@ -598,7 +708,7 @@
 <p>Some features require that the context be created before it is possible to
 determine their existence and so will fail if that is not the case.</p>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.16.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.5.7.18.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -620,20 +730,111 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.5.7.16.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.5.7.18.6"></a><h4>Returns</h4>
 <p> Whether <em class="parameter"><code>feature</code></em>
 is supported by <em class="parameter"><code>context</code></em>
 </p>
 <p></p>
 </div>
 </div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-check-gl-version"></a><h3>gst_gl_context_check_gl_version ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_context_check_gl_version (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
+                                 <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> api</code></em>,
+                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> maj</code></em>,
+                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> min</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.19.4"></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>context</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>api</p></td>
+<td class="parameter_description"><p>api type required</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>maj</p></td>
+<td class="parameter_description"><p>major version required</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>min</p></td>
+<td class="parameter_description"><p>minor version required</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.19.5"></a><h4>Returns</h4>
+<p> whether OpenGL context implements the required api and specified
+version.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-context-get-gl-version"></a><h3>gst_gl_context_get_gl_version ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_context_get_gl_version (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
+                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *maj</code></em>,
+                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *min</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.20.4"></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>context</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>maj</p></td>
+<td class="parameter_description"><p> resulting major version. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>min</p></td>
+<td class="parameter_description"><p> resulting minor version. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.5.7.20.5"></a><h4>Returns</h4>
+<p>the OpenGL version implemented by <em class="parameter"><code>context</code></em>
+.  See
+<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-api" title="gst_gl_context_get_gl_api ()"><code class="function">gst_gl_context_get_gl_api()</code></a> for retreiving the OpenGL api implemented by
+<em class="parameter"><code>context</code></em>
+.</p>
+<p></p>
+</div>
+</div>
 </div>
 <div class="refsect1">
 <a name="GstGLContext.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstGLContextError"></a><h3>enum GstGLContextError</h3>
 <div class="refsect3">
-<a name="id-1.2.7.5.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.5.8.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
diff --git a/docs/libs/html/GstGLDisplay.html b/docs/libs/html/GstGLDisplay.html
index 54d16c3..2c2c618 100644
--- a/docs/libs/html/GstGLDisplay.html
+++ b/docs/libs/html/GstGLDisplay.html
@@ -84,6 +84,10 @@
 </colgroup>
 <tbody>
 <tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="GstGLDisplay.html#GST-GL-DISPLAY-CONTEXT-TYPE:CAPS" title="GST_GL_DISPLAY_CONTEXT_TYPE">GST_GL_DISPLAY_CONTEXT_TYPE</a></td>
+</tr>
+<tr>
 <td class="datatype_keyword">enum</td>
 <td class="function_name"><a class="link" href="GstGLDisplay.html#GstGLDisplayType" title="enum GstGLDisplayType">GstGLDisplayType</a></td>
 </tr>
@@ -115,7 +119,7 @@
 <pre class="programlisting"><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="returnvalue">GstGLDisplay</span></a> *
 gst_gl_display_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.2.4"></a><h4>Returns</h4>
+<a name="id-1.2.9.10.7.2.4"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a>. </p>
 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
 </div>
@@ -126,7 +130,7 @@
 <pre class="programlisting"><a class="link" href="GstGLDisplay.html#GstGLDisplayType" title="enum GstGLDisplayType"><span class="returnvalue">GstGLDisplayType</span></a>
 gst_gl_display_get_handle_type (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.3.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.10.7.3.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -141,7 +145,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.3.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.10.7.3.5"></a><h4>Returns</h4>
 <p> the <a class="link" href="GstGLDisplay.html#GstGLDisplayType" title="enum GstGLDisplayType"><span class="type">GstGLDisplayType</span></a> of <em class="parameter"><code>display</code></em>
 </p>
 <p></p>
@@ -154,7 +158,7 @@
 gst_context_get_gl_display (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstContext.html"><span class="type">GstContext</span></a> *context</code></em>,
                             <em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> **display</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.4.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.10.7.4.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -176,7 +180,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.4.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.10.7.4.5"></a><h4>Returns</h4>
 <p> Whether <em class="parameter"><code>display</code></em>
 was in <em class="parameter"><code>context</code></em>
 </p>
@@ -193,7 +197,7 @@
  on <em class="parameter"><code>context</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.10.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.10.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -219,9 +223,15 @@
 <div class="refsect1">
 <a name="GstGLDisplay.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
+<a name="GST-GL-DISPLAY-CONTEXT-TYPE:CAPS"></a><h3>GST_GL_DISPLAY_CONTEXT_TYPE</h3>
+<pre class="programlisting">#define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="GstGLDisplayType"></a><h3>enum GstGLDisplayType</h3>
 <div class="refsect3">
-<a name="id-1.2.7.10.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.10.8.3.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
diff --git a/docs/libs/html/GstGLDownload.html b/docs/libs/html/GstGLDownload.html
index 14c2d99..40e06cf 100644
--- a/docs/libs/html/GstGLDownload.html
+++ b/docs/libs/html/GstGLDownload.html
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gl.html" title="OpenGL Helper Library">
 <link rel="prev" href="GstGLDisplay.html" title="GstGLDisplay">
-<link rel="next" href="GstGLFilter.html" title="GstGLFilter">
+<link rel="next" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
@@ -21,7 +21,7 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="GstGLDisplay.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="GstGLFilter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstEGLImageMemory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
 <a name="GstGLDownload"></a><div class="titlepage"></div>
@@ -100,7 +100,7 @@
 <pre class="programlisting"><a class="link" href="GstGLDownload.html" title="GstGLDownload"><span class="returnvalue">GstGLDownload</span></a> *
 gst_gl_download_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.11.7.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -115,7 +115,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.11.7.2.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.11.7.2.5"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLDownload.html" title="GstGLDownload"><span class="type">GstGLDownload</span></a> object</p>
 <p></p>
 </div>
@@ -129,7 +129,7 @@
 <p>Initializes <em class="parameter"><code>download</code></em>
  with the information required for download.</p>
 <div class="refsect3">
-<a name="id-1.2.7.11.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -174,7 +174,7 @@
  size and format is specified by
 the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoFormat"><span class="type">GstVideoFormat</span></a> passed to <a class="link" href="GstGLDownload.html#gst-gl-download-set-format" title="gst_gl_download_set_format ()"><code class="function">gst_gl_download_set_format()</code></a></p>
 <div class="refsect3">
-<a name="id-1.2.7.11.7.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.11.7.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -201,7 +201,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.11.7.4.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.11.7.4.6"></a><h4>Returns</h4>
 <p> whether the download was successful</p>
 <p></p>
 </div>
diff --git a/docs/libs/html/GstGLFilter.html b/docs/libs/html/GstGLFilter.html
index d51fc36..3cbc966 100644
--- a/docs/libs/html/GstGLFilter.html
+++ b/docs/libs/html/GstGLFilter.html
@@ -6,8 +6,8 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gl.html" title="OpenGL Helper Library">
-<link rel="prev" href="GstGLDownload.html" title="GstGLDownload">
-<link rel="next" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">
+<link rel="prev" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">
+<link rel="next" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
@@ -21,8 +21,8 @@
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="GstGLDownload.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-libs-gstglmemory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstEGLImageMemory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLFramebuffer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
 <a name="GstGLFilter"></a><div class="titlepage"></div>
@@ -138,7 +138,7 @@
  and <em class="parameter"><code>height</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.12.8.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.13.8.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -190,7 +190,7 @@
  is the input texture of <em class="parameter"><code>filter</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.12.8.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.13.8.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -257,7 +257,7 @@
 .</p>
 <p>See also: <a class="link" href="GstGLFilter.html#gst-gl-filter-render-to-target" title="gst_gl_filter_render_to_target ()"><code class="function">gst_gl_filter_render_to_target()</code></a></p>
 <div class="refsect3">
-<a name="id-1.2.7.12.8.4.6"></a><h4>Parameters</h4>
+<a name="id-1.2.9.13.8.4.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -305,7 +305,7 @@
 <p>Perform automatic upload if needed, call filter_texture vfunc and then an
 automatic download if needed.</p>
 <div class="refsect3">
-<a name="id-1.2.7.12.8.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.13.8.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -332,7 +332,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.12.8.5.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.13.8.5.6"></a><h4>Returns</h4>
 <p> whether the transformation succeeded</p>
 <p></p>
 </div>
@@ -347,7 +347,7 @@
 from downstream and automatic upload/download for non-<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a>
 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a>s.</p>
 <div class="refsect3">
-<a name="id-1.2.7.12.9.2.5"></a><h4>Members</h4>
+<a name="id-1.2.9.13.9.2.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
@@ -379,7 +379,7 @@
 };
 </pre>
 <div class="refsect3">
-<a name="id-1.2.7.12.9.3.4"></a><h4>Members</h4>
+<a name="id-1.2.9.13.9.3.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
diff --git a/docs/libs/html/GstGLUpload.html b/docs/libs/html/GstGLUpload.html
index d23ec05..086a512 100644
--- a/docs/libs/html/GstGLUpload.html
+++ b/docs/libs/html/GstGLUpload.html
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gl.html" title="OpenGL Helper Library">
 <link rel="prev" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">
-<link rel="next" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">
+<link rel="next" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
@@ -21,7 +21,7 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-libs-gstglshader.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-libs-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-GstGLUploadMeta.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
 <a name="GstGLUpload"></a><div class="titlepage"></div>
@@ -69,14 +69,6 @@
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
-<a class="link" href="GstGLUpload.html#gst-gl-upload-add-video-gl-texture-upload-meta" title="gst_gl_upload_add_video_gl_texture_upload_meta ()">gst_gl_upload_add_video_gl_texture_upload_meta</a> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
-<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-</td>
-<td class="function_name">
 <a class="link" href="GstGLUpload.html#gst-gl-upload-perform-with-data" title="gst_gl_upload_perform_with_data ()">gst_gl_upload_perform_with_data</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
@@ -140,7 +132,7 @@
 <pre class="programlisting"><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="returnvalue">GstGLUpload</span></a> *
 gst_gl_upload_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.2.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.2.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -155,7 +147,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.2.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.18.7.2.5"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> object</p>
 <p></p>
 </div>
@@ -169,7 +161,7 @@
 <p>Initializes <em class="parameter"><code>upload</code></em>
  with the information required for upload.</p>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -197,7 +189,7 @@
 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="returnvalue">GstVideoInfo</span></a> *
 gst_gl_upload_get_format (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.4.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.4.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -212,62 +204,24 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.4.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.18.7.4.5"></a><h4>Returns</h4>
 <p> The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> set by <a class="link" href="GstGLUpload.html#gst-gl-upload-set-format" title="gst_gl_upload_set_format ()"><code class="function">gst_gl_upload_set_format()</code></a>. </p>
 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-gl-upload-add-video-gl-texture-upload-meta"></a><h3>gst_gl_upload_add_video_gl_texture_upload_meta ()</h3>
-<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
-gst_gl_upload_add_video_gl_texture_upload_meta
-                               (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
-                                <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
-<p>Adds a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a> on <em class="parameter"><code>buffer</code></em>
- using <em class="parameter"><code>upload</code></em>
-</p>
-<div class="refsect3">
-<a name="id-1.2.7.16.7.5.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>upload</p></td>
-<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>buffer</p></td>
-<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a></p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="refsect3">
-<a name="id-1.2.7.16.7.5.6"></a><h4>Returns</h4>
-<p> whether it was successful</p>
-<p></p>
-</div>
-</div>
-<hr>
-<div class="refsect2">
 <a name="gst-gl-upload-perform-with-data"></a><h3>gst_gl_upload_perform_with_data ()</h3>
 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_upload_perform_with_data (<em class="parameter"><code><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> *upload</code></em>,
-                                 <em class="parameter"><code><span class="type">GLuint</span> texture_id</code></em>,
+                                 <em class="parameter"><code><span class="type">GLuint</span> *texture_id</code></em>,
                                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data[GST_VIDEO_MAX_PLANES]</code></em>);</pre>
 <p>Uploads <em class="parameter"><code>data</code></em>
  into <em class="parameter"><code>texture_id</code></em>
 . data size and format is specified by
 the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a>s passed to <a class="link" href="GstGLUpload.html#gst-gl-upload-set-format" title="gst_gl_upload_set_format ()"><code class="function">gst_gl_upload_set_format()</code></a></p>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.6.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -282,8 +236,8 @@
 </tr>
 <tr>
 <td class="parameter_name"><p>texture_id</p></td>
-<td class="parameter_description"><p>the texture id to download</p></td>
-<td class="parameter_annotations"> </td>
+<td class="parameter_description"><p> the texture id to upload into. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
 </tr>
 <tr>
 <td class="parameter_name"><p>data</p></td>
@@ -294,7 +248,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.6.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.18.7.5.6"></a><h4>Returns</h4>
 <p> whether the upload was successful</p>
 <p></p>
 </div>
@@ -311,7 +265,7 @@
  into <em class="parameter"><code>texture_id</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.7.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.6.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -338,7 +292,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.7.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.18.7.6.6"></a><h4>Returns</h4>
 <p> whether the upload was successful</p>
 <p></p>
 </div>
@@ -356,7 +310,7 @@
  is valid
 until <a class="link" href="GstGLUpload.html#gst-gl-upload-release-buffer" title="gst_gl_upload_release_buffer ()"><code class="function">gst_gl_upload_release_buffer()</code></a> is called.</p>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.8.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.18.7.7.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -383,7 +337,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.16.7.8.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.18.7.7.6"></a><h4>Returns</h4>
 <p> whether the upload was successful</p>
 <p></p>
 </div>
diff --git a/docs/libs/html/GstGLWindow.html b/docs/libs/html/GstGLWindow.html
index b3485e6..7c6d10b 100644
--- a/docs/libs/html/GstGLWindow.html
+++ b/docs/libs/html/GstGLWindow.html
@@ -284,7 +284,7 @@
 <pre class="programlisting"><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="returnvalue">GstGLWindow</span></a> *
 gst_gl_window_new (<em class="parameter"><code><a class="link" href="GstGLDisplay.html" title="GstGLDisplay"><span class="type">GstGLDisplay</span></a> *display</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.8.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.8.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -299,7 +299,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.8.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.7.8.5"></a><h4>Returns</h4>
 <p> a new <a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> using <em class="parameter"><code>display</code></em>
 's connection. </p>
 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
@@ -314,7 +314,7 @@
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
 <p>Redraw the window contents.  Implementations should invoke the draw callback.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.9.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.9.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -350,7 +350,7 @@
                              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
 <p>Redraw the window contents.  Implementations should invoke the draw callback.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.10.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.10.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -384,7 +384,7 @@
 gst_gl_window_is_running (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <p>Whether the runloop is running</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.11.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -406,7 +406,7 @@
 gst_gl_window_quit (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <p>Quit the runloop's execution.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.12.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.12.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -428,7 +428,7 @@
 gst_gl_window_run (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <p>Start the execution of the runloop.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.13.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.13.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -449,7 +449,7 @@
 <pre class="programlisting"><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="returnvalue">GstGLContext</span></a> *
 gst_gl_window_get_context (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.14.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.14.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -464,7 +464,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.14.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.7.14.5"></a><h4>Returns</h4>
 <p> the <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> associated with this <em class="parameter"><code>window</code></em>
 . </p>
 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
@@ -476,7 +476,7 @@
 <pre class="programlisting"><span class="returnvalue">guintptr</span>
 gst_gl_window_get_display (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.15.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.15.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -491,7 +491,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.15.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.7.15.5"></a><h4>Returns</h4>
 <p> the windowing system display handle for this <em class="parameter"><code>window</code></em>
 </p>
 <p></p>
@@ -509,7 +509,7 @@
  is guarenteed to
 have executed when this function returns.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.16.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.16.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -550,7 +550,7 @@
  on the window thread.  The callback may not
 have been executed when this function returns.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.17.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.17.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -594,7 +594,7 @@
                                   <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_notify</code></em>);</pre>
 <p>Sets the callback called when the window is about to close.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.18.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.18.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -638,7 +638,7 @@
                                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_notify</code></em>);</pre>
 <p>Sets the draw callback called everytime <a class="link" href="GstGLWindow.html#gst-gl-window-draw" title="gst_gl_window_draw ()"><code class="function">gst_gl_window_draw()</code></a> is called</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.19.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.19.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -682,7 +682,7 @@
                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_notify</code></em>);</pre>
 <p>Sets the resize callback called everytime a resize of the window occurs.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.20.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.20.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -726,7 +726,7 @@
  should render into.  Some implementations
 require this to be called with a valid handle before drawing can commence.</p>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.21.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.21.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -754,7 +754,7 @@
 <pre class="programlisting"><span class="returnvalue">guintptr</span>
 gst_gl_window_get_window_handle (<em class="parameter"><code><a class="link" href="GstGLWindow.html" title="GstGLWindow"><span class="type">GstGLWindow</span></a> *window</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.22.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.21.7.22.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -769,7 +769,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.18.7.22.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.21.7.22.5"></a><h4>Returns</h4>
 <p> the window handle we are currently rendering into</p>
 <p></p>
 </div>
@@ -780,7 +780,7 @@
 <div class="refsect2">
 <a name="GstGLWindowError"></a><h3>enum GstGLWindowError</h3>
 <div class="refsect3">
-<a name="id-1.2.7.18.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.21.8.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -835,7 +835,7 @@
 } GstGLWindowClass;
 </pre>
 <div class="refsect3">
-<a name="id-1.2.7.18.8.4.4"></a><h4>Members</h4>
+<a name="id-1.2.9.21.8.4.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
diff --git a/docs/libs/html/GstVideoAggregator.html b/docs/libs/html/GstVideoAggregator.html
new file mode 100644
index 0000000..4e39186
--- /dev/null
+++ b/docs/libs/html/GstVideoAggregator.html
@@ -0,0 +1,185 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstVideoAggregator</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="video.html" title="Video helpers and baseclasses">
+<link rel="prev" href="video.html" title="Video helpers and baseclasses">
+<link rel="next" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#GstVideoAggregator.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#GstVideoAggregator.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 
+                  <a href="#GstVideoAggregator.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="video.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="GstVideoAggregatorPad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="GstVideoAggregator"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="GstVideoAggregator.top_of_page"></a>GstVideoAggregator</span></h2>
+<p>GstVideoAggregator — Base class for video aggregators</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="GstVideoAggregator.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstVideoAggregator.html#GstVideoAggregator-struct" title="struct GstVideoAggregator">GstVideoAggregator</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstVideoAggregator.html#GstVideoAggregatorClass" title="struct GstVideoAggregatorClass">GstVideoAggregatorClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregator.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+        <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+            <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
+                <span class="lineart">╰──</span> <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+                    <span class="lineart">╰──</span> GstVideoAggregator
+                        <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixer">GstGLMixer</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregator.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
+<p>
+GstVideoAggregator implements
+ <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstChildProxy.html">GstChildProxy</a>.</p>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregator.description"></a><h2>Description</h2>
+<p>VideoAggregator can accept AYUV, ARGB and BGRA video streams. For each of the requested
+sink pads it will compare the incoming geometry and framerate to define the
+output parameters. Indeed output video frames will have the geometry of the
+biggest incoming video stream and the framerate of the fastest incoming one.</p>
+<p>VideoAggregator will do colorspace conversion.</p>
+<p>Zorder for each input stream can be configured on the
+<a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad"><span class="type">GstVideoAggregatorPad</span></a>.</p>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregator.functions_details"></a><h2>Functions</h2>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregator.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstVideoAggregator-struct"></a><h3>struct GstVideoAggregator</h3>
+<pre class="programlisting">struct GstVideoAggregator {
+  /* Output caps */
+  GstVideoInfo info;
+};
+</pre>
+<div class="refsect3">
+<a name="id-1.2.8.2.8.2.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody><tr>
+<td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> <em class="structfield"><code><a name="GstVideoAggregator-struct.info"></a>info</code></em>;</p></td>
+<td class="struct_member_description"><p>The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> representing the currently set
+srcpad caps.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstVideoAggregatorClass"></a><h3>struct GstVideoAggregatorClass</h3>
+<pre class="programlisting">struct GstVideoAggregatorClass {
+  gboolean           disable_frame_conversion;
+
+  gboolean           (*update_info)               (GstVideoAggregator *  videoaggregator,
+                                                   GstVideoInfo       *  info);
+  GstFlowReturn      (*aggregate_frames)          (GstVideoAggregator *  videoaggregator,
+                                                   GstBuffer          *  outbuffer);
+  GstFlowReturn      (*get_output_buffer)         (GstVideoAggregator *  videoaggregator,
+                                                   GstBuffer          ** outbuffer);
+  gboolean           (*negotiated_caps)           (GstVideoAggregator *  videoaggregator,
+                                                   GstCaps            *  caps);
+};
+</pre>
+<div class="refsect3">
+<a name="id-1.2.8.2.8.3.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstVideoAggregatorClass.disable-frame-conversion"></a>disable_frame_conversion</code></em>;</p></td>
+<td class="struct_member_description"><p>Optional.
+Allows subclasses to disable the frame colorspace
+conversion feature</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.update-info"></a>update_info</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Lets subclasses update the src <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> representing
+the src pad caps before usage.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.aggregate-frames"></a>aggregate_frames</code></em> ()</p></td>
+<td class="struct_member_description"><p>Lets subclasses aggregate frames that are ready. Subclasses
+should iterate the GstElement.sinkpads and use the already
+mapped <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstBaseVideoCodec.html#GstVideoFrame"><span class="type">GstVideoFrame</span></a> from GstVideoAggregatorPad.aggregated_frame
+or directly use the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> from GstVideoAggregatorPad.buffer
+if it needs to map the buffer in a special way. The result of the
+aggregation should land in <em class="parameter"><code>outbuffer</code></em>
+.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.get-output-buffer"></a>get_output_buffer</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Lets subclasses provide a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> to be used as <em class="parameter"><code>outbuffer</code></em>
+of
+the <span class="type">aggregate_frames</span> vmethod.</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoAggregatorClass.negotiated-caps"></a>negotiated_caps</code></em> ()</p></td>
+<td class="struct_member_description"><p>Optional.
+Notifies subclasses what caps format has been negotiated</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/GstVideoAggregatorPad.html b/docs/libs/html/GstVideoAggregatorPad.html
new file mode 100644
index 0000000..acf1986
--- /dev/null
+++ b/docs/libs/html/GstVideoAggregatorPad.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstVideoAggregatorPad</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="video.html" title="Video helpers and baseclasses">
+<link rel="prev" href="GstVideoAggregator.html" title="GstVideoAggregator">
+<link rel="next" href="gl.html" title="OpenGL Helper Library">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#GstVideoAggregatorPad.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#GstVideoAggregatorPad.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstVideoAggregator.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gl.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="GstVideoAggregatorPad"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="GstVideoAggregatorPad.top_of_page"></a>GstVideoAggregatorPad</span></h2>
+<p>GstVideoAggregatorPad</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="GstVideoAggregatorPad.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstVideoAggregatorPad.html#GstVideoAggregatorPad-struct" title="struct GstVideoAggregatorPad">GstVideoAggregatorPad</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="GstVideoAggregatorPad.html#GstVideoAggregatorPadClass" title="struct GstVideoAggregatorPadClass">GstVideoAggregatorPadClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregatorPad.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+        <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+            <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html">GstPad</a>
+                <span class="lineart">╰──</span> <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+                    <span class="lineart">╰──</span> GstVideoAggregatorPad
+                        <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPad">GstGLMixerPad</a>
+</pre>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregatorPad.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregatorPad.functions_details"></a><h2>Functions</h2>
+</div>
+<div class="refsect1">
+<a name="GstVideoAggregatorPad.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstVideoAggregatorPad-struct"></a><h3>struct GstVideoAggregatorPad</h3>
+<pre class="programlisting">struct GstVideoAggregatorPad;</pre>
+<p>The opaque <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad"><span class="type">GstVideoAggregatorPad</span></a> structure.</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstVideoAggregatorPadClass"></a><h3>struct GstVideoAggregatorPadClass</h3>
+<pre class="programlisting">struct GstVideoAggregatorPadClass {
+  GstAggregatorPadClass parent_class;
+
+  gpointer          _gst_reserved[GST_PADDING];
+};
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/api-index-full.html b/docs/libs/html/api-index-full.html
index 0975a4a..71454bd 100644
--- a/docs/libs/html/api-index-full.html
+++ b/docs/libs/html/api-index-full.html
@@ -13,7 +13,9 @@
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
-<td width="100%" align="left" class="shortcuts"><span id="nav_index"><a class="shortcut" href="#idxB">B</a>
+<td width="100%" align="left" class="shortcuts"><span id="nav_index"><a class="shortcut" href="#idxA">A</a>
+                     <span class="dim">|</span> 
+                  <a class="shortcut" href="#idxB">B</a>
                      <span class="dim">|</span> 
                   <a class="shortcut" href="#idxC">C</a>
                      <span class="dim">|</span> 
@@ -46,7 +48,44 @@
 <div class="index">
 <div class="titlepage"><div><div><h1 class="title">
 <a name="api-index-full"></a>Index</h1></div></div></div>
-<a name="idx"></a><a name="idxB"></a><h3 class="title">B</h3>
+<a name="idx"></a><a name="idxA"></a><h3 class="title">A</h3>
+<dt>
+<a class="link" href="GstAggregator.html#GstAggregator-struct" title="struct GstAggregator">GstAggregator</a>, struct in <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregator.html#GstAggregatorClass" title="struct GstAggregatorClass">GstAggregatorClass</a>, struct in <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregatorPad.html#GstAggregatorPad-struct" title="struct GstAggregatorPad">GstAggregatorPad</a>, struct in <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregatorPad.html#GstAggregatorPadClass" title="struct GstAggregatorPadClass">GstAggregatorPadClass</a>, struct in <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregator.html#gst-aggregator-finish-buffer" title="gst_aggregator_finish_buffer ()">gst_aggregator_finish_buffer</a>, function in <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregator.html#gst-aggregator-iterate-sinkpads" title="gst_aggregator_iterate_sinkpads ()">gst_aggregator_iterate_sinkpads</a>, function in <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-get-buffer" title="gst_aggregator_pad_get_buffer ()">gst_aggregator_pad_get_buffer</a>, function in <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregatorPad.html#gst-aggregator-pad-steal-buffer" title="gst_aggregator_pad_steal_buffer ()">gst_aggregator_pad_steal_buffer</a>, function in <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstAggregator.html#gst-aggregator-set-src-caps" title="gst_aggregator_set_src_caps ()">gst_aggregator_set_src_caps</a>, function in <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+</dt>
+<dd></dd>
+<a name="idxB"></a><h3 class="title">B</h3>
 <dt>
 GstBaseCameraSrc, struct in GstBaseCameraSrc
 </dt>
@@ -129,6 +168,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS" title="GST_CAPS_FEATURE_MEMORY_EGL_IMAGE">GST_CAPS_FEATURE_MEMORY_EGL_IMAGE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#CDCB:CAPS" title="CDCB ()">CDCB</a>, user_function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -140,10 +183,6 @@
 <a class="link" href="GstGLDisplay.html#gst-context-set-gl-display" title="gst_context_set_gl_display ()">gst_context_set_gl_display</a>, function in <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
 </dt>
 <dd></dd>
-<dt>
-<a class="link" href="gst-plugins-bad-libs-Utilities.html#CRCB:CAPS" title="CRCB ()">CRCB</a>, user_function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
-</dt>
-<dd></dd>
 <a name="idxD"></a><h3 class="title">D</h3>
 <dt>
 DEFAULT_CAPTURE_HEIGHT, macro in gstcamerabin-enum
@@ -175,6 +214,34 @@
 <dd></dd>
 <a name="idxE"></a><h3 class="title">E</h3>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-display" title="gst_egl_image_memory_get_display ()">gst_egl_image_memory_get_display</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-image" title="gst_egl_image_memory_get_image ()">gst_egl_image_memory_get_image</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-orientation" title="gst_egl_image_memory_get_orientation ()">gst_egl_image_memory_get_orientation</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-init" title="gst_egl_image_memory_init ()">gst_egl_image_memory_init</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-setup-buffer" title="gst_egl_image_memory_setup_buffer ()">gst_egl_image_memory_setup_buffer</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-set-orientation" title="gst_egl_image_memory_set_orientation ()">gst_egl_image_memory_set_orientation</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-EGL-IMAGE-MEMORY-TYPE:CAPS" title="GST_EGL_IMAGE_MEMORY_TYPE">GST_EGL_IMAGE_MEMORY_TYPE</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#gst-event-parse-mpegts-section" title="gst_event_parse_mpegts_section ()">gst_event_parse_mpegts_section</a>, function in <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html" title="Base MPEG-TS sections">Base MPEG-TS sections</a>
 </dt>
 <dd></dd>
@@ -324,6 +391,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer">GstGLFramebuffer</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebufferClass" title="struct GstGLFramebufferClass">GstGLFramebufferClass</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory">GstGLMemory</a>, struct in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">GstGLMemory</a>
 </dt>
 <dd></dd>
@@ -340,10 +415,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerCollect" title="struct GstGLMixerCollect">GstGLMixerCollect</a>, struct in <a class="link" href="gst-plugins-bad-libs-gstglmixer.html" title="GstGLMixer">gstglmixer</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerFrameData" title="struct GstGLMixerFrameData">GstGLMixerFrameData</a>, struct in <a class="link" href="gst-plugins-bad-libs-gstglmixer.html" title="GstGLMixer">GstGLMixer</a>
 </dt>
 <dd></dd>
@@ -372,6 +443,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform">GstGLPlatform</a>, enum in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader-struct" title="GstGLShader">GstGLShader</a>, struct in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
 </dt>
 <dd></dd>
@@ -404,6 +479,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta">GstGLUploadMeta</a>, struct in <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLWindow.html#GstGLWindow-struct" title="GstGLWindow">GstGLWindow</a>, struct in <a class="link" href="GstGLWindow.html" title="GstGLWindow">GstGLWindow</a>
 </dt>
 <dd></dd>
@@ -472,6 +551,30 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-from-string" title="gst_gl_api_from_string ()">gst_gl_api_from_string</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1-NAME:CAPS" title="GST_GL_API_GLES1_NAME">GST_GL_API_GLES1_NAME</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2-NAME:CAPS" title="GST_GL_API_GLES2_NAME">GST_GL_API_GLES2_NAME</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3-NAME:CAPS" title="GST_GL_API_OPENGL3_NAME">GST_GL_API_OPENGL3_NAME</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL-NAME:CAPS" title="GST_GL_API_OPENGL_NAME">GST_GL_API_OPENGL_NAME</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-to-string" title="gst_gl_api_to_string ()">gst_gl_api_to_string</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLBufferPool.html#gst-gl-buffer-pool-new" title="gst_gl_buffer_pool_new ()">gst_gl_buffer_pool_new</a>, function in <a class="link" href="GstGLBufferPool.html" title="GstGLBufferPool">GstGLBufferPool</a>
 </dt>
 <dd></dd>
@@ -480,10 +583,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-CHECK-GL-VERSION:CAPS" title="GST_GL_CHECK_GL_VERSION()">GST_GL_CHECK_GL_VERSION</a>, macro in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="GstGLColorConvert.html#GST-GL-COLOR-CONVERT-FORMATS:CAPS" title="GST_GL_COLOR_CONVERT_FORMATS">GST_GL_COLOR_CONVERT_FORMATS</a>, macro in <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
 </dt>
 <dd></dd>
@@ -496,6 +595,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLColorConvert.html#gst-gl-color-convert-set-format" title="gst_gl_color_convert_set_format ()">gst_gl_color_convert_set_format</a>, function in <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLColorConvert.html#GST-GL-COLOR-CONVERT-VIDEO-CAPS" title="GST_GL_COLOR_CONVERT_VIDEO_CAPS">GST_GL_COLOR_CONVERT_VIDEO_CAPS</a>, macro in <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
 </dt>
 <dd></dd>
@@ -512,6 +615,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-check-gl-version" title="gst_gl_context_check_gl_version ()">gst_gl_context_check_gl_version</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-clear-shader" title="gst_gl_context_clear_shader ()">gst_gl_context_clear_shader</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -580,6 +687,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-platform" title="gst_gl_context_get_gl_platform ()">gst_gl_context_get_gl_platform</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-get-gl-version" title="gst_gl_context_get_gl_version ()">gst_gl_context_get_gl_version</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLContext.html#gst-gl-context-get-proc-address" title="gst_gl_context_get_proc_address ()">gst_gl_context_get_proc_address</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
 </dt>
 <dd></dd>
@@ -596,6 +711,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLContext.html#gst-gl-context-new-wrapped" title="gst_gl_context_new_wrapped ()">gst_gl_context_new_wrapped</a>, function in <a class="link" href="GstGLContext.html" title="GstGLContext">GstGLContext</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-set-error" title="gst_gl_context_set_error ()">gst_gl_context_set_error</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -620,6 +739,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="GstGLDisplay.html#GST-GL-DISPLAY-CONTEXT-TYPE:CAPS" title="GST_GL_DISPLAY_CONTEXT_TYPE">GST_GL_DISPLAY_CONTEXT_TYPE</a>, macro in <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLDisplay.html#gst-gl-display-get-handle-type" title="gst_gl_display_get_handle_type ()">gst_gl_display_get_handle_type</a>, function in <a class="link" href="GstGLDisplay.html" title="GstGLDisplay">GstGLDisplay</a>
 </dt>
 <dd></dd>
@@ -660,6 +783,30 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-delete" title="gst_gl_framebuffer_delete ()">gst_gl_framebuffer_delete</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-generate" title="gst_gl_framebuffer_generate ()">gst_gl_framebuffer_generate</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-new" title="gst_gl_framebuffer_new ()">gst_gl_framebuffer_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use" title="gst_gl_framebuffer_use ()">gst_gl_framebuffer_use</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use-v2" title="gst_gl_framebuffer_use_v2 ()">gst_gl_framebuffer_use_v2</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">GstGLFramebuffer</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-generate-texture-full" title="gst_gl_generate_texture_full ()">gst_gl_generate_texture_full</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-handle-context-query" title="gst_gl_handle_context_query ()">gst_gl_handle_context_query</a>, function in <a class="link" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">Utilities</a>
 </dt>
 <dd></dd>
@@ -720,6 +867,14 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-from-string" title="gst_gl_platform_from_string ()">gst_gl_platform_from_string</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-to-string" title="gst_gl_platform_to_string ()">gst_gl_platform_to_string</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">GstGLAPI</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shadervariables-parse" title="gst_gl_shadervariables_parse ()">gst_gl_shadervariables_parse</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">gstglshader</a>
 </dt>
 <dd></dd>
@@ -740,10 +895,26 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-all-with-attribs-and-check" title="gst_gl_shader_compile_all_with_attribs_and_check ()">gst_gl_shader_compile_all_with_attribs_and_check</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-and-check" title="gst_gl_shader_compile_and_check ()">gst_gl_shader_compile_and_check</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-f-and-check" title="gst_gl_shader_compile_with_default_f_and_check ()">gst_gl_shader_compile_with_default_f_and_check</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-vf-and-check" title="gst_gl_shader_compile_with_default_vf_and_check ()">gst_gl_shader_compile_with_default_vf_and_check</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-v-and-check" title="gst_gl_shader_compile_with_default_v_and_check ()">gst_gl_shader_compile_with_default_v_and_check</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">GstGLShader</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglshader.html#GST-GL-SHADER-ERROR:CAPS" title="GST_GL_SHADER_ERROR">GST_GL_SHADER_ERROR</a>, macro in <a class="link" href="gst-plugins-bad-libs-gstglshader.html" title="GstGLShader">gstglshader</a>
 </dt>
 <dd></dd>
@@ -892,7 +1063,7 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="GstGLUpload.html#gst-gl-upload-add-video-gl-texture-upload-meta" title="gst_gl_upload_add_video_gl_texture_upload_meta ()">gst_gl_upload_add_video_gl_texture_upload_meta</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
+<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-gl-texture-type-from-format" title="gst_gl_texture_type_from_format ()">gst_gl_texture_type_from_format</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">GstGLMemory</a>
 </dt>
 <dd></dd>
 <dt>
@@ -900,6 +1071,22 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer" title="gst_gl_upload_meta_add_to_buffer ()">gst_gl_upload_meta_add_to_buffer</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-get-format" title="gst_gl_upload_meta_get_format ()">gst_gl_upload_meta_get_format</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-new" title="gst_gl_upload_meta_new ()">gst_gl_upload_meta_new</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-set-format" title="gst_gl_upload_meta_set_format ()">gst_gl_upload_meta_set_format</a>, function in <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">GstGLUploadMeta</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="GstGLUpload.html#gst-gl-upload-new" title="gst_gl_upload_new ()">gst_gl_upload_new</a>, function in <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
 </dt>
 <dd></dd>
@@ -1193,19 +1380,23 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag" title="gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag ()">gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-raster-from-zigzag" title="gst_h264_quant_matrix_4x4_get_raster_from_zigzag ()">gst_h264_quant_matrix_4x4_get_raster_from_zigzag</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster" title="gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster ()">gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-zigzag-from-raster" title="gst_h264_quant_matrix_4x4_get_zigzag_from_raster ()">gst_h264_quant_matrix_4x4_get_zigzag_from_raster</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag" title="gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag ()">gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-raster-from-zigzag" title="gst_h264_quant_matrix_8x8_get_raster_from_zigzag ()">gst_h264_quant_matrix_8x8_get_raster_from_zigzag</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster" title="gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster ()">gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-zigzag-from-raster" title="gst_h264_quant_matrix_8x8_get_zigzag_from_raster ()">gst_h264_quant_matrix_8x8_get_zigzag_from_raster</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-calculate-framerate" title="gst_h264_video_calculate_framerate ()">gst_h264_video_calculate_framerate</a>, function in <a class="link" href="gst-plugins-bad-libs-h264parser.html" title="h264parser">h264parser</a>
 </dt>
 <dd></dd>
 <a name="idxI"></a><h3 class="title">I</h3>
@@ -1266,6 +1457,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-is-egl-image-memory" title="gst_is_egl_image_memory ()">gst_is_egl_image_memory</a>, function in <a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html" title="GstEGLImageMemory">GstEGLImageMemory</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-is-gl-memory" title="gst_is_gl_memory ()">gst_is_gl_memory</a>, function in <a class="link" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">GstGLMemory</a>
 </dt>
 <dd></dd>
@@ -1407,14 +1602,6 @@
 </dt>
 <dd></dd>
 <dt>
-<a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT">GstMpegTsAtscTVCT</a>, struct in <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html" title="ATSC variants of MPEG-TS sections">ATSC variants of MPEG-TS sections</a>
-</dt>
-<dd></dd>
-<dt>
-<a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCTSource" title="struct GstMpegTsAtscTVCTSource">GstMpegTsAtscTVCTSource</a>, struct in <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html" title="ATSC variants of MPEG-TS sections">ATSC variants of MPEG-TS sections</a>
-</dt>
-<dd></dd>
-<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#GstMpegTsBAT" title="struct GstMpegTsBAT">GstMpegTsBAT</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html" title="DVB variants of MPEG-TS sections">DVB variants of MPEG-TS sections</a>
 </dt>
 <dd></dd>
@@ -1487,10 +1674,30 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualBouquetNameItem" title="struct GstMpegTsDvbMultilingualBouquetNameItem">GstMpegTsDvbMultilingualBouquetNameItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualComponentItem" title="struct GstMpegTsDvbMultilingualComponentItem">GstMpegTsDvbMultilingualComponentItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualNetworkNameItem" title="struct GstMpegTsDvbMultilingualNetworkNameItem">GstMpegTsDvbMultilingualNetworkNameItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualServiceNameItem" title="struct GstMpegTsDvbMultilingualServiceNameItem">GstMpegTsDvbMultilingualServiceNameItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBParentalRatingItem" title="struct GstMpegTsDVBParentalRatingItem">GstMpegTsDVBParentalRatingItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceListItem" title="struct GstMpegTsDVBServiceListItem">GstMpegTsDVBServiceListItem</a>, struct in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceType" title="enum GstMpegTsDVBServiceType">GstMpegTsDVBServiceType</a>, enum in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
@@ -1667,6 +1874,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-bouquet-name" title="gst_mpegts_descriptor_parse_dvb_bouquet_name ()">gst_mpegts_descriptor_parse_dvb_bouquet_name</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-ca-identifier" title="gst_mpegts_descriptor_parse_dvb_ca_identifier ()">gst_mpegts_descriptor_parse_dvb_ca_identifier</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
@@ -1699,6 +1910,22 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-component" title="gst_mpegts_descriptor_parse_dvb_multilingual_component ()">gst_mpegts_descriptor_parse_dvb_multilingual_component</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-network-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_network_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_network_name</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-service-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_service_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_service_name</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-network-name" title="gst_mpegts_descriptor_parse_dvb_network_name ()">gst_mpegts_descriptor_parse_dvb_network_name</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
@@ -1719,6 +1946,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-service-list" title="gst_mpegts_descriptor_parse_dvb_service_list ()">gst_mpegts_descriptor_parse_dvb_service_list</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-short-event" title="gst_mpegts_descriptor_parse_dvb_short_event ()">gst_mpegts_descriptor_parse_dvb_short_event</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
@@ -1727,6 +1958,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stuffing" title="gst_mpegts_descriptor_parse_dvb_stuffing ()">gst_mpegts_descriptor_parse_dvb_stuffing</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-t2-delivery-system" title="gst_mpegts_descriptor_parse_dvb_t2_delivery_system ()">gst_mpegts_descriptor_parse_dvb_t2_delivery_system</a>, function in <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html" title="DVB variants of MPEG-TS descriptors">DVB variants of MPEG-TS descriptors</a>
 </dt>
 <dd></dd>
@@ -2386,6 +2621,22 @@
 <a class="link" href="gst-plugins-bad-libs-vc1parser.html#gst-vc1-parse-sequence-layer" title="gst_vc1_parse_sequence_layer ()">gst_vc1_parse_sequence_layer</a>, function in <a class="link" href="gst-plugins-bad-libs-vc1parser.html" title="vc1parser">vc1parser</a>
 </dt>
 <dd></dd>
+<dt>
+<a class="link" href="GstVideoAggregator.html#GstVideoAggregator-struct" title="struct GstVideoAggregator">GstVideoAggregator</a>, struct in <a class="link" href="GstVideoAggregator.html" title="GstVideoAggregator">GstVideoAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstVideoAggregator.html#GstVideoAggregatorClass" title="struct GstVideoAggregatorClass">GstVideoAggregatorClass</a>, struct in <a class="link" href="GstVideoAggregator.html" title="GstVideoAggregator">GstVideoAggregator</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstVideoAggregatorPad.html#GstVideoAggregatorPad-struct" title="struct GstVideoAggregatorPad">GstVideoAggregatorPad</a>, struct in <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">GstVideoAggregatorPad</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="GstVideoAggregatorPad.html#GstVideoAggregatorPadClass" title="struct GstVideoAggregatorPadClass">GstVideoAggregatorPadClass</a>, struct in <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">GstVideoAggregatorPad</a>
+</dt>
+<dd></dd>
 <a name="idxZ"></a><h3 class="title">Z</h3>
 <dt>
 ZOOM_1X, macro in GstBaseCameraSrc
diff --git a/docs/libs/html/base.html b/docs/libs/html/base.html
new file mode 100644
index 0000000..19a4537
--- /dev/null
+++ b/docs/libs/html/base.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GStreamer Base classes from gst-plugins-bad</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="gstreamer-plugins-bad.html" title="Part I. GStreamer Bad Plugins Libraries">
+<link rel="prev" href="gst-plugins-bad-libs-GstInsertbin.html" title="GstInsertbin">
+<link rel="next" href="GstAggregator.html" title="GstAggregator">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="gstreamer-plugins-bad.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstInsertbin.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="GstAggregator.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="base"></a>GStreamer Base classes from gst-plugins-bad</h2></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="GstAggregator.html">GstAggregator</a></span><span class="refpurpose"> — manages a set of pads with the purpose of
+aggregating their buffers.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstAggregatorPad.html">GstAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gl.html b/docs/libs/html/gl.html
index f52ceda..8ff638f 100644
--- a/docs/libs/html/gl.html
+++ b/docs/libs/html/gl.html
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gstreamer-plugins-bad.html" title="Part I. GStreamer Bad Plugins Libraries">
-<link rel="prev" href="gst-plugins-bad-libs-GstInsertbin.html" title="GstInsertbin">
+<link rel="prev" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">
 <link rel="next" href="gst-plugins-bad-libs-GstGLAPI.html" title="GstGLAPI">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
@@ -16,7 +16,7 @@
 <td width="100%" align="left" class="shortcuts"></td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gstreamer-plugins-bad.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-libs-GstInsertbin.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="GstVideoAggregatorPad.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-libs-GstGLAPI.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="chapter">
@@ -54,9 +54,15 @@
 <span class="refentrytitle"><a href="GstGLDownload.html">GstGLDownload</a></span><span class="refpurpose"> — an object that downloads GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstEGLImageMemory.html">GstEGLImageMemory</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="GstGLFilter.html">GstGLFilter</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLFramebuffer.html">GstGLFramebuffer</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglmemory.html">GstGLMemory</a></span><span class="refpurpose"> — memory subclass for GL textures</span>
 </dt>
 <dt>
@@ -69,6 +75,9 @@
 <span class="refentrytitle"><a href="GstGLUpload.html">GstGLUpload</a></span><span class="refpurpose"> — an object that uploads to GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLUploadMeta.html">GstGLUploadMeta</a></span><span class="refpurpose">an object that provides <span class="type">GstVideoGLTextureUploadMeta</span></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-Utilities.html">Utilities</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
diff --git a/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2 b/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2
index c303a77..420c1f8 100644
--- a/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2
+++ b/docs/libs/html/gst-plugins-bad-libs-1.0.devhelp2
@@ -24,6 +24,14 @@
       <sub name="Useful elements" link="tools.html">
         <sub name="GstInsertbin" link="gst-plugins-bad-libs-GstInsertbin.html"/>
       </sub>
+      <sub name="GStreamer Base classes from gst-plugins-bad" link="base.html">
+        <sub name="GstAggregator" link="GstAggregator.html"/>
+        <sub name="GstAggregatorPad" link="GstAggregatorPad.html"/>
+      </sub>
+      <sub name="Video helpers and baseclasses" link="video.html">
+        <sub name="GstVideoAggregator" link="GstVideoAggregator.html"/>
+        <sub name="GstVideoAggregatorPad" link="GstVideoAggregatorPad.html"/>
+      </sub>
       <sub name="OpenGL Helper Library" link="gl.html">
         <sub name="GstGLAPI" link="gst-plugins-bad-libs-GstGLAPI.html"/>
         <sub name="GstGLBufferPool" link="GstGLBufferPool.html"/>
@@ -35,11 +43,14 @@
         <sub name="GstGLContextWGL" link="gst-plugins-bad-libs-GstGLContextWGL.html"/>
         <sub name="GstGLDisplay" link="GstGLDisplay.html"/>
         <sub name="GstGLDownload" link="GstGLDownload.html"/>
+        <sub name="GstEGLImageMemory" link="gst-plugins-bad-libs-GstEGLImageMemory.html"/>
         <sub name="GstGLFilter" link="GstGLFilter.html"/>
+        <sub name="GstGLFramebuffer" link="gst-plugins-bad-libs-GstGLFramebuffer.html"/>
         <sub name="GstGLMemory" link="gst-plugins-bad-libs-gstglmemory.html"/>
         <sub name="GstGLMixer" link="gst-plugins-bad-libs-gstglmixer.html"/>
         <sub name="GstGLShader" link="gst-plugins-bad-libs-gstglshader.html"/>
         <sub name="GstGLUpload" link="GstGLUpload.html"/>
+        <sub name="GstGLUploadMeta" link="gst-plugins-bad-libs-GstGLUploadMeta.html"/>
         <sub name="Utilities" link="gst-plugins-bad-libs-Utilities.html"/>
         <sub name="GstGLWindow" link="GstGLWindow.html"/>
         <sub name="GstGLWindowAndroid" link="gst-plugins-bad-libs-GstGLWindowAndroid.html"/>
@@ -72,10 +83,11 @@
     <keyword type="function" name="gst_h264_nal_parser_free ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-nal-parser-free"/>
     <keyword type="function" name="gst_h264_parse_sps ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-parse-sps"/>
     <keyword type="function" name="gst_h264_parse_pps ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-parse-pps"/>
-    <keyword type="function" name="gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster" since="1.4"/>
-    <keyword type="function" name="gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag"/>
-    <keyword type="function" name="gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster" since="1.4"/>
-    <keyword type="function" name="gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag"/>
+    <keyword type="function" name="gst_h264_quant_matrix_8x8_get_zigzag_from_raster ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-zigzag-from-raster" since="1.4"/>
+    <keyword type="function" name="gst_h264_quant_matrix_8x8_get_raster_from_zigzag ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-raster-from-zigzag" since="1.4"/>
+    <keyword type="function" name="gst_h264_quant_matrix_4x4_get_zigzag_from_raster ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-zigzag-from-raster" since="1.4"/>
+    <keyword type="function" name="gst_h264_quant_matrix_4x4_get_raster_from_zigzag ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-raster-from-zigzag" since="1.4"/>
+    <keyword type="function" name="gst_h264_video_calculate_framerate ()" link="gst-plugins-bad-libs-h264parser.html#gst-h264-video-calculate-framerate"/>
     <keyword type="macro" name="GST_H264_MAX_SPS_COUNT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-MAX-SPS-COUNT:CAPS"/>
     <keyword type="macro" name="GST_H264_MAX_PPS_COUNT" link="gst-plugins-bad-libs-h264parser.html#GST-H264-MAX-PPS-COUNT:CAPS"/>
     <keyword type="enum" name="enum GstH264NalUnitType" link="gst-plugins-bad-libs-h264parser.html#GstH264NalUnitType"/>
@@ -234,8 +246,6 @@
     <keyword type="struct" name="struct GstMpegTsLogicalChannelDescriptor" link="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsLogicalChannelDescriptor"/>
     <keyword type="function" name="gst_mpegts_section_get_atsc_tvct ()" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#gst-mpegts-section-get-atsc-tvct"/>
     <keyword type="enum" name="enum GstMpegTsSectionATSCTableID" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsSectionATSCTableID"/>
-    <keyword type="struct" name="struct GstMpegTsAtscTVCTSource" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCTSource"/>
-    <keyword type="struct" name="struct GstMpegTsAtscTVCT" link="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT"/>
     <keyword type="function" name="gst_mpegts_section_get_nit ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-mpegts-section-get-nit"/>
     <keyword type="function" name="gst_mpegts_nit_new ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-mpegts-nit-new"/>
     <keyword type="function" name="gst_mpegts_nit_stream_new ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-mpegts-nit-stream-new"/>
@@ -283,6 +293,13 @@
     <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_parental_rating ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-parental-rating"/>
     <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_stream_identifier ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stream-identifier"/>
     <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_ca_identifier ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-ca-identifier"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_service_list ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-service-list"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_stuffing ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stuffing"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_bouquet_name ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-bouquet-name"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_multilingual_network_name ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-network-name"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_multilingual_service_name ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-service-name"/>
+    <keyword type="function" name="gst_mpegts_descriptor_parse_dvb_multilingual_component ()" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-component"/>
     <keyword type="enum" name="enum GstMpegTsDVBDescriptorType" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBDescriptorType"/>
     <keyword type="enum" name="enum GstMpegTsDVBExtendedDescriptorType" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBExtendedDescriptorType"/>
     <keyword type="struct" name="struct GstMpegTsContent" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsContent"/>
@@ -313,6 +330,11 @@
     <keyword type="struct" name="struct GstMpegTsDVBLinkageDescriptor" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBLinkageDescriptor"/>
     <keyword type="struct" name="struct GstMpegTsDataBroadcastDescriptor" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDataBroadcastDescriptor"/>
     <keyword type="struct" name="struct GstMpegTsDVBParentalRatingItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBParentalRatingItem"/>
+    <keyword type="struct" name="struct GstMpegTsDVBServiceListItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceListItem"/>
+    <keyword type="struct" name="struct GstMpegTsDvbMultilingualNetworkNameItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualNetworkNameItem"/>
+    <keyword type="struct" name="struct GstMpegTsDvbMultilingualBouquetNameItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualBouquetNameItem"/>
+    <keyword type="struct" name="struct GstMpegTsDvbMultilingualServiceNameItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualServiceNameItem"/>
+    <keyword type="struct" name="struct GstMpegTsDvbMultilingualComponentItem" link="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualComponentItem"/>
     <keyword type="enum" name="enum GstMpegTsISDBDescriptorType" link="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#GstMpegTsISDBDescriptorType"/>
     <keyword type="function" name="GstInsertBinCallback ()" link="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBinCallback"/>
     <keyword type="function" name="gst_insert_bin_new ()" link="gst-plugins-bad-libs-GstInsertbin.html#gst-insert-bin-new" since="1.2"/>
@@ -328,13 +350,35 @@
     <keyword type="signal" name="The “insert-before” signal" link="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-insert-before"/>
     <keyword type="signal" name="The “prepend” signal" link="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-prepend"/>
     <keyword type="signal" name="The “remove” signal" link="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-remove"/>
+    <keyword type="function" name="gst_aggregator_finish_buffer ()" link="GstAggregator.html#gst-aggregator-finish-buffer"/>
+    <keyword type="function" name="gst_aggregator_set_src_caps ()" link="GstAggregator.html#gst-aggregator-set-src-caps"/>
+    <keyword type="function" name="gst_aggregator_iterate_sinkpads ()" link="GstAggregator.html#gst-aggregator-iterate-sinkpads"/>
+    <keyword type="struct" name="struct GstAggregator" link="GstAggregator.html#GstAggregator-struct"/>
+    <keyword type="struct" name="struct GstAggregatorClass" link="GstAggregator.html#GstAggregatorClass"/>
+    <keyword type="function" name="gst_aggregator_pad_steal_buffer ()" link="GstAggregatorPad.html#gst-aggregator-pad-steal-buffer"/>
+    <keyword type="function" name="gst_aggregator_pad_get_buffer ()" link="GstAggregatorPad.html#gst-aggregator-pad-get-buffer"/>
+    <keyword type="struct" name="struct GstAggregatorPad" link="GstAggregatorPad.html#GstAggregatorPad-struct"/>
+    <keyword type="struct" name="struct GstAggregatorPadClass" link="GstAggregatorPad.html#GstAggregatorPadClass"/>
+    <keyword type="struct" name="struct GstVideoAggregator" link="GstVideoAggregator.html#GstVideoAggregator-struct"/>
+    <keyword type="struct" name="struct GstVideoAggregatorClass" link="GstVideoAggregator.html#GstVideoAggregatorClass"/>
+    <keyword type="struct" name="struct GstVideoAggregatorPad" link="GstVideoAggregatorPad.html#GstVideoAggregatorPad-struct"/>
+    <keyword type="struct" name="struct GstVideoAggregatorPadClass" link="GstVideoAggregatorPad.html#GstVideoAggregatorPadClass"/>
+    <keyword type="function" name="gst_gl_api_to_string ()" link="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-to-string"/>
+    <keyword type="function" name="gst_gl_api_from_string ()" link="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-from-string"/>
+    <keyword type="function" name="gst_gl_platform_to_string ()" link="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-to-string"/>
+    <keyword type="function" name="gst_gl_platform_from_string ()" link="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-from-string"/>
     <keyword type="function" name="gst_gl_check_extension ()" link="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-check-extension"/>
-    <keyword type="macro" name="GST_GL_CHECK_GL_VERSION()" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-CHECK-GL-VERSION:CAPS"/>
     <keyword type="enum" name="enum GstGLAPI" link="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI"/>
+    <keyword type="enum" name="enum GstGLPlatform" link="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform"/>
+    <keyword type="macro" name="GST_GL_API_GLES1_NAME" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1-NAME:CAPS"/>
+    <keyword type="macro" name="GST_GL_API_GLES2_NAME" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2-NAME:CAPS"/>
+    <keyword type="macro" name="GST_GL_API_OPENGL3_NAME" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3-NAME:CAPS"/>
+    <keyword type="macro" name="GST_GL_API_OPENGL_NAME" link="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL-NAME:CAPS"/>
     <keyword type="function" name="gst_gl_buffer_pool_new ()" link="GstGLBufferPool.html#gst-gl-buffer-pool-new"/>
     <keyword type="struct" name="struct GstGLBufferPool" link="GstGLBufferPool.html#GstGLBufferPool-struct"/>
     <keyword type="struct" name="struct GstGLBufferPoolClass" link="GstGLBufferPool.html#GstGLBufferPoolClass"/>
     <keyword type="function" name="gst_gl_color_convert_new ()" link="GstGLColorConvert.html#gst-gl-color-convert-new"/>
+    <keyword type="function" name="gst_gl_color_convert_set_format ()" link="GstGLColorConvert.html#gst-gl-color-convert-set-format"/>
     <keyword type="function" name="gst_gl_color_convert_perform ()" link="GstGLColorConvert.html#gst-gl-color-convert-perform"/>
     <keyword type="macro" name="GST_GL_COLOR_CONVERT_FORMATS" link="GstGLColorConvert.html#GST-GL-COLOR-CONVERT-FORMATS:CAPS"/>
     <keyword type="macro" name="GST_GL_COLOR_CONVERT_VIDEO_CAPS" link="GstGLColorConvert.html#GST-GL-COLOR-CONVERT-VIDEO-CAPS"/>
@@ -344,6 +388,7 @@
     <keyword type="function" name="gst_gl_context_error_quark ()" link="GstGLContext.html#gst-gl-context-error-quark"/>
     <keyword type="function" name="GstGLContextThreadFunc ()" link="GstGLContext.html#GstGLContextThreadFunc"/>
     <keyword type="function" name="gst_gl_context_new ()" link="GstGLContext.html#gst-gl-context-new"/>
+    <keyword type="function" name="gst_gl_context_new_wrapped ()" link="GstGLContext.html#gst-gl-context-new-wrapped"/>
     <keyword type="function" name="gst_gl_context_create ()" link="GstGLContext.html#gst-gl-context-create"/>
     <keyword type="function" name="gst_gl_context_activate ()" link="GstGLContext.html#gst-gl-context-activate"/>
     <keyword type="function" name="gst_gl_context_default_get_proc_address ()" link="GstGLContext.html#gst-gl-context-default-get-proc-address"/>
@@ -354,7 +399,10 @@
     <keyword type="function" name="gst_gl_context_get_display ()" link="GstGLContext.html#gst-gl-context-get-display"/>
     <keyword type="function" name="gst_gl_context_get_gl_api ()" link="GstGLContext.html#gst-gl-context-get-gl-api"/>
     <keyword type="function" name="gst_gl_context_get_gl_context ()" link="GstGLContext.html#gst-gl-context-get-gl-context"/>
+    <keyword type="function" name="gst_gl_context_get_gl_platform ()" link="GstGLContext.html#gst-gl-context-get-gl-platform"/>
     <keyword type="function" name="gst_gl_context_check_feature ()" link="GstGLContext.html#gst-gl-context-check-feature"/>
+    <keyword type="function" name="gst_gl_context_check_gl_version ()" link="GstGLContext.html#gst-gl-context-check-gl-version"/>
+    <keyword type="function" name="gst_gl_context_get_gl_version ()" link="GstGLContext.html#gst-gl-context-get-gl-version"/>
     <keyword type="enum" name="enum GstGLContextError" link="GstGLContext.html#GstGLContextError"/>
     <keyword type="struct" name="GstGLContext" link="GstGLContext.html#GstGLContext-struct"/>
     <keyword type="function" name="gst_gl_context_cocoa_new ()" link="gst-plugins-bad-libs-GstGLContextCocoa.html#gst-gl-context-cocoa-new"/>
@@ -369,12 +417,22 @@
     <keyword type="function" name="gst_gl_display_get_handle_type ()" link="GstGLDisplay.html#gst-gl-display-get-handle-type"/>
     <keyword type="function" name="gst_context_get_gl_display ()" link="GstGLDisplay.html#gst-context-get-gl-display"/>
     <keyword type="function" name="gst_context_set_gl_display ()" link="GstGLDisplay.html#gst-context-set-gl-display"/>
+    <keyword type="macro" name="GST_GL_DISPLAY_CONTEXT_TYPE" link="GstGLDisplay.html#GST-GL-DISPLAY-CONTEXT-TYPE:CAPS"/>
     <keyword type="enum" name="enum GstGLDisplayType" link="GstGLDisplay.html#GstGLDisplayType"/>
     <keyword type="struct" name="GstGLDisplay" link="GstGLDisplay.html#GstGLDisplay-struct"/>
     <keyword type="function" name="gst_gl_download_new ()" link="GstGLDownload.html#gst-gl-download-new"/>
     <keyword type="function" name="gst_gl_download_set_format ()" link="GstGLDownload.html#gst-gl-download-set-format"/>
     <keyword type="function" name="gst_gl_download_perform_with_data ()" link="GstGLDownload.html#gst-gl-download-perform-with-data"/>
     <keyword type="struct" name="GstGLDownload" link="GstGLDownload.html#GstGLDownload-struct"/>
+    <keyword type="function" name="gst_egl_image_memory_init ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-init"/>
+    <keyword type="function" name="gst_egl_image_memory_get_display ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-display"/>
+    <keyword type="function" name="gst_egl_image_memory_get_image ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-image"/>
+    <keyword type="function" name="gst_egl_image_memory_get_orientation ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-orientation"/>
+    <keyword type="function" name="gst_egl_image_memory_set_orientation ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-set-orientation"/>
+    <keyword type="function" name="gst_egl_image_memory_setup_buffer ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-setup-buffer"/>
+    <keyword type="function" name="gst_is_egl_image_memory ()" link="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-is-egl-image-memory"/>
+    <keyword type="macro" name="GST_EGL_IMAGE_MEMORY_TYPE" link="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-EGL-IMAGE-MEMORY-TYPE:CAPS"/>
+    <keyword type="macro" name="GST_CAPS_FEATURE_MEMORY_EGL_IMAGE" link="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS"/>
     <keyword type="function" name="gst_gl_filter_draw_texture ()" link="GstGLFilter.html#gst-gl-filter-draw-texture"/>
     <keyword type="function" name="gst_gl_filter_render_to_target ()" link="GstGLFilter.html#gst-gl-filter-render-to-target"/>
     <keyword type="function" name="gst_gl_filter_render_to_target_with_shader ()" link="GstGLFilter.html#gst-gl-filter-render-to-target-with-shader"/>
@@ -382,6 +440,13 @@
     <keyword type="struct" name="struct GstGLFilter" link="GstGLFilter.html#GstGLFilter-struct"/>
     <keyword type="struct" name="struct GstGLFilterClass" link="GstGLFilter.html#GstGLFilterClass"/>
     <keyword type="property" name="The “other-context” property" link="GstGLFilter.html#GstGLFilter--other-context"/>
+    <keyword type="function" name="gst_gl_framebuffer_new ()" link="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-new"/>
+    <keyword type="function" name="gst_gl_framebuffer_generate ()" link="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-generate"/>
+    <keyword type="function" name="gst_gl_framebuffer_delete ()" link="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-delete"/>
+    <keyword type="function" name="gst_gl_framebuffer_use ()" link="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use"/>
+    <keyword type="function" name="gst_gl_framebuffer_use_v2 ()" link="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use-v2"/>
+    <keyword type="struct" name="struct GstGLFramebuffer" link="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer"/>
+    <keyword type="struct" name="struct GstGLFramebufferClass" link="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebufferClass"/>
     <keyword type="macro" name="GST_GL_MEMORY_FLAGS()" link="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAGS:CAPS"/>
     <keyword type="macro" name="GST_GL_MEMORY_FLAG_IS_SET()" link="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-IS-SET:CAPS"/>
     <keyword type="macro" name="GST_GL_MEMORY_FLAG_SET()" link="gst-plugins-bad-libs-gstglmemory.html#GST-GL-MEMORY-FLAG-SET:CAPS"/>
@@ -393,6 +458,7 @@
     <keyword type="function" name="gst_gl_memory_copy_into_texture ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-copy-into-texture"/>
     <keyword type="function" name="gst_gl_memory_setup_buffer ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-setup-buffer"/>
     <keyword type="function" name="gst_gl_memory_setup_wrapped ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-setup-wrapped"/>
+    <keyword type="function" name="gst_gl_texture_type_from_format ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-gl-texture-type-from-format"/>
     <keyword type="function" name="gst_is_gl_memory ()" link="gst-plugins-bad-libs-gstglmemory.html#gst-is-gl-memory"/>
     <keyword type="struct" name="GstGLAllocator" link="gst-plugins-bad-libs-gstglmemory.html#GstGLAllocator-struct"/>
     <keyword type="struct" name="GstGLAllocatorClass" link="gst-plugins-bad-libs-gstglmemory.html#GstGLAllocatorClass"/>
@@ -407,7 +473,6 @@
     <keyword type="function" name="gst_gl_mixer_process_textures ()" link="gst-plugins-bad-libs-gstglmixer.html#gst-gl-mixer-process-textures"/>
     <keyword type="struct" name="struct GstGLMixerPad" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPad-struct"/>
     <keyword type="struct" name="struct GstGLMixerPadClass" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPadClass"/>
-    <keyword type="struct" name="struct GstGLMixerCollect" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerCollect"/>
     <keyword type="struct" name="struct GstGLMixer" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixer-struct"/>
     <keyword type="struct" name="struct GstGLMixerClass" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerClass"/>
     <keyword type="struct" name="struct GstGLMixerFrameData" link="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerFrameData"/>
@@ -424,6 +489,10 @@
     <keyword type="function" name="gst_gl_shader_is_compiled ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-is-compiled"/>
     <keyword type="function" name="gst_gl_shader_compile ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile"/>
     <keyword type="function" name="gst_gl_shader_compile_and_check ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-and-check"/>
+    <keyword type="function" name="gst_gl_shader_compile_all_with_attribs_and_check ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-all-with-attribs-and-check"/>
+    <keyword type="function" name="gst_gl_shader_compile_with_default_f_and_check ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-f-and-check"/>
+    <keyword type="function" name="gst_gl_shader_compile_with_default_v_and_check ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-v-and-check"/>
+    <keyword type="function" name="gst_gl_shader_compile_with_default_vf_and_check ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-vf-and-check"/>
     <keyword type="function" name="gst_gl_shader_release ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-release"/>
     <keyword type="function" name="gst_gl_shader_use ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-use"/>
     <keyword type="function" name="gst_gl_shader_set_uniform_1i ()" link="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-uniform-1i"/>
@@ -464,15 +533,18 @@
     <keyword type="function" name="gst_gl_upload_new ()" link="GstGLUpload.html#gst-gl-upload-new"/>
     <keyword type="function" name="gst_gl_upload_set_format ()" link="GstGLUpload.html#gst-gl-upload-set-format"/>
     <keyword type="function" name="gst_gl_upload_get_format ()" link="GstGLUpload.html#gst-gl-upload-get-format"/>
-    <keyword type="function" name="gst_gl_upload_add_video_gl_texture_upload_meta ()" link="GstGLUpload.html#gst-gl-upload-add-video-gl-texture-upload-meta"/>
     <keyword type="function" name="gst_gl_upload_perform_with_data ()" link="GstGLUpload.html#gst-gl-upload-perform-with-data"/>
     <keyword type="function" name="gst_gl_upload_perform_with_gl_texture_upload_meta ()" link="GstGLUpload.html#gst-gl-upload-perform-with-gl-texture-upload-meta"/>
     <keyword type="function" name="gst_gl_upload_perform_with_buffer ()" link="GstGLUpload.html#gst-gl-upload-perform-with-buffer"/>
     <keyword type="function" name="gst_gl_upload_release_buffer ()" link="GstGLUpload.html#gst-gl-upload-release-buffer"/>
     <keyword type="struct" name="GstGLUpload" link="GstGLUpload.html#GstGLUpload-struct"/>
+    <keyword type="function" name="gst_gl_upload_meta_new ()" link="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-new"/>
+    <keyword type="function" name="gst_gl_upload_meta_set_format ()" link="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-set-format"/>
+    <keyword type="function" name="gst_gl_upload_meta_get_format ()" link="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-get-format"/>
+    <keyword type="function" name="gst_gl_upload_meta_add_to_buffer ()" link="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer"/>
+    <keyword type="struct" name="GstGLUploadMeta" link="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta"/>
     <keyword type="function" name="GLCB ()" link="gst-plugins-bad-libs-Utilities.html#GLCB:CAPS"/>
     <keyword type="function" name="GLCB_V2 ()" link="gst-plugins-bad-libs-Utilities.html#GLCB-V2:CAPS"/>
-    <keyword type="function" name="CRCB ()" link="gst-plugins-bad-libs-Utilities.html#CRCB:CAPS"/>
     <keyword type="function" name="CDCB ()" link="gst-plugins-bad-libs-Utilities.html#CDCB:CAPS"/>
     <keyword type="function" name="gst_gl_ensure_display ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-display"/>
     <keyword type="function" name="gst_gl_handle_set_context ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-handle-set-context"/>
@@ -489,6 +561,7 @@
     <keyword type="function" name="gst_gl_context_set_error ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-set-error"/>
     <keyword type="function" name="gst_gl_context_get_error ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-get-error"/>
     <keyword type="function" name="gst_gl_context_clear_shader ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-context-clear-shader"/>
+    <keyword type="function" name="gst_gl_generate_texture_full ()" link="gst-plugins-bad-libs-Utilities.html#gst-gl-generate-texture-full"/>
     <keyword type="enum" name="enum GstGLDisplayProjection" link="gst-plugins-bad-libs-Utilities.html#GstGLDisplayProjection"/>
     <keyword type="function" name="gst_gl_window_error_quark ()" link="GstGLWindow.html#gst-gl-window-error-quark"/>
     <keyword type="macro" name="GST_GL_WINDOW_ERROR" link="GstGLWindow.html#GST-GL-WINDOW-ERROR:CAPS"/>
diff --git a/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html b/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html
index 2455d21..83ff174 100644
--- a/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html
+++ b/docs/libs/html/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html
@@ -40,7 +40,7 @@
 <col class="functions_name">
 </colgroup>
 <tbody><tr>
-<td class="function_type">const <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT"><span class="returnvalue">GstMpegTsAtscTVCT</span></a> *
+<td class="function_type">const <span class="returnvalue">GstMpegTsAtscVCT</span> *
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#gst-mpegts-section-get-atsc-tvct" title="gst_mpegts_section_get_atsc_tvct ()">gst_mpegts_section_get_atsc_tvct</a> <span class="c_punctuation">()</span>
@@ -55,20 +55,10 @@
 <col width="150px" class="name">
 <col class="description">
 </colgroup>
-<tbody>
-<tr>
+<tbody><tr>
 <td class="datatype_keyword">enum</td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsSectionATSCTableID" title="enum GstMpegTsSectionATSCTableID">GstMpegTsSectionATSCTableID</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCTSource" title="struct GstMpegTsAtscTVCTSource">GstMpegTsAtscTVCTSource</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT">GstMpegTsAtscTVCT</a></td>
-</tr>
-</tbody>
+</tr></tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -88,9 +78,9 @@
 <a name="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
 <a name="gst-mpegts-section-get-atsc-tvct"></a><h3>gst_mpegts_section_get_atsc_tvct ()</h3>
-<pre class="programlisting">const <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT"><span class="returnvalue">GstMpegTsAtscTVCT</span></a> *
+<pre class="programlisting">const <span class="returnvalue">GstMpegTsAtscVCT</span> *
 gst_mpegts_section_get_atsc_tvct (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-sections.html#GstMpegTsSection"><span class="type">GstMpegTsSection</span></a> *section</code></em>);</pre>
-<p>Returns the <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT"><span class="type">GstMpegTsAtscTVCT</span></a> contained in the <em class="parameter"><code>section</code></em>
+<p>Returns the <span class="type">GstMpegTsAtscVCT</span> contained in the <em class="parameter"><code>section</code></em>
 </p>
 <div class="refsect3">
 <a name="id-1.2.5.6.8.2.5"></a><h4>Parameters</h4>
@@ -109,7 +99,7 @@
 </div>
 <div class="refsect3">
 <a name="id-1.2.5.6.8.2.6"></a><h4>Returns</h4>
-<p> The <a class="link" href="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT" title="struct GstMpegTsAtscTVCT"><span class="type">GstMpegTsAtscTVCT</span></a> contained in the section, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
+<p> The <span class="type">GstMpegTsAtscVCT</span> contained in the section, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error
 happened.</p>
 <p></p>
 </div>
@@ -220,43 +210,6 @@
 </table></div>
 </div>
 </div>
-<hr>
-<div class="refsect2">
-<a name="GstMpegTsAtscTVCTSource"></a><h3>struct GstMpegTsAtscTVCTSource</h3>
-<pre class="programlisting">struct GstMpegTsAtscTVCTSource {
-  gunichar2 *short_name;
-  guint16   major_channel_number;
-  guint16   minor_channel_number;
-  guint8    modulation_mode;
-  guint32   carrier_frequency;
-  guint16   channel_TSID;
-  guint16   program_number;
-  /* FIXME: */
-  guint8    ETM_location;
-  gboolean  access_controlled;
-  gboolean  hidden;
-  gboolean  hide_guide;
-  /* FIXME: */
-  guint8    service_type;
-  guint16   source_id;
-  GPtrArray *descriptors;
-};
-</pre>
-<p>Source from a <em class="parameter"><code>GstMpegTsAtscTVCT</code></em>
-</p>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstMpegTsAtscTVCT"></a><h3>struct GstMpegTsAtscTVCT</h3>
-<pre class="programlisting">struct GstMpegTsAtscTVCT {
-  guint16   transport_stream_id;
-  guint8    protocol_version;
-  GPtrArray *sources;
-  GPtrArray *descriptors;
-};
-</pre>
-<p>Terrestrial Virtual Channel Table (A65)</p>
-</div>
 </div>
 </div>
 <div class="footer">
diff --git a/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-sections.html b/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-sections.html
index 9cd3cfb..edee922 100644
--- a/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-sections.html
+++ b/docs/libs/html/gst-plugins-bad-libs-Base-MPEG-TS-sections.html
@@ -1001,6 +1001,41 @@
 </td>
 <td class="enum_member_annotations"> </td>
 </tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-MPEGTS-SECTION-ATSC-CVCT:CAPS"></a>GST_MPEGTS_SECTION_ATSC_CVCT</p></td>
+<td class="enum_member_description">
+<p>ATSC Cable Virtual Channel Table (A65)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-MPEGTS-SECTION-ATSC-MGT:CAPS"></a>GST_MPEGTS_SECTION_ATSC_MGT</p></td>
+<td class="enum_member_description">
+<p>ATSC Master Guide Table (A65)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-MPEGTS-SECTION-ATSC-ETT:CAPS"></a>GST_MPEGTS_SECTION_ATSC_ETT</p></td>
+<td class="enum_member_description">
+<p>ATSC Extended Text Table (A65)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-MPEGTS-SECTION-ATSC-EIT:CAPS"></a>GST_MPEGTS_SECTION_ATSC_EIT</p></td>
+<td class="enum_member_description">
+<p>ATSC Event Information Table (A65)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-MPEGTS-SECTION-ATSC-STT:CAPS"></a>GST_MPEGTS_SECTION_ATSC_STT</p></td>
+<td class="enum_member_description">
+<p>ATSC System Time Table (A65)</p>
+</td>
+<td class="enum_member_annotations"> </td>
+</tr>
 </tbody>
 </table></div>
 </div>
diff --git a/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html b/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html
index 94f6866..c305ef8 100644
--- a/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html
+++ b/docs/libs/html/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html
@@ -232,6 +232,62 @@
 <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-ca-identifier" title="gst_mpegts_descriptor_parse_dvb_ca_identifier ()">gst_mpegts_descriptor_parse_dvb_ca_identifier</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-service-list" title="gst_mpegts_descriptor_parse_dvb_service_list ()">gst_mpegts_descriptor_parse_dvb_service_list</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stuffing" title="gst_mpegts_descriptor_parse_dvb_stuffing ()">gst_mpegts_descriptor_parse_dvb_stuffing</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-bouquet-name" title="gst_mpegts_descriptor_parse_dvb_bouquet_name ()">gst_mpegts_descriptor_parse_dvb_bouquet_name</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-network-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_network_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_network_name</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-service-name" title="gst_mpegts_descriptor_parse_dvb_multilingual_service_name ()">gst_mpegts_descriptor_parse_dvb_multilingual_service_name</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-component" title="gst_mpegts_descriptor_parse_dvb_multilingual_component ()">gst_mpegts_descriptor_parse_dvb_multilingual_component</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -363,6 +419,26 @@
 <td class="datatype_keyword">struct</td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBParentalRatingItem" title="struct GstMpegTsDVBParentalRatingItem">GstMpegTsDVBParentalRatingItem</a></td>
 </tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceListItem" title="struct GstMpegTsDVBServiceListItem">GstMpegTsDVBServiceListItem</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualNetworkNameItem" title="struct GstMpegTsDvbMultilingualNetworkNameItem">GstMpegTsDvbMultilingualNetworkNameItem</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualBouquetNameItem" title="struct GstMpegTsDvbMultilingualBouquetNameItem">GstMpegTsDvbMultilingualBouquetNameItem</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualServiceNameItem" title="struct GstMpegTsDvbMultilingualServiceNameItem">GstMpegTsDvbMultilingualServiceNameItem</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualComponentItem" title="struct GstMpegTsDvbMultilingualComponentItem">GstMpegTsDvbMultilingualComponentItem</a></td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -1055,12 +1131,12 @@
 <tr>
 <td class="parameter_name"><p>private_data</p></td>
 <td class="parameter_description"><p> additional data or NULL. </p></td>
-<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
 </tr>
 <tr>
 <td class="parameter_name"><p>length</p></td>
 <td class="parameter_description"><p> length of <code class="literal">private_data</code>. </p></td>
-<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
 </tr>
 </tbody>
 </table></div>
@@ -1102,8 +1178,9 @@
 </tr>
 <tr>
 <td class="parameter_name"><p>list</p></td>
-<td class="parameter_description"><p> a list of all frequencies in Hz/kHz depending from <code class="literal">offset</code>. </p></td>
-<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+<td class="parameter_description"><p> a list of all frequencies in Hz/kHz
+depending on <code class="literal">offset</code>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint32]</span></td>
 </tr>
 </tbody>
 </table></div>
@@ -1354,6 +1431,268 @@
 <p></p>
 </div>
 </div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-service-list"></a><h3>gst_mpegts_descriptor_parse_dvb_service_list ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_service_list
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> **list</code></em>);</pre>
+<p>Parses out a list of services from the <em class="parameter"><code>descriptor</code></em>
+:</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.26.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-SERVICE-LIST:CAPS"><code class="literal">GST_MTS_DESC_DVB_SERVICE_LIST</code></a> <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>list</p></td>
+<td class="parameter_description"><p>the list of services. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegTsDVBServiceListItem]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.26.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-stuffing"></a><h3>gst_mpegts_descriptor_parse_dvb_stuffing ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_stuffing
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><span class="type">guint8</span> **stuffing_bytes</code></em>);</pre>
+<p>Parses out the stuffing bytes from the <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.27.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-STUFFING:CAPS"><code class="literal">GST_MTS_DESC_DVB_STUFFING</code></a> <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>stuffing_bytes</p></td>
+<td class="parameter_description"><p> the stuffing bytes. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.27.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-bouquet-name"></a><h3>gst_mpegts_descriptor_parse_dvb_bouquet_name ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_bouquet_name
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **bouquet_name</code></em>);</pre>
+<p>Extracts the bouquet name from <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.28.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>bouquet_name</p></td>
+<td class="parameter_description"><p> the bouquet name. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.28.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing succeeded, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-multilingual-network-name"></a><h3>gst_mpegts_descriptor_parse_dvb_multilingual_network_name ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_multilingual_network_name
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> **network_name_items</code></em>);</pre>
+<p>Parses out the multilingual network name from the <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.29.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-NETWORK-NAME:CAPS"><code class="literal">GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME</code></a>
+<a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>network_name_items</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualNetworkNameItem" title="struct GstMpegTsDvbMultilingualNetworkNameItem"><span class="type">GstMpegTsDvbMultilingualNetworkNameItem</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegTsDvbMultilingualNetworkNameItem]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.29.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name"></a><h3>gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> **bouquet_name_items</code></em>);</pre>
+<p>Parses out the multilingual bouquet name from the <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.30.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-BOUQUET-NAME:CAPS"><code class="literal">GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME</code></a>
+<a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>bouquet_name_items</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualBouquetNameItem" title="struct GstMpegTsDvbMultilingualBouquetNameItem"><span class="type">GstMpegTsDvbMultilingualBouquetNameItem</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegTsDvbMultilingualBouquetNameItem]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.30.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-multilingual-service-name"></a><h3>gst_mpegts_descriptor_parse_dvb_multilingual_service_name ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_multilingual_service_name
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> **service_name_items</code></em>);</pre>
+<p>Parses out the multilingual service name from the <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.31.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-SERVICE-NAME:CAPS"><code class="literal">GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME</code></a>
+<a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>service_name_items</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualServiceNameItem" title="struct GstMpegTsDvbMultilingualServiceNameItem"><span class="type">GstMpegTsDvbMultilingualServiceNameItem</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegTsDvbMultilingualServiceNameItem]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.31.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-mpegts-descriptor-parse-dvb-multilingual-component"></a><h3>gst_mpegts_descriptor_parse_dvb_multilingual_component ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_mpegts_descriptor_parse_dvb_multilingual_component
+                               (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a> *descriptor</code></em>,
+                                <em class="parameter"><code><span class="type">guint8</span> *component_tag</code></em>,
+                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> **component_description_items</code></em>);</pre>
+<p>Parses out the multilingual component from the <em class="parameter"><code>descriptor</code></em>
+.</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.32.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>descriptor</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GST-MTS-DESC-DVB-MULTILINGUAL-COMPONENT:CAPS"><code class="literal">GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT</code></a>
+<a class="link" href="gst-plugins-bad-libs-Base-MPEG-TS-descriptors.html#GstMpegTsDescriptor"><span class="type">GstMpegTsDescriptor</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>component_tag</p></td>
+<td class="parameter_description"><p>the component tag</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>component_description_items</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualComponentItem" title="struct GstMpegTsDvbMultilingualComponentItem"><span class="type">GstMpegTsDvbMultilingualComponentItem</span></a>. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstMpegTsDvbMultilingualComponentItem]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.5.9.8.32.6"></a><h4>Returns</h4>
+<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the parsing happened correctly, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
+<p></p>
+</div>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.other_details"></a><h2>Types and Values</h2>
@@ -1829,7 +2168,7 @@
   guint8 component_type;
   guint8 component_tag;
   /* FIXME : Make it a separate (allocated, null-terminated) return value  */
-  gchar  language_code[3];
+  gchar  language_code[4];
   gchar *text;
 };
 </pre>
@@ -1849,8 +2188,7 @@
 <pre class="programlisting">struct GstMpegTsExtendedEventDescriptor {
   guint8 descriptor_number;
   guint8 last_descriptor_number;
-  gchar  language_code[3];
-  guint8 nb_items;
+  gchar  language_code[4];
   GPtrArray *items;
   gchar *text;
 };
@@ -1876,13 +2214,8 @@
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsExtendedEventDescriptor.language-code"></a>language_code</code></em>[3];</p></td>
-<td class="struct_member_description"> </td>
-<td class="struct_member_annotations"> </td>
-</tr>
-<tr>
-<td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstMpegTsExtendedEventDescriptor.nb-items"></a>nb_items</code></em>;</p></td>
-<td class="struct_member_description"> </td>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsExtendedEventDescriptor.language-code"></a>language_code</code></em>[4];</p></td>
+<td class="struct_member_description"><p>NULL terminated language code.</p></td>
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
@@ -3156,7 +3489,7 @@
   guint16     data_broadcast_id;
   guint8      component_tag;
   guint8      *selector_bytes;
-  gchar       language_code[3];
+  gchar       language_code[4];
   gchar       *text;
 };
 </pre>
@@ -3185,7 +3518,7 @@
 <td class="struct_member_annotations"> </td>
 </tr>
 <tr>
-<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDataBroadcastDescriptor.language-code"></a>language_code</code></em>[3];</p></td>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDataBroadcastDescriptor.language-code"></a>language_code</code></em>[4];</p></td>
 <td class="struct_member_description"><p>language of <em class="parameter"><code>text</code></em>
 </p></td>
 <td class="struct_member_annotations"> </td>
@@ -3203,11 +3536,175 @@
 <div class="refsect2">
 <a name="GstMpegTsDVBParentalRatingItem"></a><h3>struct GstMpegTsDVBParentalRatingItem</h3>
 <pre class="programlisting">struct GstMpegTsDVBParentalRatingItem {
-  gchar  country_code[3];
+  gchar  country_code[4];
   guint8 rating;
 };
 </pre>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstMpegTsDVBServiceListItem"></a><h3>struct GstMpegTsDVBServiceListItem</h3>
+<pre class="programlisting">struct GstMpegTsDVBServiceListItem {
+  guint16                 service_id;
+  GstMpegTsDVBServiceType type;
+};
+</pre>
+<div class="refsect3">
+<a name="id-1.2.5.9.9.32.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><span class="type">guint16</span> <em class="structfield"><code><a name="GstMpegTsDVBServiceListItem.service-id"></a>service_id</code></em>;</p></td>
+<td class="struct_member_description"><p>the id of a service</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a class="link" href="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceType" title="enum GstMpegTsDVBServiceType"><span class="type">GstMpegTsDVBServiceType</span></a> <em class="structfield"><code><a name="GstMpegTsDVBServiceListItem.type"></a>type</code></em>;</p></td>
+<td class="struct_member_description"><p>the type of a service</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstMpegTsDvbMultilingualNetworkNameItem"></a><h3>struct GstMpegTsDvbMultilingualNetworkNameItem</h3>
+<pre class="programlisting">struct GstMpegTsDvbMultilingualNetworkNameItem {
+  gchar language_code[4];
+  gchar *network_name;
+};
+</pre>
+<p>a multilingual network name entry</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.9.33.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDvbMultilingualNetworkNameItem.language-code"></a>language_code</code></em>[4];</p></td>
+<td class="struct_member_description"><p>the ISO 639 language code</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstMpegTsDvbMultilingualNetworkNameItem.network-name"></a>network_name</code></em>;</p></td>
+<td class="struct_member_description"><p>the network name</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstMpegTsDvbMultilingualBouquetNameItem"></a><h3>struct GstMpegTsDvbMultilingualBouquetNameItem</h3>
+<pre class="programlisting">struct GstMpegTsDvbMultilingualBouquetNameItem {
+  gchar language_code[4];
+  gchar *bouquet_name;
+};
+</pre>
+<p>a multilingual bouquet name entry</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.9.34.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDvbMultilingualBouquetNameItem.language-code"></a>language_code</code></em>[4];</p></td>
+<td class="struct_member_description"><p>the ISO 639 language code</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstMpegTsDvbMultilingualBouquetNameItem.bouquet-name"></a>bouquet_name</code></em>;</p></td>
+<td class="struct_member_description"><p>the bouquet name</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstMpegTsDvbMultilingualServiceNameItem"></a><h3>struct GstMpegTsDvbMultilingualServiceNameItem</h3>
+<pre class="programlisting">struct GstMpegTsDvbMultilingualServiceNameItem {
+  gchar language_code[4];
+  gchar *provider_name;
+  gchar *service_name;
+};
+</pre>
+<p>a multilingual service name entry</p>
+<div class="refsect3">
+<a name="id-1.2.5.9.9.35.5"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDvbMultilingualServiceNameItem.language-code"></a>language_code</code></em>[4];</p></td>
+<td class="struct_member_description"><p>the ISO 639 language code</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstMpegTsDvbMultilingualServiceNameItem.provider-name"></a>provider_name</code></em>;</p></td>
+<td class="struct_member_description"><p>the provider name</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstMpegTsDvbMultilingualServiceNameItem.service-name"></a>service_name</code></em>;</p></td>
+<td class="struct_member_description"><p>the service name</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstMpegTsDvbMultilingualComponentItem"></a><h3>struct GstMpegTsDvbMultilingualComponentItem</h3>
+<pre class="programlisting">struct GstMpegTsDvbMultilingualComponentItem {
+  gchar language_code[4];
+  gchar *description;
+};
+</pre>
+<div class="refsect3">
+<a name="id-1.2.5.9.9.36.4"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="struct_members_name">
+<col class="struct_members_description">
+<col width="200px" class="struct_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GstMpegTsDvbMultilingualComponentItem.language-code"></a>language_code</code></em>[4];</p></td>
+<td class="struct_member_description"><p>the ISO 639 language code</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+<tr>
+<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstMpegTsDvbMultilingualComponentItem.description"></a>description</code></em>;</p></td>
+<td class="struct_member_description"><p>the component description</p></td>
+<td class="struct_member_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
 </div>
 </div>
 <div class="footer">
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html b/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html
new file mode 100644
index 0000000..90d93e2
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstEGLImageMemory.html
@@ -0,0 +1,195 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstEGLImageMemory</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="gl.html" title="OpenGL Helper Library">
+<link rel="prev" href="GstGLDownload.html" title="GstGLDownload">
+<link rel="next" href="GstGLFilter.html" title="GstGLFilter">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstEGLImageMemory.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstEGLImageMemory.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstGLDownload.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="GstGLFilter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstEGLImageMemory.top_of_page"></a>GstEGLImageMemory</span></h2>
+<p>GstEGLImageMemory</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_return">
+<col class="functions_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-init" title="gst_egl_image_memory_init ()">gst_egl_image_memory_init</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">EGLDisplay</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-display" title="gst_egl_image_memory_get_display ()">gst_egl_image_memory_get_display</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">EGLImageKHR</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-image" title="gst_egl_image_memory_get_image ()">gst_egl_image_memory_get_image</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">GstVideoGLTextureOrientation</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-orientation" title="gst_egl_image_memory_get_orientation ()">gst_egl_image_memory_get_orientation</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-set-orientation" title="gst_egl_image_memory_set_orientation ()">gst_egl_image_memory_set_orientation</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-setup-buffer" title="gst_egl_image_memory_setup_buffer ()">gst_egl_image_memory_setup_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#gst-is-egl-image-memory" title="gst_is_egl_image_memory ()">gst_is_egl_image_memory</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-EGL-IMAGE-MEMORY-TYPE:CAPS" title="GST_EGL_IMAGE_MEMORY_TYPE">GST_EGL_IMAGE_MEMORY_TYPE</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstEGLImageMemory.html#GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS" title="GST_CAPS_FEATURE_MEMORY_EGL_IMAGE">GST_CAPS_FEATURE_MEMORY_EGL_IMAGE</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-egl-image-memory-init"></a><h3>gst_egl_image_memory_init ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_egl_image_memory_init (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-egl-image-memory-get-display"></a><h3>gst_egl_image_memory_get_display ()</h3>
+<pre class="programlisting"><span class="returnvalue">EGLDisplay</span>
+gst_egl_image_memory_get_display (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-egl-image-memory-get-image"></a><h3>gst_egl_image_memory_get_image ()</h3>
+<pre class="programlisting"><span class="returnvalue">EGLImageKHR</span>
+gst_egl_image_memory_get_image (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-egl-image-memory-get-orientation"></a><h3>gst_egl_image_memory_get_orientation ()</h3>
+<pre class="programlisting"><span class="returnvalue">GstVideoGLTextureOrientation</span>
+gst_egl_image_memory_get_orientation (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-egl-image-memory-set-orientation"></a><h3>gst_egl_image_memory_set_orientation ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_egl_image_memory_set_orientation (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>,
+                                      <em class="parameter"><code><span class="type">GstVideoGLTextureOrientation</span> orientation</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-egl-image-memory-setup-buffer"></a><h3>gst_egl_image_memory_setup_buffer ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_egl_image_memory_setup_buffer (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
+                                   <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *info</code></em>,
+                                   <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-is-egl-image-memory"></a><h3>gst_is_egl_image_memory ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_is_egl_image_memory (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstEGLImageMemory.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GST-EGL-IMAGE-MEMORY-TYPE:CAPS"></a><h3>GST_EGL_IMAGE_MEMORY_TYPE</h3>
+<pre class="programlisting">#define GST_EGL_IMAGE_MEMORY_TYPE "EGLImage"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS"></a><h3>GST_CAPS_FEATURE_MEMORY_EGL_IMAGE</h3>
+<pre class="programlisting">#define GST_CAPS_FEATURE_MEMORY_EGL_IMAGE "memory:EGLImage"
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html b/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html
index ae24d34..d878bed 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLAPI.html
@@ -42,18 +42,44 @@
 <tbody>
 <tr>
 <td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-to-string" title="gst_gl_api_to_string ()">gst_gl_api_to_string</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="returnvalue">GstGLAPI</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-from-string" title="gst_gl_api_from_string ()">gst_gl_api_from_string</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-to-string" title="gst_gl_platform_to_string ()">gst_gl_platform_to_string</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="returnvalue">GstGLPlatform</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-from-string" title="gst_gl_platform_from_string ()">gst_gl_platform_from_string</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
 <a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#gst-gl-check-extension" title="gst_gl_check_extension ()">gst_gl_check_extension</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-bad-libs-GstGLAPI.html#GST-GL-CHECK-GL-VERSION:CAPS" title="GST_GL_CHECK_GL_VERSION()">GST_GL_CHECK_GL_VERSION</a><span class="c_punctuation">()</span>
-</td>
-</tr>
 </tbody>
 </table></div>
 </div>
@@ -64,10 +90,32 @@
 <col width="150px" class="name">
 <col class="description">
 </colgroup>
-<tbody><tr>
+<tbody>
+<tr>
 <td class="datatype_keyword">enum</td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI">GstGLAPI</a></td>
-</tr></tbody>
+</tr>
+<tr>
+<td class="datatype_keyword">enum</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform">GstGLPlatform</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1-NAME:CAPS" title="GST_GL_API_GLES1_NAME">GST_GL_API_GLES1_NAME</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2-NAME:CAPS" title="GST_GL_API_GLES2_NAME">GST_GL_API_GLES2_NAME</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3-NAME:CAPS" title="GST_GL_API_OPENGL3_NAME">GST_GL_API_OPENGL3_NAME</a></td>
+</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL-NAME:CAPS" title="GST_GL_API_OPENGL_NAME">GST_GL_API_OPENGL_NAME</a></td>
+</tr>
+</tbody>
 </table></div>
 </div>
 <div class="refsect1">
@@ -81,24 +129,42 @@
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstGLAPI.functions_details"></a><h2>Functions</h2>
 <div class="refsect2">
+<a name="gst-gl-api-to-string"></a><h3>gst_gl_api_to_string ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+gst_gl_api_to_string (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="type">GstGLAPI</span></a> api</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-api-from-string"></a><h3>gst_gl_api_from_string ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI" title="enum GstGLAPI"><span class="returnvalue">GstGLAPI</span></a>
+gst_gl_api_from_string (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *api_s</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-platform-to-string"></a><h3>gst_gl_platform_to_string ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
+gst_gl_platform_to_string (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="type">GstGLPlatform</span></a> api</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-platform-from-string"></a><h3>gst_gl_platform_from_string ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform" title="enum GstGLPlatform"><span class="returnvalue">GstGLPlatform</span></a>
+gst_gl_platform_from_string (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *platform_s</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-gl-check-extension"></a><h3>gst_gl_check_extension ()</h3>
 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_gl_check_extension (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ext</code></em>);</pre>
 </div>
-<hr>
-<div class="refsect2">
-<a name="GST-GL-CHECK-GL-VERSION:CAPS"></a><h3>GST_GL_CHECK_GL_VERSION()</h3>
-<pre class="programlisting">#define             GST_GL_CHECK_GL_VERSION(driver_major, driver_minor, \
-                                            target_major, target_minor)</pre>
-</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-GstGLAPI.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstGLAPI"></a><h3>enum GstGLAPI</h3>
 <div class="refsect3">
-<a name="id-1.2.7.2.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.2.8.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -132,11 +198,6 @@
 <td> </td>
 </tr>
 <tr>
-<td class="enum_member_name"><p><a name="GST-GL-API-GLES3:CAPS"></a>GST_GL_API_GLES3</p></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr>
 <td class="enum_member_name"><p><a name="GST-GL-API-ANY:CAPS"></a>GST_GL_API_ANY</p></td>
 <td> </td>
 <td> </td>
@@ -145,6 +206,81 @@
 </table></div>
 </div>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstGLPlatform"></a><h3>enum GstGLPlatform</h3>
+<div class="refsect3">
+<a name="id-1.2.9.2.8.3.3"></a><h4>Members</h4>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="300px" class="enum_members_name">
+<col class="enum_members_description">
+<col width="200px" class="enum_members_annotations">
+</colgroup>
+<tbody>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-NONE:CAPS"></a>GST_GL_PLATFORM_NONE</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-EGL:CAPS"></a>GST_GL_PLATFORM_EGL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-GLX:CAPS"></a>GST_GL_PLATFORM_GLX</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-WGL:CAPS"></a>GST_GL_PLATFORM_WGL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-CGL:CAPS"></a>GST_GL_PLATFORM_CGL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-EAGL:CAPS"></a>GST_GL_PLATFORM_EAGL</p></td>
+<td> </td>
+<td> </td>
+</tr>
+<tr>
+<td class="enum_member_name"><p><a name="GST-GL-PLATFORM-ANY:CAPS"></a>GST_GL_PLATFORM_ANY</p></td>
+<td> </td>
+<td> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-GL-API-GLES1-NAME:CAPS"></a><h3>GST_GL_API_GLES1_NAME</h3>
+<pre class="programlisting">#define GST_GL_API_GLES1_NAME "gles1"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-GL-API-GLES2-NAME:CAPS"></a><h3>GST_GL_API_GLES2_NAME</h3>
+<pre class="programlisting">#define GST_GL_API_GLES2_NAME "gles2"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-GL-API-OPENGL3-NAME:CAPS"></a><h3>GST_GL_API_OPENGL3_NAME</h3>
+<pre class="programlisting">#define GST_GL_API_OPENGL3_NAME "opengl3"
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GST-GL-API-OPENGL-NAME:CAPS"></a><h3>GST_GL_API_OPENGL_NAME</h3>
+<pre class="programlisting">#define GST_GL_API_OPENGL_NAME "opengl"
+</pre>
+</div>
 </div>
 </div>
 <div class="footer">
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html b/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html
new file mode 100644
index 0000000..82b0b55
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLFramebuffer.html
@@ -0,0 +1,196 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLFramebuffer</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="gl.html" title="OpenGL Helper Library">
+<link rel="prev" href="GstGLFilter.html" title="GstGLFilter">
+<link rel="next" href="gst-plugins-bad-libs-gstglmemory.html" title="GstGLMemory">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstGLFramebuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstGLFramebuffer.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstGLFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-gstglmemory.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstGLFramebuffer.top_of_page"></a>GstGLFramebuffer</span></h2>
+<p>GstGLFramebuffer</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_return">
+<col class="functions_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="returnvalue">GstGLFramebuffer</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-new" title="gst_gl_framebuffer_new ()">gst_gl_framebuffer_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-generate" title="gst_gl_framebuffer_generate ()">gst_gl_framebuffer_generate</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-delete" title="gst_gl_framebuffer_delete ()">gst_gl_framebuffer_delete</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use" title="gst_gl_framebuffer_use ()">gst_gl_framebuffer_use</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use-v2" title="gst_gl_framebuffer_use_v2 ()">gst_gl_framebuffer_use_v2</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer">GstGLFramebuffer</a></td>
+</tr>
+<tr>
+<td class="datatype_keyword">struct</td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebufferClass" title="struct GstGLFramebufferClass">GstGLFramebufferClass</a></td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-gl-framebuffer-new"></a><h3>gst_gl_framebuffer_new ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="returnvalue">GstGLFramebuffer</span></a> *
+gst_gl_framebuffer_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-framebuffer-generate"></a><h3>gst_gl_framebuffer_generate ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_framebuffer_generate (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
+                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
+                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *fbo</code></em>,
+                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *depthbuffer</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-framebuffer-delete"></a><h3>gst_gl_framebuffer_delete ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_framebuffer_delete (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                           <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fbo</code></em>,
+                           <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> depth</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-framebuffer-use"></a><h3>gst_gl_framebuffer_use ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_framebuffer_use (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_height</code></em>,
+                        <em class="parameter"><code><span class="type">GLuint</span> fbo</code></em>,
+                        <em class="parameter"><code><span class="type">GLuint</span> depth_buffer</code></em>,
+                        <em class="parameter"><code><span class="type">GLuint</span> texture_fbo</code></em>,
+                        <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-Utilities.html#GLCB:CAPS" title="GLCB ()"><span class="type">GLCB</span></a> cb</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> input_tex_width</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> input_tex_height</code></em>,
+                        <em class="parameter"><code><span class="type">GLuint</span> input_tex</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param1</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param2</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param3</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> proj_param4</code></em>,
+                        <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-Utilities.html#GstGLDisplayProjection" title="enum GstGLDisplayProjection"><span class="type">GstGLDisplayProjection</span></a> projection</code></em>,
+                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> stuff</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-framebuffer-use-v2"></a><h3>gst_gl_framebuffer_use_v2 ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_framebuffer_use_v2 (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer" title="struct GstGLFramebuffer"><span class="type">GstGLFramebuffer</span></a> *frame</code></em>,
+                           <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_width</code></em>,
+                           <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> texture_fbo_height</code></em>,
+                           <em class="parameter"><code><span class="type">GLuint</span> fbo</code></em>,
+                           <em class="parameter"><code><span class="type">GLuint</span> depth_buffer</code></em>,
+                           <em class="parameter"><code><span class="type">GLuint</span> texture_fbo</code></em>,
+                           <em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-Utilities.html#GLCB-V2:CAPS" title="GLCB_V2 ()"><span class="type">GLCB_V2</span></a> cb</code></em>,
+                           <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> stuff</code></em>);</pre>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLFramebuffer.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLFramebuffer"></a><h3>struct GstGLFramebuffer</h3>
+<pre class="programlisting">struct GstGLFramebuffer {
+  GObject             object;
+};
+</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstGLFramebufferClass"></a><h3>struct GstGLFramebufferClass</h3>
+<pre class="programlisting">struct GstGLFramebufferClass {
+  GObjectClass object_class;
+};
+</pre>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLUploadMeta.html b/docs/libs/html/gst-plugins-bad-libs-GstGLUploadMeta.html
new file mode 100644
index 0000000..0736de0
--- /dev/null
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLUploadMeta.html
@@ -0,0 +1,243 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstGLUploadMeta</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="gl.html" title="OpenGL Helper Library">
+<link rel="prev" href="GstGLUpload.html" title="GstGLUpload">
+<link rel="next" href="gst-plugins-bad-libs-Utilities.html" title="Utilities">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstGLUploadMeta.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-libs-GstGLUploadMeta.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstGLUpload.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-libs-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstGLUploadMeta.top_of_page"></a>GstGLUploadMeta</span></h2>
+<p>GstGLUploadMeta — an object that provides <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a></p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.functions"></a><h2>Functions</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="functions_return">
+<col class="functions_name">
+</colgroup>
+<tbody>
+<tr>
+<td class="function_type">
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="returnvalue">GstGLUploadMeta</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-new" title="gst_gl_upload_meta_new ()">gst_gl_upload_meta_new</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-set-format" title="gst_gl_upload_meta_set_format ()">gst_gl_upload_meta_set_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="returnvalue">GstVideoInfo</span></a> *
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-get-format" title="gst_gl_upload_meta_get_format ()">gst_gl_upload_meta_get_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer" title="gst_gl_upload_meta_add_to_buffer ()">gst_gl_upload_meta_add_to_buffer</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.other"></a><h2>Types and Values</h2>
+<div class="informaltable"><table width="100%" border="0">
+<colgroup>
+<col width="150px" class="name">
+<col class="description">
+</colgroup>
+<tbody><tr>
+<td class="datatype_keyword"> </td>
+<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta">GstGLUploadMeta</a></td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.description"></a><h2>Description</h2>
+<p><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> is an object that uploads data from system memory into GL textures.</p>
+<p>A <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a> can be created with <a class="link" href="GstGLUpload.html#gst-gl-upload-new" title="gst_gl_upload_new ()"><code class="function">gst_gl_upload_new()</code></a></p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.functions_details"></a><h2>Functions</h2>
+<div class="refsect2">
+<a name="gst-gl-upload-meta-new"></a><h3>gst_gl_upload_meta_new ()</h3>
+<pre class="programlisting"><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="returnvalue">GstGLUploadMeta</span></a> *
+gst_gl_upload_meta_new (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.2.4"></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>context</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.2.5"></a><h4>Returns</h4>
+<p> a new <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> object</p>
+<p></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-upload-meta-set-format"></a><h3>gst_gl_upload_meta_set_format ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_upload_meta_set_format (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> *upload</code></em>,
+                               <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *info</code></em>);</pre>
+<p>Initializes <em class="parameter"><code>upload</code></em>
+ with the information required for upload.</p>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.3.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>upload</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>info</p></td>
+<td class="parameter_description"><p>input <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-upload-meta-get-format"></a><h3>gst_gl_upload_meta_get_format ()</h3>
+<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="returnvalue">GstVideoInfo</span></a> *
+gst_gl_upload_meta_get_format (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> *upload</code></em>);</pre>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.4.4"></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>upload</p></td>
+<td class="parameter_description"><p>a <a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.4.5"></a><h4>Returns</h4>
+<p> The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> set by
+<a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-set-format" title="gst_gl_upload_meta_set_format ()"><code class="function">gst_gl_upload_meta_set_format()</code></a>. </p>
+<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
+</div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-upload-meta-add-to-buffer"></a><h3>gst_gl_upload_meta_add_to_buffer ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_upload_meta_add_to_buffer (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> *upload</code></em>,
+                                  <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
+<p>Adds a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta"><span class="type">GstVideoGLTextureUploadMeta</span></a> on <em class="parameter"><code>buffer</code></em>
+ using <em class="parameter"><code>upload</code></em>
+</p>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.5.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>upload</p></td>
+<td class="parameter_description"><p>a <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>buffer</p></td>
+<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a></p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect3">
+<a name="id-1.2.9.19.7.5.6"></a><h4>Returns</h4>
+<p> whether it was successful</p>
+<p></p>
+</div>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.other_details"></a><h2>Types and Values</h2>
+<div class="refsect2">
+<a name="GstGLUploadMeta"></a><h3>GstGLUploadMeta</h3>
+<pre class="programlisting">typedef struct {
+} GstGLUploadMeta;
+</pre>
+<p>Opaque <a class="link" href="gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta" title="GstGLUploadMeta"><span class="type">GstGLUploadMeta</span></a> object</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-libs-GstGLUploadMeta.see-also"></a><h2>See Also</h2>
+<p><a class="link" href="GstGLUpload.html" title="GstGLUpload"><span class="type">GstGLUpload</span></a>, <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html
index 2df8e6f..5cb4a6a 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstGLWindowX11.html
@@ -129,7 +129,7 @@
 gst_gl_window_x11_untrap_x_errors (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 <p>Removes the X error trap and returns the current status.</p>
 <div class="refsect3">
-<a name="id-1.2.7.24.7.5.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.27.7.5.5"></a><h4>Returns</h4>
 <p> the trapped error code, or 0 for success</p>
 <p></p>
 </div>
diff --git a/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html b/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
index 979a3f9..9c828fd 100644
--- a/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
+++ b/docs/libs/html/gst-plugins-bad-libs-GstInsertbin.html
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="tools.html" title="Useful elements">
 <link rel="prev" href="tools.html" title="Useful elements">
-<link rel="next" href="gl.html" title="OpenGL Helper Library">
+<link rel="next" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
@@ -23,7 +23,7 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="tools.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="tools.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gl.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="base.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
 <a name="gst-plugins-bad-libs-GstInsertbin"></a><div class="titlepage"></div>
diff --git a/docs/libs/html/gst-plugins-bad-libs-Utilities.html b/docs/libs/html/gst-plugins-bad-libs-Utilities.html
index 292255a..e92282b 100644
--- a/docs/libs/html/gst-plugins-bad-libs-Utilities.html
+++ b/docs/libs/html/gst-plugins-bad-libs-Utilities.html
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gl.html" title="OpenGL Helper Library">
-<link rel="prev" href="GstGLUpload.html" title="GstGLUpload">
+<link rel="prev" href="gst-plugins-bad-libs-GstGLUploadMeta.html" title="GstGLUploadMeta">
 <link rel="next" href="GstGLWindow.html" title="GstGLWindow">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
@@ -20,7 +20,7 @@
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="GstGLUpload.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstGLUploadMeta.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="GstGLWindow.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -58,14 +58,6 @@
 </tr>
 <tr>
 <td class="function_type">
-<span class="returnvalue">void</span>
-</td>
-<td class="function_name">
-<span class="c_punctuation">(</span><a class="link" href="gst-plugins-bad-libs-Utilities.html#CRCB:CAPS" title="CRCB ()">*CRCB</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
-</td>
-</tr>
-<tr>
-<td class="function_type">
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -192,6 +184,14 @@
 <a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-context-clear-shader" title="gst_gl_context_clear_shader ()">gst_gl_context_clear_shader</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-Utilities.html#gst-gl-generate-texture-full" title="gst_gl_generate_texture_full ()">gst_gl_generate_texture_full</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -227,7 +227,7 @@
          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> stuff</code></em>);</pre>
 <p>callback definition for operating on textures</p>
 <div class="refsect3">
-<a name="id-1.2.7.17.7.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -266,7 +266,7 @@
 <span class="c_punctuation">(</span>*GLCB_V2<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> stuff</code></em>);</pre>
 <p>callback definition for operating through a Framebuffer object</p>
 <div class="refsect3">
-<a name="id-1.2.7.17.7.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -283,42 +283,6 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="CRCB:CAPS"></a><h3>CRCB ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span>
-<span class="c_punctuation">(</span>*CRCB<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">GLuint</span> width</code></em>,
-         <em class="parameter"><code><span class="type">GLuint</span> height</code></em>,
-         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
-<p>client reshape callback</p>
-<div class="refsect3">
-<a name="id-1.2.7.17.7.4.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>width</p></td>
-<td class="parameter_description"><p>new width</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>height</p></td>
-<td class="parameter_description"><p>new height:</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-<tr>
-<td class="parameter_name"><p>data</p></td>
-<td class="parameter_description"><p>user data</p></td>
-<td class="parameter_annotations"> </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-</div>
-<hr>
-<div class="refsect2">
 <a name="CDCB:CAPS"></a><h3>CDCB ()</h3>
 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 <span class="c_punctuation">(</span>*CDCB<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">GLuint</span> texture</code></em>,
@@ -327,7 +291,7 @@
          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
 <p>client draw callback</p>
 <div class="refsect3">
-<a name="id-1.2.7.17.7.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.20.7.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -494,13 +458,25 @@
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_gl_context_clear_shader (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>);</pre>
 </div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-generate-texture-full"></a><h3>gst_gl_generate_texture_full ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_gl_generate_texture_full (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
+                              <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoInfo"><span class="type">GstVideoInfo</span></a> *info</code></em>,
+                              <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> comp</code></em>,
+                              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> stride[]</code></em>,
+                              <em class="parameter"><code><span class="type">gsize</span> offset[]</code></em>,
+                              <em class="parameter"><code><span class="type">gsize</span> size[]</code></em>,
+                              <em class="parameter"><code><span class="type">GLuint</span> *pTexture</code></em>);</pre>
+</div>
 </div>
 <div class="refsect1">
 <a name="gst-plugins-bad-libs-Utilities.other_details"></a><h2>Types and Values</h2>
 <div class="refsect2">
 <a name="GstGLDisplayProjection"></a><h3>enum GstGLDisplayProjection</h3>
 <div class="refsect3">
-<a name="id-1.2.7.17.8.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.20.8.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html b/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
index e535ef6..292dab2 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstglmemory.html
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
 <link rel="up" href="gl.html" title="OpenGL Helper Library">
-<link rel="prev" href="GstGLFilter.html" title="GstGLFilter">
+<link rel="prev" href="gst-plugins-bad-libs-GstGLFramebuffer.html" title="GstGLFramebuffer">
 <link rel="next" href="gst-plugins-bad-libs-gstglmixer.html" title="GstGLMixer">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
@@ -20,7 +20,7 @@
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="gl.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="GstGLFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-libs-GstGLFramebuffer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-libs-gstglmixer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -122,6 +122,14 @@
 </tr>
 <tr>
 <td class="function_type">
+<span class="returnvalue">GstVideoGLTextureType</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglmemory.html#gst-gl-texture-type-from-format" title="gst_gl_texture_type_from_format ()">gst_gl_texture_type_from_format</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 </td>
 <td class="function_name">
@@ -192,7 +200,7 @@
 <p>Get the currently set flags on <em class="parameter"><code>mem</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -216,7 +224,7 @@
  is set on <em class="parameter"><code>mem</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -247,7 +255,7 @@
  on <em class="parameter"><code>mem</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.4.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.4.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -278,7 +286,7 @@
  on <em class="parameter"><code>mem</code></em>
 </p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.5.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.5.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -318,7 +326,7 @@
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>,
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> stride</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.7.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.7.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -340,7 +348,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.7.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.7.5"></a><h4>Returns</h4>
 <p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> object with a GL texture specified by <em class="parameter"><code>v_info</code></em>
 from <em class="parameter"><code>context</code></em>
 </p>
@@ -360,7 +368,7 @@
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.8.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.8.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -400,7 +408,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.8.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.8.5"></a><h4>Returns</h4>
 <p> a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a> object with a GL texture specified by <em class="parameter"><code>v_info</code></em>
 from <em class="parameter"><code>context</code></em>
 and contents specified by <em class="parameter"><code>data</code></em>
@@ -451,7 +459,7 @@
 using glCopyTexImage.  See the OpenGL specification for details on the
 mappings between texture formats.</p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.10.7"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.10.7"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -500,7 +508,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.10.8"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.10.8"></a><h4>Returns</h4>
 <p> Whether the copy suceeded</p>
 <p></p>
 </div>
@@ -517,7 +525,7 @@
  based on <em class="parameter"><code>info</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.11.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.11.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -544,7 +552,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.11.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.11.6"></a><h4>Returns</h4>
 <p> whether the memory's were sucessfully added.</p>
 <p></p>
 </div>
@@ -563,7 +571,7 @@
  based on <em class="parameter"><code>info</code></em>
 .</p>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.12.5"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.12.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -595,18 +603,26 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.12.6"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.12.6"></a><h4>Returns</h4>
 <p> whether the memory's were sucessfully created.</p>
 <p></p>
 </div>
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-texture-type-from-format"></a><h3>gst_gl_texture_type_from_format ()</h3>
+<pre class="programlisting"><span class="returnvalue">GstVideoGLTextureType</span>
+gst_gl_texture_type_from_format (<em class="parameter"><code><a class="link" href="GstGLContext.html" title="GstGLContext"><span class="type">GstGLContext</span></a> *context</code></em>,
+                                 <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoFormat"><span class="type">GstVideoFormat</span></a> v_format</code></em>,
+                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> plane</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-is-gl-memory"></a><h3>gst_is_gl_memory ()</h3>
 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 gst_is_gl_memory (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMemory.html"><span class="type">GstMemory</span></a> *mem</code></em>);</pre>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.13.4"></a><h4>Parameters</h4>
+<a name="id-1.2.9.15.8.14.4"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -621,7 +637,7 @@
 </table></div>
 </div>
 <div class="refsect3">
-<a name="id-1.2.7.13.8.13.5"></a><h4>Returns</h4>
+<a name="id-1.2.9.15.8.14.5"></a><h4>Returns</h4>
 <p> whether the memory at <em class="parameter"><code>mem</code></em>
 is a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
 <p></p>
@@ -666,7 +682,7 @@
 <a name="GstGLMemoryFlags"></a><h3>enum GstGLMemoryFlags</h3>
 <p>Flags indicating the current state of a <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLMemory" title="GstGLMemory"><span class="type">GstGLMemory</span></a></p>
 <div class="refsect3">
-<a name="id-1.2.7.13.9.6.4"></a><h4>Members</h4>
+<a name="id-1.2.9.15.9.6.4"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -715,7 +731,7 @@
 </pre>
 <p>Represents information about a GL texture</p>
 <div class="refsect3">
-<a name="id-1.2.7.13.9.7.5"></a><h4>Members</h4>
+<a name="id-1.2.9.15.9.7.5"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="struct_members_name">
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstglmixer.html b/docs/libs/html/gst-plugins-bad-libs-gstglmixer.html
index 7178bf6..b62d28e 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstglmixer.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstglmixer.html
@@ -102,10 +102,6 @@
 </tr>
 <tr>
 <td class="datatype_keyword">struct</td>
-<td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerCollect" title="struct GstGLMixerCollect">GstGLMixerCollect</a></td>
-</tr>
-<tr>
-<td class="datatype_keyword">struct</td>
 <td class="function_name"><a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixer-struct" title="struct GstGLMixer">GstGLMixer</a></td>
 </tr>
 <tr>
@@ -125,9 +121,13 @@
     <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
         <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
             <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
-            <span class="lineart">│</span>   <span class="lineart">╰──</span> GstGLMixer
+            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+            <span class="lineart">│</span>       <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregator.html" title="GstVideoAggregator">GstVideoAggregator</a>
+            <span class="lineart">│</span>           <span class="lineart">╰──</span> GstGLMixer
             <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html">GstPad</a>
-                <span class="lineart">╰──</span> GstGLMixerPad
+                <span class="lineart">╰──</span> <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+                    <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">GstVideoAggregatorPad</a>
+                        <span class="lineart">╰──</span> GstGLMixerPad
 </pre>
 </div>
 <div class="refsect1">
@@ -187,23 +187,7 @@
 <div class="refsect2">
 <a name="GstGLMixerPadClass"></a><h3>struct GstGLMixerPadClass</h3>
 <pre class="programlisting">struct GstGLMixerPadClass {
-  GstPadClass parent_class;
-};
-</pre>
-</div>
-<hr>
-<div class="refsect2">
-<a name="GstGLMixerCollect"></a><h3>struct GstGLMixerCollect</h3>
-<pre class="programlisting">struct GstGLMixerCollect {
-  GstCollectData collect;       /* we extend the CollectData */
-
-  GstBuffer *queued;
-
-  GstBuffer *buffer;            /* the queued buffer for this pad */
-  GstClockTime start_time;
-  GstClockTime end_time;
-
-  GstGLMixerPad *mixpad;
+  GstVideoAggregatorPadClass parent_class;
 };
 </pre>
 </div>
@@ -216,7 +200,7 @@
 <div class="refsect2">
 <a name="GstGLMixerClass"></a><h3>struct GstGLMixerClass</h3>
 <pre class="programlisting">struct GstGLMixerClass {
-  GstElementClass parent_class;
+  GstVideoAggregatorClass parent_class;
 
   GstGLMixerSetCaps set_caps;
   GstGLMixerReset reset;
diff --git a/docs/libs/html/gst-plugins-bad-libs-gstglshader.html b/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
index 63134dc..45a2ead 100644
--- a/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
+++ b/docs/libs/html/gst-plugins-bad-libs-gstglshader.html
@@ -141,6 +141,38 @@
 </tr>
 <tr>
 <td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-all-with-attribs-and-check" title="gst_gl_shader_compile_all_with_attribs_and_check ()">gst_gl_shader_compile_all_with_attribs_and_check</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-f-and-check" title="gst_gl_shader_compile_with_default_f_and_check ()">gst_gl_shader_compile_with_default_f_and_check</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-v-and-check" title="gst_gl_shader_compile_with_default_v_and_check ()">gst_gl_shader_compile_with_default_v_and_check</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-vf-and-check" title="gst_gl_shader_compile_with_default_vf_and_check ()">gst_gl_shader_compile_with_default_vf_and_check</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
@@ -537,6 +569,48 @@
 </div>
 <hr>
 <div class="refsect2">
+<a name="gst-gl-shader-compile-all-with-attribs-and-check"></a><h3>gst_gl_shader_compile_all_with_attribs_and_check ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_shader_compile_all_with_attribs_and_check
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *v_src</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *f_src</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attribs</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *attrib_names[]</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> attrib_locs[]</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-shader-compile-with-default-f-and-check"></a><h3>gst_gl_shader_compile_with_default_f_and_check ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_shader_compile_with_default_f_and_check
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *v_src</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attribs</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *attrib_names[]</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> attrib_locs[]</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-shader-compile-with-default-v-and-check"></a><h3>gst_gl_shader_compile_with_default_v_and_check ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_shader_compile_with_default_v_and_check
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>,
+                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *f_src</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> *pos_loc</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> *tex_loc</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-gl-shader-compile-with-default-vf-and-check"></a><h3>gst_gl_shader_compile_with_default_vf_and_check ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
+gst_gl_shader_compile_with_default_vf_and_check
+                               (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> *pos_loc</code></em>,
+                                <em class="parameter"><code><span class="type">GLint</span> *tex_loc</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
 <a name="gst-gl-shader-release"></a><h3>gst_gl_shader_release ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
 gst_gl_shader_release (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-gstglshader.html#GstGLShader"><span class="type">GstGLShader</span></a> *shader</code></em>);</pre>
@@ -812,7 +886,7 @@
 <div class="refsect2">
 <a name="GstGLShaderError"></a><h3>enum GstGLShaderError</h3>
 <div class="refsect3">
-<a name="id-1.2.7.15.10.2.3"></a><h4>Members</h4>
+<a name="id-1.2.9.17.10.2.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
@@ -843,7 +917,7 @@
 <div class="refsect2">
 <a name="GstGLShaderSourceType"></a><h3>enum GstGLShaderSourceType</h3>
 <div class="refsect3">
-<a name="id-1.2.7.15.10.3.3"></a><h4>Members</h4>
+<a name="id-1.2.9.17.10.3.3"></a><h4>Members</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="300px" class="enum_members_name">
diff --git a/docs/libs/html/gst-plugins-bad-libs-h264parser.html b/docs/libs/html/gst-plugins-bad-libs-h264parser.html
index ba6e336..24833d0 100644
--- a/docs/libs/html/gst-plugins-bad-libs-h264parser.html
+++ b/docs/libs/html/gst-plugins-bad-libs-h264parser.html
@@ -164,7 +164,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster" title="gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster ()">gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster</a> <span class="c_punctuation">()</span>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-zigzag-from-raster" title="gst_h264_quant_matrix_8x8_get_zigzag_from_raster ()">gst_h264_quant_matrix_8x8_get_zigzag_from_raster</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -172,7 +172,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag" title="gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag ()">gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag</a> <span class="c_punctuation">()</span>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-raster-from-zigzag" title="gst_h264_quant_matrix_8x8_get_raster_from_zigzag ()">gst_h264_quant_matrix_8x8_get_raster_from_zigzag</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -180,7 +180,7 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster" title="gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster ()">gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster</a> <span class="c_punctuation">()</span>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-zigzag-from-raster" title="gst_h264_quant_matrix_4x4_get_zigzag_from_raster ()">gst_h264_quant_matrix_4x4_get_zigzag_from_raster</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 <tr>
@@ -188,7 +188,15 @@
 <span class="returnvalue">void</span>
 </td>
 <td class="function_name">
-<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag" title="gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag ()">gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag</a> <span class="c_punctuation">()</span>
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-raster-from-zigzag" title="gst_h264_quant_matrix_4x4_get_raster_from_zigzag ()">gst_h264_quant_matrix_4x4_get_raster_from_zigzag</a> <span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
+<td class="function_type">
+<span class="returnvalue">void</span>
+</td>
+<td class="function_name">
+<a class="link" href="gst-plugins-bad-libs-h264parser.html#gst-h264-video-calculate-framerate" title="gst_h264_video_calculate_framerate ()">gst_h264_video_calculate_framerate</a> <span class="c_punctuation">()</span>
 </td>
 </tr>
 </tbody>
@@ -848,9 +856,9 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster"></a><h3>gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster ()</h3>
+<a name="gst-h264-quant-matrix-8x8-get-zigzag-from-raster"></a><h3>gst_h264_quant_matrix_8x8_get_zigzag_from_raster ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster
+gst_h264_quant_matrix_8x8_get_zigzag_from_raster
                                (<em class="parameter"><code><span class="type">guint8</span> out_quant[64]</code></em>,
                                 <em class="parameter"><code>const <span class="type">guint8</span> quant[64]</code></em>);</pre>
 <p>Converts quantization matrix <em class="parameter"><code>quant</code></em>
@@ -887,17 +895,48 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag"></a><h3>gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag ()</h3>
+<a name="gst-h264-quant-matrix-8x8-get-raster-from-zigzag"></a><h3>gst_h264_quant_matrix_8x8_get_raster_from_zigzag ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag
+gst_h264_quant_matrix_8x8_get_raster_from_zigzag
                                (<em class="parameter"><code><span class="type">guint8</span> out_quant[64]</code></em>,
                                 <em class="parameter"><code>const <span class="type">guint8</span> quant[64]</code></em>);</pre>
+<p>Converts quantization matrix <em class="parameter"><code>quant</code></em>
+ from zigzag scan order to
+raster scan order and store the resulting factors into <em class="parameter"><code>out_quant</code></em>
+.</p>
+<p>Note: it is an error to pass the same table in both <em class="parameter"><code>quant</code></em>
+ and
+<em class="parameter"><code>out_quant</code></em>
+ arguments.</p>
+<div class="refsect3">
+<a name="id-1.2.4.3.8.19.6"></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>out_quant</p></td>
+<td class="parameter_description"><p> The resulting quantization matrix. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>quant</p></td>
+<td class="parameter_description"><p>The source quantization matrix</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since 1.4</p>
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster"></a><h3>gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster ()</h3>
+<a name="gst-h264-quant-matrix-4x4-get-zigzag-from-raster"></a><h3>gst_h264_quant_matrix_4x4_get_zigzag_from_raster ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster
+gst_h264_quant_matrix_4x4_get_zigzag_from_raster
                                (<em class="parameter"><code><span class="type">guint8</span> out_quant[16]</code></em>,
                                 <em class="parameter"><code>const <span class="type">guint8</span> quant[16]</code></em>);</pre>
 <p>Converts quantization matrix <em class="parameter"><code>quant</code></em>
@@ -934,11 +973,101 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag"></a><h3>gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag ()</h3>
+<a name="gst-h264-quant-matrix-4x4-get-raster-from-zigzag"></a><h3>gst_h264_quant_matrix_4x4_get_raster_from_zigzag ()</h3>
 <pre class="programlisting"><span class="returnvalue">void</span>
-gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag
+gst_h264_quant_matrix_4x4_get_raster_from_zigzag
                                (<em class="parameter"><code><span class="type">guint8</span> out_quant[16]</code></em>,
                                 <em class="parameter"><code>const <span class="type">guint8</span> quant[16]</code></em>);</pre>
+<p>Converts quantization matrix <em class="parameter"><code>quant</code></em>
+ from zigzag scan order to
+raster scan order and store the resulting factors into <em class="parameter"><code>out_quant</code></em>
+.</p>
+<p>Note: it is an error to pass the same table in both <em class="parameter"><code>quant</code></em>
+ and
+<em class="parameter"><code>out_quant</code></em>
+ arguments.</p>
+<div class="refsect3">
+<a name="id-1.2.4.3.8.21.6"></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>out_quant</p></td>
+<td class="parameter_description"><p> The resulting quantization matrix. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>quant</p></td>
+<td class="parameter_description"><p>The source quantization matrix</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p class="since">Since 1.4</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="gst-h264-video-calculate-framerate"></a><h3>gst_h264_video_calculate_framerate ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+gst_h264_video_calculate_framerate (<em class="parameter"><code>const <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264SPS" title="struct GstH264SPS"><span class="type">GstH264SPS</span></a> *sps</code></em>,
+                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> field_pic_flag</code></em>,
+                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> pic_struct</code></em>,
+                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *fps_num</code></em>,
+                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *fps_den</code></em>);</pre>
+<p>Calculate framerate of a video sequence using <em class="parameter"><code>sps</code></em>
+ VUI information,
+<em class="parameter"><code>field_pic_flag</code></em>
+ from a slice header and <em class="parameter"><code>pic_struct</code></em>
+ from <a class="link" href="gst-plugins-bad-libs-h264parser.html#GstH264PicTiming" title="struct GstH264PicTiming"><span class="type">GstH264PicTiming</span></a> SEI
+message.</p>
+<p>If framerate is variable or can't be determined, <em class="parameter"><code>fps_num</code></em>
+ will be set to 0
+and <em class="parameter"><code>fps_den</code></em>
+ to 1.</p>
+<div class="refsect3">
+<a name="id-1.2.4.3.8.22.6"></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>sps</p></td>
+<td class="parameter_description"><p>Current Sequence Parameter Set</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>field_pic_flag</p></td>
+<td class="parameter_description"><p>Current <em class="parameter"><code>field_pic_flag</code></em>
+, obtained from latest slice header</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>pic_struct</p></td>
+<td class="parameter_description"><p><em class="parameter"><code>pic_struct</code></em>
+value if available, 0 otherwise</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>fps_num</p></td>
+<td class="parameter_description"><p> The resulting fps numerator. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+<tr>
+<td class="parameter_name"><p>fps_den</p></td>
+<td class="parameter_description"><p> The resulting fps denominator. </p></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
+</tr>
+</tbody>
+</table></div>
+</div>
 </div>
 </div>
 <div class="refsect1">
diff --git a/docs/libs/html/gstreamer-libs-hierarchy.html b/docs/libs/html/gstreamer-libs-hierarchy.html
index cedbcde..fde61af 100644
--- a/docs/libs/html/gstreamer-libs-hierarchy.html
+++ b/docs/libs/html/gstreamer-libs-hierarchy.html
@@ -29,13 +29,17 @@
             <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html">GstAllocator</a>
             <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmemory.html#GstGLAllocator">GstGLAllocator</a>
             <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html">GstPad</a>
-            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPad">GstGLMixerPad</a>
+            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstAggregatorPad.html" title="GstAggregatorPad">GstAggregatorPad</a>
+            <span class="lineart">│</span>       <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregatorPad.html" title="GstVideoAggregatorPad">GstVideoAggregatorPad</a>
+            <span class="lineart">│</span>           <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPad">GstGLMixerPad</a>
             <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
             <span class="lineart">│</span>   <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html">GstBin</a>
             <span class="lineart">│</span>   <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin">GstInsertBin</a>
             <span class="lineart">│</span>   <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
             <span class="lineart">│</span>   <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstGLFilter.html" title="GstGLFilter">GstGLFilter</a>
-            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixer">GstGLMixer</a>
+            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a class="link" href="GstAggregator.html" title="GstAggregator">GstAggregator</a>
+            <span class="lineart">│</span>       <span class="lineart">╰──</span> <a class="link" href="GstVideoAggregator.html" title="GstVideoAggregator">GstVideoAggregator</a>
+            <span class="lineart">│</span>           <span class="lineart">╰──</span> <a class="link" href="gst-plugins-bad-libs-gstglmixer.html#GstGLMixer">GstGLMixer</a>
             <span class="lineart">├──</span> <a class="link" href="GstGLUpload.html" title="GstGLUpload">GstGLUpload</a>
             <span class="lineart">├──</span> <a class="link" href="GstGLDownload.html" title="GstGLDownload">GstGLDownload</a>
             <span class="lineart">├──</span> <a class="link" href="GstGLColorConvert.html" title="GstGLColorConvert">GstGLColorConvert</a>
diff --git a/docs/libs/html/gstreamer-plugins-bad.html b/docs/libs/html/gstreamer-plugins-bad.html
index ae29f66..62a93dc 100644
--- a/docs/libs/html/gstreamer-plugins-bad.html
+++ b/docs/libs/html/gstreamer-plugins-bad.html
@@ -83,6 +83,25 @@
 <dd><dl><dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstInsertbin.html">GstInsertbin</a></span><span class="refpurpose">A <span class="type">GstBin</span> to insertally link filter-like elements.</span>
 </dt></dl></dd>
+<dt><span class="chapter"><a href="base.html">GStreamer Base classes from gst-plugins-bad</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="GstAggregator.html">GstAggregator</a></span><span class="refpurpose"> — manages a set of pads with the purpose of
+aggregating their buffers.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstAggregatorPad.html">GstAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="video.html">Video helpers and baseclasses</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregator.html">GstVideoAggregator</a></span><span class="refpurpose"> — Base class for video aggregators</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregatorPad.html">GstVideoAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
 <dt><span class="chapter"><a href="gl.html">OpenGL Helper Library</a></span></dt>
 <dd><dl>
 <dt>
@@ -116,9 +135,15 @@
 <span class="refentrytitle"><a href="GstGLDownload.html">GstGLDownload</a></span><span class="refpurpose"> — an object that downloads GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstEGLImageMemory.html">GstEGLImageMemory</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="GstGLFilter.html">GstGLFilter</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLFramebuffer.html">GstGLFramebuffer</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglmemory.html">GstGLMemory</a></span><span class="refpurpose"> — memory subclass for GL textures</span>
 </dt>
 <dt>
@@ -131,6 +156,9 @@
 <span class="refentrytitle"><a href="GstGLUpload.html">GstGLUpload</a></span><span class="refpurpose"> — an object that uploads to GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLUploadMeta.html">GstGLUploadMeta</a></span><span class="refpurpose">an object that provides <span class="type">GstVideoGLTextureUploadMeta</span></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-Utilities.html">Utilities</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
diff --git a/docs/libs/html/index.html b/docs/libs/html/index.html
index 8428279..b35785b 100644
--- a/docs/libs/html/index.html
+++ b/docs/libs/html/index.html
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer Bad Plugins 1.0 Library Reference Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      for GStreamer Bad Library 1.0 (1.3.2)
+      for GStreamer Bad Library 1.0 (1.3.3)
       <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/</a>.
     </p></div>
 </div>
@@ -82,6 +82,25 @@
 <dd><dl><dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-GstInsertbin.html">GstInsertbin</a></span><span class="refpurpose">A <span class="type">GstBin</span> to insertally link filter-like elements.</span>
 </dt></dl></dd>
+<dt><span class="chapter"><a href="base.html">GStreamer Base classes from gst-plugins-bad</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="GstAggregator.html">GstAggregator</a></span><span class="refpurpose"> — manages a set of pads with the purpose of
+aggregating their buffers.</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstAggregatorPad.html">GstAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
+<dt><span class="chapter"><a href="video.html">Video helpers and baseclasses</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregator.html">GstVideoAggregator</a></span><span class="refpurpose"> — Base class for video aggregators</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregatorPad.html">GstVideoAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></dd>
 <dt><span class="chapter"><a href="gl.html">OpenGL Helper Library</a></span></dt>
 <dd><dl>
 <dt>
@@ -115,9 +134,15 @@
 <span class="refentrytitle"><a href="GstGLDownload.html">GstGLDownload</a></span><span class="refpurpose"> — an object that downloads GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstEGLImageMemory.html">GstEGLImageMemory</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="GstGLFilter.html">GstGLFilter</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLFramebuffer.html">GstGLFramebuffer</a></span><span class="refpurpose"></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-gstglmemory.html">GstGLMemory</a></span><span class="refpurpose"> — memory subclass for GL textures</span>
 </dt>
 <dt>
@@ -130,6 +155,9 @@
 <span class="refentrytitle"><a href="GstGLUpload.html">GstGLUpload</a></span><span class="refpurpose"> — an object that uploads to GL textures</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-libs-GstGLUploadMeta.html">GstGLUploadMeta</a></span><span class="refpurpose">an object that provides <span class="type">GstVideoGLTextureUploadMeta</span></span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-libs-Utilities.html">Utilities</a></span><span class="refpurpose"></span>
 </dt>
 <dt>
diff --git a/docs/libs/html/index.sgml b/docs/libs/html/index.sgml
index 61fefe7..523d397 100644
--- a/docs/libs/html/index.sgml
+++ b/docs/libs/html/index.sgml
@@ -23,10 +23,11 @@
 <ANCHOR id="gst-h264-nal-parser-free" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-nal-parser-free">
 <ANCHOR id="gst-h264-parse-sps" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-parse-sps">
 <ANCHOR id="gst-h264-parse-pps" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-parse-pps">
-<ANCHOR id="gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-zigzag-from-raster">
-<ANCHOR id="gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-8x8-get-raster-from-zigzag">
-<ANCHOR id="gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-zigzag-from-raster">
-<ANCHOR id="gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-video-quant-matrix-4x4-get-raster-from-zigzag">
+<ANCHOR id="gst-h264-quant-matrix-8x8-get-zigzag-from-raster" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-zigzag-from-raster">
+<ANCHOR id="gst-h264-quant-matrix-8x8-get-raster-from-zigzag" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-8x8-get-raster-from-zigzag">
+<ANCHOR id="gst-h264-quant-matrix-4x4-get-zigzag-from-raster" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-zigzag-from-raster">
+<ANCHOR id="gst-h264-quant-matrix-4x4-get-raster-from-zigzag" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-quant-matrix-4x4-get-raster-from-zigzag">
+<ANCHOR id="gst-h264-video-calculate-framerate" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-h264-video-calculate-framerate">
 <ANCHOR id="gst-plugins-bad-libs-h264parser.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#gst-plugins-bad-libs-h264parser.other_details">
 <ANCHOR id="GST-H264-MAX-SPS-COUNT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-MAX-SPS-COUNT:CAPS">
 <ANCHOR id="GST-H264-MAX-PPS-COUNT:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-h264parser.html#GST-H264-MAX-PPS-COUNT:CAPS">
@@ -250,8 +251,6 @@
 <ANCHOR id="gst-mpegts-section-get-atsc-tvct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#gst-mpegts-section-get-atsc-tvct">
 <ANCHOR id="gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.other_details">
 <ANCHOR id="GstMpegTsSectionATSCTableID" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsSectionATSCTableID">
-<ANCHOR id="GstMpegTsAtscTVCTSource" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCTSource">
-<ANCHOR id="GstMpegTsAtscTVCT" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ATSC-variants-of-MPEG-TS-sections.html#GstMpegTsAtscTVCT">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.functions">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.html#gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-sections.other">
@@ -321,6 +320,13 @@
 <ANCHOR id="gst-mpegts-descriptor-parse-dvb-parental-rating" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-parental-rating">
 <ANCHOR id="gst-mpegts-descriptor-parse-dvb-stream-identifier" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stream-identifier">
 <ANCHOR id="gst-mpegts-descriptor-parse-dvb-ca-identifier" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-ca-identifier">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-service-list" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-service-list">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-stuffing" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-stuffing">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-bouquet-name" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-bouquet-name">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-multilingual-network-name" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-network-name">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-bouquet-name">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-multilingual-service-name" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-service-name">
+<ANCHOR id="gst-mpegts-descriptor-parse-dvb-multilingual-component" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-mpegts-descriptor-parse-dvb-multilingual-component">
 <ANCHOR id="gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.other_details">
 <ANCHOR id="GstMpegTsDVBDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBDescriptorType">
 <ANCHOR id="GstMpegTsDVBExtendedDescriptorType" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBExtendedDescriptorType">
@@ -352,6 +358,11 @@
 <ANCHOR id="GstMpegTsDVBLinkageDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBLinkageDescriptor">
 <ANCHOR id="GstMpegTsDataBroadcastDescriptor" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDataBroadcastDescriptor">
 <ANCHOR id="GstMpegTsDVBParentalRatingItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBParentalRatingItem">
+<ANCHOR id="GstMpegTsDVBServiceListItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDVBServiceListItem">
+<ANCHOR id="GstMpegTsDvbMultilingualNetworkNameItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualNetworkNameItem">
+<ANCHOR id="GstMpegTsDvbMultilingualBouquetNameItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualBouquetNameItem">
+<ANCHOR id="GstMpegTsDvbMultilingualServiceNameItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualServiceNameItem">
+<ANCHOR id="GstMpegTsDvbMultilingualComponentItem" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-DVB-variants-of-MPEG-TS-descriptors.html#GstMpegTsDvbMultilingualComponentItem">
 <ANCHOR id="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html">
 <ANCHOR id="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.other">
 <ANCHOR id="gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.html#gst-plugins-bad-libs-ISDB-variants-of-MPEG-TS-descriptors.object-hierarchy">
@@ -385,16 +396,65 @@
 <ANCHOR id="GstInsertBin-insert-before" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-insert-before">
 <ANCHOR id="GstInsertBin-prepend" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-prepend">
 <ANCHOR id="GstInsertBin-remove" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstInsertbin.html#GstInsertBin-remove">
+<ANCHOR id="GstAggregator" href="gst-plugins-bad-libs-1.0/GstAggregator.html">
+<ANCHOR id="GstAggregator.functions" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.functions">
+<ANCHOR id="GstAggregator.other" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.other">
+<ANCHOR id="GstAggregator.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.object-hierarchy">
+<ANCHOR id="GstAggregator.description" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.description">
+<ANCHOR id="GstAggregator.functions_details" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.functions_details">
+<ANCHOR id="gst-aggregator-finish-buffer" href="gst-plugins-bad-libs-1.0/GstAggregator.html#gst-aggregator-finish-buffer">
+<ANCHOR id="gst-aggregator-set-src-caps" href="gst-plugins-bad-libs-1.0/GstAggregator.html#gst-aggregator-set-src-caps">
+<ANCHOR id="gst-aggregator-iterate-sinkpads" href="gst-plugins-bad-libs-1.0/GstAggregator.html#gst-aggregator-iterate-sinkpads">
+<ANCHOR id="GstAggregator.other_details" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.other_details">
+<ANCHOR id="GstAggregator-struct" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator-struct">
+<ANCHOR id="GstAggregatorClass" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregatorClass">
+<ANCHOR id="GstAggregator.see-also" href="gst-plugins-bad-libs-1.0/GstAggregator.html#GstAggregator.see-also">
+<ANCHOR id="GstAggregatorPad" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html">
+<ANCHOR id="GstAggregatorPad.functions" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.functions">
+<ANCHOR id="GstAggregatorPad.other" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.other">
+<ANCHOR id="GstAggregatorPad.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.object-hierarchy">
+<ANCHOR id="GstAggregatorPad.description" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.description">
+<ANCHOR id="GstAggregatorPad.functions_details" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.functions_details">
+<ANCHOR id="gst-aggregator-pad-steal-buffer" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#gst-aggregator-pad-steal-buffer">
+<ANCHOR id="gst-aggregator-pad-get-buffer" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#gst-aggregator-pad-get-buffer">
+<ANCHOR id="GstAggregatorPad.other_details" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad.other_details">
+<ANCHOR id="GstAggregatorPad-struct" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPad-struct">
+<ANCHOR id="GstAggregatorPadClass" href="gst-plugins-bad-libs-1.0/GstAggregatorPad.html#GstAggregatorPadClass">
+<ANCHOR id="GstVideoAggregator" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html">
+<ANCHOR id="GstVideoAggregator.other" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.other">
+<ANCHOR id="GstVideoAggregator.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.object-hierarchy">
+<ANCHOR id="GstVideoAggregator.implemented-interfaces" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.implemented-interfaces">
+<ANCHOR id="GstVideoAggregator.description" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.description">
+<ANCHOR id="GstVideoAggregator.functions_details" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.functions_details">
+<ANCHOR id="GstVideoAggregator.other_details" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator.other_details">
+<ANCHOR id="GstVideoAggregator-struct" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregator-struct">
+<ANCHOR id="GstVideoAggregatorClass" href="gst-plugins-bad-libs-1.0/GstVideoAggregator.html#GstVideoAggregatorClass">
+<ANCHOR id="GstVideoAggregatorPad" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html">
+<ANCHOR id="GstVideoAggregatorPad.other" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad.other">
+<ANCHOR id="GstVideoAggregatorPad.object-hierarchy" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad.object-hierarchy">
+<ANCHOR id="GstVideoAggregatorPad.description" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad.description">
+<ANCHOR id="GstVideoAggregatorPad.functions_details" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad.functions_details">
+<ANCHOR id="GstVideoAggregatorPad.other_details" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad.other_details">
+<ANCHOR id="GstVideoAggregatorPad-struct" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPad-struct">
+<ANCHOR id="GstVideoAggregatorPadClass" href="gst-plugins-bad-libs-1.0/GstVideoAggregatorPad.html#GstVideoAggregatorPadClass">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.functions">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.other">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.object-hierarchy">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.description">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.functions_details">
+<ANCHOR id="gst-gl-api-to-string" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-to-string">
+<ANCHOR id="gst-gl-api-from-string" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-gl-api-from-string">
+<ANCHOR id="gst-gl-platform-to-string" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-to-string">
+<ANCHOR id="gst-gl-platform-from-string" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-gl-platform-from-string">
 <ANCHOR id="gst-gl-check-extension" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-gl-check-extension">
-<ANCHOR id="GST-GL-CHECK-GL-VERSION:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-CHECK-GL-VERSION:CAPS">
 <ANCHOR id="gst-plugins-bad-libs-GstGLAPI.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#gst-plugins-bad-libs-GstGLAPI.other_details">
 <ANCHOR id="GstGLAPI" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GstGLAPI">
+<ANCHOR id="GstGLPlatform" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GstGLPlatform">
+<ANCHOR id="GST-GL-API-GLES1-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES1-NAME:CAPS">
+<ANCHOR id="GST-GL-API-GLES2-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-GLES2-NAME:CAPS">
+<ANCHOR id="GST-GL-API-OPENGL3-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL3-NAME:CAPS">
+<ANCHOR id="GST-GL-API-OPENGL-NAME:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLAPI.html#GST-GL-API-OPENGL-NAME:CAPS">
 <ANCHOR id="GstGLBufferPool" href="gst-plugins-bad-libs-1.0/GstGLBufferPool.html">
 <ANCHOR id="GstGLBufferPool.functions" href="gst-plugins-bad-libs-1.0/GstGLBufferPool.html#GstGLBufferPool.functions">
 <ANCHOR id="GstGLBufferPool.other" href="gst-plugins-bad-libs-1.0/GstGLBufferPool.html#GstGLBufferPool.other">
@@ -413,6 +473,7 @@
 <ANCHOR id="GstGLColorConvert.description" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#GstGLColorConvert.description">
 <ANCHOR id="GstGLColorConvert.functions_details" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#GstGLColorConvert.functions_details">
 <ANCHOR id="gst-gl-color-convert-new" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#gst-gl-color-convert-new">
+<ANCHOR id="gst-gl-color-convert-set-format" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#gst-gl-color-convert-set-format">
 <ANCHOR id="gst-gl-color-convert-perform" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#gst-gl-color-convert-perform">
 <ANCHOR id="GstGLColorConvert.other_details" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#GstGLColorConvert.other_details">
 <ANCHOR id="GST-GL-COLOR-CONVERT-FORMATS:CAPS" href="gst-plugins-bad-libs-1.0/GstGLColorConvert.html#GST-GL-COLOR-CONVERT-FORMATS:CAPS">
@@ -430,6 +491,7 @@
 <ANCHOR id="gst-gl-context-error-quark" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-error-quark">
 <ANCHOR id="GstGLContextThreadFunc" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContextThreadFunc">
 <ANCHOR id="gst-gl-context-new" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-new">
+<ANCHOR id="gst-gl-context-new-wrapped" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-new-wrapped">
 <ANCHOR id="gst-gl-context-create" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-create">
 <ANCHOR id="gst-gl-context-activate" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-activate">
 <ANCHOR id="gst-gl-context-default-get-proc-address" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-default-get-proc-address">
@@ -440,7 +502,10 @@
 <ANCHOR id="gst-gl-context-get-display" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-display">
 <ANCHOR id="gst-gl-context-get-gl-api" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-gl-api">
 <ANCHOR id="gst-gl-context-get-gl-context" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-gl-context">
+<ANCHOR id="gst-gl-context-get-gl-platform" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-gl-platform">
 <ANCHOR id="gst-gl-context-check-feature" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-check-feature">
+<ANCHOR id="gst-gl-context-check-gl-version" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-check-gl-version">
+<ANCHOR id="gst-gl-context-get-gl-version" href="gst-plugins-bad-libs-1.0/GstGLContext.html#gst-gl-context-get-gl-version">
 <ANCHOR id="GstGLContext.other_details" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContext.other_details">
 <ANCHOR id="GstGLContextError" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContextError">
 <ANCHOR id="GstGLContext-struct" href="gst-plugins-bad-libs-1.0/GstGLContext.html#GstGLContext-struct">
@@ -492,6 +557,7 @@
 <ANCHOR id="gst-context-get-gl-display" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-context-get-gl-display">
 <ANCHOR id="gst-context-set-gl-display" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#gst-context-set-gl-display">
 <ANCHOR id="GstGLDisplay.other_details" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.other_details">
+<ANCHOR id="GST-GL-DISPLAY-CONTEXT-TYPE:CAPS" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GST-GL-DISPLAY-CONTEXT-TYPE:CAPS">
 <ANCHOR id="GstGLDisplayType" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplayType">
 <ANCHOR id="GstGLDisplay-struct" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay-struct">
 <ANCHOR id="GstGLDisplay.see-also" href="gst-plugins-bad-libs-1.0/GstGLDisplay.html#GstGLDisplay.see-also">
@@ -507,6 +573,22 @@
 <ANCHOR id="GstGLDownload.other_details" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#GstGLDownload.other_details">
 <ANCHOR id="GstGLDownload-struct" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#GstGLDownload-struct">
 <ANCHOR id="GstGLDownload.see-also" href="gst-plugins-bad-libs-1.0/GstGLDownload.html#GstGLDownload.see-also">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.other">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.description">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.functions_details">
+<ANCHOR id="gst-egl-image-memory-init" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-init">
+<ANCHOR id="gst-egl-image-memory-get-display" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-display">
+<ANCHOR id="gst-egl-image-memory-get-image" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-image">
+<ANCHOR id="gst-egl-image-memory-get-orientation" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-get-orientation">
+<ANCHOR id="gst-egl-image-memory-set-orientation" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-set-orientation">
+<ANCHOR id="gst-egl-image-memory-setup-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-egl-image-memory-setup-buffer">
+<ANCHOR id="gst-is-egl-image-memory" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-is-egl-image-memory">
+<ANCHOR id="gst-plugins-bad-libs-GstEGLImageMemory.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#gst-plugins-bad-libs-GstEGLImageMemory.other_details">
+<ANCHOR id="GST-EGL-IMAGE-MEMORY-TYPE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#GST-EGL-IMAGE-MEMORY-TYPE:CAPS">
+<ANCHOR id="GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstEGLImageMemory.html#GST-CAPS-FEATURE-MEMORY-EGL-IMAGE:CAPS">
 <ANCHOR id="GstGLFilter" href="gst-plugins-bad-libs-1.0/GstGLFilter.html">
 <ANCHOR id="GstGLFilter.functions" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.functions">
 <ANCHOR id="GstGLFilter.properties" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.properties">
@@ -523,6 +605,20 @@
 <ANCHOR id="GstGLFilterClass" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilterClass">
 <ANCHOR id="GstGLFilter.property-details" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter.property-details">
 <ANCHOR id="GstGLFilter--other-context" href="gst-plugins-bad-libs-1.0/GstGLFilter.html#GstGLFilter--other-context">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.other">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.description">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.functions_details">
+<ANCHOR id="gst-gl-framebuffer-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-new">
+<ANCHOR id="gst-gl-framebuffer-generate" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-generate">
+<ANCHOR id="gst-gl-framebuffer-delete" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-delete">
+<ANCHOR id="gst-gl-framebuffer-use" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use">
+<ANCHOR id="gst-gl-framebuffer-use-v2" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-gl-framebuffer-use-v2">
+<ANCHOR id="gst-plugins-bad-libs-GstGLFramebuffer.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#gst-plugins-bad-libs-GstGLFramebuffer.other_details">
+<ANCHOR id="GstGLFramebuffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebuffer">
+<ANCHOR id="GstGLFramebufferClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLFramebuffer.html#GstGLFramebufferClass">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.functions">
 <ANCHOR id="GstGLAllocator" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GstGLAllocator">
@@ -541,6 +637,7 @@
 <ANCHOR id="gst-gl-memory-copy-into-texture" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-copy-into-texture">
 <ANCHOR id="gst-gl-memory-setup-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-setup-buffer">
 <ANCHOR id="gst-gl-memory-setup-wrapped" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-memory-setup-wrapped">
+<ANCHOR id="gst-gl-texture-type-from-format" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-gl-texture-type-from-format">
 <ANCHOR id="gst-is-gl-memory" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-is-gl-memory">
 <ANCHOR id="gst-plugins-bad-libs-gstglmemory.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#gst-plugins-bad-libs-gstglmemory.other_details">
 <ANCHOR id="GstGLAllocator-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmemory.html#GstGLAllocator-struct">
@@ -567,7 +664,6 @@
 <ANCHOR id="gst-plugins-bad-libs-gstglmixer.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#gst-plugins-bad-libs-gstglmixer.other_details">
 <ANCHOR id="GstGLMixerPad-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPad-struct">
 <ANCHOR id="GstGLMixerPadClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixerPadClass">
-<ANCHOR id="GstGLMixerCollect" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixerCollect">
 <ANCHOR id="GstGLMixer-struct" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixer-struct">
 <ANCHOR id="GstGLMixerClass" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixerClass">
 <ANCHOR id="GstGLMixerFrameData" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglmixer.html#GstGLMixerFrameData">
@@ -592,6 +688,10 @@
 <ANCHOR id="gst-gl-shader-is-compiled" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-is-compiled">
 <ANCHOR id="gst-gl-shader-compile" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile">
 <ANCHOR id="gst-gl-shader-compile-and-check" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-and-check">
+<ANCHOR id="gst-gl-shader-compile-all-with-attribs-and-check" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-all-with-attribs-and-check">
+<ANCHOR id="gst-gl-shader-compile-with-default-f-and-check" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-f-and-check">
+<ANCHOR id="gst-gl-shader-compile-with-default-v-and-check" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-v-and-check">
+<ANCHOR id="gst-gl-shader-compile-with-default-vf-and-check" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-compile-with-default-vf-and-check">
 <ANCHOR id="gst-gl-shader-release" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-release">
 <ANCHOR id="gst-gl-shader-use" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-use">
 <ANCHOR id="gst-gl-shader-set-uniform-1i" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-gstglshader.html#gst-gl-shader-set-uniform-1i">
@@ -640,7 +740,6 @@
 <ANCHOR id="gst-gl-upload-new" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-new">
 <ANCHOR id="gst-gl-upload-set-format" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-set-format">
 <ANCHOR id="gst-gl-upload-get-format" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-get-format">
-<ANCHOR id="gst-gl-upload-add-video-gl-texture-upload-meta" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-add-video-gl-texture-upload-meta">
 <ANCHOR id="gst-gl-upload-perform-with-data" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-perform-with-data">
 <ANCHOR id="gst-gl-upload-perform-with-gl-texture-upload-meta" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-perform-with-gl-texture-upload-meta">
 <ANCHOR id="gst-gl-upload-perform-with-buffer" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#gst-gl-upload-perform-with-buffer">
@@ -648,6 +747,19 @@
 <ANCHOR id="GstGLUpload.other_details" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.other_details">
 <ANCHOR id="GstGLUpload-struct" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload-struct">
 <ANCHOR id="GstGLUpload.see-also" href="gst-plugins-bad-libs-1.0/GstGLUpload.html#GstGLUpload.see-also">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.functions">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.other">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.object-hierarchy" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.description" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.description">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.functions_details">
+<ANCHOR id="gst-gl-upload-meta-new" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-new">
+<ANCHOR id="gst-gl-upload-meta-set-format" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-set-format">
+<ANCHOR id="gst-gl-upload-meta-get-format" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-get-format">
+<ANCHOR id="gst-gl-upload-meta-add-to-buffer" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-gl-upload-meta-add-to-buffer">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.other_details">
+<ANCHOR id="GstGLUploadMeta" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#GstGLUploadMeta">
+<ANCHOR id="gst-plugins-bad-libs-GstGLUploadMeta.see-also" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstGLUploadMeta.html#gst-plugins-bad-libs-GstGLUploadMeta.see-also">
 <ANCHOR id="gst-plugins-bad-libs-Utilities" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html">
 <ANCHOR id="gst-plugins-bad-libs-Utilities.functions" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-plugins-bad-libs-Utilities.functions">
 <ANCHOR id="gst-plugins-bad-libs-Utilities.other" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-plugins-bad-libs-Utilities.other">
@@ -656,7 +768,6 @@
 <ANCHOR id="gst-plugins-bad-libs-Utilities.functions_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-plugins-bad-libs-Utilities.functions_details">
 <ANCHOR id="GLCB:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#GLCB:CAPS">
 <ANCHOR id="GLCB-V2:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#GLCB-V2:CAPS">
-<ANCHOR id="CRCB:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#CRCB:CAPS">
 <ANCHOR id="CDCB:CAPS" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#CDCB:CAPS">
 <ANCHOR id="gst-gl-ensure-display" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-ensure-display">
 <ANCHOR id="gst-gl-handle-set-context" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-handle-set-context">
@@ -673,6 +784,7 @@
 <ANCHOR id="gst-gl-context-set-error" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-set-error">
 <ANCHOR id="gst-gl-context-get-error" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-get-error">
 <ANCHOR id="gst-gl-context-clear-shader" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-context-clear-shader">
+<ANCHOR id="gst-gl-generate-texture-full" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-gl-generate-texture-full">
 <ANCHOR id="gst-plugins-bad-libs-Utilities.other_details" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#gst-plugins-bad-libs-Utilities.other_details">
 <ANCHOR id="GstGLDisplayProjection" href="gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-Utilities.html#GstGLDisplayProjection">
 <ANCHOR id="GstGLWindow" href="gst-plugins-bad-libs-1.0/GstGLWindow.html">
diff --git a/docs/libs/html/video.html b/docs/libs/html/video.html
new file mode 100644
index 0000000..66eb938
--- /dev/null
+++ b/docs/libs/html/video.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Library Reference Manual: Video helpers and baseclasses</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
+<link rel="up" href="gstreamer-plugins-bad.html" title="Part I. GStreamer Bad Plugins Libraries">
+<link rel="prev" href="GstAggregatorPad.html" title="GstAggregatorPad">
+<link rel="next" href="GstVideoAggregator.html" title="GstVideoAggregator">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts"></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="gstreamer-plugins-bad.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="GstAggregatorPad.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="GstVideoAggregator.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="video"></a>Video helpers and baseclasses</h2></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregator.html">GstVideoAggregator</a></span><span class="refpurpose"> — Base class for video aggregators</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="GstVideoAggregatorPad.html">GstVideoAggregatorPad</a></span><span class="refpurpose"></span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/Makefile.in b/docs/plugins/Makefile.in
index a025969..f7dc35a 100644
--- a/docs/plugins/Makefile.in
+++ b/docs/plugins/Makefile.in
@@ -337,6 +337,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -423,6 +425,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -714,6 +717,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj
 
 # The name of the module, e.g. 'glib'.
diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml
index 72b4508..2ef5941 100644
--- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml
+++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml
@@ -26,6 +26,7 @@
     <xi:include href="xml/element-chromium.xml" />
     <xi:include href="xml/element-circle.xml" />
     <xi:include href="xml/element-coloreffects.xml" />
+    <xi:include href="xml/element-compositor.xml" />
     <xi:include href="xml/element-cvdilate.xml" />
     <xi:include href="xml/element-cverode.xml" />
     <xi:include href="xml/element-cvequalizehist.xml" />
diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt
index 17eb5c7..e42f1b3 100644
--- a/docs/plugins/gst-plugins-bad-plugins-sections.txt
+++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt
@@ -1611,6 +1611,39 @@
 GST_TYPE_ZBAR
 </SECTION>
 
+<SECTION>
+<FILE>element-gltransformation</FILE>
+<TITLE>gltransformation</TITLE>
+GstGLTransformation
+<SUBSECTION Standard>
+GstGLTransformationClass
+GST_GL_TRANSFORMATION
+GST_GL_TRANSFORMATION_CLASS
+GST_IS_GL_TRANSFORMATION
+GST_IS_GL_TRANSFORMATION_CLASS
+GST_TYPE_GL_TRANSFORMATION
+</SECTION>
+
+<SECTION>
+<FILE>element-compositor</FILE>
+<TITLE>compositor</TITLE>
+<SUBSECTION Standard>
+GstCompositorClass
+GstCompositor
+GST_COMPOSITOR
+GST_COMPOSITOR_CLASS
+GST_IS_COMPOSITOR
+GST_IS_COMPOSITOR_CLASS
+GST_TYPE_COMPOSITOR
+GstCompositorPad
+GstCompositorPadClass
+GST_COMPOSITOR_PAD
+GST_COMPOSITOR_PAD_CLASS
+GST_IS_COMPOSITOR_PAD
+GST_IS_COMPOSITOR_PAD_CLASS
+GST_TYPE_COMPOSITOR_PAD
+</SECTION>
+
 # gst-libs
 
 <SECTION>
diff --git a/docs/plugins/gst-plugins-bad-plugins.args b/docs/plugins/gst-plugins-bad-plugins.args
index a8303c5..45be52c 100644
--- a/docs/plugins/gst-plugins-bad-plugins.args
+++ b/docs/plugins/gst-plugins-bad-plugins.args
@@ -731,7 +731,7 @@
 <ARG>
 <NAME>GstMpeg2enc::bitrate</NAME>
 <TYPE>gint</TYPE>
-<RANGE>[0,10000]</RANGE>
+<RANGE>[0,40000]</RANGE>
 <FLAGS>rw</FLAGS>
 <NICK>Bitrate</NICK>
 <BLURB>Compressed video bitrate (kbps).</BLURB>
@@ -1929,6 +1929,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstDvbSrc::tuning-timeout</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Tuning Timeout</NICK>
+<BLURB>Milliseconds to wait before giving up tuning/locking on a signal.</BLURB>
+<DEFAULT>10000000000</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstRfbSrc::host</NAME>
 <TYPE>gchar*</TYPE>
 <RANGE></RANGE>
@@ -18129,6 +18139,16 @@
 </ARG>
 
 <ARG>
+<NAME>DvbBaseBin::tuning-timeout</NAME>
+<TYPE>guint64</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Tuning Timeout</NICK>
+<BLURB>Milliseconds to wait before giving up tuning/locking on a signal.</BLURB>
+<DEFAULT>10000000000</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstSDPDemux::debug</NAME>
 <TYPE>gboolean</TYPE>
 <RANGE></RANGE>
@@ -59094,6 +59114,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstWaylandSink::display</NAME>
+<TYPE>gchar*</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Wayland Display name</NICK>
+<BLURB>Wayland display name to connect to, if not supplied via the GstContext.</BLURB>
+<DEFAULT>NULL</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstPyramidSegment::level</NAME>
 <TYPE>gint</TYPE>
 <RANGE>[0,4]</RANGE>
@@ -67078,6 +67108,16 @@
 </ARG>
 
 <ARG>
+<NAME>GstSrtpEnc::allow-repeat-tx</NAME>
+<TYPE>gboolean</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Allow repeat packets transmission</NICK>
+<BLURB>Whether retransmissions of packets with the same sequence number are allowed(Note that such repeated transmissions must have the same RTP payload, or a severe security weakness is introduced!).</BLURB>
+<DEFAULT>FALSE</DEFAULT>
+</ARG>
+
+<ARG>
 <NAME>GstSegmentation::learning-rate</NAME>
 <TYPE>gfloat</TYPE>
 <RANGE>[0,1]</RANGE>
@@ -67825,3 +67865,13 @@
 <DEFAULT>NULL</DEFAULT>
 </ARG>
 
+<ARG>
+<NAME>GstCompositor::background</NAME>
+<TYPE>GstCompositorBackground</TYPE>
+<RANGE></RANGE>
+<FLAGS>rw</FLAGS>
+<NICK>Background</NICK>
+<BLURB>Background type.</BLURB>
+<DEFAULT>Checker pattern</DEFAULT>
+</ARG>
+
diff --git a/docs/plugins/gst-plugins-bad-plugins.hierarchy b/docs/plugins/gst-plugins-bad-plugins.hierarchy
index 9af1119..eb4da08 100644
--- a/docs/plugins/gst-plugins-bad-plugins.hierarchy
+++ b/docs/plugins/gst-plugins-bad-plugins.hierarchy
@@ -14,6 +14,12 @@
       GstControlBinding
       GstControlSource
       GstElement
+        GstAggregator
+          GstVideoAggregator
+            GstCompositor
+            GstGLMixer
+              GstGLMosaic
+              GstGLVideoMixer
         GstAiffMux
         GstAiffParse
         GstAsfMux
@@ -226,9 +232,6 @@
         GstFluidDec
         GstGDPDepay
         GstGDPPay
-        GstGLMixer
-          GstGLMosaic
-          GstGLVideoMixer
         GstGmeDec
         GstInterlace
         GstJP2kDecimator
@@ -251,7 +254,6 @@
         GstOpencvTextOverlay
         GstPcapParse
         GstPitch
-        GstPnmdec
         GstPnmenc
         GstPyramidSegment
         GstRTPBaseDepayload
@@ -279,6 +281,7 @@
         GstVideoDecoder
           GstOpenEXRDec
           GstOpenJPEGDec
+          GstPnmdec
           GstRsvgDec
           GstSchroDec
           GstVMncDec
@@ -298,7 +301,11 @@
         MpegTsMux
       GstGLContext
       GstPad
-        GstGLMixerPad
+        GstAggregatorPad
+          GstVideoAggregatorPad
+            GstCompositorPad
+            GstGLMixerPad
+              GstGLVideoMixerPad
       GstPadTemplate
       GstPlugin
       GstPluginFeature
@@ -395,4 +402,5 @@
   GstTagXmpWriter
   GstURIHandler
   GstVideoOverlay
+  GstWaylandVideo
   MXFDescriptiveMetadataFrameworkInterface
diff --git a/docs/plugins/gst-plugins-bad-plugins.interfaces b/docs/plugins/gst-plugins-bad-plugins.interfaces
index e0c5528..a1abf41 100644
--- a/docs/plugins/gst-plugins-bad-plugins.interfaces
+++ b/docs/plugins/gst-plugins-bad-plugins.interfaces
@@ -15,6 +15,7 @@
 GstCameraBin GstChildProxy GstTagSetter
 GstCameraBin2 GstChildProxy GstTagSetter
 GstCeltEnc GstPreset GstTagSetter
+GstCompositor GstChildProxy
 GstDaalaEnc GstPreset
 GstDashDemux GstChildProxy
 GstDataURISrc GstURIHandler
@@ -65,10 +66,12 @@
 GstVCDSrc GstURIHandler
 GstVP8Enc GstPreset GstTagSetter
 GstVP8Enc GstTagSetter GstPreset
+GstVideoAggregator GstChildProxy
 GstVideoEncoder GstPreset
 GstViewfinderBin GstChildProxy
 GstVoAacEnc GstPreset
 GstVoAmrWbEnc GstPreset
+GstWaylandSink GstVideoOverlay GstWaylandVideo
 GstWrapperCameraBinSrc GstChildProxy
 GstXvidEnc GstPreset
 MXFDMS1ClipFramework MXFDescriptiveMetadataFrameworkInterface
diff --git a/docs/plugins/gst-plugins-bad-plugins.prerequisites b/docs/plugins/gst-plugins-bad-plugins.prerequisites
index 2cf25c2..aff93ba 100644
--- a/docs/plugins/gst-plugins-bad-plugins.prerequisites
+++ b/docs/plugins/gst-plugins-bad-plugins.prerequisites
@@ -6,5 +6,6 @@
 GstPhotography GstImplementsInterface GstElement
 GstTagSetter GstElement
 GstTagXmpWriter GstElement
+GstWaylandVideo GstVideoOverlay
 GstXOverlay GstImplementsInterface GstElement
 MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadata
diff --git a/docs/plugins/gst-plugins-bad-plugins.signals b/docs/plugins/gst-plugins-bad-plugins.signals
index 8affeb7..d9cc154 100644
--- a/docs/plugins/gst-plugins-bad-plugins.signals
+++ b/docs/plugins/gst-plugins-bad-plugins.signals
@@ -551,6 +551,14 @@
 </SIGNAL>
 
 <SIGNAL>
+<NAME>GstSrtpEnc::get-rollover-counter</NAME>
+<RETURNS>guint</RETURNS>
+<FLAGS>la</FLAGS>
+GstSrtpEnc *gstsrtpenc
+guint  arg1
+</SIGNAL>
+
+<SIGNAL>
 <NAME>GstSrtpDec::clear-keys</NAME>
 <RETURNS>void</RETURNS>
 <FLAGS>la</FLAGS>
@@ -589,3 +597,74 @@
 guint  arg1
 </SIGNAL>
 
+<SIGNAL>
+<NAME>GstDvbSrc::tuning-done</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDvbSrc *gstdvbsrc
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstDvbSrc::tuning-fail</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDvbSrc *gstdvbsrc
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstDvbSrc::tuning-start</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+GstDvbSrc *gstdvbsrc
+</SIGNAL>
+
+<SIGNAL>
+<NAME>DvbBaseBin::tuning-done</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+DvbBaseBin *dvbbasebin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>DvbBaseBin::tuning-fail</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+DvbBaseBin *dvbbasebin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>DvbBaseBin::tuning-start</NAME>
+<RETURNS>void</RETURNS>
+<FLAGS>l</FLAGS>
+DvbBaseBin *dvbbasebin
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLImageSink::client-draw</NAME>
+<RETURNS>gboolean</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLImageSink *gstglimagesink
+guint  arg1
+guint  arg2
+guint  arg3
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLImageSink::client-reshape</NAME>
+<RETURNS>gboolean</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLImageSink *gstglimagesink
+guint  arg1
+guint  arg2
+</SIGNAL>
+
+<SIGNAL>
+<NAME>GstGLFilterApp::client-draw</NAME>
+<RETURNS>gboolean</RETURNS>
+<FLAGS>l</FLAGS>
+GstGLFilterApp *gstglfilterapp
+guint  arg1
+guint  arg2
+guint  arg3
+</SIGNAL>
+
diff --git a/docs/plugins/html/ch01.html b/docs/plugins/html/ch01.html
index bb0056b..71247e0 100644
--- a/docs/plugins/html/ch01.html
+++ b/docs/plugins/html/ch01.html
@@ -51,6 +51,9 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filter</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-compositor.html">compositor</a></span><span class="refpurpose"> — Composite multiple video streams</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvdilate.html">cvdilate</a></span><span class="refpurpose"> — Applies cvDilate OpenCV function to the image</span>
 </dt>
 <dt>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2 b/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2
index 44812d5..1f13223 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2
+++ b/docs/plugins/html/gst-plugins-bad-plugins-1.0.devhelp2
@@ -12,6 +12,7 @@
       <sub name="chromium" link="gst-plugins-bad-plugins-chromium.html"/>
       <sub name="circle" link="gst-plugins-bad-plugins-circle.html"/>
       <sub name="coloreffects" link="gst-plugins-bad-plugins-coloreffects.html"/>
+      <sub name="compositor" link="gst-plugins-bad-plugins-compositor.html"/>
       <sub name="cvdilate" link="gst-plugins-bad-plugins-cvdilate.html"/>
       <sub name="cverode" link="gst-plugins-bad-plugins-cverode.html"/>
       <sub name="cvequalizehist" link="gst-plugins-bad-plugins-cvequalizehist.html"/>
@@ -177,62 +178,66 @@
     <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-coloreffects.html#id-1.2.10.7.4.2"/>
     <keyword type="struct" name="struct GstColorEffects" link="gst-plugins-bad-plugins-coloreffects.html#GstColorEffects-struct"/>
     <keyword type="property" name="The “preset” property" link="gst-plugins-bad-plugins-coloreffects.html#GstColorEffects--preset"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvdilate.html#id-1.2.11.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvdilate.html#id-1.2.11.6.2.2"/>
+    <keyword type="" name="Sample pipelines" link="gst-plugins-bad-plugins-compositor.html#id-1.2.11.7.5"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-compositor.html#id-1.2.11.7.6.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-compositor.html#id-1.2.11.7.6.2"/>
+    <keyword type="property" name="The “background” property" link="gst-plugins-bad-plugins-compositor.html#GstCompositor--background"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvdilate.html#id-1.2.12.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvdilate.html#id-1.2.12.6.2.2"/>
     <keyword type="struct" name="struct GstCvDilate" link="gst-plugins-bad-plugins-cvdilate.html#GstCvDilate-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cverode.html#id-1.2.12.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cverode.html#id-1.2.12.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cverode.html#id-1.2.13.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cverode.html#id-1.2.13.6.2.2"/>
     <keyword type="struct" name="struct GstCvErode" link="gst-plugins-bad-plugins-cverode.html#GstCvErode-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvequalizehist.html#id-1.2.13.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvequalizehist.html#id-1.2.13.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvequalizehist.html#id-1.2.14.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvequalizehist.html#id-1.2.14.6.2.2"/>
     <keyword type="struct" name="struct GstCvEqualizeHist" link="gst-plugins-bad-plugins-cvequalizehist.html#GstCvEqualizeHist-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvlaplace.html#id-1.2.14.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvlaplace.html#id-1.2.14.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvlaplace.html#id-1.2.15.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvlaplace.html#id-1.2.15.7.2.2"/>
     <keyword type="struct" name="struct GstCvLaplace" link="gst-plugins-bad-plugins-cvlaplace.html#GstCvLaplace-struct"/>
     <keyword type="property" name="The “aperture-size” property" link="gst-plugins-bad-plugins-cvlaplace.html#GstCvLaplace--aperture-size"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvsmooth.html#id-1.2.15.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvsmooth.html#id-1.2.15.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvsmooth.html#id-1.2.16.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvsmooth.html#id-1.2.16.7.2.2"/>
     <keyword type="struct" name="struct GstCvSmooth" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth-struct"/>
     <keyword type="property" name="The “param1” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param1"/>
     <keyword type="property" name="The “param2” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param2"/>
     <keyword type="property" name="The “param3” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param3"/>
     <keyword type="property" name="The “param4” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--param4"/>
     <keyword type="property" name="The “type” property" link="gst-plugins-bad-plugins-cvsmooth.html#GstCvSmooth--type"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvsobel.html#id-1.2.16.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvsobel.html#id-1.2.16.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-cvsobel.html#id-1.2.17.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-cvsobel.html#id-1.2.17.7.2.2"/>
     <keyword type="struct" name="struct GstCvSobel" link="gst-plugins-bad-plugins-cvsobel.html#GstCvSobel-struct"/>
     <keyword type="property" name="The “aperture-size” property" link="gst-plugins-bad-plugins-cvsobel.html#GstCvSobel--aperture-size"/>
     <keyword type="property" name="The “x-order” property" link="gst-plugins-bad-plugins-cvsobel.html#GstCvSobel--x-order"/>
     <keyword type="property" name="The “y-order” property" link="gst-plugins-bad-plugins-cvsobel.html#GstCvSobel--y-order"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.17.8.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.17.8.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.17.8.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.18.8.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.18.8.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dataurisrc.html#id-1.2.18.8.4.2"/>
     <keyword type="struct" name="struct GstDataURISrc" link="gst-plugins-bad-plugins-dataurisrc.html#GstDataURISrc-struct"/>
     <keyword type="property" name="The “uri” property" link="gst-plugins-bad-plugins-dataurisrc.html#GstDataURISrc--uri"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-diffuse.html#id-1.2.18.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-diffuse.html#id-1.2.18.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-diffuse.html#id-1.2.19.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-diffuse.html#id-1.2.19.7.2.2"/>
     <keyword type="struct" name="struct GstDiffuse" link="gst-plugins-bad-plugins-diffuse.html#GstDiffuse-struct"/>
     <keyword type="property" name="The “scale” property" link="gst-plugins-bad-plugins-diffuse.html#GstDiffuse--scale"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dilate.html#id-1.2.19.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dilate.html#id-1.2.19.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dilate.html#id-1.2.19.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dilate.html#id-1.2.20.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dilate.html#id-1.2.20.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dilate.html#id-1.2.20.7.4.2"/>
     <keyword type="struct" name="struct GstDilate" link="gst-plugins-bad-plugins-dilate.html#GstDilate-struct"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-dilate.html#GstDilate--silent"/>
     <keyword type="property" name="The “erode” property" link="gst-plugins-bad-plugins-dilate.html#GstDilate--erode"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dodge.html#id-1.2.20.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dodge.html#id-1.2.20.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dodge.html#id-1.2.20.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dodge.html#id-1.2.21.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dodge.html#id-1.2.21.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dodge.html#id-1.2.21.7.4.2"/>
     <keyword type="struct" name="struct GstDodge" link="gst-plugins-bad-plugins-dodge.html#GstDodge-struct"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-dodge.html#GstDodge--silent"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dtmfdetect.html#id-1.2.21.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dtmfdetect.html#id-1.2.21.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dtmfdetect.html#id-1.2.22.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dtmfdetect.html#id-1.2.22.6.2.2"/>
     <keyword type="struct" name="struct GstDtmfDetect" link="gst-plugins-bad-plugins-dtmfdetect.html#GstDtmfDetect-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dtsdec.html#id-1.2.22.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dtsdec.html#id-1.2.22.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dtsdec.html#id-1.2.23.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dtsdec.html#id-1.2.23.7.2.2"/>
     <keyword type="struct" name="struct GstDtsDec" link="gst-plugins-bad-plugins-dtsdec.html#GstDtsDec-struct"/>
     <keyword type="property" name="The “drc” property" link="gst-plugins-bad-plugins-dtsdec.html#GstDtsDec--drc"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dvbsrc.html#id-1.2.23.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dvbsrc.html#id-1.2.23.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dvbsrc.html#id-1.2.24.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dvbsrc.html#id-1.2.24.8.2.2"/>
     <keyword type="struct" name="struct GstDvbSrc" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-struct"/>
     <keyword type="property" name="The “bandwidth-hz” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--bandwidth-hz"/>
     <keyword type="property" name="The “bandwidth” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--bandwidth"/>
@@ -263,22 +268,26 @@
     <keyword type="property" name="The “pilot” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--pilot"/>
     <keyword type="property" name="The “rolloff” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--rolloff"/>
     <keyword type="property" name="The “stream-id” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--stream-id"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.24.6.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.24.6.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.24.6.4.2"/>
+    <keyword type="property" name="The “tuning-timeout” property" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--tuning-timeout"/>
+    <keyword type="signal" name="The “tuning-done” signal" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-done"/>
+    <keyword type="signal" name="The “tuning-fail” signal" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-fail"/>
+    <keyword type="signal" name="The “tuning-start” signal" link="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-start"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.25.6.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.25.6.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-dvdspu.html#id-1.2.25.6.4.2"/>
     <keyword type="struct" name="GstDVDSpu" link="gst-plugins-bad-plugins-dvdspu.html#GstDVDSpu-struct"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.25.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.25.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.25.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.26.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.26.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-exclusion.html#id-1.2.26.7.4.2"/>
     <keyword type="struct" name="struct GstExclusion" link="gst-plugins-bad-plugins-exclusion.html#GstExclusion-struct"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-exclusion.html#GstExclusion--silent"/>
     <keyword type="property" name="The “factor” property" link="gst-plugins-bad-plugins-exclusion.html#GstExclusion--factor"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-edgedetect.html#id-1.2.26.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-edgedetect.html#id-1.2.26.4.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.27.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.27.4.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faac.html#id-1.2.28.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faac.html#id-1.2.28.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-edgedetect.html#id-1.2.27.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-edgedetect.html#id-1.2.27.4.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.28.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-eglglessink.html#id-1.2.28.4.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faac.html#id-1.2.29.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faac.html#id-1.2.29.8.2.2"/>
     <keyword type="struct" name="struct GstFaac" link="gst-plugins-bad-plugins-faac.html#GstFaac-struct"/>
     <keyword type="property" name="The “bitrate” property" link="gst-plugins-bad-plugins-faac.html#GstFaac--bitrate"/>
     <keyword type="property" name="The “midside” property" link="gst-plugins-bad-plugins-faac.html#GstFaac--midside"/>
@@ -288,23 +297,23 @@
     <keyword type="property" name="The “tns” property" link="gst-plugins-bad-plugins-faac.html#GstFaac--tns"/>
     <keyword type="property" name="The “quality” property" link="gst-plugins-bad-plugins-faac.html#GstFaac--quality"/>
     <keyword type="property" name="The “rate-control” property" link="gst-plugins-bad-plugins-faac.html#GstFaac--rate-control"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faad.html#id-1.2.29.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faad.html#id-1.2.29.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faad.html#id-1.2.30.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faad.html#id-1.2.30.6.2.2"/>
     <keyword type="struct" name="GstFaad" link="gst-plugins-bad-plugins-faad.html#GstFaad-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faceblur.html#id-1.2.30.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faceblur.html#id-1.2.30.4.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.31.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.31.4.2.2"/>
-    <keyword type="" name="Example pipeline" link="gst-plugins-bad-plugins-festival.html#id-1.2.32.6.5"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-festival.html#id-1.2.32.6.6.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-festival.html#id-1.2.32.6.6.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-faceblur.html#id-1.2.31.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-faceblur.html#id-1.2.31.4.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.32.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-facedetect.html#id-1.2.32.4.2.2"/>
+    <keyword type="" name="Example pipeline" link="gst-plugins-bad-plugins-festival.html#id-1.2.33.6.5"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-festival.html#id-1.2.33.6.6.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-festival.html#id-1.2.33.6.6.2"/>
     <keyword type="struct" name="struct GstFestival" link="gst-plugins-bad-plugins-festival.html#GstFestival-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-fisheye.html#id-1.2.33.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-fisheye.html#id-1.2.33.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-fisheye.html#id-1.2.34.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-fisheye.html#id-1.2.34.6.2.2"/>
     <keyword type="struct" name="struct GstFisheye" link="gst-plugins-bad-plugins-fisheye.html#GstFisheye-struct"/>
-    <keyword type="" name="Example launch lines" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.34.9.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.34.9.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.34.9.4.2"/>
+    <keyword type="" name="Example launch lines" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.35.9.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.35.9.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-fpsdisplaysink.html#id-1.2.35.9.4.2"/>
     <keyword type="struct" name="struct GstFPSDisplaySink" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink-struct"/>
     <keyword type="property" name="The “sync” property" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink--sync"/>
     <keyword type="property" name="The “text-overlay” property" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink--text-overlay"/>
@@ -318,12 +327,12 @@
     <keyword type="property" name="The “last-message” property" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink--last-message"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink--silent"/>
     <keyword type="signal" name="The “fps-measurements” signal" link="gst-plugins-bad-plugins-fpsdisplaysink.html#GstFPSDisplaySink-fps-measurements"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.35.4.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.35.4.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.35.4.4.2"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.36.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.36.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.36.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.36.4.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.36.4.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-gaussianblur.html#id-1.2.36.4.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.37.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.37.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-jpegparse.html#id-1.2.37.7.4.2"/>
     <keyword type="macro" name="GST_JPEG_PARSE()" link="gst-plugins-bad-plugins-jpegparse.html#GST-JPEG-PARSE:CAPS"/>
     <keyword type="macro" name="GST_JPEG_PARSE_CLASS()" link="gst-plugins-bad-plugins-jpegparse.html#GST-JPEG-PARSE-CLASS:CAPS"/>
     <keyword type="macro" name="GST_IS_JPEG_PARSE()" link="gst-plugins-bad-plugins-jpegparse.html#GST-IS-JPEG-PARSE:CAPS"/>
@@ -332,36 +341,36 @@
     <keyword type="struct" name="struct GstJpegParse" link="gst-plugins-bad-plugins-jpegparse.html#GstJpegParse-struct"/>
     <keyword type="struct" name="struct GstJpegParseClass" link="gst-plugins-bad-plugins-jpegparse.html#GstJpegParseClass"/>
     <keyword type="macro" name="GST_TYPE_JPEG_PARSE" link="gst-plugins-bad-plugins-jpegparse.html#GST-TYPE-JPEG-PARSE:CAPS"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-kaleidoscope.html#id-1.2.37.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-kaleidoscope.html#id-1.2.37.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-kaleidoscope.html#id-1.2.38.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-kaleidoscope.html#id-1.2.38.7.2.2"/>
     <keyword type="struct" name="struct GstKaleidoscope" link="gst-plugins-bad-plugins-kaleidoscope.html#GstKaleidoscope-struct"/>
     <keyword type="property" name="The “angle” property" link="gst-plugins-bad-plugins-kaleidoscope.html#GstKaleidoscope--angle"/>
     <keyword type="property" name="The “angle2” property" link="gst-plugins-bad-plugins-kaleidoscope.html#GstKaleidoscope--angle2"/>
     <keyword type="property" name="The “sides” property" link="gst-plugins-bad-plugins-kaleidoscope.html#GstKaleidoscope--sides"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-liveadder.html#id-1.2.38.7.3.1.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-liveadder.html#id-1.2.38.7.3.1.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-liveadder.html#id-1.2.39.7.3.1.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-liveadder.html#id-1.2.39.7.3.1.2"/>
     <keyword type="struct" name="struct GstLiveAdder" link="gst-plugins-bad-plugins-liveadder.html#GstLiveAdder-struct"/>
     <keyword type="property" name="The “latency” property" link="gst-plugins-bad-plugins-liveadder.html#GstLiveAdder--latency"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-marble.html#id-1.2.39.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-marble.html#id-1.2.39.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-marble.html#id-1.2.40.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-marble.html#id-1.2.40.7.2.2"/>
     <keyword type="struct" name="struct GstMarble" link="gst-plugins-bad-plugins-marble.html#GstMarble-struct"/>
     <keyword type="property" name="The “amount” property" link="gst-plugins-bad-plugins-marble.html#GstMarble--amount"/>
     <keyword type="property" name="The “turbulence” property" link="gst-plugins-bad-plugins-marble.html#GstMarble--turbulence"/>
     <keyword type="property" name="The “x-scale” property" link="gst-plugins-bad-plugins-marble.html#GstMarble--x-scale"/>
     <keyword type="property" name="The “y-scale” property" link="gst-plugins-bad-plugins-marble.html#GstMarble--y-scale"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mimenc.html#id-1.2.40.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mimenc.html#id-1.2.40.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mimenc.html#id-1.2.41.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mimenc.html#id-1.2.41.7.2.2"/>
     <keyword type="struct" name="struct GstMimEnc" link="gst-plugins-bad-plugins-mimenc.html#GstMimEnc-struct"/>
     <keyword type="property" name="The “paused-mode” property" link="gst-plugins-bad-plugins-mimenc.html#GstMimEnc--paused-mode"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mimdec.html#id-1.2.41.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mimdec.html#id-1.2.41.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mimdec.html#id-1.2.42.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mimdec.html#id-1.2.42.6.2.2"/>
     <keyword type="struct" name="struct GstMimDec" link="gst-plugins-bad-plugins-mimdec.html#GstMimDec-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mirror.html#id-1.2.42.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mirror.html#id-1.2.42.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mirror.html#id-1.2.43.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mirror.html#id-1.2.43.7.2.2"/>
     <keyword type="struct" name="struct GstMirror" link="gst-plugins-bad-plugins-mirror.html#GstMirror-struct"/>
     <keyword type="property" name="The “mode” property" link="gst-plugins-bad-plugins-mirror.html#GstMirror--mode"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-modplug.html#id-1.2.43.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-modplug.html#id-1.2.43.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-modplug.html#id-1.2.44.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-modplug.html#id-1.2.44.7.2.2"/>
     <keyword type="struct" name="GstModPlug" link="gst-plugins-bad-plugins-modplug.html#GstModPlug-struct"/>
     <keyword type="property" name="The “megabass” property" link="gst-plugins-bad-plugins-modplug.html#GstModPlug--megabass"/>
     <keyword type="property" name="The “megabass-amount” property" link="gst-plugins-bad-plugins-modplug.html#GstModPlug--megabass-amount"/>
@@ -375,8 +384,8 @@
     <keyword type="property" name="The “surround” property" link="gst-plugins-bad-plugins-modplug.html#GstModPlug--surround"/>
     <keyword type="property" name="The “surround-delay” property" link="gst-plugins-bad-plugins-modplug.html#GstModPlug--surround-delay"/>
     <keyword type="property" name="The “surround-depth” property" link="gst-plugins-bad-plugins-modplug.html#GstModPlug--surround-depth"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mpeg2enc.html#id-1.2.44.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mpeg2enc.html#id-1.2.44.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mpeg2enc.html#id-1.2.45.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mpeg2enc.html#id-1.2.45.8.2.2"/>
     <keyword type="struct" name="GstMpeg2enc" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc-struct"/>
     <keyword type="property" name="The “altscan-mpeg2” property" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--altscan-mpeg2"/>
     <keyword type="property" name="The “aspect” property" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--aspect"/>
@@ -412,8 +421,8 @@
     <keyword type="property" name="The “sequence-length” property" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--sequence-length"/>
     <keyword type="property" name="The “unit-coeff-elim” property" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--unit-coeff-elim"/>
     <keyword type="property" name="The “vcd-still-size” property" link="gst-plugins-bad-plugins-mpeg2enc.html#GstMpeg2enc--vcd-still-size"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mplex.html#id-1.2.45.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mplex.html#id-1.2.45.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mplex.html#id-1.2.46.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mplex.html#id-1.2.46.7.2.2"/>
     <keyword type="struct" name="GstMplex" link="gst-plugins-bad-plugins-mplex.html#GstMplex-struct"/>
     <keyword type="property" name="The “bufsize” property" link="gst-plugins-bad-plugins-mplex.html#GstMplex--bufsize"/>
     <keyword type="property" name="The “format” property" link="gst-plugins-bad-plugins-mplex.html#GstMplex--format"/>
@@ -422,11 +431,11 @@
     <keyword type="property" name="The “sector-size” property" link="gst-plugins-bad-plugins-mplex.html#GstMplex--sector-size"/>
     <keyword type="property" name="The “system-headers” property" link="gst-plugins-bad-plugins-mplex.html#GstMplex--system-headers"/>
     <keyword type="property" name="The “vbr” property" link="gst-plugins-bad-plugins-mplex.html#GstMplex--vbr"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mpg123audiodec.html#id-1.2.46.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mpg123audiodec.html#id-1.2.46.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-mpg123audiodec.html#id-1.2.47.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-mpg123audiodec.html#id-1.2.47.6.2.2"/>
     <keyword type="struct" name="struct GstMpg123AudioDec" link="gst-plugins-bad-plugins-mpg123audiodec.html#GstMpg123AudioDec-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-neonhttpsrc.html#id-1.2.47.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-neonhttpsrc.html#id-1.2.47.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-neonhttpsrc.html#id-1.2.48.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-neonhttpsrc.html#id-1.2.48.8.2.2"/>
     <keyword type="struct" name="struct GstNeonhttpSrc" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc-struct"/>
     <keyword type="property" name="The “location” property" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc--location"/>
     <keyword type="property" name="The “proxy” property" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc--proxy"/>
@@ -442,20 +451,20 @@
     <keyword type="property" name="The “connect-timeout” property" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc--connect-timeout"/>
     <keyword type="property" name="The “cookies” property" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc--cookies"/>
     <keyword type="property" name="The “read-timeout” property" link="gst-plugins-bad-plugins-neonhttpsrc.html#GstNeonhttpSrc--read-timeout"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-ofa.html#id-1.2.48.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-ofa.html#id-1.2.48.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-ofa.html#id-1.2.49.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-ofa.html#id-1.2.49.7.2.2"/>
     <keyword type="struct" name="struct GstOFA" link="gst-plugins-bad-plugins-ofa.html#GstOFA-struct"/>
     <keyword type="property" name="The “fingerprint” property" link="gst-plugins-bad-plugins-ofa.html#GstOFA--fingerprint"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-openalsrc.html#id-1.2.49.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-openalsrc.html#id-1.2.49.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-openalsrc.html#id-1.2.50.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-openalsrc.html#id-1.2.50.7.2.2"/>
     <keyword type="struct" name="struct GstOpenalSrc" link="gst-plugins-bad-plugins-openalsrc.html#GstOpenalSrc-struct"/>
     <keyword type="property" name="The “device” property" link="gst-plugins-bad-plugins-openalsrc.html#GstOpenalSrc--device"/>
     <keyword type="property" name="The “device-name” property" link="gst-plugins-bad-plugins-openalsrc.html#GstOpenalSrc--device-name"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-openalsink.html#id-1.2.50.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-openalsink.html#id-1.2.50.4.2.2"/>
-    <keyword type="" name="Example pipelines" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.51.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.51.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.51.7.4.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-openalsink.html#id-1.2.51.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-openalsink.html#id-1.2.51.4.2.2"/>
+    <keyword type="" name="Example pipelines" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.52.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.52.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pcapparse.html#id-1.2.52.7.4.2"/>
     <keyword type="struct" name="struct GstPcapParse" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse-struct"/>
     <keyword type="property" name="The “dst-ip” property" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--dst-ip"/>
     <keyword type="property" name="The “dst-port” property" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--dst-port"/>
@@ -463,14 +472,14 @@
     <keyword type="property" name="The “src-port” property" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--src-port"/>
     <keyword type="property" name="The “caps” property" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--caps"/>
     <keyword type="property" name="The “ts-offset” property" link="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--ts-offset"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pinch.html#id-1.2.52.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pinch.html#id-1.2.52.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pinch.html#id-1.2.53.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pinch.html#id-1.2.53.7.2.2"/>
     <keyword type="struct" name="struct GstPinch" link="gst-plugins-bad-plugins-pinch.html#GstPinch-struct"/>
     <keyword type="property" name="The “intensity” property" link="gst-plugins-bad-plugins-pinch.html#GstPinch--intensity"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pyramidsegment.html#id-1.2.53.5.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pyramidsegment.html#id-1.2.53.5.2.2"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rfbsrc.html#id-1.2.54.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rfbsrc.html#id-1.2.54.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-pyramidsegment.html#id-1.2.54.5.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-pyramidsegment.html#id-1.2.54.5.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rfbsrc.html#id-1.2.55.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rfbsrc.html#id-1.2.55.7.2.2"/>
     <keyword type="struct" name="struct GstRfbSrc" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc-struct"/>
     <keyword type="property" name="The “host” property" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc--host"/>
     <keyword type="property" name="The “port” property" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc--port"/>
@@ -484,16 +493,16 @@
     <keyword type="property" name="The “use-copyrect” property" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc--use-copyrect"/>
     <keyword type="property" name="The “shared” property" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc--shared"/>
     <keyword type="property" name="The “view-only” property" link="gst-plugins-bad-plugins-rfbsrc.html#GstRfbSrc--view-only"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rtmpsink.html#id-1.2.55.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rtmpsink.html#id-1.2.55.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rtmpsink.html#id-1.2.56.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rtmpsink.html#id-1.2.56.8.2.2"/>
     <keyword type="struct" name="struct GstRTMPSink" link="gst-plugins-bad-plugins-rtmpsink.html#GstRTMPSink-struct"/>
     <keyword type="property" name="The “location” property" link="gst-plugins-bad-plugins-rtmpsink.html#GstRTMPSink--location"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rtmpsrc.html#id-1.2.56.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rtmpsrc.html#id-1.2.56.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-rtmpsrc.html#id-1.2.57.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-rtmpsrc.html#id-1.2.57.8.2.2"/>
     <keyword type="struct" name="struct GstRTMPSrc" link="gst-plugins-bad-plugins-rtmpsrc.html#GstRTMPSrc-struct"/>
     <keyword type="property" name="The “location” property" link="gst-plugins-bad-plugins-rtmpsrc.html#GstRTMPSrc--location"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-shmsink.html#id-1.2.57.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-shmsink.html#id-1.2.57.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-shmsink.html#id-1.2.58.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-shmsink.html#id-1.2.58.8.2.2"/>
     <keyword type="struct" name="struct GstShmSink" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink-struct"/>
     <keyword type="property" name="The “perms” property" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink--perms"/>
     <keyword type="property" name="The “shm-size” property" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink--shm-size"/>
@@ -502,67 +511,67 @@
     <keyword type="property" name="The “buffer-time” property" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink--buffer-time"/>
     <keyword type="signal" name="The “client-connected” signal" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink-client-connected"/>
     <keyword type="signal" name="The “client-disconnected” signal" link="gst-plugins-bad-plugins-shmsink.html#GstShmSink-client-disconnected"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-shmsrc.html#id-1.2.58.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-shmsrc.html#id-1.2.58.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-shmsrc.html#id-1.2.59.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-shmsrc.html#id-1.2.59.7.2.2"/>
     <keyword type="struct" name="struct GstShmSrc" link="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc-struct"/>
     <keyword type="property" name="The “is-live” property" link="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--is-live"/>
     <keyword type="property" name="The “socket-path” property" link="gst-plugins-bad-plugins-shmsrc.html#GstShmSrc--socket-path"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.59.8.5"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.59.8.6.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.59.8.6.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.60.8.5"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.60.8.6.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-sdpdemux.html#id-1.2.60.8.6.2"/>
     <keyword type="struct" name="struct GstSDPDemux" link="gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux-struct"/>
     <keyword type="property" name="The “debug” property" link="gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux--debug"/>
     <keyword type="property" name="The “latency” property" link="gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux--latency"/>
     <keyword type="property" name="The “timeout” property" link="gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux--timeout"/>
     <keyword type="property" name="The “redirect” property" link="gst-plugins-bad-plugins-sdpdemux.html#GstSDPDemux--redirect"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-solarize.html#id-1.2.60.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-solarize.html#id-1.2.60.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-solarize.html#id-1.2.60.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-solarize.html#id-1.2.61.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-solarize.html#id-1.2.61.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-solarize.html#id-1.2.61.7.4.2"/>
     <keyword type="struct" name="struct GstSolarize" link="gst-plugins-bad-plugins-solarize.html#GstSolarize-struct"/>
     <keyword type="property" name="The “silent” property" link="gst-plugins-bad-plugins-solarize.html#GstSolarize--silent"/>
     <keyword type="property" name="The “end” property" link="gst-plugins-bad-plugins-solarize.html#GstSolarize--end"/>
     <keyword type="property" name="The “start” property" link="gst-plugins-bad-plugins-solarize.html#GstSolarize--start"/>
     <keyword type="property" name="The “threshold” property" link="gst-plugins-bad-plugins-solarize.html#GstSolarize--threshold"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.61.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.61.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.61.7.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.62.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.62.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-spacescope.html#id-1.2.62.7.4.2"/>
     <keyword type="struct" name="struct GstSpaceScope" link="gst-plugins-bad-plugins-spacescope.html#GstSpaceScope-struct"/>
     <keyword type="property" name="The “style” property" link="gst-plugins-bad-plugins-spacescope.html#GstSpaceScope--style"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.62.6.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.62.6.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.62.6.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.63.6.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.63.6.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-spectrascope.html#id-1.2.63.6.4.2"/>
     <keyword type="struct" name="struct GstSpectraScope" link="gst-plugins-bad-plugins-spectrascope.html#GstSpectraScope-struct"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.63.6.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.63.6.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.63.6.4.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.64.6.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.64.6.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-synaescope.html#id-1.2.64.6.4.2"/>
     <keyword type="struct" name="struct GstSynaeScope" link="gst-plugins-bad-plugins-synaescope.html#GstSynaeScope-struct"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-speed.html#id-1.2.64.7.4"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-speed.html#id-1.2.64.7.5.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-speed.html#id-1.2.64.7.5.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-speed.html#id-1.2.65.7.4"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-speed.html#id-1.2.65.7.5.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-speed.html#id-1.2.65.7.5.2"/>
     <keyword type="struct" name="struct GstSpeed" link="gst-plugins-bad-plugins-speed.html#GstSpeed-struct"/>
     <keyword type="property" name="The “speed” property" link="gst-plugins-bad-plugins-speed.html#GstSpeed--speed"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-sphere.html#id-1.2.65.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-sphere.html#id-1.2.65.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-sphere.html#id-1.2.66.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-sphere.html#id-1.2.66.7.2.2"/>
     <keyword type="struct" name="struct GstSphere" link="gst-plugins-bad-plugins-sphere.html#GstSphere-struct"/>
     <keyword type="property" name="The “refraction” property" link="gst-plugins-bad-plugins-sphere.html#GstSphere--refraction"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-square.html#id-1.2.66.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-square.html#id-1.2.66.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-square.html#id-1.2.67.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-square.html#id-1.2.67.7.2.2"/>
     <keyword type="struct" name="struct GstSquare" link="gst-plugins-bad-plugins-square.html#GstSquare-struct"/>
     <keyword type="property" name="The “height” property" link="gst-plugins-bad-plugins-square.html#GstSquare--height"/>
     <keyword type="property" name="The “width” property" link="gst-plugins-bad-plugins-square.html#GstSquare--width"/>
     <keyword type="property" name="The “zoom” property" link="gst-plugins-bad-plugins-square.html#GstSquare--zoom"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-stretch.html#id-1.2.67.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-stretch.html#id-1.2.67.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-stretch.html#id-1.2.68.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-stretch.html#id-1.2.68.7.2.2"/>
     <keyword type="struct" name="struct GstStretch" link="gst-plugins-bad-plugins-stretch.html#GstStretch-struct"/>
     <keyword type="property" name="The “intensity” property" link="gst-plugins-bad-plugins-stretch.html#GstStretch--intensity"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-templatematch.html#id-1.2.68.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-templatematch.html#id-1.2.68.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-templatematch.html#id-1.2.69.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-templatematch.html#id-1.2.69.8.2.2"/>
     <keyword type="struct" name="struct GstTemplateMatch" link="gst-plugins-bad-plugins-templatematch.html#GstTemplateMatch-struct"/>
     <keyword type="property" name="The “display” property" link="gst-plugins-bad-plugins-templatematch.html#GstTemplateMatch--display"/>
     <keyword type="property" name="The “method” property" link="gst-plugins-bad-plugins-templatematch.html#GstTemplateMatch--method"/>
     <keyword type="property" name="The “template” property" link="gst-plugins-bad-plugins-templatematch.html#GstTemplateMatch--template"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-opencvtextoverlay.html#id-1.2.69.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-opencvtextoverlay.html#id-1.2.69.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-opencvtextoverlay.html#id-1.2.70.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-opencvtextoverlay.html#id-1.2.70.8.2.2"/>
     <keyword type="struct" name="struct GstOpencvTextOverlay" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay-struct"/>
     <keyword type="property" name="The “colorB” property" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay--colorB"/>
     <keyword type="property" name="The “colorG” property" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay--colorG"/>
@@ -573,15 +582,15 @@
     <keyword type="property" name="The “width” property" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay--width"/>
     <keyword type="property" name="The “xpos” property" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay--xpos"/>
     <keyword type="property" name="The “ypos” property" link="gst-plugins-bad-plugins-opencvtextoverlay.html#GstOpencvTextOverlay--ypos"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-tunnel.html#id-1.2.70.6.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-tunnel.html#id-1.2.70.6.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-tunnel.html#id-1.2.71.6.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-tunnel.html#id-1.2.71.6.2.2"/>
     <keyword type="struct" name="struct GstTunnel" link="gst-plugins-bad-plugins-tunnel.html#GstTunnel-struct"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-twirl.html#id-1.2.71.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-twirl.html#id-1.2.71.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-twirl.html#id-1.2.72.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-twirl.html#id-1.2.72.7.2.2"/>
     <keyword type="struct" name="struct GstTwirl" link="gst-plugins-bad-plugins-twirl.html#GstTwirl-struct"/>
     <keyword type="property" name="The “angle” property" link="gst-plugins-bad-plugins-twirl.html#GstTwirl--angle"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-videoparse.html#id-1.2.72.7.2.1.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-videoparse.html#id-1.2.72.7.2.1.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-videoparse.html#id-1.2.73.7.2.1.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-videoparse.html#id-1.2.73.7.2.1.2"/>
     <keyword type="struct" name="struct GstVideoParse" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse-struct"/>
     <keyword type="property" name="The “alpha-mask” property" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse--alpha-mask"/>
     <keyword type="property" name="The “blue-mask” property" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse--blue-mask"/>
@@ -597,26 +606,26 @@
     <keyword type="property" name="The “width” property" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse--width"/>
     <keyword type="property" name="The “interlaced” property" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse--interlaced"/>
     <keyword type="property" name="The “top-field-first” property" link="gst-plugins-bad-plugins-videoparse.html#GstVideoParse--top-field-first"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-waterripple.html#id-1.2.73.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-waterripple.html#id-1.2.73.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-waterripple.html#id-1.2.74.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-waterripple.html#id-1.2.74.7.2.2"/>
     <keyword type="struct" name="struct GstWaterRipple" link="gst-plugins-bad-plugins-waterripple.html#GstWaterRipple-struct"/>
     <keyword type="property" name="The “amplitude” property" link="gst-plugins-bad-plugins-waterripple.html#GstWaterRipple--amplitude"/>
     <keyword type="property" name="The “phase” property" link="gst-plugins-bad-plugins-waterripple.html#GstWaterRipple--phase"/>
     <keyword type="property" name="The “wavelength” property" link="gst-plugins-bad-plugins-waterripple.html#GstWaterRipple--wavelength"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-zbar.html#id-1.2.74.7.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-zbar.html#id-1.2.74.7.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-zbar.html#id-1.2.75.7.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-zbar.html#id-1.2.75.7.2.2"/>
     <keyword type="struct" name="struct GstZBar" link="gst-plugins-bad-plugins-zbar.html#GstZBar-struct"/>
     <keyword type="property" name="The “message” property" link="gst-plugins-bad-plugins-zbar.html#GstZBar--message"/>
     <keyword type="property" name="The “cache” property" link="gst-plugins-bad-plugins-zbar.html#GstZBar--cache"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-voaacenc.html#id-1.2.75.8.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-voaacenc.html#id-1.2.75.8.2.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-voaacenc.html#id-1.2.76.8.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-voaacenc.html#id-1.2.76.8.2.2"/>
     <keyword type="struct" name="struct GstVoAacEnc" link="gst-plugins-bad-plugins-voaacenc.html#GstVoAacEnc-struct"/>
     <keyword type="property" name="The “bitrate” property" link="gst-plugins-bad-plugins-voaacenc.html#GstVoAacEnc--bitrate"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-voamrwbenc.html#id-1.2.76.4.2.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-voamrwbenc.html#id-1.2.76.4.2.2"/>
-    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.77.7.3"/>
-    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.77.7.4.1"/>
-    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.77.7.4.2"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-voamrwbenc.html#id-1.2.77.4.2.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-voamrwbenc.html#id-1.2.77.4.2.2"/>
+    <keyword type="" name="Example launch line" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.78.7.3"/>
+    <keyword type="" name="Element Information" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.78.7.4.1"/>
+    <keyword type="" name="Element Pads" link="gst-plugins-bad-plugins-wavescope.html#id-1.2.78.7.4.2"/>
     <keyword type="struct" name="struct GstWaveScope" link="gst-plugins-bad-plugins-wavescope.html#GstWaveScope-struct"/>
     <keyword type="property" name="The “style” property" link="gst-plugins-bad-plugins-wavescope.html#GstWaveScope--style"/>
     <keyword type="function" name="GstPhotographyCapturePrepared ()" link="GstPhotography.html#GstPhotographyCapturePrepared"/>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html b/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
index 1c5575d..fc2fa51 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-coloreffects.html
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
 <link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
 <link rel="prev" href="gst-plugins-bad-plugins-circle.html" title="circle">
-<link rel="next" href="gst-plugins-bad-plugins-cvdilate.html" title="cvdilate">
+<link rel="next" href="gst-plugins-bad-plugins-compositor.html" title="compositor">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
@@ -22,7 +22,7 @@
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 <td><a accesskey="p" href="gst-plugins-bad-plugins-circle.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
-<td><a accesskey="n" href="gst-plugins-bad-plugins-cvdilate.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-compositor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
 <a name="gst-plugins-bad-plugins-coloreffects"></a><div class="titlepage"></div>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-compositor.html b/docs/plugins/html/gst-plugins-bad-plugins-compositor.html
new file mode 100644
index 0000000..310b39c
--- /dev/null
+++ b/docs/plugins/html/gst-plugins-bad-plugins-compositor.html
@@ -0,0 +1,276 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>GStreamer Bad Plugins 1.0 Plugins Reference Manual: compositor</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
+<link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
+<link rel="prev" href="gst-plugins-bad-plugins-coloreffects.html" title="coloreffects">
+<link rel="next" href="gst-plugins-bad-plugins-cvdilate.html" title="cvdilate">
+<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
+<td width="100%" align="left" class="shortcuts">
+<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-compositor.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-compositor.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-compositor.properties" class="shortcut">Properties</a></span>
+</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-coloreffects.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="n" href="gst-plugins-bad-plugins-cvdilate.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="refentry">
+<a name="gst-plugins-bad-plugins-compositor"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-compositor.top_of_page"></a>compositor</span></h2>
+<p>compositor — Composite multiple video streams</p>
+</td>
+<td class="gallery_image" valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.properties"></a><h2>Properties</h2>
+<div class="informaltable"><table border="0">
+<colgroup>
+<col width="150px" class="properties_type">
+<col width="300px" class="properties_name">
+<col width="200px" class="properties_flags">
+</colgroup>
+<tbody><tr>
+<td class="property_type"><span class="type">GstCompositorBackground</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-compositor.html#GstCompositor--background" title="The “background” property">background</a></td>
+<td class="property_flags">Read / Write</td>
+</tr></tbody>
+</table></div>
+</div>
+<a name="GstCompositor"></a><a name="GstCompositorPad"></a><div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.object-hierarchy"></a><h2>Object Hierarchy</h2>
+<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+    <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+        <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
+            <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
+            <span class="lineart">│</span>   <span class="lineart">╰──</span> GstAggregator
+            <span class="lineart">│</span>       <span class="lineart">╰──</span> GstVideoAggregator
+            <span class="lineart">│</span>           <span class="lineart">╰──</span> GstCompositor
+            <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html">GstPad</a>
+                <span class="lineart">╰──</span> GstAggregatorPad
+                    <span class="lineart">╰──</span> GstVideoAggregatorPad
+                        <span class="lineart">╰──</span> GstCompositorPad
+</pre>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.description"></a><h2>Description</h2>
+<p>Compositor can accept AYUV, ARGB and BGRA video streams. For each of the requested
+sink pads it will compare the incoming geometry and framerate to define the
+output parameters. Indeed output video frames will have the geometry of the
+biggest incoming video stream and the framerate of the fastest incoming one.</p>
+<p>Compositor will do colorspace conversion.</p>
+<p>Individual parameters for each input stream can be configured on the
+<a class="link" href="gst-plugins-bad-plugins-compositor.html#GstCompositorPad"><span class="type">GstCompositorPad</span></a>.</p>
+<div class="refsect2">
+<a name="id-1.2.11.7.5"></a><h3>Sample pipelines</h3>
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8</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> \
+  videotestsrc pattern<span class="gtkdoc opt">=</span><span class="number">1</span> <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>AYUV<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span>\<span class="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">10</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">100</span><span class="gtkdoc opt">,</span>height<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> \
+  videobox border<span class="gtkdoc opt">-</span>alpha<span class="gtkdoc opt">=</span><span class="number">0</span> top<span class="gtkdoc opt">=-</span><span class="number">70</span> bottom<span class="gtkdoc opt">=-</span><span class="number">70</span> right<span class="gtkdoc opt">=-</span><span class="number">220</span> <span class="gtkdoc opt">!</span> \
+  compositor name<span class="gtkdoc opt">=</span>comp sink_0<span class="gtkdoc opt">::</span>alpha<span class="gtkdoc opt">=</span><span class="number">0.7</span> sink_1<span class="gtkdoc opt">::</span>alpha<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> \
+  videoconvert <span class="gtkdoc opt">!</span> xvimagesink \
+  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>AYUV<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span>\<span class="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">5</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">320</span><span class="gtkdoc opt">,</span>height<span class="gtkdoc opt">=</span><span class="number">240</span> <span class="gtkdoc opt">!</span> comp<span class="gtkdoc opt">.</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ A pipeline to demonstrate compositor used together with videobox.
+This should show a 320x240 pixels video test source with some transparency
+showing the background checker pattern. Another video test source with just
+the snow pattern of 100x100 pixels is overlayed on top of the first one on
+the left vertically centered with a small transparency showing the first
+video test source behind and the checker pattern under it. Note that the
+framerate of the output video is 10 frames per second.
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5</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> videotestsrc pattern<span class="gtkdoc opt">=</span><span class="number">1</span> <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="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">10</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">100</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> \
+  compositor name<span class="gtkdoc opt">=</span>comp <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> ximagesink \
+  videotestsrc <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="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">5</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">320</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">=</span><span class="number">240</span> <span class="gtkdoc opt">!</span> comp<span class="gtkdoc opt">.</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ A pipeline to demostrate bgra comping. (This does not demonstrate alpha blending). 
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5</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> videotestsrc pattern<span class="gtkdoc opt">=</span><span class="number">1</span> <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>I420<span class="gtkdoc opt">,</span> framerate<span class="gtkdoc opt">=</span>\<span class="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">10</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">100</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> \
+  compositor name<span class="gtkdoc opt">=</span>comp <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> ximagesink \
+  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>I420<span class="gtkdoc opt">,</span> framerate<span class="gtkdoc opt">=</span>\<span class="gtkdoc opt">(</span>fraction\<span class="gtkdoc opt">)</span><span class="number">5</span><span class="gtkdoc opt">/</span><span class="number">1</span><span class="gtkdoc opt">,</span> width<span class="gtkdoc opt">=</span><span class="number">320</span><span class="gtkdoc opt">,</span> height<span class="gtkdoc opt">=</span><span class="number">240</span> <span class="gtkdoc opt">!</span> comp<span class="gtkdoc opt">.</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ A pipeline to test I420
+<div class="informalexample">
+  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+    <tbody>
+      <tr>
+        <td class="listing_lines" align="right"><pre>1
+2
+3
+4
+5
+6
+7
+8</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> compositor name<span class="gtkdoc opt">=</span>comp sink_1<span class="gtkdoc opt">::</span>alpha<span class="gtkdoc opt">=</span><span class="number">0.5</span> sink_1<span class="gtkdoc opt">::</span>xpos<span class="gtkdoc opt">=</span><span class="number">50</span> sink_1<span class="gtkdoc opt">::</span>ypos<span class="gtkdoc opt">=</span><span class="number">50</span> <span class="gtkdoc opt">!</span> \
+  videoconvert <span class="gtkdoc opt">!</span> ximagesink \
+  videotestsrc pattern<span class="gtkdoc opt">=</span>snow timestamp<span class="gtkdoc opt">-</span>offset<span class="gtkdoc opt">=</span><span class="number">3000000000</span> <span class="gtkdoc opt">!</span> \
+  <span class="string">&quot;video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1&quot;</span> <span class="gtkdoc opt">!</span> \
+  timeoverlay <span class="gtkdoc opt">!</span> queue2 <span class="gtkdoc opt">!</span> comp<span class="gtkdoc opt">.</span> \
+  videotestsrc pattern<span class="gtkdoc opt">=</span>smpte <span class="gtkdoc opt">!</span> \
+  <span class="string">&quot;video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1&quot;</span> <span class="gtkdoc opt">!</span> \
+  timeoverlay <span class="gtkdoc opt">!</span> queue2 <span class="gtkdoc opt">!</span> comp<span class="gtkdoc opt">.</span></pre></td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+ A pipeline to demonstrate synchronized compositing (the second stream starts after 3 seconds)
+</div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<div class="refsect2">
+<a name="id-1.2.11.7.6.1"></a><h3>Element Information</h3>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term">plugin</span></p></td>
+<td>
+            compositor
+          </td>
+</tr>
+<tr>
+<td><p><span class="term">author</span></p></td>
+<td>Wim Taymans &lt;wim@fluendo.com&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</td>
+</tr>
+<tr>
+<td><p><span class="term">class</span></p></td>
+<td>Filter/Editor/Video/Compositor</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="id-1.2.11.7.6.2"></a><h3>Element Pads</h3>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term">name</span></p></td>
+<td>sink_%u</td>
+</tr>
+<tr>
+<td><p><span class="term">direction</span></p></td>
+<td>sink</td>
+</tr>
+<tr>
+<td><p><span class="term">presence</span></p></td>
+<td>request</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>video/x-raw, format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+</tr>
+</tbody>
+</table></div>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term">name</span></p></td>
+<td>src</td>
+</tr>
+<tr>
+<td><p><span class="term">direction</span></p></td>
+<td>source</td>
+</tr>
+<tr>
+<td><p><span class="term">presence</span></p></td>
+<td>always</td>
+</tr>
+<tr>
+<td><p><span class="term">details</span></p></td>
+<td>video/x-raw, format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<p>
+</p>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.functions_details"></a><h2>Functions</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.other_details"></a><h2>Types and Values</h2>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-compositor.property-details"></a><h2>Property Details</h2>
+<div class="refsect2">
+<a name="GstCompositor--background"></a><h3>The <code class="literal">“background”</code> property</h3>
+<pre class="programlisting">  “background”               <span class="type">GstCompositorBackground</span></pre>
+<p>Background type.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: Checker pattern</p>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.20</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html b/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html
index c6c2b0b..9d417a6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvdilate.html
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
 <link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
-<link rel="prev" href="gst-plugins-bad-plugins-coloreffects.html" title="coloreffects">
+<link rel="prev" href="gst-plugins-bad-plugins-compositor.html" title="compositor">
 <link rel="next" href="gst-plugins-bad-plugins-cverode.html" title="cverode">
 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
@@ -20,7 +20,7 @@
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
-<td><a accesskey="p" href="gst-plugins-bad-plugins-coloreffects.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
+<td><a accesskey="p" href="gst-plugins-bad-plugins-compositor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 <td><a accesskey="n" href="gst-plugins-bad-plugins-cverode.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 </tr></table>
 <div class="refentry">
@@ -63,7 +63,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.11.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.12.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -89,7 +89,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.11.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.12.6.2.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-bad-plugins-cvequalizehist.html b/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
index 2481418..e39a530 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvequalizehist.html
@@ -62,7 +62,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.13.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.14.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -88,7 +88,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.13.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.14.6.2.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-bad-plugins-cverode.html b/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
index 38ec04d..8dbeb53 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cverode.html
@@ -63,7 +63,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.12.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.13.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -89,7 +89,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.12.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.13.6.2.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-bad-plugins-cvlaplace.html b/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
index 24176fc..4c8955a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvlaplace.html
@@ -78,7 +78,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.14.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.15.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -104,7 +104,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.14.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.15.7.2.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-bad-plugins-cvsmooth.html b/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
index 65759d8..ef63dbc 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvsmooth.html
@@ -100,7 +100,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.15.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.16.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -126,7 +126,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.15.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.16.7.2.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-bad-plugins-cvsobel.html b/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
index b6dd0e3..98ff9ab 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-cvsobel.html
@@ -90,7 +90,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.16.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.17.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -116,7 +116,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.16.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.17.7.2.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-bad-plugins-dataurisrc.html b/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
index b8515ad..65d983f 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dataurisrc.html
@@ -83,7 +83,7 @@
 <a name="gst-plugins-bad-plugins-dataurisrc.description"></a><h2>Description</h2>
 <p>dataurisrc handles data: URIs, see <a class="ulink" href="http://tools.ietf.org/html/rfc2397" target="_top">RFC 2397</a> for more information.</p>
 <div class="refsect2">
-<a name="id-1.2.17.8.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.18.8.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -99,7 +99,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.17.8.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.18.8.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -125,7 +125,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.17.8.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.18.8.4.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-bad-plugins-diffuse.html b/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
index 6c4cd44..be4a44c 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-diffuse.html
@@ -78,7 +78,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.18.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.19.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -104,7 +104,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.18.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.19.7.2.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-bad-plugins-dilate.html b/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
index 630d9a7..70e9fc8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dilate.html
@@ -83,7 +83,7 @@
 <a name="gst-plugins-bad-plugins-dilate.description"></a><h2>Description</h2>
 <p>Dilate adjusts the colors of a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.19.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.20.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -99,7 +99,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.19.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.20.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -125,7 +125,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.19.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.20.7.4.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-bad-plugins-dodge.html b/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
index 6004445..0e358d9 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dodge.html
@@ -76,7 +76,7 @@
 <a name="gst-plugins-bad-plugins-dodge.description"></a><h2>Description</h2>
 <p>Dodge saturates the colors of a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.20.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.21.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -92,7 +92,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.20.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.21.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -118,7 +118,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.20.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.21.7.4.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-bad-plugins-dtmfdetect.html b/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
index 470e571..84ebb03 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dtmfdetect.html
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.21.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.22.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -86,7 +86,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.21.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.22.6.2.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-bad-plugins-dtsdec.html b/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
index 4a1296b..19e653b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dtsdec.html
@@ -76,7 +76,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.22.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.23.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -102,7 +102,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.22.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.23.7.2.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-bad-plugins-dvbsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
index fae6ebc..c142ffc 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dvbsrc.html
@@ -17,7 +17,8 @@
 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
                   <a href="#gst-plugins-bad-plugins-dvbsrc.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                   <a href="#gst-plugins-bad-plugins-dvbsrc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 
-                  <a href="#gst-plugins-bad-plugins-dvbsrc.properties" class="shortcut">Properties</a></span>
+                  <a href="#gst-plugins-bad-plugins-dvbsrc.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> 
+                  <a href="#gst-plugins-bad-plugins-dvbsrc.signals" class="shortcut">Signals</a></span>
 </td>
 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
@@ -189,6 +190,38 @@
 <td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--stream-id" title="The “stream-id” property">stream-id</a></td>
 <td class="property_flags">Read / Write</td>
 </tr>
+<tr>
+<td class="property_type"><span class="type">guint64</span></td>
+<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--tuning-timeout" title="The “tuning-timeout” property">tuning-timeout</a></td>
+<td class="property_flags">Read / Write</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-dvbsrc.signals"></a><h2>Signals</h2>
+<div class="informaltable"><table border="0">
+<colgroup>
+<col width="150px" class="signals_return">
+<col width="300px" class="signals_name">
+<col width="200px" class="signals_flags">
+</colgroup>
+<tbody>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-done" title="The “tuning-done” signal">tuning-done</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-fail" title="The “tuning-fail” signal">tuning-fail</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
+<tr>
+<td class="signal_type"><span class="returnvalue">void</span></td>
+<td class="signal_name"><a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-start" title="The “tuning-start” signal">tuning-start</a></td>
+<td class="signal_flags">Run Last</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -221,7 +254,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.23.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.24.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -247,7 +280,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.23.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.24.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -528,6 +561,112 @@
 <p>Allowed values: [G_MAXULONG,65535]</p>
 <p>Default value: -1</p>
 </div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc--tuning-timeout"></a><h3>The <code class="literal">“tuning-timeout”</code> property</h3>
+<pre class="programlisting">  “tuning-timeout”           <span class="type">guint64</span></pre>
+<p>Milliseconds to wait before giving up tuning/locking on a signal.</p>
+<p>Flags: Read / Write</p>
+<p>Default value: 10000000000</p>
+</div>
+</div>
+<div class="refsect1">
+<a name="gst-plugins-bad-plugins-dvbsrc.signal-details"></a><h2>Signal Details</h2>
+<div class="refsect2">
+<a name="GstDvbSrc-tuning-done"></a><h3>The <code class="literal">“tuning-done”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc"><span class="type">GstDvbSrc</span></a> *gstdvbsrc,
+               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
+<p>
+</p>
+<div class="refsect3">
+<a name="id-1.2.24.12.2.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>gstdvbsrc</p></td>
+<td class="parameter_description"><p>the object which received the signal.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc-tuning-fail"></a><h3>The <code class="literal">“tuning-fail”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc"><span class="type">GstDvbSrc</span></a> *gstdvbsrc,
+               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
+<p>
+</p>
+<div class="refsect3">
+<a name="id-1.2.24.12.3.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>gstdvbsrc</p></td>
+<td class="parameter_description"><p>the object which received the signal.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="GstDvbSrc-tuning-start"></a><h3>The <code class="literal">“tuning-start”</code> signal</h3>
+<pre class="programlisting"><span class="returnvalue">void</span>
+user_function (<a class="link" href="gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc"><span class="type">GstDvbSrc</span></a> *gstdvbsrc,
+               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
+<p>
+</p>
+<div class="refsect3">
+<a name="id-1.2.24.12.4.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>gstdvbsrc</p></td>
+<td class="parameter_description"><p>the object which received the signal.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+<tr>
+<td class="parameter_name"><p>user_data</p></td>
+<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
+<td class="parameter_annotations"> </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<p>Flags: Run Last</p>
+</div>
 </div>
 </div>
 <div class="footer">
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html b/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
index 0033f70..e983512 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-dvdspu.html
@@ -58,7 +58,7 @@
 <a name="gst-plugins-bad-plugins-dvdspu.description"></a><h2>Description</h2>
 <p>DVD sub picture overlay element.</p>
 <div class="refsect2">
-<a name="id-1.2.24.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.25.6.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -74,7 +74,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.24.6.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.25.6.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -100,7 +100,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.24.6.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.25.6.4.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-bad-plugins-edgedetect.html b/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
index 9892fef..2f68edb 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-edgedetect.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.26.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.27.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.26.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.27.4.2.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-bad-plugins-eglglessink.html b/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html
index db4ecb2..c0b14fe 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-eglglessink.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.27.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.28.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.27.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.28.4.2.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-bad-plugins-exclusion.html b/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
index 0d9e71b..b2aab3c 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-exclusion.html
@@ -83,7 +83,7 @@
 <a name="gst-plugins-bad-plugins-exclusion.description"></a><h2>Description</h2>
 <p>Exclusion saturates the colors of a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.25.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.26.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -99,7 +99,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.25.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.26.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -125,7 +125,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.25.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.26.7.4.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-bad-plugins-faac.html b/docs/plugins/html/gst-plugins-bad-plugins-faac.html
index f3ae143..7cf7fd1 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faac.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faac.html
@@ -120,7 +120,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.28.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.29.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -146,7 +146,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.28.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.29.8.2.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-bad-plugins-faad.html b/docs/plugins/html/gst-plugins-bad-plugins-faad.html
index d5c83a0..845319d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faad.html
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.29.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.30.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -86,7 +86,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.29.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.30.6.2.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-bad-plugins-faceblur.html b/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
index cf8f8a7..4908db2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-faceblur.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.30.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.31.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.30.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.31.4.2.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-bad-plugins-facedetect.html b/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
index ed59524..635ab9a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-facedetect.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.31.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.32.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.31.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.32.4.2.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-bad-plugins-festival.html b/docs/plugins/html/gst-plugins-bad-plugins-festival.html
index f57cd47..1a3844e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-festival.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-festival.html
@@ -61,7 +61,7 @@
 in server mode, started as </p>
 <pre class="screen">festival --server</pre>
 <div class="refsect2">
-<a name="id-1.2.32.6.5"></a><h3>Example pipeline</h3>
+<a name="id-1.2.33.6.5"></a><h3>Example pipeline</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -77,7 +77,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.32.6.6.1"></a><h3>Element Information</h3>
+<a name="id-1.2.33.6.6.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -103,7 +103,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.32.6.6.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.33.6.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-bad-plugins-fisheye.html b/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
index f642f91..bd7a73e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-fisheye.html
@@ -62,7 +62,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.33.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.34.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -88,7 +88,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.33.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.34.6.2.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-bad-plugins-fpsdisplaysink.html b/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
index 9e563d2..a16234a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-fpsdisplaysink.html
@@ -152,7 +152,7 @@
 <a name="gst-plugins-bad-plugins-fpsdisplaysink.description"></a><h2>Description</h2>
 <p>Can display the current and average framerate as a testoverlay or on stdout.</p>
 <div class="refsect2">
-<a name="id-1.2.34.9.3"></a><h3>Example launch lines</h3>
+<a name="id-1.2.35.9.3"></a><h3>Example launch lines</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -174,7 +174,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.34.9.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.35.9.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -200,7 +200,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.34.9.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.35.9.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -346,7 +346,7 @@
                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)</pre>
 <p>Signals the application about the measured fps</p>
 <div class="refsect3">
-<a name="id-1.2.34.13.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.35.13.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html b/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
index 71b076a..2b698cf 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-gaussianblur.html
@@ -41,7 +41,7 @@
 <a name="gst-plugins-bad-plugins-gaussianblur.description"></a><h2>Description</h2>
 <p>Gaussianblur blurs the video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.35.4.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.36.4.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -57,7 +57,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.35.4.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.36.4.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -83,7 +83,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.35.4.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.36.4.4.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-bad-plugins-jpegparse.html b/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
index b5f085b..19f4957 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-jpegparse.html
@@ -114,7 +114,7 @@
 image header searching for image properties such as width and height
 among others. Jpegparse can also extract metadata (e.g. xmp).</p>
 <div class="refsect2">
-<a name="id-1.2.36.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.37.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -132,7 +132,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.36.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.37.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -158,7 +158,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.36.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.37.7.4.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -249,7 +249,7 @@
 <p>
 </p>
 <div class="refsect3">
-<a name="id-1.2.36.8.6.5"></a><h4>Returns</h4>
+<a name="id-1.2.37.8.6.5"></a><h4>Returns</h4>
 <p></p>
 </div>
 </div>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html b/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
index db8c275..9142561 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-kaleidoscope.html
@@ -91,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.37.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.38.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -117,7 +117,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.37.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.38.7.2.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-bad-plugins-liveadder.html b/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
index 04a4666..1f7aa83 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-liveadder.html
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.38.7.3.1.1"></a><h3>Element Information</h3>
+<a name="id-1.2.39.7.3.1.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -105,7 +105,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.38.7.3.1.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.39.7.3.1.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-bad-plugins-marble.html b/docs/plugins/html/gst-plugins-bad-plugins-marble.html
index 000c164..d73ce24 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-marble.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-marble.html
@@ -95,7 +95,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.39.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.40.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -121,7 +121,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.39.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.40.7.2.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-bad-plugins-mimdec.html b/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
index 21d8453..396c552 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mimdec.html
@@ -59,7 +59,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.41.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.42.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -85,7 +85,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.41.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.42.6.2.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-bad-plugins-mimenc.html b/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
index cf39650..e5d52f5 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mimenc.html
@@ -75,7 +75,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.40.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.41.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -101,7 +101,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.40.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.41.7.2.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-bad-plugins-mirror.html b/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
index 4f99767..00303ea 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mirror.html
@@ -78,7 +78,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.42.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.43.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -104,7 +104,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.42.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.43.7.2.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-bad-plugins-modplug.html b/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
index cd0bbd3..d88f366 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-modplug.html
@@ -133,7 +133,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.43.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.44.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -159,7 +159,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.43.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.44.7.2.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-bad-plugins-mpeg2enc.html b/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
index 51427e8..21daa78 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpeg2enc.html
@@ -249,7 +249,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.44.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.45.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -276,7 +276,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.44.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.45.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -374,7 +374,7 @@
 <pre class="programlisting">  “bitrate”                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
 <p>Compressed video bitrate (kbps).</p>
 <p>Flags: Read / Write</p>
-<p>Allowed values: [0,10000]</p>
+<p>Allowed values: [0,40000]</p>
 <p>Default value: 1125</p>
 </div>
 <hr>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html b/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
index 915b79b..ebb7306 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mpg123audiodec.html
@@ -60,7 +60,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.46.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.47.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -86,7 +86,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.46.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.47.6.2.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-bad-plugins-mplex.html b/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
index 3a02400..b366c7b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-mplex.html
@@ -107,7 +107,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.45.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.46.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -135,7 +135,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.45.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.46.7.2.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-bad-plugins-neonhttpsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
index 96d9754..54e9025 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-neonhttpsrc.html
@@ -157,7 +157,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.47.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.48.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -183,7 +183,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.47.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.48.8.2.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-bad-plugins-ofa.html b/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
index fdbbba7..85d0c12 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-ofa.html
@@ -78,7 +78,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.48.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.49.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -104,7 +104,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.48.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.49.7.2.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-bad-plugins-openalsink.html b/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
index 9e1a600..1eb27b8 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-openalsink.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.50.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.51.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.50.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.51.4.2.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-bad-plugins-openalsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
index 0843e61..80b472e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-openalsrc.html
@@ -88,7 +88,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.49.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.50.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -114,7 +114,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.49.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.50.7.2.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-bad-plugins-opencvtextoverlay.html b/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
index ef76996..ea84c4d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-opencvtextoverlay.html
@@ -118,7 +118,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.69.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.70.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -144,7 +144,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.69.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.70.8.2.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-bad-plugins-pcapparse.html b/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
index 3deed0c..d0f6e76 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pcapparse.html
@@ -107,7 +107,7 @@
 <a class="link" href="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--src-port" title="The “src-port” property"><span class="type">“src-port”</span></a> and <a class="link" href="gst-plugins-bad-plugins-pcapparse.html#GstPcapParse--dst-port" title="The “dst-port” property"><span class="type">“dst-port”</span></a> to restrict which packets
 should be included.</p>
 <div class="refsect2">
-<a name="id-1.2.51.7.3"></a><h3>Example pipelines</h3>
+<a name="id-1.2.52.7.3"></a><h3>Example pipelines</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -126,7 +126,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.51.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.52.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -152,7 +152,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.51.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.52.7.4.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-bad-plugins-pinch.html b/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
index 74886a4..b8223ee 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pinch.html
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.52.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.53.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -105,7 +105,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.52.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.53.7.2.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-bad-plugins-plugin-assrender.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-assrender.html
index 8fee864..8032f77 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-assrender.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-assrender.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html
index b5fd63f..60a7eb7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-audiovisualizers.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html
index bbdfce8..2aaa375 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-autoconvert.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html
index a944b63..f9bcbb4 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bayer.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html
index b190f75..eb47001 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-bz2.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html
index 7acd96e..fddd2d2 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-camerabin.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html
index e4a68f5..3484fd7 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-coloreffects.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html
index 7ede8e4..e383f0a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-curl.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html
index 0e2cf8a..1942003 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dataurisrc.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html
index 2320e65..f298da3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-debugutilsbad.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html
index e077597..94336fe 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dtsdec.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html
index 29d40a6..3042173 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvb.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html
index 7fcd1bc..32ec7e0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-dvdspu.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html
index 516ca70..ab47ee4 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faac.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html
index ab14782..42a6cee 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-faad.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html
index c1feb65..431d07e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-festival.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html
index a157bd5..372ecb3 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gaudieffects.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html
index 30121d7..1bfa38d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-geometrictransform.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html
index 75175e9..fe8af05 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-gsm.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html
index b781a2a..f8d4ed5 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-jpegformat.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html
index 4f0fb44..9dedaa6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-liveadder.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html
index f95fca6..e015387 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mimic.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html
index 4c13d1e..1a73551 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mms.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html
index c89980b..a31d031 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-modplug.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html
index 3cb25bf..52351ad 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpeg2enc.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html
index 641e1b9..8feed29 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mpegtsmux.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html
index 842ad62..c03dc6d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-mplex.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html
index 69b3640..e69296f 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-neon.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.2.1</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
@@ -50,7 +50,7 @@
 </tr>
 <tr>
 <td><p><span class="term">package</span></p></td>
-<td>GStreamer Bad Plug-ins source release</td>
+<td>GStreamer Bad Plug-ins git</td>
 </tr>
 <tr>
 <td><p><span class="term">origin</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html
index d3f9bf0..2f9209d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-ofa.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html
index 3f6154c..c47c2fd 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-openal.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html
index 13267b7..fa6b320 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-opencv.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html
index 341e165..59d3a1e 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-pcapparse.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html
index 63446e4..a6cd439 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rawparse.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html
index 165c9d2..3a3d2e0 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-rfbsrc.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html
index 82917a3..05c2eae 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-sdp.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html
index 475a991..5572842 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-shm.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html
index c0fa690..98c8234 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-soundtouch.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html
index 461cd68..ae17a57 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-speed.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html
index f0e31be..f09ac95 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voaacenc.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html
index 74df8d0..16f9496 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-voamrwbenc.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html b/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html
index ffa2d03..c7c974a 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-plugin-zbar.html
@@ -42,7 +42,7 @@
 </tr>
 <tr>
 <td><p><span class="term">version</span></p></td>
-<td>1.3.2</td>
+<td>1.3.3</td>
 </tr>
 <tr>
 <td><p><span class="term">run-time license</span></p></td>
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html b/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
index a442635..84a6cea 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-pyramidsegment.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.53.5.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.54.5.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.53.5.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.54.5.2.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-bad-plugins-rfbsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
index b723ae9..26365d1 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rfbsrc.html
@@ -137,7 +137,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.54.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.55.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -163,7 +163,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.54.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.55.7.2.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-bad-plugins-rtmpsink.html b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
index 4f672db..897c822 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsink.html
@@ -84,7 +84,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.55.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.56.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -110,7 +110,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.55.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.56.8.2.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-bad-plugins-rtmpsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
index a0fdac6..f1de857 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-rtmpsrc.html
@@ -85,7 +85,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.56.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.57.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -111,7 +111,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.56.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.57.8.2.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-bad-plugins-sdpdemux.html b/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
index 7f1b2b9..4566c35 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-sdpdemux.html
@@ -108,7 +108,7 @@
 <p>sdpdemux acts like a live element and will therefore only generate data in the 
 PLAYING state.</p>
 <div class="refsect2">
-<a name="id-1.2.59.8.5"></a><h3>Example launch line</h3>
+<a name="id-1.2.60.8.5"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -125,7 +125,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.59.8.6.1"></a><h3>Element Information</h3>
+<a name="id-1.2.60.8.6.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -151,7 +151,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.59.8.6.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.60.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-bad-plugins-shmsink.html b/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
index 20612f6..a8da690 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-shmsink.html
@@ -122,7 +122,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.57.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.58.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -148,7 +148,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.57.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.58.8.2.2"></a><h3>Element Pads</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -245,7 +245,7 @@
 <p>
 </p>
 <div class="refsect3">
-<a name="id-1.2.57.12.2.5"></a><h4>Parameters</h4>
+<a name="id-1.2.58.12.2.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
@@ -278,7 +278,7 @@
 <p>
 </p>
 <div class="refsect3">
-<a name="id-1.2.57.12.3.5"></a><h4>Parameters</h4>
+<a name="id-1.2.58.12.3.5"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
 <colgroup>
 <col width="150px" class="parameters_name">
diff --git a/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html b/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
index b684359..e4053be 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-shmsrc.html
@@ -85,7 +85,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.58.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.59.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -111,7 +111,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.58.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.59.7.2.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-bad-plugins-solarize.html b/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
index 36f6d8c..10a9167 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-solarize.html
@@ -93,7 +93,7 @@
 <a name="gst-plugins-bad-plugins-solarize.description"></a><h2>Description</h2>
 <p>Solarize does a smart inverse in a video stream in realtime.</p>
 <div class="refsect2">
-<a name="id-1.2.60.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.61.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -109,7 +109,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.60.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.61.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -135,7 +135,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.60.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.61.7.4.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-bad-plugins-spacescope.html b/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
index 118f88f..cdd205b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-spacescope.html
@@ -76,7 +76,7 @@
 <p>Spacescope is a simple audio visualisation element. It maps the left and
 right channel to x and y coordinates.</p>
 <div class="refsect2">
-<a name="id-1.2.61.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.62.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -92,7 +92,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.61.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.62.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -118,7 +118,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.61.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.62.7.4.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-bad-plugins-spectrascope.html b/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
index 5a7a0d4..07ea784 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-spectrascope.html
@@ -60,7 +60,7 @@
 <p>Spectrascope is a simple spectrum visualisation element. It renders the
 frequency spectrum as a series of bars.</p>
 <div class="refsect2">
-<a name="id-1.2.62.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.63.6.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -76,7 +76,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.62.6.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.63.6.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -102,7 +102,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.62.6.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.63.6.4.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-bad-plugins-speed.html b/docs/plugins/html/gst-plugins-bad-plugins-speed.html
index 8f5a3fe..9e11b42 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-speed.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-speed.html
@@ -78,7 +78,7 @@
 element (but relies on the decoder/demuxer to handle this correctly, also
 requires a fairly up-to-date gst-plugins-base, as of February 2007).</p>
 <div class="refsect2">
-<a name="id-1.2.64.7.4"></a><h3>Example launch line</h3>
+<a name="id-1.2.65.7.4"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -94,7 +94,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.64.7.5.1"></a><h3>Element Information</h3>
+<a name="id-1.2.65.7.5.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -120,7 +120,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.64.7.5.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.65.7.5.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-bad-plugins-sphere.html b/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
index ed7e863..b678e9d 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-sphere.html
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.65.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.66.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -105,7 +105,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.65.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.66.7.2.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-bad-plugins-square.html b/docs/plugins/html/gst-plugins-bad-plugins-square.html
index 58d513a..f98aa27 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-square.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-square.html
@@ -90,7 +90,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.66.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.67.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -116,7 +116,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.66.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.67.7.2.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-bad-plugins-stretch.html b/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
index dabd6b8..d163deb 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-stretch.html
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.67.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.68.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -105,7 +105,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.67.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.68.7.2.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-bad-plugins-synaescope.html b/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
index 96652c7..96c686b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-synaescope.html
@@ -60,7 +60,7 @@
 <p>Synaescope is an audio visualisation element. It analyzes frequencies and
 out-of phase properties of audio and draws this as clouds of stars.</p>
 <div class="refsect2">
-<a name="id-1.2.63.6.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.64.6.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -76,7 +76,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.63.6.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.64.6.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -102,7 +102,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.63.6.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.64.6.4.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-bad-plugins-templatematch.html b/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
index 83baf1c..b91654b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-templatematch.html
@@ -88,7 +88,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.68.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.69.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -114,7 +114,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.68.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.69.8.2.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-bad-plugins-tunnel.html b/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
index ac7d333..82ac409 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-tunnel.html
@@ -63,7 +63,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.70.6.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.71.6.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -89,7 +89,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.70.6.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.71.6.2.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-bad-plugins-twirl.html b/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
index 2da83c9..c565964 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-twirl.html
@@ -79,7 +79,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.71.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.72.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -105,7 +105,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.71.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.72.7.2.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-bad-plugins-videoparse.html b/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
index 69e0507..ed89020 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-videoparse.html
@@ -144,7 +144,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.72.7.2.1.1"></a><h3>Element Information</h3>
+<a name="id-1.2.73.7.2.1.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -170,7 +170,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.72.7.2.1.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.73.7.2.1.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-bad-plugins-voaacenc.html b/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
index 47ca435..4bdf20b 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-voaacenc.html
@@ -83,7 +83,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.75.8.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.76.8.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -109,7 +109,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.75.8.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.76.8.2.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-bad-plugins-voamrwbenc.html b/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
index a76f726..ed7d087 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-voamrwbenc.html
@@ -42,7 +42,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.76.4.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.77.4.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -68,7 +68,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.76.4.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.77.4.2.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-bad-plugins-waterripple.html b/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
index 1c26f64..ee66fc6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-waterripple.html
@@ -91,7 +91,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.73.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.74.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -117,7 +117,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.73.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.74.7.2.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-bad-plugins-wavescope.html b/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
index b4e79ee..fe15eea 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-wavescope.html
@@ -76,7 +76,7 @@
 <p>Wavescope is a simple audio visualisation element. It renders the waveforms
 like on an oscilloscope.</p>
 <div class="refsect2">
-<a name="id-1.2.77.7.3"></a><h3>Example launch line</h3>
+<a name="id-1.2.78.7.3"></a><h3>Example launch line</h3>
 <div class="informalexample">
   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
     <tbody>
@@ -92,7 +92,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.77.7.4.1"></a><h3>Element Information</h3>
+<a name="id-1.2.78.7.4.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -118,7 +118,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.77.7.4.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.78.7.4.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-bad-plugins-zbar.html b/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
index 604dd4d..96a9fe6 100644
--- a/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
+++ b/docs/plugins/html/gst-plugins-bad-plugins-zbar.html
@@ -84,7 +84,7 @@
 <div class="refsynopsisdiv">
 <h2>Synopsis</h2>
 <div class="refsect2">
-<a name="id-1.2.74.7.2.1"></a><h3>Element Information</h3>
+<a name="id-1.2.75.7.2.1"></a><h3>Element Information</h3>
 <div class="variablelist"><table border="0" class="variablelist">
 <colgroup>
 <col align="left" valign="top">
@@ -110,7 +110,7 @@
 </div>
 <hr>
 <div class="refsect2">
-<a name="id-1.2.74.7.2.2"></a><h3>Element Pads</h3>
+<a name="id-1.2.75.7.2.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/index.html b/docs/plugins/html/index.html
index 30f4077..260ec71 100644
--- a/docs/plugins/html/index.html
+++ b/docs/plugins/html/index.html
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer Bad Plugins 1.0 Plugins Reference Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      for GStreamer Bad Plugins 1.0 (1.3.2)
+      for GStreamer Bad Plugins 1.0 (1.3.3)
       The latest version of this documentation can be found on-line at
       <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad/html/</a>.
     </p></div>
@@ -53,6 +53,9 @@
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-coloreffects.html">coloreffects</a></span><span class="refpurpose"> — Color Look-up Table filter</span>
 </dt>
 <dt>
+<span class="refentrytitle"><a href="gst-plugins-bad-plugins-compositor.html">compositor</a></span><span class="refpurpose"> — Composite multiple video streams</span>
+</dt>
+<dt>
 <span class="refentrytitle"><a href="gst-plugins-bad-plugins-cvdilate.html">cvdilate</a></span><span class="refpurpose"> — Applies cvDilate OpenCV function to the image</span>
 </dt>
 <dt>
diff --git a/docs/plugins/html/index.sgml b/docs/plugins/html/index.sgml
index 27c03ae..f2e8c44 100644
--- a/docs/plugins/html/index.sgml
+++ b/docs/plugins/html/index.sgml
@@ -102,6 +102,16 @@
 <ANCHOR id="GstColorEffects-struct" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-coloreffects.html#GstColorEffects-struct">
 <ANCHOR id="gst-plugins-bad-plugins-coloreffects.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-coloreffects.html#gst-plugins-bad-plugins-coloreffects.property-details">
 <ANCHOR id="GstColorEffects--preset" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-coloreffects.html#GstColorEffects--preset">
+<ANCHOR id="gst-plugins-bad-plugins-compositor" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.properties">
+<ANCHOR id="GstCompositor" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#GstCompositor">
+<ANCHOR id="GstCompositorPad" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#GstCompositorPad">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.object-hierarchy">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.description" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.description">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.functions_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.functions_details">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.other_details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.other_details">
+<ANCHOR id="gst-plugins-bad-plugins-compositor.property-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#gst-plugins-bad-plugins-compositor.property-details">
+<ANCHOR id="GstCompositor--background" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-compositor.html#GstCompositor--background">
 <ANCHOR id="gst-plugins-bad-plugins-cvdilate" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvdilate.html">
 <ANCHOR id="GstCvDilate" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvdilate.html#GstCvDilate">
 <ANCHOR id="gst-plugins-bad-plugins-cvdilate.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-cvdilate.html#gst-plugins-bad-plugins-cvdilate.other">
@@ -232,6 +242,7 @@
 <ANCHOR id="GstDtsDec--drc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dtsdec.html#GstDtsDec--drc">
 <ANCHOR id="gst-plugins-bad-plugins-dvbsrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html">
 <ANCHOR id="gst-plugins-bad-plugins-dvbsrc.properties" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#gst-plugins-bad-plugins-dvbsrc.properties">
+<ANCHOR id="gst-plugins-bad-plugins-dvbsrc.signals" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#gst-plugins-bad-plugins-dvbsrc.signals">
 <ANCHOR id="GstDvbSrc" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc">
 <ANCHOR id="gst-plugins-bad-plugins-dvbsrc.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#gst-plugins-bad-plugins-dvbsrc.other">
 <ANCHOR id="gst-plugins-bad-plugins-dvbsrc.object-hierarchy" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#gst-plugins-bad-plugins-dvbsrc.object-hierarchy">
@@ -269,6 +280,11 @@
 <ANCHOR id="GstDvbSrc--pilot" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--pilot">
 <ANCHOR id="GstDvbSrc--rolloff" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--rolloff">
 <ANCHOR id="GstDvbSrc--stream-id" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--stream-id">
+<ANCHOR id="GstDvbSrc--tuning-timeout" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc--tuning-timeout">
+<ANCHOR id="gst-plugins-bad-plugins-dvbsrc.signal-details" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#gst-plugins-bad-plugins-dvbsrc.signal-details">
+<ANCHOR id="GstDvbSrc-tuning-done" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-done">
+<ANCHOR id="GstDvbSrc-tuning-fail" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-fail">
+<ANCHOR id="GstDvbSrc-tuning-start" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvbsrc.html#GstDvbSrc-tuning-start">
 <ANCHOR id="gst-plugins-bad-plugins-dvdspu" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvdspu.html">
 <ANCHOR id="GstDVDSpu" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvdspu.html#GstDVDSpu">
 <ANCHOR id="gst-plugins-bad-plugins-dvdspu.other" href="gst-plugins-bad-plugins-1.0/gst-plugins-bad-plugins-dvdspu.html#gst-plugins-bad-plugins-dvdspu.other">
diff --git a/docs/plugins/inspect/plugin-accurip.xml b/docs/plugins/inspect/plugin-accurip.xml
index 86883d7..00c9e09 100644
--- a/docs/plugins/inspect/plugin-accurip.xml
+++ b/docs/plugins/inspect/plugin-accurip.xml
@@ -3,7 +3,7 @@
   <description>Computes an AccurateRip CRC</description>
   <filename>../../gst/accurip/.libs/libgstaccurip.so</filename>
   <basename>libgstaccurip.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-adpcmdec.xml b/docs/plugins/inspect/plugin-adpcmdec.xml
index c8261c9..d3aca6c 100644
--- a/docs/plugins/inspect/plugin-adpcmdec.xml
+++ b/docs/plugins/inspect/plugin-adpcmdec.xml
@@ -3,7 +3,7 @@
   <description>ADPCM decoder</description>
   <filename>../../gst/adpcmdec/.libs/libgstadpcmdec.so</filename>
   <basename>libgstadpcmdec.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-adpcmenc.xml b/docs/plugins/inspect/plugin-adpcmenc.xml
index 790723a..dfd75f8 100644
--- a/docs/plugins/inspect/plugin-adpcmenc.xml
+++ b/docs/plugins/inspect/plugin-adpcmenc.xml
@@ -3,7 +3,7 @@
   <description>ADPCM encoder</description>
   <filename>../../gst/adpcmenc/.libs/libgstadpcmenc.so</filename>
   <basename>libgstadpcmenc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-aiff.xml b/docs/plugins/inspect/plugin-aiff.xml
index 283f0f3..f24f385 100644
--- a/docs/plugins/inspect/plugin-aiff.xml
+++ b/docs/plugins/inspect/plugin-aiff.xml
@@ -3,7 +3,7 @@
   <description>Create and parse Audio Interchange File Format (AIFF) files</description>
   <filename>../../gst/aiff/.libs/libgstaiff.so</filename>
   <basename>libgstaiff.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-asfmux.xml b/docs/plugins/inspect/plugin-asfmux.xml
index 2f94787..8def0c1 100644
--- a/docs/plugins/inspect/plugin-asfmux.xml
+++ b/docs/plugins/inspect/plugin-asfmux.xml
@@ -3,7 +3,7 @@
   <description>ASF Muxer Plugin</description>
   <filename>../../gst/asfmux/.libs/libgstasfmux.so</filename>
   <basename>libgstasfmux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-assrender.xml b/docs/plugins/inspect/plugin-assrender.xml
index 16bb3df..d10f30d 100644
--- a/docs/plugins/inspect/plugin-assrender.xml
+++ b/docs/plugins/inspect/plugin-assrender.xml
@@ -3,7 +3,7 @@
   <description>ASS/SSA subtitle renderer</description>
   <filename>../../ext/assrender/.libs/libgstassrender.so</filename>
   <basename>libgstassrender.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-audiofxbad.xml b/docs/plugins/inspect/plugin-audiofxbad.xml
index 4b1a0fb..64eae71 100644
--- a/docs/plugins/inspect/plugin-audiofxbad.xml
+++ b/docs/plugins/inspect/plugin-audiofxbad.xml
@@ -3,7 +3,7 @@
   <description>Audio filters from gst-plugins-bad</description>
   <filename>../../gst/audiofxbad/.libs/libgstaudiofxbad.so</filename>
   <basename>libgstaudiofxbad.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-audiomixer.xml b/docs/plugins/inspect/plugin-audiomixer.xml
index 602c683..bd29c1b 100644
--- a/docs/plugins/inspect/plugin-audiomixer.xml
+++ b/docs/plugins/inspect/plugin-audiomixer.xml
@@ -3,7 +3,7 @@
   <description>Mixes multiple audio streams</description>
   <filename>../../gst/audiomixer/.libs/libgstaudiomixer.so</filename>
   <basename>libgstaudiomixer.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-audiovisualizers.xml b/docs/plugins/inspect/plugin-audiovisualizers.xml
index 0c2c3ba..29e0f46 100644
--- a/docs/plugins/inspect/plugin-audiovisualizers.xml
+++ b/docs/plugins/inspect/plugin-audiovisualizers.xml
@@ -3,7 +3,7 @@
   <description>Creates video visualizations of audio input</description>
   <filename>../../gst/audiovisualizers/.libs/libgstaudiovisualizers.so</filename>
   <basename>libgstaudiovisualizers.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-autoconvert.xml b/docs/plugins/inspect/plugin-autoconvert.xml
index e8ad756..fc77bc3 100644
--- a/docs/plugins/inspect/plugin-autoconvert.xml
+++ b/docs/plugins/inspect/plugin-autoconvert.xml
@@ -3,7 +3,7 @@
   <description>Selects convertor element based on caps</description>
   <filename>../../gst/autoconvert/.libs/libgstautoconvert.so</filename>
   <basename>libgstautoconvert.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-bayer.xml b/docs/plugins/inspect/plugin-bayer.xml
index a35eff6..a8005bd 100644
--- a/docs/plugins/inspect/plugin-bayer.xml
+++ b/docs/plugins/inspect/plugin-bayer.xml
@@ -3,7 +3,7 @@
   <description>Elements to convert Bayer images</description>
   <filename>../../gst/bayer/.libs/libgstbayer.so</filename>
   <basename>libgstbayer.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-bz2.xml b/docs/plugins/inspect/plugin-bz2.xml
index d4a5216..367c4ad 100644
--- a/docs/plugins/inspect/plugin-bz2.xml
+++ b/docs/plugins/inspect/plugin-bz2.xml
@@ -3,7 +3,7 @@
   <description>Compress or decompress streams</description>
   <filename>../../ext/bz2/.libs/libgstbz2.so</filename>
   <basename>libgstbz2.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-camerabin.xml b/docs/plugins/inspect/plugin-camerabin.xml
index 32d1d89..cba052b 100644
--- a/docs/plugins/inspect/plugin-camerabin.xml
+++ b/docs/plugins/inspect/plugin-camerabin.xml
@@ -3,7 +3,7 @@
   <description>Take image snapshots and record movies from camera</description>
   <filename>../../gst/camerabin2/.libs/libgstcamerabin2.so</filename>
   <basename>libgstcamerabin2.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-chromaprint.xml b/docs/plugins/inspect/plugin-chromaprint.xml
index 4e2f41e..bb75478 100644
--- a/docs/plugins/inspect/plugin-chromaprint.xml
+++ b/docs/plugins/inspect/plugin-chromaprint.xml
@@ -3,7 +3,7 @@
   <description>Calculate Chromaprint fingerprint from audio files</description>
   <filename>../../ext/chromaprint/.libs/libgstchromaprint.so</filename>
   <basename>libgstchromaprint.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-coloreffects.xml b/docs/plugins/inspect/plugin-coloreffects.xml
index fff0333..0cddc9d 100644
--- a/docs/plugins/inspect/plugin-coloreffects.xml
+++ b/docs/plugins/inspect/plugin-coloreffects.xml
@@ -3,7 +3,7 @@
   <description>Color Look-up Table filters</description>
   <filename>../../gst/coloreffects/.libs/libgstcoloreffects.so</filename>
   <basename>libgstcoloreffects.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-compositor.xml b/docs/plugins/inspect/plugin-compositor.xml
new file mode 100644
index 0000000..5071793
--- /dev/null
+++ b/docs/plugins/inspect/plugin-compositor.xml
@@ -0,0 +1,34 @@
+<plugin>
+  <name>compositor</name>
+  <description>Compositor</description>
+  <filename>../../gst/compositor/.libs/libgstcompositor.so</filename>
+  <basename>libgstcompositor.so</basename>
+  <version>1.3.3</version>
+  <license>LGPL</license>
+  <source>gst-plugins-bad</source>
+  <package>GStreamer Bad Plug-ins source release</package>
+  <origin>Unknown package origin</origin>
+  <elements>
+    <element>
+      <name>compositor</name>
+      <longname>Compositor</longname>
+      <class>Filter/Editor/Video/Compositor</class>
+      <description>Composite multiple video streams</description>
+      <author>Wim Taymans &lt;wim@fluendo.com&gt;, Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</author>
+      <pads>
+        <caps>
+          <name>sink_%u</name>
+          <direction>sink</direction>
+          <presence>request</presence>
+          <details>video/x-raw, format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+        <caps>
+          <name>src</name>
+          <direction>source</direction>
+          <presence>always</presence>
+          <details>video/x-raw, format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+        </caps>
+      </pads>
+    </element>
+  </elements>
+</plugin>
\ No newline at end of file
diff --git a/docs/plugins/inspect/plugin-curl.xml b/docs/plugins/inspect/plugin-curl.xml
index 2477e45..8c91d41 100644
--- a/docs/plugins/inspect/plugin-curl.xml
+++ b/docs/plugins/inspect/plugin-curl.xml
@@ -3,7 +3,7 @@
   <description>libcurl-based elements</description>
   <filename>../../ext/curl/.libs/libgstcurl.so</filename>
   <basename>libgstcurl.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dashdemux.xml b/docs/plugins/inspect/plugin-dashdemux.xml
index 03bfb03..42f6a91 100644
--- a/docs/plugins/inspect/plugin-dashdemux.xml
+++ b/docs/plugins/inspect/plugin-dashdemux.xml
@@ -3,7 +3,7 @@
   <description>DASH demuxer plugin</description>
   <filename>../../ext/dash/.libs/libgstdashdemux.so</filename>
   <basename>libgstdashdemux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-dataurisrc.xml b/docs/plugins/inspect/plugin-dataurisrc.xml
index 94ec484..4d83a57 100644
--- a/docs/plugins/inspect/plugin-dataurisrc.xml
+++ b/docs/plugins/inspect/plugin-dataurisrc.xml
@@ -3,7 +3,7 @@
   <description>data: URI source</description>
   <filename>../../gst/dataurisrc/.libs/libgstdataurisrc.so</filename>
   <basename>libgstdataurisrc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-debugutilsbad.xml b/docs/plugins/inspect/plugin-debugutilsbad.xml
index ba31620..37df6b8 100644
--- a/docs/plugins/inspect/plugin-debugutilsbad.xml
+++ b/docs/plugins/inspect/plugin-debugutilsbad.xml
@@ -3,7 +3,7 @@
   <description>Collection of elements that may or may not be useful for debugging</description>
   <filename>../../gst/debugutils/.libs/libgstdebugutilsbad.so</filename>
   <basename>libgstdebugutilsbad.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-decklink.xml b/docs/plugins/inspect/plugin-decklink.xml
index fa3191d..1a8a1d4 100644
--- a/docs/plugins/inspect/plugin-decklink.xml
+++ b/docs/plugins/inspect/plugin-decklink.xml
@@ -3,7 +3,7 @@
   <description>Blackmagic Decklink plugin</description>
   <filename>../../sys/decklink/.libs/libgstdecklink.so</filename>
   <basename>libgstdecklink.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-dfbvideosink.xml b/docs/plugins/inspect/plugin-dfbvideosink.xml
index 902bcf5..c1f4382 100644
--- a/docs/plugins/inspect/plugin-dfbvideosink.xml
+++ b/docs/plugins/inspect/plugin-dfbvideosink.xml
@@ -3,7 +3,7 @@
   <description>DirectFB video output plugin</description>
   <filename>../../ext/directfb/.libs/libgstdfbvideosink.so</filename>
   <basename>libgstdfbvideosink.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dtsdec.xml b/docs/plugins/inspect/plugin-dtsdec.xml
index 46a6ac7..4f348f3 100644
--- a/docs/plugins/inspect/plugin-dtsdec.xml
+++ b/docs/plugins/inspect/plugin-dtsdec.xml
@@ -3,7 +3,7 @@
   <description>Decodes DTS audio streams</description>
   <filename>../../ext/dts/.libs/libgstdtsdec.so</filename>
   <basename>libgstdtsdec.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dvb.xml b/docs/plugins/inspect/plugin-dvb.xml
index 5dd3b40..9c2e659 100644
--- a/docs/plugins/inspect/plugin-dvb.xml
+++ b/docs/plugins/inspect/plugin-dvb.xml
@@ -3,7 +3,7 @@
   <description>DVB elements</description>
   <filename>../../sys/dvb/.libs/libgstdvb.so</filename>
   <basename>libgstdvb.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dvbsuboverlay.xml b/docs/plugins/inspect/plugin-dvbsuboverlay.xml
index 6a44de9..bbfb1c5 100644
--- a/docs/plugins/inspect/plugin-dvbsuboverlay.xml
+++ b/docs/plugins/inspect/plugin-dvbsuboverlay.xml
@@ -3,7 +3,7 @@
   <description>DVB subtitle renderer</description>
   <filename>../../gst/dvbsuboverlay/.libs/libgstdvbsuboverlay.so</filename>
   <basename>libgstdvbsuboverlay.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-dvdspu.xml b/docs/plugins/inspect/plugin-dvdspu.xml
index 3896b35..eaf6a7f 100644
--- a/docs/plugins/inspect/plugin-dvdspu.xml
+++ b/docs/plugins/inspect/plugin-dvdspu.xml
@@ -3,7 +3,7 @@
   <description>DVD Sub-picture Overlay element</description>
   <filename>../../gst/dvdspu/.libs/libgstdvdspu.so</filename>
   <basename>libgstdvdspu.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-faac.xml b/docs/plugins/inspect/plugin-faac.xml
index 75a31da..286880f 100644
--- a/docs/plugins/inspect/plugin-faac.xml
+++ b/docs/plugins/inspect/plugin-faac.xml
@@ -3,7 +3,7 @@
   <description>Free AAC Encoder (FAAC)</description>
   <filename>../../ext/faac/.libs/libgstfaac.so</filename>
   <basename>libgstfaac.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-faad.xml b/docs/plugins/inspect/plugin-faad.xml
index 0c8df3d..93d495d 100644
--- a/docs/plugins/inspect/plugin-faad.xml
+++ b/docs/plugins/inspect/plugin-faad.xml
@@ -3,7 +3,7 @@
   <description>Free AAC Decoder (FAAD)</description>
   <filename>../../ext/faad/.libs/libgstfaad.so</filename>
   <basename>libgstfaad.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-fbdevsink.xml b/docs/plugins/inspect/plugin-fbdevsink.xml
index 8509297..da07409 100644
--- a/docs/plugins/inspect/plugin-fbdevsink.xml
+++ b/docs/plugins/inspect/plugin-fbdevsink.xml
@@ -3,7 +3,7 @@
   <description>Linux framebuffer video sink</description>
   <filename>../../sys/fbdev/.libs/libgstfbdevsink.so</filename>
   <basename>libgstfbdevsink.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-festival.xml b/docs/plugins/inspect/plugin-festival.xml
index a210a8c..da0cb67 100644
--- a/docs/plugins/inspect/plugin-festival.xml
+++ b/docs/plugins/inspect/plugin-festival.xml
@@ -3,7 +3,7 @@
   <description>Synthesizes plain text into audio</description>
   <filename>../../gst/festival/.libs/libgstfestival.so</filename>
   <basename>libgstfestival.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-fieldanalysis.xml b/docs/plugins/inspect/plugin-fieldanalysis.xml
index f8d1fb1..f389889 100644
--- a/docs/plugins/inspect/plugin-fieldanalysis.xml
+++ b/docs/plugins/inspect/plugin-fieldanalysis.xml
@@ -3,7 +3,7 @@
   <description>Video field analysis</description>
   <filename>../../gst/fieldanalysis/.libs/libgstfieldanalysis.so</filename>
   <basename>libgstfieldanalysis.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-flite.xml b/docs/plugins/inspect/plugin-flite.xml
index 85cfe2d..6198313 100644
--- a/docs/plugins/inspect/plugin-flite.xml
+++ b/docs/plugins/inspect/plugin-flite.xml
@@ -3,7 +3,7 @@
   <description>Flite speech synthesizer plugin</description>
   <filename>../../ext/flite/.libs/libgstflite.so</filename>
   <basename>libgstflite.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-fluidsynthmidi.xml b/docs/plugins/inspect/plugin-fluidsynthmidi.xml
index f3d232d..d3ccf61 100644
--- a/docs/plugins/inspect/plugin-fluidsynthmidi.xml
+++ b/docs/plugins/inspect/plugin-fluidsynthmidi.xml
@@ -3,7 +3,7 @@
   <description>Fluidsynth MIDI Plugin</description>
   <filename>../../ext/fluidsynth/.libs/libgstfluidsynthmidi.so</filename>
   <basename>libgstfluidsynthmidi.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-fragmented.xml b/docs/plugins/inspect/plugin-fragmented.xml
index 55c6a73..bf99d78 100644
--- a/docs/plugins/inspect/plugin-fragmented.xml
+++ b/docs/plugins/inspect/plugin-fragmented.xml
@@ -3,7 +3,7 @@
   <description>Fragmented streaming plugins</description>
   <filename>../../ext/hls/.libs/libgstfragmented.so</filename>
   <basename>libgstfragmented.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-freeverb.xml b/docs/plugins/inspect/plugin-freeverb.xml
index 076e549..ab97826 100644
--- a/docs/plugins/inspect/plugin-freeverb.xml
+++ b/docs/plugins/inspect/plugin-freeverb.xml
@@ -3,7 +3,7 @@
   <description>Reverberation/room effect</description>
   <filename>../../gst/freeverb/.libs/libgstfreeverb.so</filename>
   <basename>libgstfreeverb.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-frei0r.xml b/docs/plugins/inspect/plugin-frei0r.xml
index f64e287..dfaf982 100644
--- a/docs/plugins/inspect/plugin-frei0r.xml
+++ b/docs/plugins/inspect/plugin-frei0r.xml
@@ -3,7 +3,7 @@
   <description>frei0r plugin library</description>
   <filename>../../gst/frei0r/.libs/libgstfrei0r.so</filename>
   <basename>libgstfrei0r.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-gaudieffects.xml b/docs/plugins/inspect/plugin-gaudieffects.xml
index e735cea..8fde698 100644
--- a/docs/plugins/inspect/plugin-gaudieffects.xml
+++ b/docs/plugins/inspect/plugin-gaudieffects.xml
@@ -3,7 +3,7 @@
   <description>Gaudi video effects.</description>
   <filename>../../gst/gaudieffects/.libs/libgstgaudieffects.so</filename>
   <basename>libgstgaudieffects.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-gdp.xml b/docs/plugins/inspect/plugin-gdp.xml
index f84d5a9..b6a02c4 100644
--- a/docs/plugins/inspect/plugin-gdp.xml
+++ b/docs/plugins/inspect/plugin-gdp.xml
@@ -3,7 +3,7 @@
   <description>Payload/depayload GDP packets</description>
   <filename>../../gst/gdp/.libs/libgstgdp.so</filename>
   <basename>libgstgdp.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-geometrictransform.xml b/docs/plugins/inspect/plugin-geometrictransform.xml
index 230629a..1f0335c 100644
--- a/docs/plugins/inspect/plugin-geometrictransform.xml
+++ b/docs/plugins/inspect/plugin-geometrictransform.xml
@@ -3,7 +3,7 @@
   <description>Various geometric image transform elements</description>
   <filename>../../gst/geometrictransform/.libs/libgstgeometrictransform.so</filename>
   <basename>libgstgeometrictransform.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-gmedec.xml b/docs/plugins/inspect/plugin-gmedec.xml
index d647c90..aa4eac6 100644
--- a/docs/plugins/inspect/plugin-gmedec.xml
+++ b/docs/plugins/inspect/plugin-gmedec.xml
@@ -3,7 +3,7 @@
   <description>GME Audio Decoder</description>
   <filename>../../ext/gme/.libs/libgstgme.so</filename>
   <basename>libgstgme.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-gsm.xml b/docs/plugins/inspect/plugin-gsm.xml
index 23c72cf..bd1435c 100644
--- a/docs/plugins/inspect/plugin-gsm.xml
+++ b/docs/plugins/inspect/plugin-gsm.xml
@@ -3,7 +3,7 @@
   <description>GSM encoder/decoder</description>
   <filename>../../ext/gsm/.libs/libgstgsm.so</filename>
   <basename>libgstgsm.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-gstsiren.xml b/docs/plugins/inspect/plugin-gstsiren.xml
index be9df02..965f197 100644
--- a/docs/plugins/inspect/plugin-gstsiren.xml
+++ b/docs/plugins/inspect/plugin-gstsiren.xml
@@ -3,7 +3,7 @@
   <description>Siren encoder/decoder/payloader/depayloader plugins</description>
   <filename>../../gst/siren/.libs/libgstsiren.so</filename>
   <basename>libgstsiren.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-id3tag.xml b/docs/plugins/inspect/plugin-id3tag.xml
index 0e054eb..6e05bf8 100644
--- a/docs/plugins/inspect/plugin-id3tag.xml
+++ b/docs/plugins/inspect/plugin-id3tag.xml
@@ -3,7 +3,7 @@
   <description>ID3 v1 and v2 muxing plugin</description>
   <filename>../../gst/id3tag/.libs/libgstid3tag.so</filename>
   <basename>libgstid3tag.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-inter.xml b/docs/plugins/inspect/plugin-inter.xml
index 8ec6872..ada37f4 100644
--- a/docs/plugins/inspect/plugin-inter.xml
+++ b/docs/plugins/inspect/plugin-inter.xml
@@ -3,7 +3,7 @@
   <description>plugin for inter-pipeline communication</description>
   <filename>../../gst/inter/.libs/libgstinter.so</filename>
   <basename>libgstinter.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-interlace.xml b/docs/plugins/inspect/plugin-interlace.xml
index a709b17..5b1a8b7 100644
--- a/docs/plugins/inspect/plugin-interlace.xml
+++ b/docs/plugins/inspect/plugin-interlace.xml
@@ -3,7 +3,7 @@
   <description>Create an interlaced video stream</description>
   <filename>../../gst/interlace/.libs/libgstinterlace.so</filename>
   <basename>libgstinterlace.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-ivfparse.xml b/docs/plugins/inspect/plugin-ivfparse.xml
index ae2002e..bbe47ff 100644
--- a/docs/plugins/inspect/plugin-ivfparse.xml
+++ b/docs/plugins/inspect/plugin-ivfparse.xml
@@ -3,7 +3,7 @@
   <description>IVF parser</description>
   <filename>../../gst/ivfparse/.libs/libgstivfparse.so</filename>
   <basename>libgstivfparse.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-ivtc.xml b/docs/plugins/inspect/plugin-ivtc.xml
index 1f9c162..5b60738 100644
--- a/docs/plugins/inspect/plugin-ivtc.xml
+++ b/docs/plugins/inspect/plugin-ivtc.xml
@@ -3,7 +3,7 @@
   <description>Inverse Telecine</description>
   <filename>../../gst/ivtc/.libs/libgstivtc.so</filename>
   <basename>libgstivtc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-jp2kdecimator.xml b/docs/plugins/inspect/plugin-jp2kdecimator.xml
index 97a8619..1af4075 100644
--- a/docs/plugins/inspect/plugin-jp2kdecimator.xml
+++ b/docs/plugins/inspect/plugin-jp2kdecimator.xml
@@ -3,7 +3,7 @@
   <description>JPEG2000 decimator</description>
   <filename>../../gst/jp2kdecimator/.libs/libgstjp2kdecimator.so</filename>
   <basename>libgstjp2kdecimator.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-jpegformat.xml b/docs/plugins/inspect/plugin-jpegformat.xml
index b247e5c..51743fc 100644
--- a/docs/plugins/inspect/plugin-jpegformat.xml
+++ b/docs/plugins/inspect/plugin-jpegformat.xml
@@ -3,7 +3,7 @@
   <description>JPEG interchange format plugin</description>
   <filename>../../gst/jpegformat/.libs/libgstjpegformat.so</filename>
   <basename>libgstjpegformat.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-kate.xml b/docs/plugins/inspect/plugin-kate.xml
index 3598900..e9bd435 100644
--- a/docs/plugins/inspect/plugin-kate.xml
+++ b/docs/plugins/inspect/plugin-kate.xml
@@ -3,7 +3,7 @@
   <description>Kate plugin</description>
   <filename>../../ext/kate/.libs/libgstkate.so</filename>
   <basename>libgstkate.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-ladspa.xml b/docs/plugins/inspect/plugin-ladspa.xml
index 36e163b..0a0a525 100644
--- a/docs/plugins/inspect/plugin-ladspa.xml
+++ b/docs/plugins/inspect/plugin-ladspa.xml
@@ -3,7 +3,7 @@
   <description>LADSPA plugin</description>
   <filename>../../ext/ladspa/.libs/libgstladspa.so</filename>
   <basename>libgstladspa.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-liveadder.xml b/docs/plugins/inspect/plugin-liveadder.xml
index bba2a30..65b8317 100644
--- a/docs/plugins/inspect/plugin-liveadder.xml
+++ b/docs/plugins/inspect/plugin-liveadder.xml
@@ -3,7 +3,7 @@
   <description>Adds multiple live discontinuous streams</description>
   <filename>../../gst/liveadder/.libs/libgstliveadder.so</filename>
   <basename>libgstliveadder.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-midi.xml b/docs/plugins/inspect/plugin-midi.xml
index 06c3549..2b2a9e5 100644
--- a/docs/plugins/inspect/plugin-midi.xml
+++ b/docs/plugins/inspect/plugin-midi.xml
@@ -3,7 +3,7 @@
   <description>Parse MIDI files</description>
   <filename>../../gst/midi/.libs/libgstmidi.so</filename>
   <basename>libgstmidi.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mimic.xml b/docs/plugins/inspect/plugin-mimic.xml
index c9401c0..2eed0b2 100644
--- a/docs/plugins/inspect/plugin-mimic.xml
+++ b/docs/plugins/inspect/plugin-mimic.xml
@@ -3,7 +3,7 @@
   <description>Mimic codec</description>
   <filename>../../ext/mimic/.libs/libgstmimic.so</filename>
   <basename>libgstmimic.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mms.xml b/docs/plugins/inspect/plugin-mms.xml
index 3ec36c4..6d3f2d0 100644
--- a/docs/plugins/inspect/plugin-mms.xml
+++ b/docs/plugins/inspect/plugin-mms.xml
@@ -3,7 +3,7 @@
   <description>Microsoft Multi Media Server streaming protocol support</description>
   <filename>../../ext/libmms/.libs/libgstmms.so</filename>
   <basename>libgstmms.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-modplug.xml b/docs/plugins/inspect/plugin-modplug.xml
index 4b1ace3..031db4b 100644
--- a/docs/plugins/inspect/plugin-modplug.xml
+++ b/docs/plugins/inspect/plugin-modplug.xml
@@ -3,7 +3,7 @@
   <description>.MOD audio decoding</description>
   <filename>../../ext/modplug/.libs/libgstmodplug.so</filename>
   <basename>libgstmodplug.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpeg2enc.xml b/docs/plugins/inspect/plugin-mpeg2enc.xml
index a6f2c95..16e66fa 100644
--- a/docs/plugins/inspect/plugin-mpeg2enc.xml
+++ b/docs/plugins/inspect/plugin-mpeg2enc.xml
@@ -3,7 +3,7 @@
   <description>High-quality MPEG-1/2 video encoder</description>
   <filename>../../ext/mpeg2enc/.libs/libgstmpeg2enc.so</filename>
   <basename>libgstmpeg2enc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpegpsdemux.xml b/docs/plugins/inspect/plugin-mpegpsdemux.xml
index 76a9ab7..ac299de 100644
--- a/docs/plugins/inspect/plugin-mpegpsdemux.xml
+++ b/docs/plugins/inspect/plugin-mpegpsdemux.xml
@@ -3,7 +3,7 @@
   <description>MPEG-PS demuxer</description>
   <filename>../../gst/mpegdemux/.libs/libgstmpegpsdemux.so</filename>
   <basename>libgstmpegpsdemux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>unknown</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpegpsmux.xml b/docs/plugins/inspect/plugin-mpegpsmux.xml
index 4ddf359..046c173 100644
--- a/docs/plugins/inspect/plugin-mpegpsmux.xml
+++ b/docs/plugins/inspect/plugin-mpegpsmux.xml
@@ -3,7 +3,7 @@
   <description>MPEG-PS muxer</description>
   <filename>../../gst/mpegpsmux/.libs/libgstmpegpsmux.so</filename>
   <basename>libgstmpegpsmux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpegtsdemux.xml b/docs/plugins/inspect/plugin-mpegtsdemux.xml
index 0dda618..029acf0 100644
--- a/docs/plugins/inspect/plugin-mpegtsdemux.xml
+++ b/docs/plugins/inspect/plugin-mpegtsdemux.xml
@@ -3,7 +3,7 @@
   <description>MPEG TS demuxer</description>
   <filename>../../gst/mpegtsdemux/.libs/libgstmpegtsdemux.so</filename>
   <basename>libgstmpegtsdemux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpegtsmux.xml b/docs/plugins/inspect/plugin-mpegtsmux.xml
index 0f1543c..4ae76c4 100644
--- a/docs/plugins/inspect/plugin-mpegtsmux.xml
+++ b/docs/plugins/inspect/plugin-mpegtsmux.xml
@@ -3,7 +3,7 @@
   <description>MPEG-TS muxer</description>
   <filename>../../gst/mpegtsmux/.libs/libgstmpegtsmux.so</filename>
   <basename>libgstmpegtsmux.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mpg123.xml b/docs/plugins/inspect/plugin-mpg123.xml
index d48f3d4..50f26e8 100644
--- a/docs/plugins/inspect/plugin-mpg123.xml
+++ b/docs/plugins/inspect/plugin-mpg123.xml
@@ -3,7 +3,7 @@
   <description>mp3 decoding based on the mpg123 library</description>
   <filename>../../ext/mpg123/.libs/libgstmpg123.so</filename>
   <basename>libgstmpg123.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mplex.xml b/docs/plugins/inspect/plugin-mplex.xml
index 8bfc786..a21eb03 100644
--- a/docs/plugins/inspect/plugin-mplex.xml
+++ b/docs/plugins/inspect/plugin-mplex.xml
@@ -3,7 +3,7 @@
   <description>High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer</description>
   <filename>../../ext/mplex/.libs/libgstmplex.so</filename>
   <basename>libgstmplex.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-mxf.xml b/docs/plugins/inspect/plugin-mxf.xml
index 579a21a..ad4b1f0 100644
--- a/docs/plugins/inspect/plugin-mxf.xml
+++ b/docs/plugins/inspect/plugin-mxf.xml
@@ -3,7 +3,7 @@
   <description>MXF plugin library</description>
   <filename>../../gst/mxf/.libs/libgstmxf.so</filename>
   <basename>libgstmxf.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-neon.xml b/docs/plugins/inspect/plugin-neon.xml
index 7afcd57..09e5dcc 100644
--- a/docs/plugins/inspect/plugin-neon.xml
+++ b/docs/plugins/inspect/plugin-neon.xml
@@ -3,10 +3,10 @@
   <description>lib neon http client src</description>
   <filename>../../ext/neon/.libs/libgstneonhttpsrc.so</filename>
   <basename>libgstneonhttpsrc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.2.1</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
-  <package>GStreamer Bad Plug-ins source release</package>
+  <package>GStreamer Bad Plug-ins git</package>
   <origin>Unknown package origin</origin>
   <elements>
     <element>
diff --git a/docs/plugins/inspect/plugin-ofa.xml b/docs/plugins/inspect/plugin-ofa.xml
index 1f47b2c..bd54b01 100644
--- a/docs/plugins/inspect/plugin-ofa.xml
+++ b/docs/plugins/inspect/plugin-ofa.xml
@@ -3,7 +3,7 @@
   <description>Calculate MusicIP fingerprint from audio files</description>
   <filename>../../ext/ofa/.libs/libgstofa.so</filename>
   <basename>libgstofa.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-openal.xml b/docs/plugins/inspect/plugin-openal.xml
index 9e9ca20..b174847 100644
--- a/docs/plugins/inspect/plugin-openal.xml
+++ b/docs/plugins/inspect/plugin-openal.xml
@@ -3,7 +3,7 @@
   <description>OpenAL plugin library</description>
   <filename>../../ext/openal/.libs/libgstopenal.so</filename>
   <basename>libgstopenal.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-opencv.xml b/docs/plugins/inspect/plugin-opencv.xml
index 1f6e882..fc6b1fe 100644
--- a/docs/plugins/inspect/plugin-opencv.xml
+++ b/docs/plugins/inspect/plugin-opencv.xml
@@ -3,7 +3,7 @@
   <description>GStreamer OpenCV Plugins</description>
   <filename>../../ext/opencv/.libs/libgstopencv.so</filename>
   <basename>libgstopencv.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-openexr.xml b/docs/plugins/inspect/plugin-openexr.xml
index 8b68292..012a77f 100644
--- a/docs/plugins/inspect/plugin-openexr.xml
+++ b/docs/plugins/inspect/plugin-openexr.xml
@@ -3,7 +3,7 @@
   <description>OpenEXR image plugin</description>
   <filename>../../ext/openexr/.libs/libgstopenexr.so</filename>
   <basename>libgstopenexr.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-opengl.xml b/docs/plugins/inspect/plugin-opengl.xml
index a70a2a4..44a2344 100644
--- a/docs/plugins/inspect/plugin-opengl.xml
+++ b/docs/plugins/inspect/plugin-opengl.xml
@@ -3,7 +3,7 @@
   <description>OpenGL plugin</description>
   <filename>../../ext/gl/.libs/libgstopengl.so</filename>
   <basename>libgstopengl.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -284,7 +284,7 @@
       <author>Julien Isorce &lt;julien.isorce@gmail.com&gt;</author>
       <pads>
         <caps>
-          <name>sink_%d</name>
+          <name>sink_%u</name>
           <direction>sink</direction>
           <presence>request</presence>
           <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB, RGBx, RGBA, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
@@ -357,12 +357,12 @@
     <element>
       <name>glvideomixer</name>
       <longname>OpenGL video_mixer</longname>
-      <class>Filter/Effect/Video</class>
+      <class>Filter/Effect/Video/Compositor</class>
       <description>OpenGL video_mixer</description>
       <author>Julien Isorce &lt;julien.isorce@gmail.com&gt;</author>
       <pads>
         <caps>
-          <name>sink_%d</name>
+          <name>sink_%u</name>
           <direction>sink</direction>
           <presence>request</presence>
           <details>video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB, RGBx, RGBA, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
diff --git a/docs/plugins/inspect/plugin-openjpeg.xml b/docs/plugins/inspect/plugin-openjpeg.xml
index cdcfd5b..5d20601 100644
--- a/docs/plugins/inspect/plugin-openjpeg.xml
+++ b/docs/plugins/inspect/plugin-openjpeg.xml
@@ -3,7 +3,7 @@
   <description>OpenJPEG-based JPEG2000 image decoder/encoder</description>
   <filename>../../ext/openjpeg/.libs/libgstopenjpeg.so</filename>
   <basename>libgstopenjpeg.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-opus.xml b/docs/plugins/inspect/plugin-opus.xml
index cffb920..ec432af 100644
--- a/docs/plugins/inspect/plugin-opus.xml
+++ b/docs/plugins/inspect/plugin-opus.xml
@@ -3,7 +3,7 @@
   <description>OPUS plugin library</description>
   <filename>../../ext/opus/.libs/libgstopus.so</filename>
   <basename>libgstopus.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-pcapparse.xml b/docs/plugins/inspect/plugin-pcapparse.xml
index fb83797..7670b8f 100644
--- a/docs/plugins/inspect/plugin-pcapparse.xml
+++ b/docs/plugins/inspect/plugin-pcapparse.xml
@@ -3,7 +3,7 @@
   <description>Element parsing raw pcap streams</description>
   <filename>../../gst/pcapparse/.libs/libgstpcapparse.so</filename>
   <basename>libgstpcapparse.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-pnm.xml b/docs/plugins/inspect/plugin-pnm.xml
index 13790bb..f688679 100644
--- a/docs/plugins/inspect/plugin-pnm.xml
+++ b/docs/plugins/inspect/plugin-pnm.xml
@@ -3,7 +3,7 @@
   <description>PNM plugin</description>
   <filename>../../gst/pnm/.libs/libgstpnm.so</filename>
   <basename>libgstpnm.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-rawparse.xml b/docs/plugins/inspect/plugin-rawparse.xml
index 181a5ce..9e8defd 100644
--- a/docs/plugins/inspect/plugin-rawparse.xml
+++ b/docs/plugins/inspect/plugin-rawparse.xml
@@ -3,7 +3,7 @@
   <description>Parses byte streams into raw frames</description>
   <filename>../../gst/rawparse/.libs/libgstrawparse.so</filename>
   <basename>libgstrawparse.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-removesilence.xml b/docs/plugins/inspect/plugin-removesilence.xml
index 8d9d800..8938732 100644
--- a/docs/plugins/inspect/plugin-removesilence.xml
+++ b/docs/plugins/inspect/plugin-removesilence.xml
@@ -3,7 +3,7 @@
   <description>Removes silence from an audio stream</description>
   <filename>../../gst/removesilence/.libs/libgstremovesilence.so</filename>
   <basename>libgstremovesilence.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-resindvd.xml b/docs/plugins/inspect/plugin-resindvd.xml
index 840fdda..6081e01 100644
--- a/docs/plugins/inspect/plugin-resindvd.xml
+++ b/docs/plugins/inspect/plugin-resindvd.xml
@@ -3,7 +3,7 @@
   <description>Resin DVD playback elements</description>
   <filename>../../ext/resindvd/.libs/libgstresindvd.so</filename>
   <basename>libgstresindvd.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-rfbsrc.xml b/docs/plugins/inspect/plugin-rfbsrc.xml
index da41ec5..16adacf 100644
--- a/docs/plugins/inspect/plugin-rfbsrc.xml
+++ b/docs/plugins/inspect/plugin-rfbsrc.xml
@@ -3,7 +3,7 @@
   <description>Connects to a VNC server and decodes RFB stream</description>
   <filename>../../gst/librfb/.libs/libgstrfbsrc.so</filename>
   <basename>libgstrfbsrc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-rsvg.xml b/docs/plugins/inspect/plugin-rsvg.xml
index 25d2e04..7bcaade 100644
--- a/docs/plugins/inspect/plugin-rsvg.xml
+++ b/docs/plugins/inspect/plugin-rsvg.xml
@@ -3,7 +3,7 @@
   <description>RSVG plugin library</description>
   <filename>../../ext/rsvg/.libs/libgstrsvg.so</filename>
   <basename>libgstrsvg.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-sbc.xml b/docs/plugins/inspect/plugin-sbc.xml
index 732ed7d..a68eb0a 100644
--- a/docs/plugins/inspect/plugin-sbc.xml
+++ b/docs/plugins/inspect/plugin-sbc.xml
@@ -3,7 +3,7 @@
   <description>SBC bluetooth audio support</description>
   <filename>../../ext/sbc/.libs/libgstsbc.so</filename>
   <basename>libgstsbc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-schro.xml b/docs/plugins/inspect/plugin-schro.xml
index 278d721..d69ea35 100644
--- a/docs/plugins/inspect/plugin-schro.xml
+++ b/docs/plugins/inspect/plugin-schro.xml
@@ -3,7 +3,7 @@
   <description>Schroedinger plugin</description>
   <filename>../../ext/schroedinger/.libs/libgstschro.so</filename>
   <basename>libgstschro.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-sdp.xml b/docs/plugins/inspect/plugin-sdp.xml
index 45aba36..c4183bd 100644
--- a/docs/plugins/inspect/plugin-sdp.xml
+++ b/docs/plugins/inspect/plugin-sdp.xml
@@ -3,7 +3,7 @@
   <description>configure streaming sessions using SDP</description>
   <filename>../../gst/sdp/.libs/libgstsdpelem.so</filename>
   <basename>libgstsdpelem.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-segmentclip.xml b/docs/plugins/inspect/plugin-segmentclip.xml
index decfa34..03f6ca1 100644
--- a/docs/plugins/inspect/plugin-segmentclip.xml
+++ b/docs/plugins/inspect/plugin-segmentclip.xml
@@ -3,7 +3,7 @@
   <description>Segment clip elements</description>
   <filename>../../gst/segmentclip/.libs/libgstsegmentclip.so</filename>
   <basename>libgstsegmentclip.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-shm.xml b/docs/plugins/inspect/plugin-shm.xml
index 9089e87..c007fc0 100644
--- a/docs/plugins/inspect/plugin-shm.xml
+++ b/docs/plugins/inspect/plugin-shm.xml
@@ -3,7 +3,7 @@
   <description>shared memory sink source</description>
   <filename>../../sys/shm/.libs/libgstshm.so</filename>
   <basename>libgstshm.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-smooth.xml b/docs/plugins/inspect/plugin-smooth.xml
index 17ed22a..75cae9a 100644
--- a/docs/plugins/inspect/plugin-smooth.xml
+++ b/docs/plugins/inspect/plugin-smooth.xml
@@ -3,7 +3,7 @@
   <description>Apply a smooth filter to an image</description>
   <filename>../../gst/smooth/.libs/libgstsmooth.so</filename>
   <basename>libgstsmooth.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-smoothstreaming.xml b/docs/plugins/inspect/plugin-smoothstreaming.xml
index f8d6336..6d83eae 100644
--- a/docs/plugins/inspect/plugin-smoothstreaming.xml
+++ b/docs/plugins/inspect/plugin-smoothstreaming.xml
@@ -3,7 +3,7 @@
   <description>Microsoft&apos;s Smooth Streaming format support </description>
   <filename>../../ext/smoothstreaming/.libs/libgstsmoothstreaming.so</filename>
   <basename>libgstsmoothstreaming.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-sndfile.xml b/docs/plugins/inspect/plugin-sndfile.xml
index b5a149a..af29310 100644
--- a/docs/plugins/inspect/plugin-sndfile.xml
+++ b/docs/plugins/inspect/plugin-sndfile.xml
@@ -3,7 +3,7 @@
   <description>use libsndfile to read and write various audio formats</description>
   <filename>../../ext/sndfile/.libs/libgstsndfile.so</filename>
   <basename>libgstsndfile.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-soundtouch.xml b/docs/plugins/inspect/plugin-soundtouch.xml
index fd41c61..08df2bf 100644
--- a/docs/plugins/inspect/plugin-soundtouch.xml
+++ b/docs/plugins/inspect/plugin-soundtouch.xml
@@ -3,7 +3,7 @@
   <description>Audio Pitch Controller &amp; BPM Detection</description>
   <filename>../../ext/soundtouch/.libs/libgstsoundtouch.so</filename>
   <basename>libgstsoundtouch.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-spandsp.xml b/docs/plugins/inspect/plugin-spandsp.xml
index 3261c62..ff36463 100644
--- a/docs/plugins/inspect/plugin-spandsp.xml
+++ b/docs/plugins/inspect/plugin-spandsp.xml
@@ -3,7 +3,7 @@
   <description>libspandsp plugin</description>
   <filename>../../ext/spandsp/.libs/libgstspandsp.so</filename>
   <basename>libgstspandsp.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-speed.xml b/docs/plugins/inspect/plugin-speed.xml
index d0bb029..3609588 100644
--- a/docs/plugins/inspect/plugin-speed.xml
+++ b/docs/plugins/inspect/plugin-speed.xml
@@ -3,7 +3,7 @@
   <description>Set speed/pitch on audio/raw streams (resampler)</description>
   <filename>../../gst/speed/.libs/libgstspeed.so</filename>
   <basename>libgstspeed.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-srtp.xml b/docs/plugins/inspect/plugin-srtp.xml
index 7c6c14d..f761293 100644
--- a/docs/plugins/inspect/plugin-srtp.xml
+++ b/docs/plugins/inspect/plugin-srtp.xml
@@ -3,7 +3,7 @@
   <description>GStreamer SRTP</description>
   <filename>../../ext/srtp/.libs/libgstsrtp.so</filename>
   <basename>libgstsrtp.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-stereo.xml b/docs/plugins/inspect/plugin-stereo.xml
index 2c9b844..78a1a1b 100644
--- a/docs/plugins/inspect/plugin-stereo.xml
+++ b/docs/plugins/inspect/plugin-stereo.xml
@@ -3,7 +3,7 @@
   <description>Muck with the stereo signal, enhance it&apos;s &apos;stereo-ness&apos;</description>
   <filename>../../gst/stereo/.libs/libgststereo.so</filename>
   <basename>libgststereo.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-subenc.xml b/docs/plugins/inspect/plugin-subenc.xml
index 3304936..bd25909 100644
--- a/docs/plugins/inspect/plugin-subenc.xml
+++ b/docs/plugins/inspect/plugin-subenc.xml
@@ -3,7 +3,7 @@
   <description>subtitle encoders</description>
   <filename>../../gst/subenc/.libs/libgstsubenc.so</filename>
   <basename>libgstsubenc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-uvch264.xml b/docs/plugins/inspect/plugin-uvch264.xml
index 47ec193..7dcbee5 100644
--- a/docs/plugins/inspect/plugin-uvch264.xml
+++ b/docs/plugins/inspect/plugin-uvch264.xml
@@ -3,7 +3,7 @@
   <description>UVC compliant H264 encoding cameras plugin</description>
   <filename>../../sys/uvch264/.libs/libgstuvch264.so</filename>
   <basename>libgstuvch264.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-vdpau.xml b/docs/plugins/inspect/plugin-vdpau.xml
index d70cfe1..3d5eb90 100644
--- a/docs/plugins/inspect/plugin-vdpau.xml
+++ b/docs/plugins/inspect/plugin-vdpau.xml
@@ -3,7 +3,7 @@
   <description>Various elements utilizing VDPAU</description>
   <filename>../../sys/vdpau/.libs/libgstvdpau.so</filename>
   <basename>libgstvdpau.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer</package>
diff --git a/docs/plugins/inspect/plugin-videofiltersbad.xml b/docs/plugins/inspect/plugin-videofiltersbad.xml
index 81c4b77..8b8fb18 100644
--- a/docs/plugins/inspect/plugin-videofiltersbad.xml
+++ b/docs/plugins/inspect/plugin-videofiltersbad.xml
@@ -3,7 +3,7 @@
   <description>Video filters in gst-plugins-bad</description>
   <filename>../../gst/videofilters/.libs/libgstvideofiltersbad.so</filename>
   <basename>libgstvideofiltersbad.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-videoparsersbad.xml b/docs/plugins/inspect/plugin-videoparsersbad.xml
index 2ed6fa4..9d819d1 100644
--- a/docs/plugins/inspect/plugin-videoparsersbad.xml
+++ b/docs/plugins/inspect/plugin-videoparsersbad.xml
@@ -3,7 +3,7 @@
   <description>videoparsers</description>
   <filename>../../gst/videoparsers/.libs/libgstvideoparsersbad.so</filename>
   <basename>libgstvideoparsersbad.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-videosignal.xml b/docs/plugins/inspect/plugin-videosignal.xml
index 0822e75..e239223 100644
--- a/docs/plugins/inspect/plugin-videosignal.xml
+++ b/docs/plugins/inspect/plugin-videosignal.xml
@@ -3,7 +3,7 @@
   <description>Various video signal analysers</description>
   <filename>../../gst/videosignal/.libs/libgstvideosignal.so</filename>
   <basename>libgstvideosignal.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-vmnc.xml b/docs/plugins/inspect/plugin-vmnc.xml
index 0e9bc6e..8b4b977 100644
--- a/docs/plugins/inspect/plugin-vmnc.xml
+++ b/docs/plugins/inspect/plugin-vmnc.xml
@@ -3,7 +3,7 @@
   <description>VmWare Video Codec plugins</description>
   <filename>../../gst/vmnc/.libs/libgstvmnc.so</filename>
   <basename>libgstvmnc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-voaacenc.xml b/docs/plugins/inspect/plugin-voaacenc.xml
index 38d72e3..4083841 100644
--- a/docs/plugins/inspect/plugin-voaacenc.xml
+++ b/docs/plugins/inspect/plugin-voaacenc.xml
@@ -3,7 +3,7 @@
   <description>AAC audio encoder</description>
   <filename>../../ext/voaacenc/.libs/libgstvoaacenc.so</filename>
   <basename>libgstvoaacenc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-voamrwbenc.xml b/docs/plugins/inspect/plugin-voamrwbenc.xml
index 20c5bf0..0ec9f12 100644
--- a/docs/plugins/inspect/plugin-voamrwbenc.xml
+++ b/docs/plugins/inspect/plugin-voamrwbenc.xml
@@ -3,7 +3,7 @@
   <description>Adaptive Multi-Rate Wide-Band Encoder</description>
   <filename>../../ext/voamrwbenc/.libs/libgstvoamrwbenc.so</filename>
   <basename>libgstvoamrwbenc.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>unknown</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-waylandsink.xml b/docs/plugins/inspect/plugin-waylandsink.xml
index 750d11f..9d34c94 100644
--- a/docs/plugins/inspect/plugin-waylandsink.xml
+++ b/docs/plugins/inspect/plugin-waylandsink.xml
@@ -3,7 +3,7 @@
   <description>Wayland Video Sink</description>
   <filename>../../ext/wayland/.libs/libgstwaylandsink.so</filename>
   <basename>libgstwaylandsink.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
@@ -14,13 +14,13 @@
       <longname>wayland video sink</longname>
       <class>Sink/Video</class>
       <description>Output to wayland surface</description>
-      <author>Sreerenj Balachandran &lt;sreerenj.balachandran@intel.com&gt;</author>
+      <author>Sreerenj Balachandran &lt;sreerenj.balachandran@intel.com&gt;, George Kiagiadakis &lt;george.kiagiadakis@collabora.com&gt;</author>
       <pads>
         <caps>
           <name>sink</name>
           <direction>sink</direction>
           <presence>always</presence>
-          <details>video/x-raw, format=(string){ BGRx, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
+          <details>video/x-raw, format=(string){ BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
         </caps>
       </pads>
     </element>
diff --git a/docs/plugins/inspect/plugin-webp.xml b/docs/plugins/inspect/plugin-webp.xml
index a3577a7..8543e04 100644
--- a/docs/plugins/inspect/plugin-webp.xml
+++ b/docs/plugins/inspect/plugin-webp.xml
@@ -3,7 +3,7 @@
   <description>WebP plugin</description>
   <filename>../../ext/webp/.libs/libgstwebp.so</filename>
   <basename>libgstwebp.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-wildmidi.xml b/docs/plugins/inspect/plugin-wildmidi.xml
index 5f79cfa..ba61170 100644
--- a/docs/plugins/inspect/plugin-wildmidi.xml
+++ b/docs/plugins/inspect/plugin-wildmidi.xml
@@ -3,7 +3,7 @@
   <description>Wildmidi Plugin</description>
   <filename>../../ext/timidity/.libs/libgstwildmidi.so</filename>
   <basename>libgstwildmidi.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/docs/plugins/inspect/plugin-y4mdec.xml b/docs/plugins/inspect/plugin-y4mdec.xml
index 7cee1f8..f49fd54 100644
--- a/docs/plugins/inspect/plugin-y4mdec.xml
+++ b/docs/plugins/inspect/plugin-y4mdec.xml
@@ -3,7 +3,7 @@
   <description>Demuxes/decodes YUV4MPEG streams</description>
   <filename>../../gst/y4m/.libs/libgsty4mdec.so</filename>
   <basename>libgsty4mdec.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-yadif.xml b/docs/plugins/inspect/plugin-yadif.xml
index b90f482..c847663 100644
--- a/docs/plugins/inspect/plugin-yadif.xml
+++ b/docs/plugins/inspect/plugin-yadif.xml
@@ -3,7 +3,7 @@
   <description>YADIF deinterlacing filter</description>
   <filename>../../gst/yadif/.libs/libgstyadif.so</filename>
   <basename>libgstyadif.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>GPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins</package>
diff --git a/docs/plugins/inspect/plugin-zbar.xml b/docs/plugins/inspect/plugin-zbar.xml
index 022e833..63236c1 100644
--- a/docs/plugins/inspect/plugin-zbar.xml
+++ b/docs/plugins/inspect/plugin-zbar.xml
@@ -3,7 +3,7 @@
   <description>zbar barcode scanner</description>
   <filename>../../ext/zbar/.libs/libgstzbar.so</filename>
   <basename>libgstzbar.so</basename>
-  <version>1.3.2</version>
+  <version>1.3.3</version>
   <license>LGPL</license>
   <source>gst-plugins-bad</source>
   <package>GStreamer Bad Plug-ins source release</package>
diff --git a/ext/Makefile.in b/ext/Makefile.in
index 7fafec1..69c79ea 100644
--- a/ext/Makefile.in
+++ b/ext/Makefile.in
@@ -323,6 +323,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -409,6 +411,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -700,6 +703,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @USE_ASSRENDER_FALSE@ASSRENDER_DIR = 
 @USE_ASSRENDER_TRUE@ASSRENDER_DIR = assrender
 @USE_VOAMRWBENC_FALSE@VOAMRWBENC_DIR = 
diff --git a/ext/apexsink/Makefile.in b/ext/apexsink/Makefile.in
index 320c6ba..7aa1cc7 100644
--- a/ext/apexsink/Makefile.in
+++ b/ext/apexsink/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstapexsink.la
 libgstapexsink_la_SOURCES = gstapexplugin.c gstapexraop.c gstapexsink.c
 libgstapexsink_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
diff --git a/ext/assrender/Makefile.in b/ext/assrender/Makefile.in
index 8923f75..b909773 100644
--- a/ext/assrender/Makefile.in
+++ b/ext/assrender/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstassrender.la
 libgstassrender_la_SOURCES = gstassrender.c
 libgstassrender_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(ASSRENDER_CFLAGS)
diff --git a/ext/bz2/Makefile.in b/ext/bz2/Makefile.in
index 5f3b4ae..e3af17a 100644
--- a/ext/bz2/Makefile.in
+++ b/ext/bz2/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstbz2.la
 libgstbz2_la_SOURCES = \
 	gstbz2.c gstbz2dec.c gstbz2enc.c
diff --git a/ext/chromaprint/Makefile.in b/ext/chromaprint/Makefile.in
index 988ee11..790598e 100644
--- a/ext/chromaprint/Makefile.in
+++ b/ext/chromaprint/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstchromaprint.la
 libgstchromaprint_la_SOURCES = gstchromaprint.c gstchromaprint.h
 libgstchromaprint_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
diff --git a/ext/curl/Makefile.in b/ext/curl/Makefile.in
index f9dec43..5d8cafc 100644
--- a/ext/curl/Makefile.in
+++ b/ext/curl/Makefile.in
@@ -358,6 +358,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -444,6 +446,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -735,6 +738,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstcurl.la
 @USE_SSH2_FALSE@gstcurlsshsink_SOURCES = 
 @USE_SSH2_TRUE@gstcurlsshsink_SOURCES = gstcurlsshsink.c gstcurlsftpsink.c
diff --git a/ext/daala/Makefile.in b/ext/daala/Makefile.in
index ced8982..2c3831a 100644
--- a/ext/daala/Makefile.in
+++ b/ext/daala/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdaala.la
 noinst_HEADERS = gstdaalaenc.h \
 		 gstdaaladec.h
diff --git a/ext/dash/Makefile.in b/ext/dash/Makefile.in
index d891907..34e88fd 100644
--- a/ext/dash/Makefile.in
+++ b/ext/dash/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdashdemux.la
 libgstdashdemux_la_SOURCES = \
 	gstmpdparser.c				\
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index 02c4b62..e087b4c 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -787,9 +787,24 @@
       query = gst_query_new_uri ();
       query_res = gst_pad_peer_query (pad, query);
       if (query_res) {
-        gst_query_parse_uri (query, &demux->client->mpd_uri);
-        GST_DEBUG_OBJECT (demux, "Fetched MPD file at URI: %s",
-            demux->client->mpd_uri);
+        gchar *uri, *redirect_uri;
+        gboolean permanent;
+
+        gst_query_parse_uri (query, &uri);
+        gst_query_parse_uri_redirection (query, &redirect_uri);
+        gst_query_parse_uri_redirection_permanent (query, &permanent);
+
+        if (permanent && redirect_uri) {
+          demux->client->mpd_uri = redirect_uri;
+          demux->client->mpd_base_uri = NULL;
+          g_free (uri);
+        } else {
+          demux->client->mpd_uri = uri;
+          demux->client->mpd_base_uri = redirect_uri;
+        }
+
+        GST_DEBUG_OBJECT (demux, "Fetched MPD file at URI: %s (base: %s)",
+            demux->client->mpd_uri, GST_STR_NULL (demux->client->mpd_base_uri));
       } else {
         GST_WARNING_OBJECT (demux, "MPD URI query failed.");
       }
@@ -1282,7 +1297,14 @@
         GstMapInfo mapinfo;
 
         new_client = gst_mpd_client_new ();
-        new_client->mpd_uri = g_strdup (demux->client->mpd_uri);
+
+        if (download->redirect_permanent && download->redirect_uri) {
+          new_client->mpd_uri = g_strdup (download->redirect_uri);
+          new_client->mpd_base_uri = NULL;
+        } else {
+          new_client->mpd_uri = g_strdup (download->uri);
+          new_client->mpd_base_uri = g_strdup (download->redirect_uri);
+        }
 
         gst_buffer_map (buffer, &mapinfo, GST_MAP_READ);
 
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index b1e30fd..0b3b5ec 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -2653,6 +2653,7 @@
 {
   GstStreamPeriod *stream_period;
   GstBaseURL *baseURL;
+  gchar *mpd_uri;
   GList *list;
   static gchar *baseURL_array[5];
   static gchar empty[] = "";
@@ -2704,7 +2705,8 @@
   ret = g_strjoinv (NULL, baseURL_array);
 
   /* get base URI from MPD file URI, if the "http" scheme is missing */
-  if (client->mpd_uri != NULL && strncmp (ret, "http://", 7) != 0) {
+  mpd_uri = client->mpd_base_uri ? client->mpd_base_uri : client->mpd_uri;
+  if (mpd_uri != NULL && strncmp (ret, "http://", 7) != 0) {
     gchar *last_sep, *tmp1, *tmp2;
 
     if (ret[0] == '?') {
@@ -2717,9 +2719,9 @@
         *query = NULL;
     }
 
-    last_sep = strrchr (client->mpd_uri, '/');
+    last_sep = strrchr (mpd_uri, '/');
     if (last_sep) {
-      tmp1 = g_strndup (client->mpd_uri, last_sep - client->mpd_uri + 1);
+      tmp1 = g_strndup (mpd_uri, last_sep - mpd_uri + 1);
       if (ret) {
         tmp2 = ret;
         ret = g_strconcat (tmp1, tmp2, NULL);
@@ -2819,10 +2821,10 @@
 
   g_mutex_clear (&client->lock);
 
-  if (client->mpd_uri) {
-    g_free (client->mpd_uri);
-    client->mpd_uri = NULL;
-  }
+  g_free (client->mpd_uri);
+  client->mpd_uri = NULL;
+  g_free (client->mpd_base_uri);
+  client->mpd_base_uri = NULL;
 
   g_free (client);
 }
diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h
index 9ce41f3..5d059b8 100644
--- a/ext/dash/gstmpdparser.h
+++ b/ext/dash/gstmpdparser.h
@@ -469,6 +469,8 @@
 
   guint update_failed_count;
   gchar *mpd_uri;                             /* manifest file URI */
+  gchar *mpd_base_uri;                        /* base URI for resolving relative URIs.
+                                               * this will be different for redirects */
   GMutex lock;
 };
 
diff --git a/ext/dc1394/Makefile.in b/ext/dc1394/Makefile.in
index 3f5c333..bc4923f 100644
--- a/ext/dc1394/Makefile.in
+++ b/ext/dc1394/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdc1394.la
 libgstdc1394_la_SOURCES = gstdc1394.c 
 libgstdc1394_la_CFLAGS = $(GST_CFLAGS) \
diff --git a/ext/directfb/Makefile.in b/ext/directfb/Makefile.in
index 604363e..45d909f 100644
--- a/ext/directfb/Makefile.in
+++ b/ext/directfb/Makefile.in
@@ -354,6 +354,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -440,6 +442,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -731,6 +734,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdfbvideosink.la
 libgstdfbvideosink_la_SOURCES = dfbvideosink.c
 libgstdfbvideosink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
diff --git a/ext/dts/Makefile.in b/ext/dts/Makefile.in
index ea6bb97..c0fd72d 100644
--- a/ext/dts/Makefile.in
+++ b/ext/dts/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdtsdec.la
 libgstdtsdec_la_SOURCES = gstdtsdec.c
 libgstdtsdec_la_CFLAGS = -DGST_USE_UNSTABLE_API \
diff --git a/ext/faac/Makefile.in b/ext/faac/Makefile.in
index 51b205e..c99d5ae 100644
--- a/ext/faac/Makefile.in
+++ b/ext/faac/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfaac.la
 libgstfaac_la_SOURCES = gstfaac.c
 libgstfaac_la_CFLAGS = -DGST_USE_UNSTABLE_API \
diff --git a/ext/faad/Makefile.in b/ext/faad/Makefile.in
index f0eac90..dbdd4c5 100644
--- a/ext/faad/Makefile.in
+++ b/ext/faad/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfaad.la
 libgstfaad_la_SOURCES = gstfaad.c
 libgstfaad_la_CFLAGS = -DGST_USE_UNSTABLE_API \
diff --git a/ext/flite/Makefile.in b/ext/flite/Makefile.in
index 8d7ac95..0b24595 100644
--- a/ext/flite/Makefile.in
+++ b/ext/flite/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstflite.la
 libgstflite_la_SOURCES = gstflite.c gstflitetestsrc.c
 libgstflite_la_CFLAGS = \
diff --git a/ext/fluidsynth/Makefile.in b/ext/fluidsynth/Makefile.in
index d7e3ed3..3821752 100644
--- a/ext/fluidsynth/Makefile.in
+++ b/ext/fluidsynth/Makefile.in
@@ -352,6 +352,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -438,6 +440,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -729,6 +732,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 
 # plugindir is set in configure
 plugin_LTLIBRARIES = $(am__append_1)
diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
index 2a3cdfe..66537e6 100644
--- a/ext/gl/Makefile.am
+++ b/ext/gl/Makefile.am
@@ -76,6 +76,12 @@
 	gstglcolorscale.h \
 	$(OPENGL_SOURCES)
 
+if HAVE_GRAPHENE
+libgstopengl_la_SOURCES += \
+	gstgltransformation.c \
+	gstgltransformation.h
+endif
+
 # check order of CFLAGS and LIBS, shouldn't the order be the other way around
 # (like in AM_CFLAGS)?
 libgstopengl_la_CFLAGS = \
@@ -85,17 +91,20 @@
 	$(GST_BASE_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GL_CFLAGS) \
-	$(LIBPNG_CFLAGS)
+	$(LIBPNG_CFLAGS) \
+	$(GRAPHENE_CFLAGS)
 
 libgstopengl_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
 	$(GST_BASE_LIBS) \
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	-lgstpbutils-$(GST_API_VERSION) \
 	$(GL_LIBS) \
 	$(LIBPNG_LIBS) \
-        $(JPEG_LIBS) \
-	$(LIBM)
+	$(JPEG_LIBS) \
+	$(LIBM) \
+	$(GRAPHENE_LIBS)
 
 libgstopengl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
diff --git a/ext/gl/Makefile.in b/ext/gl/Makefile.in
index 571239d..f1411fb 100644
--- a/ext/gl/Makefile.in
+++ b/ext/gl/Makefile.in
@@ -89,6 +89,10 @@
 @HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstgloverlay.c \
 @HAVE_JPEG_TRUE@@HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	gstgloverlay.h
 
+@HAVE_GRAPHENE_TRUE@am__append_3 = \
+@HAVE_GRAPHENE_TRUE@	gstgltransformation.c \
+@HAVE_GRAPHENE_TRUE@	gstgltransformation.h
+
 subdir = ext/gl
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(top_srcdir)/depcomp
@@ -164,9 +168,11 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstopengl_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am__libgstopengl_la_SOURCES_DIST = gstopengl.c gstglimagesink.c \
 	gstglimagesink.h gstglfiltercube.c gstglfiltercube.h \
 	gstgleffects.c gstgleffects.h effects/gstgleffectssources.c \
@@ -189,7 +195,8 @@
 	effects/gstgleffectrgbtocurve.c effects/gstgleffectsin.c \
 	effects/gstgleffectglow.c effects/gstgleffectxray.c \
 	gstglbumper.c gstglbumper.h gstgldifferencematte.c \
-	gstgldifferencematte.h gstgloverlay.c gstgloverlay.h
+	gstgldifferencematte.h gstgloverlay.c gstgloverlay.h \
+	gstgltransformation.c gstgltransformation.h
 am__dirstamp = $(am__leading_dot)dirstamp
 @HAVE_PNG_TRUE@@USE_OPENGL_TRUE@am__objects_1 = libgstopengl_la-gstglbumper.lo \
 @HAVE_PNG_TRUE@@USE_OPENGL_TRUE@	libgstopengl_la-gstgldifferencematte.lo
@@ -218,6 +225,8 @@
 @USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectglow.lo \
 @USE_OPENGL_TRUE@	effects/libgstopengl_la-gstgleffectxray.lo \
 @USE_OPENGL_TRUE@	$(am__objects_1) $(am__objects_2)
+@HAVE_GRAPHENE_TRUE@am__objects_4 =  \
+@HAVE_GRAPHENE_TRUE@	libgstopengl_la-gstgltransformation.lo
 am_libgstopengl_la_OBJECTS = libgstopengl_la-gstopengl.lo \
 	libgstopengl_la-gstglimagesink.lo \
 	libgstopengl_la-gstglfiltercube.lo \
@@ -226,7 +235,8 @@
 	effects/libgstopengl_la-gstgleffectidentity.lo \
 	effects/libgstopengl_la-gstgleffectmirror.lo \
 	effects/libgstopengl_la-gstgleffectsqueeze.lo \
-	libgstopengl_la-gstglcolorscale.lo $(am__objects_3)
+	libgstopengl_la-gstglcolorscale.lo $(am__objects_3) \
+	$(am__objects_4)
 libgstopengl_la_OBJECTS = $(am_libgstopengl_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -413,6 +423,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -499,6 +511,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -790,6 +803,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopengl.la
 AM_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 AM_LIBS = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
@@ -821,23 +835,13 @@
 @USE_OPENGL_TRUE@	effects/gstgleffectglow.c \
 @USE_OPENGL_TRUE@	effects/gstgleffectxray.c $(am__append_1) \
 @USE_OPENGL_TRUE@	$(am__append_2)
-libgstopengl_la_SOURCES = \
-	gstopengl.c \
-	gstglimagesink.c \
-	gstglimagesink.h \
-	gstglfiltercube.c \
-	gstglfiltercube.h \
-	gstgleffects.c \
-	gstgleffects.h \
-	effects/gstgleffectssources.c \
-	effects/gstgleffectssources.h \
-	effects/gstgleffectidentity.c \
-	effects/gstgleffectmirror.c \
-	effects/gstgleffectsqueeze.c \
-	gstglcolorscale.c \
-	gstglcolorscale.h \
-	$(OPENGL_SOURCES)
-
+libgstopengl_la_SOURCES = gstopengl.c gstglimagesink.c \
+	gstglimagesink.h gstglfiltercube.c gstglfiltercube.h \
+	gstgleffects.c gstgleffects.h effects/gstgleffectssources.c \
+	effects/gstgleffectssources.h effects/gstgleffectidentity.c \
+	effects/gstgleffectmirror.c effects/gstgleffectsqueeze.c \
+	gstglcolorscale.c gstglcolorscale.h $(OPENGL_SOURCES) \
+	$(am__append_3)
 
 # check order of CFLAGS and LIBS, shouldn't the order be the other way around
 # (like in AM_CFLAGS)?
@@ -848,17 +852,20 @@
 	$(GST_BASE_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) \
 	$(GL_CFLAGS) \
-	$(LIBPNG_CFLAGS)
+	$(LIBPNG_CFLAGS) \
+	$(GRAPHENE_CFLAGS)
 
 libgstopengl_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
 	$(GST_BASE_LIBS) \
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	-lgstpbutils-$(GST_API_VERSION) \
 	$(GL_LIBS) \
 	$(LIBPNG_LIBS) \
-        $(JPEG_LIBS) \
-	$(LIBM)
+	$(JPEG_LIBS) \
+	$(LIBM) \
+	$(GRAPHENE_LIBS)
 
 libgstopengl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstopengl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
@@ -997,6 +1004,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglmosaic.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgloverlay.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgltestsrc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstgltransformation.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstglvideomixer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstopengl_la-gstopengl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@effects/$(DEPDIR)/libgstopengl_la-gstgleffectbulge.Plo@am__quote@
@@ -1284,6 +1292,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstgloverlay.lo `test -f 'gstgloverlay.c' || echo '$(srcdir)/'`gstgloverlay.c
 
+libgstopengl_la-gstgltransformation.lo: gstgltransformation.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -MT libgstopengl_la-gstgltransformation.lo -MD -MP -MF $(DEPDIR)/libgstopengl_la-gstgltransformation.Tpo -c -o libgstopengl_la-gstgltransformation.lo `test -f 'gstgltransformation.c' || echo '$(srcdir)/'`gstgltransformation.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstopengl_la-gstgltransformation.Tpo $(DEPDIR)/libgstopengl_la-gstgltransformation.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgltransformation.c' object='libgstopengl_la-gstgltransformation.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstopengl_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopengl_la_CFLAGS) $(CFLAGS) -c -o libgstopengl_la-gstgltransformation.lo `test -f 'gstgltransformation.c' || echo '$(srcdir)/'`gstgltransformation.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
diff --git a/ext/gl/effects/gstgleffectidentity.c b/ext/gl/effects/gstgleffectidentity.c
index 526b7d0..5cf06e0 100644
--- a/ext/gl/effects/gstgleffectidentity.c
+++ b/ext/gl/effects/gstgleffectidentity.c
@@ -23,11 +23,11 @@
 
 #include "../gstgleffects.h"
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static void
 gst_gl_effects_identity_callback (gint width, gint height, guint texture,
diff --git a/ext/gl/effects/gstgleffectmirror.c b/ext/gl/effects/gstgleffectmirror.c
index 33c0844..35f87e1 100644
--- a/ext/gl/effects/gstgleffectmirror.c
+++ b/ext/gl/effects/gstgleffectmirror.c
@@ -23,11 +23,11 @@
 
 #include "../gstgleffects.h"
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static void
 gst_gl_effects_mirror_callback (gint width, gint height, guint texture,
diff --git a/ext/gl/effects/gstgleffectsqueeze.c b/ext/gl/effects/gstgleffectsqueeze.c
index 5978b5b..421ef27 100644
--- a/ext/gl/effects/gstgleffectsqueeze.c
+++ b/ext/gl/effects/gstgleffectsqueeze.c
@@ -23,11 +23,11 @@
 
 #include "../gstgleffects.h"
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static void
 gst_gl_effects_squeeze_callback (gint width, gint height, guint texture,
diff --git a/ext/gl/gstglfilterapp.c b/ext/gl/gstglfilterapp.c
index ba60a46..d7dbd88 100644
--- a/ext/gl/gstglfilterapp.c
+++ b/ext/gl/gstglfilterapp.c
@@ -47,12 +47,13 @@
 
 enum
 {
-  PROP_0,
-  PROP_CLIENT_RESHAPE_CALLBACK,
-  PROP_CLIENT_DRAW_CALLBACK,
-  PROP_CLIENT_DATA
+  SIGNAL_0,
+  CLIENT_DRAW_SIGNAL,
+  LAST_SIGNAL
 };
 
+static guint gst_gl_filter_app_signals[LAST_SIGNAL] = { 0 };
+
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_filter_app_debug, "glfilterapp", 0, "glfilterapp element");
 
@@ -88,21 +89,23 @@
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_filter_app_filter_texture;
 
-  g_object_class_install_property (gobject_class, PROP_CLIENT_RESHAPE_CALLBACK,
-      g_param_spec_pointer ("client-reshape-callback",
-          "Client reshape callback",
-          "Define a custom reshape callback in a client code",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_CLIENT_DRAW_CALLBACK,
-      g_param_spec_pointer ("client-draw-callback", "Client draw callback",
-          "Define a custom draw callback in a client code",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_CLIENT_DATA,
-      g_param_spec_pointer ("client-data", "Client data",
-          "Pass data to the draw and reshape callbacks",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
+  /**
+   * GstGLFilterApp::client-draw:
+   * @object: the #GstGLImageSink
+   * @texture: the #guint id of the texture.
+   * @width: the #guint width of the texture.
+   * @height: the #guint height of the texture.
+   *
+   * Will be emitted before to draw the texture.  The client should
+   * redraw the surface/contents with the @texture, @width and @height.
+   *
+   * Returns: whether the texture was redrawn by the signal.  If not, a
+   *          default redraw will occur.
+   */
+  gst_gl_filter_app_signals[CLIENT_DRAW_SIGNAL] =
+      g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_BOOLEAN, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
 
   gst_element_class_set_metadata (element_class,
       "OpenGL application filter", "Filter/Effect",
@@ -113,33 +116,13 @@
 static void
 gst_gl_filter_app_init (GstGLFilterApp * filter)
 {
-  filter->clientReshapeCallback = NULL;
-  filter->clientDrawCallback = NULL;
-  filter->client_data = NULL;
 }
 
 static void
 gst_gl_filter_app_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstGLFilterApp *filter = GST_GL_FILTER_APP (object);
-
   switch (prop_id) {
-    case PROP_CLIENT_RESHAPE_CALLBACK:
-    {
-      filter->clientReshapeCallback = g_value_get_pointer (value);
-      break;
-    }
-    case PROP_CLIENT_DRAW_CALLBACK:
-    {
-      filter->clientDrawCallback = g_value_get_pointer (value);
-      break;
-    }
-    case PROP_CLIENT_DATA:
-    {
-      filter->client_data = g_value_get_pointer (value);
-      break;
-    }
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -150,8 +133,6 @@
 gst_gl_filter_app_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
-  //GstGLFilterApp* filter = GST_GL_FILTER_APP (object);
-
   switch (prop_id) {
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -168,30 +149,37 @@
   return TRUE;
 }
 
+static void
+_emit_draw_signal (guint tex, gint width, gint height, gpointer data)
+{
+  GstGLFilterApp *app_filter = GST_GL_FILTER_APP (data);
+  gboolean drawn;
+
+  g_signal_emit (app_filter, gst_gl_filter_app_signals[CLIENT_DRAW_SIGNAL], 0,
+      tex, width, height, &drawn);
+
+  app_filter->default_draw = !drawn;
+}
+
 static gboolean
 gst_gl_filter_app_filter_texture (GstGLFilter * filter, guint in_tex,
     guint out_tex)
 {
   GstGLFilterApp *app_filter = GST_GL_FILTER_APP (filter);
 
-  if (app_filter->clientDrawCallback) {
-    //blocking call, use a FBO
-    gst_gl_context_use_fbo (filter->context,
-        GST_VIDEO_INFO_WIDTH (&filter->out_info),
-        GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-        filter->fbo, filter->depthbuffer, out_tex,
-        app_filter->clientDrawCallback,
-        GST_VIDEO_INFO_WIDTH (&filter->in_info),
-        GST_VIDEO_INFO_HEIGHT (&filter->in_info),
-        in_tex, 45,
-        (gfloat) GST_VIDEO_INFO_WIDTH (&filter->out_info) /
-        (gfloat) GST_VIDEO_INFO_HEIGHT (&filter->out_info),
-        0.1, 100, GST_GL_DISPLAY_PROJECTION_PERSPECTIVE,
-        app_filter->client_data);
-  }
-  //default
-  else {
-    //blocking call, use a FBO
+  //blocking call, use a FBO
+  gst_gl_context_use_fbo (filter->context,
+      GST_VIDEO_INFO_WIDTH (&filter->out_info),
+      GST_VIDEO_INFO_HEIGHT (&filter->out_info),
+      filter->fbo, filter->depthbuffer, out_tex, (GLCB) _emit_draw_signal,
+      GST_VIDEO_INFO_WIDTH (&filter->in_info),
+      GST_VIDEO_INFO_HEIGHT (&filter->in_info),
+      in_tex, 45,
+      (gfloat) GST_VIDEO_INFO_WIDTH (&filter->out_info) /
+      (gfloat) GST_VIDEO_INFO_HEIGHT (&filter->out_info),
+      0.1, 100, GST_GL_DISPLAY_PROJECTION_PERSPECTIVE, filter);
+
+  if (app_filter->default_draw) {
     gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
         gst_gl_filter_app_callback, filter);
   }
diff --git a/ext/gl/gstglfilterapp.h b/ext/gl/gstglfilterapp.h
index 9874d9d..a8978c5 100644
--- a/ext/gl/gstglfilterapp.h
+++ b/ext/gl/gstglfilterapp.h
@@ -38,9 +38,7 @@
 {
     GstGLFilter filter;
 
-    CRCB clientReshapeCallback;
-    GLCB clientDrawCallback;
-    gpointer client_data;
+    gboolean default_draw;
 };
 
 struct _GstGLFilterAppClass
diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c
index 6cf88d5..71130e6 100644
--- a/ext/gl/gstglfiltershader.c
+++ b/ext/gl/gstglfiltershader.c
@@ -60,6 +60,15 @@
   PROP_VARIABLES
 };
 
+static const gchar text_vertex_shader[] =
+    "attribute vec4 a_position;   \n"
+    "attribute vec2 a_texcoord;   \n"
+    "varying vec2 v_texcoord;     \n"
+    "void main()                  \n"
+    "{                            \n"
+    "   gl_Position = a_position; \n"
+    "   v_texcoord = a_texcoord;  \n" "}                            \n";
+
 #define GST_CAT_DEFAULT gst_gl_filtershader_debug
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
 
@@ -80,6 +89,8 @@
 static gboolean gst_gl_filtershader_load_variables (GstGLFilterShader *
     filter_shader, char *filename, char **storage);
 static gboolean gst_gl_filtershader_init_shader (GstGLFilter * filter);
+static gboolean gst_gl_filtershader_filter (GstGLFilter * filter,
+    GstBuffer * inbuf, GstBuffer * outbuf);
 static gboolean gst_gl_filtershader_filter_texture (GstGLFilter * filter,
     guint in_tex, guint out_tex);
 static void gst_gl_filtershader_hcallback (gint width, gint height,
@@ -136,6 +147,7 @@
       "OpenGL fragment shader filter", "Filter/Effect",
       "Load GLSL fragment shader from file", "<luc.deschenaux@freesurf.ch>");
 
+  GST_GL_FILTER_CLASS (klass)->filter = gst_gl_filtershader_filter;
   GST_GL_FILTER_CLASS (klass)->filter_texture =
       gst_gl_filtershader_filter_texture;
   GST_GL_FILTER_CLASS (klass)->display_init_cb =
@@ -318,8 +330,8 @@
     return FALSE;
 
   //blocking call, wait the opengl thread has compiled the shader
-  if (!gst_gl_context_gen_shader (filter->context, 0, hfilter_fragment_source,
-          &filtershader->shader0))
+  if (!gst_gl_context_gen_shader (filter->context, text_vertex_shader,
+          hfilter_fragment_source, &filtershader->shader0))
     return FALSE;
 
 
@@ -332,6 +344,43 @@
   return TRUE;
 }
 
+static inline gboolean
+_gst_clock_time_to_double (GstClockTime time, gdouble * result)
+{
+  if (!GST_CLOCK_TIME_IS_VALID (time))
+    return FALSE;
+
+  *result = (gdouble) time / GST_SECOND;
+
+  return TRUE;
+}
+
+static inline gboolean
+_gint64_time_val_to_double (gint64 time, gdouble * result)
+{
+  if (time == -1)
+    return FALSE;
+
+  *result = (gdouble) time / GST_USECOND;
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_filtershader_filter (GstGLFilter * filter, GstBuffer * inbuf,
+    GstBuffer * outbuf)
+{
+  GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (filter);
+
+  if (!_gst_clock_time_to_double (GST_BUFFER_PTS (inbuf), &filtershader->time)) {
+    if (!_gst_clock_time_to_double (GST_BUFFER_DTS (inbuf),
+            &filtershader->time))
+      _gint64_time_val_to_double (g_get_monotonic_time (), &filtershader->time);
+  }
+
+  return gst_gl_filter_filter_texture (filter, inbuf, outbuf);
+}
+
 static gboolean
 gst_gl_filtershader_filter_texture (GstGLFilter * filter, guint in_tex,
     guint out_tex)
@@ -351,18 +400,39 @@
   GstGLFilter *filter = GST_GL_FILTER (stuff);
   GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (filter);
   GstGLFuncs *gl = filter->context->gl_vtable;
+  const GLfloat vVertices[] = {
+    -1.0f, -1.0f, -1.0f, 0.0f, 0.0f,
+    1.0, -1.0f, -1.0f, 1.0f, 0.0f,
+    1.0f, 1.0f, -1.0f, 1.0f, 1.0f,
+    -1.0f, 1.0f, -1.0f, 0.0f, 1.0f
+  };
+  GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
 
-  gl->MatrixMode (GL_PROJECTION);
-  gl->LoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+  if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL) {
+    gl->MatrixMode (GL_PROJECTION);
+    gl->LoadIdentity ();
+  }
+#endif
 
   gst_gl_shader_use (filtershader->shader0);
 
-  gl->ActiveTexture (GL_TEXTURE1);
+  gl->ActiveTexture (GL_TEXTURE0);
   gl->Enable (GL_TEXTURE_2D);
   gl->BindTexture (GL_TEXTURE_2D, texture);
-  gl->Disable (GL_TEXTURE_2D);
 
-  gst_gl_shader_set_uniform_1i (filtershader->shader0, "tex", 1);
+  gst_gl_shader_set_uniform_1i (filtershader->shader0, "tex", 0);
+  gst_gl_shader_set_uniform_1f (filtershader->shader0, "width", width);
+  gst_gl_shader_set_uniform_1f (filtershader->shader0, "height", height);
+  gst_gl_shader_set_uniform_1f (filtershader->shader0, "time",
+      filtershader->time);
+
+  filtershader->attr_position_loc =
+      gst_gl_shader_get_attribute_location (filtershader->shader0,
+      "a_position");
+  filtershader->attr_texture_loc =
+      gst_gl_shader_get_attribute_location (filtershader->shader0,
+      "a_texcoord");
 
   if (hfilter_fragment_variables[0]) {
     gst_gl_filtershader_variables_parse (filtershader->shader0,
@@ -377,6 +447,21 @@
     hfilter_fragment_variables[1] = 0;
   }
 
-  gst_gl_filter_draw_texture (filter, texture, width, height);
+  gl->Clear (GL_COLOR_BUFFER_BIT);
 
+  gl->EnableVertexAttribArray (filtershader->attr_position_loc);
+  gl->EnableVertexAttribArray (filtershader->attr_texture_loc);
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (filtershader->attr_position_loc, 3, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), vVertices);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (filtershader->attr_texture_loc, 2, GL_FLOAT,
+      GL_FALSE, 5 * sizeof (GLfloat), &vVertices[3]);
+
+  gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
+
+  gl->DisableVertexAttribArray (filtershader->attr_position_loc);
+  gl->DisableVertexAttribArray (filtershader->attr_texture_loc);
 }
diff --git a/ext/gl/gstglfiltershader.h b/ext/gl/gstglfiltershader.h
index 0d0cce3..615382a 100644
--- a/ext/gl/gstglfiltershader.h
+++ b/ext/gl/gstglfiltershader.h
@@ -42,7 +42,10 @@
   gchar *filename;
   gchar *presetfile;
   int texSet;
+  gdouble time;
 
+  gint attr_position_loc;
+  gint attr_texture_loc;
 };
 
 struct _GstGLFilterShaderClass
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index 1311319..73c561f 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -101,19 +101,19 @@
 #define GST_GLIMAGE_SINK_UNLOCK(glsink) \
   (g_mutex_unlock(&GST_GLIMAGE_SINK_GET_LOCK (glsink)))
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 #if GST_GL_HAVE_GLES2
 static void gst_glimage_sink_thread_init_redisplay (GstGLImageSink * gl_sink);
 #endif
 static void gst_glimage_sink_on_close (GstGLImageSink * gl_sink);
-static void gst_glimage_sink_on_resize (const GstGLImageSink * gl_sink,
+static void gst_glimage_sink_on_resize (GstGLImageSink * gl_sink,
     gint width, gint height);
-static void gst_glimage_sink_on_draw (const GstGLImageSink * gl_sink);
+static void gst_glimage_sink_on_draw (GstGLImageSink * gl_sink);
 static gboolean gst_glimage_sink_redisplay (GstGLImageSink * gl_sink);
 
 static void gst_glimage_sink_finalize (GObject * object);
@@ -136,7 +136,7 @@
 static gboolean gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
 static GstFlowReturn gst_glimage_sink_prepare (GstBaseSink * bsink,
     GstBuffer * buf);
-static GstFlowReturn gst_glimage_sink_render (GstBaseSink * bsink,
+static GstFlowReturn gst_glimage_sink_show_frame (GstVideoSink * bsink,
     GstBuffer * buf);
 static gboolean gst_glimage_sink_propose_allocation (GstBaseSink * bsink,
     GstQuery * query);
@@ -167,14 +167,21 @@
 {
   ARG_0,
   ARG_DISPLAY,
-  PROP_CLIENT_RESHAPE_CALLBACK,
-  PROP_CLIENT_DRAW_CALLBACK,
-  PROP_CLIENT_DATA,
   PROP_FORCE_ASPECT_RATIO,
   PROP_PIXEL_ASPECT_RATIO,
   PROP_OTHER_CONTEXT
 };
 
+enum
+{
+  SIGNAL_0,
+  CLIENT_DRAW_SIGNAL,
+  CLIENT_RESHAPE_SIGNAL,
+  LAST_SIGNAL
+};
+
+static guint gst_glimage_sink_signals[LAST_SIGNAL] = { 0 };
+
 #define gst_glimage_sink_parent_class parent_class
 G_DEFINE_TYPE_WITH_CODE (GstGLImageSink, gst_glimage_sink,
     GST_TYPE_VIDEO_SINK, G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
@@ -188,11 +195,13 @@
   GObjectClass *gobject_class;
   GstElementClass *gstelement_class;
   GstBaseSinkClass *gstbasesink_class;
+  GstVideoSinkClass *gstvideosink_class;
   GstElementClass *element_class;
 
   gobject_class = (GObjectClass *) klass;
   gstelement_class = (GstElementClass *) klass;
   gstbasesink_class = (GstBaseSinkClass *) klass;
+  gstvideosink_class = (GstVideoSinkClass *) klass;
   element_class = GST_ELEMENT_CLASS (klass);
 
   gobject_class->set_property = gst_glimage_sink_set_property;
@@ -202,22 +211,6 @@
       g_param_spec_string ("display", "Display", "Display name",
           NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
-  g_object_class_install_property (gobject_class, PROP_CLIENT_RESHAPE_CALLBACK,
-      g_param_spec_pointer ("client-reshape-callback",
-          "Client reshape callback",
-          "Define a custom reshape callback in a client code",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_CLIENT_DRAW_CALLBACK,
-      g_param_spec_pointer ("client-draw-callback", "Client draw callback",
-          "Define a custom draw callback in a client code",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-  g_object_class_install_property (gobject_class, PROP_CLIENT_DATA,
-      g_param_spec_pointer ("client-data", "Client data",
-          "Pass data to the draw and reshape callbacks",
-          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
   g_object_class_install_property (gobject_class, PROP_FORCE_ASPECT_RATIO,
       g_param_spec_boolean ("force-aspect-ratio",
           "Force aspect ratio",
@@ -239,6 +232,42 @@
       "Sink/Video", "A videosink based on OpenGL",
       "Julien Isorce <julien.isorce@gmail.com>");
 
+  /**
+   * GstGLImageSink::client-draw:
+   * @object: the #GstGLImageSink
+   * @texture: the #guint id of the texture.
+   * @width: the #guint width of the texture.
+   * @height: the #guint height of the texture.
+   *
+   * Will be emitted before actually drawing the texture.  The client should
+   * redraw the surface/contents with the @texture, @width and @height and
+   * and return %TRUE.
+   *
+   * Returns: whether the texture was redrawn by the signal.  If not, a
+   *          default redraw will occur.
+   */
+  gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL] =
+      g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_BOOLEAN, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
+
+  /**
+   * GstGLImageSink::client-reshape:
+   * @object: the #GstGLImageSink
+   * @width: the #guint width of the texture.
+   * @height: the #guint height of the texture.
+   *
+   * The client should resize the surface/window/viewport with the @width and
+   * @height and return %TRUE.
+   *
+   * Returns: whether the content area was resized by the signal.  If not, a
+   *          default viewport resize will occur.
+   */
+  gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL] =
+      g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_BOOLEAN, 2, G_TYPE_UINT, G_TYPE_UINT);
+
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&gst_glimage_sink_template));
 
@@ -249,11 +278,12 @@
   gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_glimage_sink_query);
   gstbasesink_class->set_caps = gst_glimage_sink_set_caps;
   gstbasesink_class->get_times = gst_glimage_sink_get_times;
-  gstbasesink_class->preroll = gst_glimage_sink_render;
-  gstbasesink_class->render = gst_glimage_sink_render;
   gstbasesink_class->prepare = gst_glimage_sink_prepare;
   gstbasesink_class->propose_allocation = gst_glimage_sink_propose_allocation;
   gstbasesink_class->stop = gst_glimage_sink_stop;
+
+  gstvideosink_class->show_frame =
+      GST_DEBUG_FUNCPTR (gst_glimage_sink_show_frame);
 }
 
 static void
@@ -263,13 +293,11 @@
   glimage_sink->window_id = 0;
   glimage_sink->new_window_id = 0;
   glimage_sink->display = NULL;
-  glimage_sink->clientReshapeCallback = NULL;
-  glimage_sink->clientDrawCallback = NULL;
-  glimage_sink->client_data = NULL;
-  glimage_sink->keep_aspect_ratio = TRUE;
-  glimage_sink->par_n = 1;
+  glimage_sink->keep_aspect_ratio = FALSE;
+  glimage_sink->par_n = 0;
   glimage_sink->par_d = 1;
   glimage_sink->pool = NULL;
+  glimage_sink->stored_buffer = NULL;
   glimage_sink->redisplay_texture = 0;
 
   g_mutex_init (&glimage_sink->drawing_lock);
@@ -292,21 +320,6 @@
       glimage_sink->display_name = g_strdup (g_value_get_string (value));
       break;
     }
-    case PROP_CLIENT_RESHAPE_CALLBACK:
-    {
-      glimage_sink->clientReshapeCallback = g_value_get_pointer (value);
-      break;
-    }
-    case PROP_CLIENT_DRAW_CALLBACK:
-    {
-      glimage_sink->clientDrawCallback = g_value_get_pointer (value);
-      break;
-    }
-    case PROP_CLIENT_DATA:
-    {
-      glimage_sink->client_data = g_value_get_pointer (value);
-      break;
-    }
     case PROP_FORCE_ASPECT_RATIO:
     {
       glimage_sink->keep_aspect_ratio = g_value_get_boolean (value);
@@ -503,7 +516,9 @@
   GstGLImageSink *glimage_sink;
   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
 
-  GST_DEBUG ("change state");
+  GST_DEBUG ("changing state: %s => %s",
+      gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+      gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
 
   glimage_sink = GST_GLIMAGE_SINK (element);
 
@@ -537,6 +552,10 @@
        */
       GST_GLIMAGE_SINK_LOCK (glimage_sink);
       glimage_sink->redisplay_texture = 0;
+      if (glimage_sink->stored_buffer) {
+        gst_buffer_unref (glimage_sink->stored_buffer);
+        glimage_sink->stored_buffer = NULL;
+      }
       GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
 
       if (glimage_sink->upload) {
@@ -700,7 +719,7 @@
 
   if (glimage_sink->upload)
     gst_object_unref (glimage_sink->upload);
-  glimage_sink->upload = gst_object_ref (GST_GL_BUFFER_POOL (newpool)->upload);
+  glimage_sink->upload = gst_gl_upload_new (glimage_sink->context);
 
   gst_gl_upload_set_format (glimage_sink->upload, &vinfo);
 
@@ -748,13 +767,14 @@
 }
 
 static GstFlowReturn
-gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
+gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
 {
   GstGLImageSink *glimage_sink;
+  GstBuffer *stored_buffer;
 
   GST_TRACE ("rendering buffer:%p", buf);
 
-  glimage_sink = GST_GLIMAGE_SINK (bsink);
+  glimage_sink = GST_GLIMAGE_SINK (vsink);
 
   GST_TRACE ("redisplay texture:%u of size:%ux%u, window size:%ux%u",
       glimage_sink->next_tex, GST_VIDEO_INFO_WIDTH (&glimage_sink->info),
@@ -765,7 +785,11 @@
   /* Avoid to release the texture while drawing */
   GST_GLIMAGE_SINK_LOCK (glimage_sink);
   glimage_sink->redisplay_texture = glimage_sink->next_tex;
+  stored_buffer = glimage_sink->stored_buffer;
+  glimage_sink->stored_buffer = gst_buffer_ref (buf);
   GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
+  if (stored_buffer)
+    gst_buffer_unref (stored_buffer);
 
   /* Ask the underlying window to redraw its content */
   if (!gst_glimage_sink_redisplay (glimage_sink))
@@ -976,22 +1000,22 @@
 #endif
 
 static void
-gst_glimage_sink_on_resize (const GstGLImageSink * gl_sink, gint width,
-    gint height)
+gst_glimage_sink_on_resize (GstGLImageSink * gl_sink, gint width, gint height)
 {
   /* Here gl_sink members (ex:gl_sink->info) have a life time of set_caps.
    * It means that they cannot not change between two set_caps
    */
   const GstGLFuncs *gl = gl_sink->context->gl_vtable;
+  gboolean do_reshape;
 
   GST_TRACE ("GL Window resized to %ux%u", width, height);
 
   /* check if a client reshape callback is registered */
-  if (gl_sink->clientReshapeCallback)
-    gl_sink->clientReshapeCallback (width, height, gl_sink->client_data);
+  g_signal_emit (gl_sink, gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL], 0,
+      width, height, &do_reshape);
 
   /* default reshape */
-  else {
+  if (!do_reshape) {
     if (gl_sink->keep_aspect_ratio) {
       GstVideoRectangle src, dst, result;
 
@@ -1023,7 +1047,7 @@
 
 
 static void
-gst_glimage_sink_on_draw (const GstGLImageSink * gl_sink)
+gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
 {
   /* Here gl_sink members (ex:gl_sink->info) have a life time of set_caps.
    * It means that they cannot not change between two set_caps as well as
@@ -1033,6 +1057,7 @@
 
   const GstGLFuncs *gl = NULL;
   GstGLWindow *window = NULL;
+  gboolean do_redisplay;
 
   g_return_if_fail (GST_IS_GLIMAGE_SINK (gl_sink));
 
@@ -1062,22 +1087,11 @@
 
   gl->BindTexture (GL_TEXTURE_2D, 0);
 
-  /* check if a client draw callback is registered */
-  if (gl_sink->clientDrawCallback) {
+  g_signal_emit (gl_sink, gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL], 0,
+      gl_sink->redisplay_texture, GST_VIDEO_INFO_WIDTH (&gl_sink->info),
+      GST_VIDEO_INFO_HEIGHT (&gl_sink->info), &do_redisplay);
 
-    gboolean doRedisplay =
-        gl_sink->clientDrawCallback (gl_sink->redisplay_texture,
-        GST_VIDEO_INFO_WIDTH (&gl_sink->info),
-        GST_VIDEO_INFO_HEIGHT (&gl_sink->info),
-        gl_sink->client_data);
-
-    if (doRedisplay)
-      gst_gl_window_draw_unlocked (window,
-          GST_VIDEO_INFO_WIDTH (&gl_sink->info),
-          GST_VIDEO_INFO_HEIGHT (&gl_sink->info));
-  }
-  /* default opengl scene */
-  else {
+  if (!do_redisplay) {
 #if GST_GL_HAVE_OPENGL
     if (USING_OPENGL (gl_sink->context)) {
       GLfloat verts[8] = { 1.0f, 1.0f,
@@ -1150,8 +1164,8 @@
       gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
     }
 #endif
-  }                             /* end default opengl scene */
-
+  }
+  /* end default opengl scene */
   window->is_drawing = FALSE;
   gst_object_unref (window);
 
diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h
index 2f02836..efa557b 100644
--- a/ext/gl/gstglimagesink.h
+++ b/ext/gl/gstglimagesink.h
@@ -67,10 +67,6 @@
     GstGLUpload *upload;
     guint      next_tex;
 
-    CRCB clientReshapeCallback;
-    CDCB clientDrawCallback;
-    gpointer client_data;
-
     volatile gint to_quit;
     gboolean keep_aspect_ratio;
     gint par_n, par_d;
@@ -79,6 +75,7 @@
 
     /* avoid replacing the stored_buffer while drawing */
     GMutex drawing_lock;
+    GstBuffer *stored_buffer;
     GLuint redisplay_texture;
 
 #if GST_GL_HAVE_GLES2
diff --git a/ext/gl/gstglmosaic.c b/ext/gl/gstglmosaic.c
index 857c179..5a5c418 100644
--- a/ext/gl/gstglmosaic.c
+++ b/ext/gl/gstglmosaic.c
@@ -197,9 +197,9 @@
 
   //blocking call, use a FBO
   gst_gl_context_use_fbo_v2 (mix->context,
-      GST_VIDEO_INFO_WIDTH (&mix->out_info),
-      GST_VIDEO_INFO_HEIGHT (&mix->out_info), mix->fbo, mix->depthbuffer,
-      out_tex, gst_gl_mosaic_callback, (gpointer) mosaic);
+      GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR (mix)->info),
+      GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR (mix)->info), mix->fbo,
+      mix->depthbuffer, out_tex, gst_gl_mosaic_callback, (gpointer) mosaic);
 
   return TRUE;
 }
@@ -294,8 +294,9 @@
       continue;
     }
     in_tex = frame->texture;
-    width = GST_VIDEO_INFO_WIDTH (&frame->pad->in_info);
-    height = GST_VIDEO_INFO_HEIGHT (&frame->pad->in_info);
+    width = GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR_PAD (frame->pad)->info);
+    height =
+        GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR_PAD (frame->pad)->info);
 
     if (!in_tex || width <= 0 || height <= 0) {
       GST_DEBUG ("skipping texture:%u frame:%p width:%u height %u",
diff --git a/ext/gl/gstgltransformation.c b/ext/gl/gstgltransformation.c
new file mode 100644
index 0000000..7d761fc
--- /dev/null
+++ b/ext/gl/gstgltransformation.c
@@ -0,0 +1,476 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Lubosz Sarnecki <lubosz@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.
+ */
+
+/**
+ * SECTION:element-gltransformation
+ *
+ * Transforms video on the GPU.
+ *
+ * <refsect2>
+ * <title>Examples</title>
+ * |[
+ * gst-launch gltestsrc ! gltransformation rotation-z=45 ! glimagesink
+ * ]| A pipeline to rotate by 45 degrees
+ * |[
+ * gst-launch gltestsrc ! gltransformation translation-x=0.5 ! glimagesink
+ * ]| Translate the video by 0.5
+ * |[
+ * gst-launch gltestsrc ! gltransformation scale-y=0.5 scale-x=0.5 ! glimagesink
+ * ]| Resize the video by 0.5
+ * |[
+ * gst-launch gltestsrc ! gltransformation rotation-x=-45 ortho=True ! glimagesink
+ * ]| Rotate the video around the X-Axis by -45° with an orthographic projection
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gl/gstglapi.h>
+#include "gstgltransformation.h"
+
+#define GST_CAT_DEFAULT gst_gl_transformation_debug
+GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+enum
+{
+  PROP_0,
+  PROP_FOVY,
+  PROP_ORTHO,
+  PROP_TRANSLATION_X,
+  PROP_TRANSLATION_Y,
+  PROP_TRANSLATION_Z,
+  PROP_ROTATION_X,
+  PROP_ROTATION_Y,
+  PROP_ROTATION_Z,
+  PROP_SCALE_X,
+  PROP_SCALE_Y
+};
+
+#define DEBUG_INIT \
+    GST_DEBUG_CATEGORY_INIT (gst_gl_transformation_debug, "gltransformation", 0, "gltransformation element");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLTransformation, gst_gl_transformation,
+    GST_TYPE_GL_FILTER, DEBUG_INIT);
+
+static void gst_gl_transformation_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gl_transformation_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
+static gboolean gst_gl_transformation_set_caps (GstGLFilter * filter,
+    GstCaps * incaps, GstCaps * outcaps);
+
+static void gst_gl_transformation_reset (GstGLFilter * filter);
+static gboolean gst_gl_transformation_init_shader (GstGLFilter * filter);
+static void gst_gl_transformation_callback (gpointer stuff);
+static void gst_gl_transformation_build_mvp (GstGLTransformation *
+    transformation);
+
+static gboolean gst_gl_transformation_filter_texture (GstGLFilter * filter,
+    guint in_tex, guint out_tex);
+
+/* vertex source */
+static const gchar *cube_v_src =
+    "attribute vec4 position;                     \n"
+    "attribute vec2 uv;                           \n"
+    "uniform mat4 mvp;                            \n"
+    "varying vec2 out_uv;                         \n"
+    "void main()                                  \n"
+    "{                                            \n"
+    "   gl_Position = mvp * position;             \n"
+    "   out_uv = uv;                              \n"
+    "}                                            \n";
+
+/* fragment source */
+static const gchar *cube_f_src =
+    "#ifdef GL_ES                                 \n"
+    "  precision mediump float;                   \n"
+    "#endif                                       \n"
+    "varying vec2 out_uv;                         \n"
+    "uniform sampler2D texture;                   \n"
+    "void main()                                  \n"
+    "{                                            \n"
+    "  gl_FragColor = texture2D (texture, out_uv);\n"
+    "}                                            \n";
+
+static void
+gst_gl_transformation_class_init (GstGLTransformationClass * klass)
+{
+  GObjectClass *gobject_class;
+  GstElementClass *element_class;
+
+  gobject_class = (GObjectClass *) klass;
+  element_class = GST_ELEMENT_CLASS (klass);
+
+  gobject_class->set_property = gst_gl_transformation_set_property;
+  gobject_class->get_property = gst_gl_transformation_get_property;
+
+  GST_GL_FILTER_CLASS (klass)->onInitFBO = gst_gl_transformation_init_shader;
+  GST_GL_FILTER_CLASS (klass)->onReset = gst_gl_transformation_reset;
+  GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_transformation_set_caps;
+  GST_GL_FILTER_CLASS (klass)->filter_texture =
+      gst_gl_transformation_filter_texture;
+
+  g_object_class_install_property (gobject_class, PROP_FOVY,
+      g_param_spec_float ("fovy", "Fovy", "Field of view angle in degrees",
+          0.0, G_MAXFLOAT, 90.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_ORTHO,
+      g_param_spec_boolean ("ortho", "Orthographic",
+          "Use orthographic projection", FALSE,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* Rotation */
+  g_object_class_install_property (gobject_class, PROP_ROTATION_X,
+      g_param_spec_float ("rotation-x", "X Rotation",
+          "Rotates the video around the X-Axis in degrees.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_ROTATION_Y,
+      g_param_spec_float ("rotation-y", "Y Rotation",
+          "Rotates the video around the Y-Axis in degrees.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_ROTATION_Z,
+      g_param_spec_float ("rotation-z", "Z Rotation",
+          "Rotates the video around the Z-Axis in degrees.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* Translation */
+  g_object_class_install_property (gobject_class, PROP_TRANSLATION_X,
+      g_param_spec_float ("translation-x", "X Translation",
+          "Translates the video at the X-Axis.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TRANSLATION_Y,
+      g_param_spec_float ("translation-y", "Y Translation",
+          "Translates the video at the Y-Axis.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_TRANSLATION_Z,
+      g_param_spec_float ("translation-z", "Z Translation",
+          "Translates the video at the Z-Axis.",
+          -G_MAXFLOAT, G_MAXFLOAT, 0.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  /* Scale */
+  g_object_class_install_property (gobject_class, PROP_SCALE_X,
+      g_param_spec_float ("scale-x", "X Scale",
+          "Scale multiplierer for the X-Axis.",
+          0.0, G_MAXFLOAT, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_SCALE_Y,
+      g_param_spec_float ("scale-y", "Y Scale",
+          "Scale multiplierer for the Y-Axis.",
+          0.0, G_MAXFLOAT, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_set_metadata (element_class, "OpenGL transformation filter",
+      "Filter/Effect/Video", "Transform video on the GPU",
+      "Lubosz Sarnecki <lubosz@gmail.com>");
+}
+
+static void
+gst_gl_transformation_init (GstGLTransformation * filter)
+{
+  filter->shader = NULL;
+  filter->fovy = 90;
+  filter->aspect = 0;
+  filter->znear = 0.1;
+  filter->zfar = 100;
+
+  filter->xscale = 1.0;
+  filter->yscale = 1.0;
+
+  filter->in_tex = 0;
+
+  gst_gl_transformation_build_mvp (filter);
+}
+
+static void
+gst_gl_transformation_build_mvp (GstGLTransformation * transformation)
+{
+  graphene_point3d_t translation_vector =
+      GRAPHENE_POINT3D_INIT (transformation->xtranslation,
+      transformation->ytranslation,
+      transformation->ztranslation);
+
+  graphene_matrix_t model_matrix;
+  graphene_matrix_t projection_matrix;
+  graphene_matrix_t view_matrix;
+  graphene_matrix_t vp_matrix;
+
+  graphene_vec3_t eye;
+  graphene_vec3_t center;
+  graphene_vec3_t up;
+
+  graphene_vec3_init (&eye, 0.f, 0.f, 1.f);
+  graphene_vec3_init (&center, 0.f, 0.f, 0.f);
+  graphene_vec3_init (&up, 0.f, 1.f, 0.f);
+
+  graphene_matrix_init_rotate (&model_matrix,
+      transformation->xrotation, graphene_vec3_x_axis ());
+  graphene_matrix_rotate (&model_matrix,
+      transformation->yrotation, graphene_vec3_y_axis ());
+  graphene_matrix_rotate (&model_matrix,
+      transformation->zrotation, graphene_vec3_z_axis ());
+  graphene_matrix_scale (&model_matrix,
+      transformation->xscale, transformation->yscale, 1.0f);
+  graphene_matrix_translate (&model_matrix, &translation_vector);
+
+  if (transformation->ortho) {
+    graphene_matrix_init_ortho (&projection_matrix,
+        -transformation->aspect, transformation->aspect,
+        -1, 1, transformation->znear, transformation->zfar);
+  } else {
+    graphene_matrix_init_perspective (&projection_matrix,
+        transformation->fovy,
+        transformation->aspect, transformation->znear, transformation->zfar);
+  }
+
+  graphene_matrix_init_look_at (&view_matrix, &eye, &center, &up);
+
+  graphene_matrix_multiply (&projection_matrix, &view_matrix, &vp_matrix);
+  graphene_matrix_multiply (&vp_matrix, &model_matrix,
+      &transformation->mvp_matrix);
+}
+
+static void
+gst_gl_transformation_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLTransformation *filter = GST_GL_TRANSFORMATION (object);
+
+  switch (prop_id) {
+    case PROP_FOVY:
+      filter->fovy = g_value_get_float (value);
+      break;
+    case PROP_ORTHO:
+      filter->ortho = g_value_get_boolean (value);
+      break;
+    case PROP_TRANSLATION_X:
+      filter->xtranslation = g_value_get_float (value);
+      break;
+    case PROP_TRANSLATION_Y:
+      filter->ytranslation = g_value_get_float (value);
+      break;
+    case PROP_TRANSLATION_Z:
+      filter->ztranslation = g_value_get_float (value);
+      break;
+    case PROP_ROTATION_X:
+      filter->xrotation = g_value_get_float (value);
+      break;
+    case PROP_ROTATION_Y:
+      filter->yrotation = g_value_get_float (value);
+      break;
+    case PROP_ROTATION_Z:
+      filter->zrotation = g_value_get_float (value);
+      break;
+    case PROP_SCALE_X:
+      filter->xscale = g_value_get_float (value);
+      break;
+    case PROP_SCALE_Y:
+      filter->yscale = g_value_get_float (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+  gst_gl_transformation_build_mvp (filter);
+}
+
+static void
+gst_gl_transformation_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLTransformation *filter = GST_GL_TRANSFORMATION (object);
+
+  switch (prop_id) {
+    case PROP_FOVY:
+      g_value_set_float (value, filter->fovy);
+      break;
+    case PROP_ORTHO:
+      g_value_set_boolean (value, filter->ortho);
+      break;
+    case PROP_TRANSLATION_X:
+      g_value_set_float (value, filter->xtranslation);
+      break;
+    case PROP_TRANSLATION_Y:
+      g_value_set_float (value, filter->ytranslation);
+      break;
+    case PROP_TRANSLATION_Z:
+      g_value_set_float (value, filter->ztranslation);
+      break;
+    case PROP_ROTATION_X:
+      g_value_set_float (value, filter->xrotation);
+      break;
+    case PROP_ROTATION_Y:
+      g_value_set_float (value, filter->yrotation);
+      break;
+    case PROP_ROTATION_Z:
+      g_value_set_float (value, filter->zrotation);
+      break;
+    case PROP_SCALE_X:
+      g_value_set_float (value, filter->xscale);
+      break;
+    case PROP_SCALE_Y:
+      g_value_set_float (value, filter->yscale);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static gboolean
+gst_gl_transformation_set_caps (GstGLFilter * filter, GstCaps * incaps,
+    GstCaps * outcaps)
+{
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+
+  transformation->aspect =
+      (gdouble) GST_VIDEO_INFO_WIDTH (&filter->out_info) /
+      (gdouble) GST_VIDEO_INFO_HEIGHT (&filter->out_info);
+
+  gst_gl_transformation_build_mvp (transformation);
+
+  return TRUE;
+}
+
+static void
+gst_gl_transformation_reset (GstGLFilter * filter)
+{
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+
+  /* blocking call, wait until the opengl thread has destroyed the shader */
+  if (transformation->shader)
+    gst_gl_context_del_shader (filter->context, transformation->shader);
+  transformation->shader = NULL;
+}
+
+static gboolean
+gst_gl_transformation_init_shader (GstGLFilter * filter)
+{
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+
+  if (gst_gl_context_get_gl_api (filter->context)) {
+    /* blocking call, wait until the opengl thread has compiled the shader */
+    return gst_gl_context_gen_shader (filter->context, cube_v_src, cube_f_src,
+        &transformation->shader);
+  }
+  return TRUE;
+}
+
+static gboolean
+gst_gl_transformation_filter_texture (GstGLFilter * filter, guint in_tex,
+    guint out_tex)
+{
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+
+  transformation->in_tex = in_tex;
+
+  /* blocking call, use a FBO */
+  gst_gl_context_use_fbo_v2 (filter->context,
+      GST_VIDEO_INFO_WIDTH (&filter->out_info),
+      GST_VIDEO_INFO_HEIGHT (&filter->out_info),
+      filter->fbo, filter->depthbuffer,
+      out_tex, gst_gl_transformation_callback, (gpointer) transformation);
+
+  return TRUE;
+}
+
+static void
+gst_gl_transformation_callback (gpointer stuff)
+{
+  GstGLFilter *filter = GST_GL_FILTER (stuff);
+  GstGLTransformation *transformation = GST_GL_TRANSFORMATION (filter);
+  GstGLFuncs *gl = filter->context->gl_vtable;
+
+/* *INDENT-OFF* */
+
+  const GLfloat positions[] = {
+     -transformation->aspect,  1.0,  0.0, 1.0,
+      transformation->aspect,  1.0,  0.0, 1.0,
+      transformation->aspect, -1.0,  0.0, 1.0,
+     -transformation->aspect, -1.0,  0.0, 1.0,
+  };
+
+  const GLfloat texture_coordinates[] = {
+     0.0,  1.0,
+     1.0,  1.0,
+     1.0,  0.0,
+     0.0,  0.0,
+  };
+
+/* *INDENT-ON* */
+
+  GLushort indices[] = { 0, 1, 2, 3, 0 };
+
+  GLfloat temp_matrix[16];
+
+  GLint attr_position_loc = 0;
+  GLint attr_texture_loc = 0;
+
+  gst_gl_context_clear_shader (filter->context);
+  gl->BindTexture (GL_TEXTURE_2D, 0);
+
+  gl->ClearColor (0.f, 0.f, 0.f, 0.f);
+  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+  gst_gl_shader_use (transformation->shader);
+
+  attr_position_loc =
+      gst_gl_shader_get_attribute_location (transformation->shader, "position");
+
+  attr_texture_loc =
+      gst_gl_shader_get_attribute_location (transformation->shader, "uv");
+
+  /* Load the vertex position */
+  gl->VertexAttribPointer (attr_position_loc, 4, GL_FLOAT,
+      GL_FALSE, 0, positions);
+
+  /* Load the texture coordinate */
+  gl->VertexAttribPointer (attr_texture_loc, 2, GL_FLOAT,
+      GL_FALSE, 0, texture_coordinates);
+
+  gl->EnableVertexAttribArray (attr_position_loc);
+  gl->EnableVertexAttribArray (attr_texture_loc);
+
+  gl->ActiveTexture (GL_TEXTURE0);
+  gl->BindTexture (GL_TEXTURE_2D, transformation->in_tex);
+  gst_gl_shader_set_uniform_1i (transformation->shader, "texture", 0);
+
+  graphene_matrix_to_float (&transformation->mvp_matrix, temp_matrix);
+  gst_gl_shader_set_uniform_matrix_4fv (transformation->shader, "mvp",
+      1, GL_FALSE, temp_matrix);
+
+  gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, indices);
+
+  gl->DisableVertexAttribArray (attr_position_loc);
+  gl->DisableVertexAttribArray (attr_texture_loc);
+
+  gst_gl_context_clear_shader (filter->context);
+}
diff --git a/ext/gl/gstgltransformation.h b/ext/gl/gstgltransformation.h
new file mode 100644
index 0000000..05145fb
--- /dev/null
+++ b/ext/gl/gstgltransformation.h
@@ -0,0 +1,77 @@
+/*
+ * GStreamer
+ * Copyright (C) 2014 Lubosz Sarnecki <lubosz@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.
+ */
+
+#ifndef _GST_GL_TRANSFORMATION_H_
+#define _GST_GL_TRANSFORMATION_H_
+
+#include <gst/gl/gstglfilter.h>
+#include <graphene-1.0/graphene.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_GL_TRANSFORMATION            (gst_gl_transformation_get_type())
+#define GST_GL_TRANSFORMATION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_TRANSFORMATION,GstGLTransformation))
+#define GST_IS_GL_TRANSFORMATION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_TRANSFORMATION))
+#define GST_GL_TRANSFORMATION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_GL_TRANSFORMATION,GstGLTransformationClass))
+#define GST_IS_GL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_GL_TRANSFORMATION))
+#define GST_GL_TRANSFORMATION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_TRANSFORMATION,GstGLTransformationClass))
+
+typedef struct _GstGLTransformation GstGLTransformation;
+typedef struct _GstGLTransformationClass GstGLTransformationClass;
+
+struct _GstGLTransformation
+{
+    GstGLFilter filter;
+
+    GstGLShader *shader;
+
+    guint in_tex;
+
+    gfloat xrotation;
+    gfloat yrotation;
+    gfloat zrotation;
+
+    gfloat xscale;
+    gfloat yscale;
+
+    gfloat xtranslation;
+    gfloat ytranslation;
+    gfloat ztranslation;
+
+    /* perspective */
+    gfloat fovy;
+    gfloat aspect;
+    gfloat znear;
+    gfloat zfar;
+    gboolean ortho;
+
+    graphene_matrix_t mvp_matrix;
+};
+
+struct _GstGLTransformationClass
+{
+    GstGLFilterClass filter_class;
+};
+
+GType gst_gl_transformation_get_type (void);
+
+G_END_DECLS
+
+#endif /* _GST_GL_TRANSFORMATION_H_ */
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index b2aaeb9..5a5d7a2 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -72,29 +72,183 @@
 static const gchar *video_mixer_v_src =
     "attribute vec4 a_position;                                   \n"
     "attribute vec2 a_texCoord;                                   \n"
-    "uniform float x_scale;                                       \n"
-    "uniform float y_scale;                                       \n"
     "varying vec2 v_texCoord;                                     \n"
     "void main()                                                  \n"
     "{                                                            \n"
-    "   gl_Position = a_position * vec4(x_scale, y_scale, 1.0, 1.0);\n"
+    "   gl_Position = a_position;                                 \n"
     "   v_texCoord = a_texCoord;                                  \n" "}";
 
 /* fragment source */
 static const gchar *video_mixer_f_src =
     "uniform sampler2D texture;                     \n"
+    "uniform float alpha;\n"
     "varying vec2 v_texCoord;                            \n"
     "void main()                                         \n"
     "{                                                   \n"
     "  vec4 rgba = texture2D( texture, v_texCoord );\n"
-    "  gl_FragColor = vec4(rgba.rgb, 1.0);\n"
+    "  gl_FragColor = vec4(rgba.rgb, rgba.a * alpha);\n"
     "}                                                   \n";
 
+#define GST_TYPE_GL_VIDEO_MIXER_PAD (gst_gl_video_mixer_pad_get_type())
+#define GST_GL_VIDEO_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_VIDEO_MIXER_PAD, GstGLVideoMixerPad))
+#define GST_GL_VIDEO_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_VIDEO_MIXER_PAD, GstGLVideoMixerPadClass))
+#define GST_IS_GL_VIDEO_MIXER_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_VIDEO_MIXER_PAD))
+#define GST_IS_GL_VIDEO_MIXER_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_VIDEO_MIXER_PAD))
+
+typedef struct _GstGLVideoMixerPad GstGLVideoMixerPad;
+typedef struct _GstGLVideoMixerPadClass GstGLVideoMixerPadClass;
+typedef struct _GstGLVideoMixerCollect GstGLVideoMixerCollect;
+
+/**
+ * GstGLVideoMixerPad:
+ *
+ * The opaque #GstGLVideoMixerPad structure.
+ */
+struct _GstGLVideoMixerPad
+{
+  GstGLMixerPad parent;
+
+  /* < private > */
+  /* properties */
+  gint xpos, ypos;
+  gint width, height;
+  gdouble alpha;
+};
+
+struct _GstGLVideoMixerPadClass
+{
+  GstGLMixerPadClass parent_class;
+};
+
+GType gst_gl_video_mixer_pad_get_type (void);
+G_DEFINE_TYPE (GstGLVideoMixerPad, gst_gl_video_mixer_pad,
+    GST_TYPE_GL_MIXER_PAD);
+
+static void gst_gl_video_mixer_pad_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec);
+static void gst_gl_video_mixer_pad_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec);
+
+#define DEFAULT_PAD_XPOS   0
+#define DEFAULT_PAD_YPOS   0
+#define DEFAULT_PAD_WIDTH  0
+#define DEFAULT_PAD_HEIGHT 0
+#define DEFAULT_PAD_ALPHA  1.0
+enum
+{
+  PROP_PAD_0,
+  PROP_PAD_XPOS,
+  PROP_PAD_YPOS,
+  PROP_PAD_WIDTH,
+  PROP_PAD_HEIGHT,
+  PROP_PAD_ALPHA
+};
+
+static void
+gst_gl_video_mixer_pad_init (GstGLVideoMixerPad * pad)
+{
+  pad->alpha = 1.0;
+}
+
+static void
+gst_gl_video_mixer_pad_class_init (GstGLVideoMixerPadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  gobject_class->set_property = gst_gl_video_mixer_pad_set_property;
+  gobject_class->get_property = gst_gl_video_mixer_pad_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_PAD_XPOS,
+      g_param_spec_int ("xpos", "X Position", "X Position of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_XPOS,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_YPOS,
+      g_param_spec_int ("ypos", "Y Position", "Y Position of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_YPOS,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_WIDTH,
+      g_param_spec_int ("width", "Width", "Width of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_WIDTH,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_HEIGHT,
+      g_param_spec_int ("height", "Height", "Height of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_HEIGHT,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_ALPHA,
+      g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
+          DEFAULT_PAD_ALPHA,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_gl_video_mixer_pad_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (object);
+
+  switch (prop_id) {
+    case PROP_PAD_XPOS:
+      g_value_set_int (value, pad->xpos);
+      break;
+    case PROP_PAD_YPOS:
+      g_value_set_int (value, pad->ypos);
+      break;
+    case PROP_PAD_WIDTH:
+      g_value_set_int (value, pad->width);
+      break;
+    case PROP_PAD_HEIGHT:
+      g_value_set_int (value, pad->height);
+      break;
+    case PROP_PAD_ALPHA:
+      g_value_set_double (value, pad->alpha);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_gl_video_mixer_pad_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (object);
+  GstGLMixer *mix = GST_GL_MIXER (gst_pad_get_parent (GST_PAD (pad)));
+
+  switch (prop_id) {
+    case PROP_PAD_XPOS:
+      pad->xpos = g_value_get_int (value);
+      break;
+    case PROP_PAD_YPOS:
+      pad->ypos = g_value_get_int (value);
+      break;
+    case PROP_PAD_WIDTH:
+      pad->width = g_value_get_int (value);
+      break;
+    case PROP_PAD_HEIGHT:
+      pad->height = g_value_get_int (value);
+      break;
+    case PROP_PAD_ALPHA:
+      pad->alpha = g_value_get_double (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  gst_object_unref (mix);
+}
+
 static void
 gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *element_class;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
 
   gobject_class = (GObjectClass *) klass;
   element_class = GST_ELEMENT_CLASS (klass);
@@ -103,13 +257,16 @@
   gobject_class->get_property = gst_gl_video_mixer_get_property;
 
   gst_element_class_set_metadata (element_class, "OpenGL video_mixer",
-      "Filter/Effect/Video", "OpenGL video_mixer",
+      "Filter/Effect/Video/Compositor", "OpenGL video_mixer",
       "Julien Isorce <julien.isorce@gmail.com>");
 
   GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_video_mixer_init_shader;
   GST_GL_MIXER_CLASS (klass)->reset = gst_gl_video_mixer_reset;
   GST_GL_MIXER_CLASS (klass)->process_textures =
       gst_gl_video_mixer_process_textures;
+
+  agg_class->sinkpads_type = GST_TYPE_GL_VIDEO_MIXER_PAD;
+
 }
 
 static void
@@ -171,8 +328,9 @@
   video_mixer->input_frames = frames;
 
   gst_gl_context_use_fbo_v2 (mix->context,
-      GST_VIDEO_INFO_WIDTH (&mix->out_info),
-      GST_VIDEO_INFO_HEIGHT (&mix->out_info), mix->fbo, mix->depthbuffer,
+      GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR (mix)->info),
+      GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR (mix)->info),
+      mix->fbo, mix->depthbuffer,
       out_tex, gst_gl_video_mixer_callback, (gpointer) video_mixer);
 
   return TRUE;
@@ -197,8 +355,8 @@
 
   guint count = 0;
 
-  out_width = GST_VIDEO_INFO_WIDTH (&mixer->out_info);
-  out_height = GST_VIDEO_INFO_HEIGHT (&mixer->out_info);
+  out_width = GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR (stuff)->info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR (stuff)->info);
 
   gst_gl_context_clear_shader (mixer->context);
   gl->BindTexture (GL_TEXTURE_2D, 0);
@@ -221,6 +379,7 @@
 
   while (count < video_mixer->input_frames->len) {
     GstGLMixerFrameData *frame;
+    GstGLVideoMixerPad *pad;
     /* *INDENT-OFF* */
     gfloat v_vertices[] = {
       /* front face */
@@ -232,6 +391,7 @@
     /* *INDENT-ON* */
     guint in_tex;
     guint in_width, in_height;
+    guint pad_width, pad_height;
     gfloat w, h;
 
     frame = g_ptr_array_index (video_mixer->input_frames, count);
@@ -240,8 +400,9 @@
       count++;
       continue;
     }
-    in_width = GST_VIDEO_INFO_WIDTH (&frame->pad->in_info);
-    in_height = GST_VIDEO_INFO_HEIGHT (&frame->pad->in_info);
+    pad = (GstGLVideoMixerPad *) frame->pad;
+    in_width = GST_VIDEO_INFO_WIDTH (&GST_VIDEO_AGGREGATOR_PAD (pad)->info);
+    in_height = GST_VIDEO_INFO_HEIGHT (&GST_VIDEO_AGGREGATOR_PAD (pad)->info);
 
     if (!frame->texture || in_width <= 0 || in_height <= 0) {
       GST_DEBUG ("skipping texture:%u frame:%p width:%u height %u",
@@ -250,14 +411,25 @@
       continue;
     }
     in_tex = frame->texture;
+    pad_width = pad->width <= 0 ? in_width : pad->width;
+    pad_height = pad->height <= 0 ? in_height : pad->height;
 
-    GST_TRACE ("processing texture:%u dimensions:%ux%u", in_tex, in_width,
-        in_height);
+    w = ((gfloat) pad_width / (gfloat) out_width);
+    h = ((gfloat) pad_height / (gfloat) out_height);
 
-    w = ((gfloat) in_width / (gfloat) out_width);
-    h = ((gfloat) in_height / (gfloat) out_height);
-    GST_TRACE ("processing texture:%u dimensions:%ux%u, %fx%f", in_tex,
-        in_width, in_height, w, h);
+    /* top-left */
+    v_vertices[0] = v_vertices[15] =
+        2.0f * (gfloat) pad->xpos / (gfloat) out_width - 1.0f;
+    /* bottom-left */
+    v_vertices[1] = v_vertices[6] =
+        2.0f * (gfloat) pad->ypos / (gfloat) out_height - 1.0f;
+    /* top-right */
+    v_vertices[5] = v_vertices[10] = v_vertices[0] + 2.0f * w;
+    /* bottom-right */
+    v_vertices[11] = v_vertices[16] = v_vertices[1] + 2.0f * h;
+    GST_TRACE ("processing texture:%u dimensions:%ux%u, at %f,%f %fx%f with "
+        "alpha:%f", in_tex, in_width, in_height, v_vertices[0], v_vertices[1],
+        v_vertices[5], v_vertices[11], pad->alpha);
 
     gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
         GL_FALSE, 5 * sizeof (GLfloat), &v_vertices[0]);
@@ -268,14 +440,14 @@
     gl->EnableVertexAttribArray (attr_position_loc);
     gl->EnableVertexAttribArray (attr_texture_loc);
 
-    gl->BlendFunc (GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR);
-    gl->BlendEquation (GL_FUNC_ADD);
+    gl->BlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE,
+        GL_ZERO);
+    gl->BlendEquationSeparate (GL_FUNC_ADD, GL_FUNC_ADD);
 
     gl->ActiveTexture (GL_TEXTURE0);
     gl->BindTexture (GL_TEXTURE_2D, in_tex);
     gst_gl_shader_set_uniform_1i (video_mixer->shader, "texture", 0);
-    gst_gl_shader_set_uniform_1f (video_mixer->shader, "x_scale", w);
-    gst_gl_shader_set_uniform_1f (video_mixer->shader, "y_scale", h);
+    gst_gl_shader_set_uniform_1f (video_mixer->shader, "alpha", pad->alpha);
 
     gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
 
diff --git a/ext/gl/gstglvideomixer.h b/ext/gl/gstglvideomixer.h
index 716c60a..69a0771 100644
--- a/ext/gl/gstglvideomixer.h
+++ b/ext/gl/gstglvideomixer.h
@@ -22,6 +22,7 @@
 #define _GST_GL_VIDEO_MIXER_H_
 
 #include <gst/gl/gstglmixer.h>
+#include <gst/gl/gstglmixerpad.h>
 
 G_BEGIN_DECLS
 
diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
index 29fbd03..bb692d7 100644
--- a/ext/gl/gstopengl.c
+++ b/ext/gl/gstopengl.c
@@ -48,6 +48,9 @@
 #include "gstglfiltercube.h"
 #include "gstgleffects.h"
 #include "gstglcolorscale.h"
+#if HAVE_GRAPHENE
+#include "gstgltransformation.h"
+#endif
 
 #if GST_GL_HAVE_OPENGL
 #include "gstgltestsrc.h"
@@ -97,7 +100,12 @@
           GST_RANK_NONE, GST_TYPE_GL_FILTER_CUBE)) {
     return FALSE;
   }
-
+#if HAVE_GRAPHENE
+  if (!gst_element_register (plugin, "gltransformation",
+          GST_RANK_NONE, GST_TYPE_GL_TRANSFORMATION)) {
+    return FALSE;
+  }
+#endif
   if (!gst_element_register (plugin, "gleffects",
           GST_RANK_NONE, gst_gl_effects_get_type ())) {
     return FALSE;
diff --git a/ext/gme/Makefile.in b/ext/gme/Makefile.in
index cfe127b..d205d34 100644
--- a/ext/gme/Makefile.in
+++ b/ext/gme/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstgme.la
 libgstgme_la_SOURCES = gstgme.c
 libgstgme_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GME_CFLAGS)
diff --git a/ext/gsettings/Makefile.in b/ext/gsettings/Makefile.in
index 36c891b..d01ba13 100644
--- a/ext/gsettings/Makefile.in
+++ b/ext/gsettings/Makefile.in
@@ -355,6 +355,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -441,6 +443,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -732,6 +735,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 gsettings_SCHEMAS = org.freedesktop.gstreamer-@GST_API_VERSION@.default-elements.gschema.xml
 plugin_LTLIBRARIES = libgstgsettingselements.la
 libgstgsettingselements_la_SOURCES = \
diff --git a/ext/gsm/Makefile.in b/ext/gsm/Makefile.in
index b31f433..1f04e81 100644
--- a/ext/gsm/Makefile.in
+++ b/ext/gsm/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstgsm.la
 libgstgsm_la_SOURCES = gstgsm.c gstgsmenc.c gstgsmdec.c
 libgstgsm_la_CFLAGS = \
diff --git a/ext/hls/Makefile.in b/ext/hls/Makefile.in
index 660d1da..a2278a9 100644
--- a/ext/hls/Makefile.in
+++ b/ext/hls/Makefile.in
@@ -351,6 +351,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -437,6 +439,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -728,6 +731,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfragmented.la
 libgstfragmented_la_SOURCES = \
 	m3u8.c					\
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index 3e21f59..466f665 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -44,6 +44,15 @@
 #include <gst/base/gsttypefindhelper.h>
 #include "gsthlsdemux.h"
 
+#define GST_ELEMENT_ERROR_FROM_ERROR(el, msg, err) G_STMT_START { \
+  gchar *__dbg = g_strdup_printf ("%s: %s", msg, err->message);         \
+  GST_WARNING_OBJECT (el, "error: %s", __dbg);                          \
+  gst_element_message_full (GST_ELEMENT(el), GST_MESSAGE_ERROR,         \
+    err->domain, err->code,                                             \
+    NULL, __dbg, __FILE__, GST_FUNCTION, __LINE__);                     \
+  g_clear_error (&err); \
+} G_STMT_END
+
 static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",
     GST_PAD_SRC,
     GST_PAD_SOMETIMES,
@@ -105,7 +114,7 @@
     gboolean update, GError ** err);
 static void gst_hls_demux_reset (GstHLSDemux * demux, gboolean dispose);
 static gboolean gst_hls_demux_set_location (GstHLSDemux * demux,
-    const gchar * uri);
+    const gchar * uri, const gchar * base_uri);
 static gchar *gst_hls_src_buf_to_utf8_playlist (GstBuffer * buf);
 
 static gboolean gst_hls_demux_change_playlist (GstHLSDemux * demux,
@@ -347,15 +356,25 @@
     case GST_MESSAGE_ERROR:{
       GError *err = NULL;
       gchar *debug = NULL;
+      gchar *new_error = NULL;
 
       gst_message_parse_error (msg, &err, &debug);
 
       GST_WARNING_OBJECT (demux, "Source posted error: %d:%d %s (%s)",
           err->domain, err->code, err->message, debug);
 
+      if (debug)
+        new_error = g_strdup_printf ("%s: %s\n", err->message, debug);
+      if (new_error) {
+        g_free (err->message);
+        err->message = new_error;
+      }
+
       /* error, but ask to retry */
       g_mutex_lock (&demux->fragment_download_lock);
       demux->last_ret = GST_FLOW_CUSTOM_ERROR;
+      g_clear_error (&demux->last_error);
+      demux->last_error = g_error_copy (err);
       g_cond_signal (&demux->fragment_download_cond);
       g_mutex_unlock (&demux->fragment_download_lock);
 
@@ -459,10 +478,8 @@
         gst_uri_downloader_reset (demux->downloader);
         if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
           g_rec_mutex_unlock (&demux->stream_lock);
-          gst_element_post_message (GST_ELEMENT_CAST (demux),
-              gst_message_new_error (GST_OBJECT_CAST (demux), err,
-                  "Could not switch playlist"));
-          g_clear_error (&err);
+          GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not switch playlist",
+              err);
           gst_event_unref (event);
           return FALSE;
         }
@@ -488,10 +505,8 @@
         if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
           g_rec_mutex_unlock (&demux->stream_lock);
 
-          gst_element_post_message (GST_ELEMENT_CAST (demux),
-              gst_message_new_error (GST_OBJECT_CAST (demux), err,
-                  "Could not switch playlist"));
-          g_clear_error (&err);
+          GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not switch playlist",
+              err);
           gst_event_unref (event);
           return FALSE;
         }
@@ -572,7 +587,6 @@
   GstHLSDemux *demux;
   GstQuery *query;
   gboolean ret;
-  gchar *uri;
 
   demux = GST_HLS_DEMUX (parent);
 
@@ -592,18 +606,19 @@
       ret = gst_pad_peer_query (demux->sinkpad, query);
       if (ret) {
         gboolean permanent;
+        gchar *uri, *redirect_uri;
 
-        gst_query_parse_uri_redirection (query, &uri);
+        gst_query_parse_uri (query, &uri);
+        gst_query_parse_uri_redirection (query, &redirect_uri);
         gst_query_parse_uri_redirection_permanent (query, &permanent);
 
-        /* Only use the redirect target for permanent redirects */
-        if (!permanent || uri == NULL) {
-          g_free (uri);
-          gst_query_parse_uri (query, &uri);
+        if (permanent && redirect_uri) {
+          gst_hls_demux_set_location (demux, redirect_uri, NULL);
+        } else {
+          gst_hls_demux_set_location (demux, uri, redirect_uri);
         }
-
-        gst_hls_demux_set_location (demux, uri);
         g_free (uri);
+        g_free (redirect_uri);
       }
       gst_query_unref (query);
 
@@ -790,7 +805,7 @@
     gsize available;
 
     /* restart the decrypting lib for a new fragment */
-    if (demux->starting_fragment) {
+    if (demux->reset_crypto) {
       GstFragment *key_fragment;
       GstBuffer *key_buffer;
       GstMapInfo key_info;
@@ -827,6 +842,8 @@
       gst_buffer_unmap (key_buffer, &key_info);
       gst_buffer_unref (key_buffer);
       g_object_unref (key_fragment);
+
+      demux->reset_crypto = FALSE;
     }
 
     gst_adapter_push (demux->adapter, buffer);
@@ -1210,10 +1227,8 @@
         GST_DEBUG_OBJECT (demux, "Retrying now");
         return;
       } else {
-        gst_element_post_message (GST_ELEMENT_CAST (demux),
-            gst_message_new_error (GST_OBJECT_CAST (demux), err,
-                "Could not fetch the next fragment"));
-        g_clear_error (&err);
+        GST_ELEMENT_ERROR_FROM_ERROR (demux,
+            "Could not fetch the next fragment", err);
         goto pause_task;
       }
     }
@@ -1291,7 +1306,7 @@
   }
 
   if (!dispose) {
-    demux->client = gst_m3u8_client_new ("");
+    demux->client = gst_m3u8_client_new ("", NULL);
   }
 
   gst_segment_init (&demux->segment, GST_FORMAT_TIME);
@@ -1311,6 +1326,8 @@
     gst_element_set_state (demux->src, GST_STATE_NULL);
   }
 
+  g_clear_error (&demux->last_error);
+
   if (demux->adapter)
     gst_adapter_clear (demux->adapter);
   if (demux->pending_buffer)
@@ -1324,12 +1341,14 @@
 }
 
 static gboolean
-gst_hls_demux_set_location (GstHLSDemux * demux, const gchar * uri)
+gst_hls_demux_set_location (GstHLSDemux * demux, const gchar * uri,
+    const gchar * base_uri)
 {
   if (demux->client)
     gst_m3u8_client_free (demux->client);
-  demux->client = gst_m3u8_client_new (uri);
-  GST_INFO_OBJECT (demux, "Changed location: %s", uri);
+  demux->client = gst_m3u8_client_new (uri, base_uri);
+  GST_INFO_OBJECT (demux, "Changed location: %s (base uri: %s)", uri,
+      GST_STR_NULL (base_uri));
   return TRUE;
 }
 
@@ -1364,10 +1383,8 @@
 
     gst_m3u8_client_set_current (demux->client, child);
     if (!gst_hls_demux_update_playlist (demux, FALSE, &err)) {
-      gst_element_post_message (GST_ELEMENT_CAST (demux),
-          gst_message_new_error (GST_OBJECT_CAST (demux), err,
-              "Could not fetch the child playlist"));
-      g_error_free (err);
+      GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not fetch the child playlist",
+          err);
       goto error;
     }
   }
@@ -1421,10 +1438,7 @@
             gst_util_uint64_scale (gst_m3u8_client_get_target_duration
             (demux->client), G_USEC_PER_SEC, 2 * GST_SECOND);
       } else {
-        gst_element_post_message (GST_ELEMENT_CAST (demux),
-            gst_message_new_error (GST_OBJECT_CAST (demux), err,
-                "Could not update the playlist"));
-        g_error_free (err);
+        GST_ELEMENT_ERROR_FROM_ERROR (demux, "Could not update playlist", err);
         goto error;
       }
     } else {
@@ -1488,16 +1502,78 @@
   GstFragment *download;
   GstBuffer *buf;
   gchar *playlist;
-  gboolean updated = FALSE;
+  gboolean main_checked = FALSE, updated = FALSE;
+  const gchar *uri;
 
-  const gchar *uri = gst_m3u8_client_get_current_uri (demux->client);
-
+retry:
+  uri = gst_m3u8_client_get_current_uri (demux->client);
   download =
       gst_uri_downloader_fetch_uri (demux->downloader, uri,
       demux->client->main ? demux->client->main->uri : NULL, TRUE, TRUE, TRUE,
       err);
-  if (download == NULL)
-    return FALSE;
+  if (download == NULL) {
+    if (update && !main_checked
+        && gst_m3u8_client_has_variant_playlist (demux->client)
+        && demux->client->main) {
+      GError *err2 = NULL;
+      GST_INFO_OBJECT (demux,
+          "Updating playlist %s failed, attempt to refresh variant playlist %s",
+          uri, demux->client->main->uri);
+      download =
+          gst_uri_downloader_fetch_uri (demux->downloader,
+          demux->client->main->uri, NULL, TRUE, TRUE, TRUE, &err2);
+      g_clear_error (&err2);
+      if (download != NULL) {
+        gchar *base_uri;
+
+        buf = gst_fragment_get_buffer (download);
+        playlist = gst_hls_src_buf_to_utf8_playlist (buf);
+
+        if (playlist == NULL) {
+          GST_WARNING_OBJECT (demux,
+              "Failed to validate variant playlist encoding");
+          return FALSE;
+        }
+
+        if (download->redirect_permanent && download->redirect_uri) {
+          uri = download->redirect_uri;
+          base_uri = NULL;
+        } else {
+          uri = download->uri;
+          base_uri = download->redirect_uri;
+        }
+
+        if (!gst_m3u8_client_update_variant_playlist (demux->client, playlist,
+                uri, base_uri)) {
+          GST_WARNING_OBJECT (demux, "Failed to update the variant playlist");
+          return FALSE;
+        }
+
+        g_object_unref (download);
+
+        g_clear_error (err);
+        main_checked = TRUE;
+        goto retry;
+      } else {
+        return FALSE;
+      }
+    } else {
+      return FALSE;
+    }
+  }
+
+  /* Set the base URI of the playlist to the redirect target if any */
+  GST_M3U8_CLIENT_LOCK (demux->client);
+  g_free (demux->client->current->uri);
+  g_free (demux->client->current->base_uri);
+  if (download->redirect_permanent && download->redirect_uri) {
+    demux->client->current->uri = g_strdup (download->redirect_uri);
+    demux->client->current->base_uri = NULL;
+  } else {
+    demux->client->current->uri = g_strdup (download->uri);
+    demux->client->current->base_uri = g_strdup (download->redirect_uri);
+  }
+  GST_M3U8_CLIENT_UNLOCK (demux->client);
 
   buf = gst_fragment_get_buffer (download);
   playlist = gst_hls_src_buf_to_utf8_playlist (buf);
@@ -1526,8 +1602,8 @@
 
     GST_M3U8_CLIENT_LOCK (demux->client);
     last_sequence =
-        GST_M3U8_MEDIA_FILE (g_list_last (demux->client->current->files)->
-        data)->sequence;
+        GST_M3U8_MEDIA_FILE (g_list_last (demux->client->current->
+            files)->data)->sequence;
 
     if (demux->client->sequence >= last_sequence - 3) {
       GST_DEBUG_OBJECT (demux, "Sequence is beyond playlist. Moving back to %u",
@@ -1628,8 +1704,8 @@
     gst_m3u8_client_set_current (demux->client, previous_variant->data);
     /*  Try a lower bitrate (or stop if we just tried the lowest) */
     if (GST_M3U8 (previous_variant->data)->iframe && new_bandwidth ==
-        GST_M3U8 (g_list_first (demux->client->main->iframe_lists)->
-            data)->bandwidth)
+        GST_M3U8 (g_list_first (demux->client->main->iframe_lists)->data)->
+        bandwidth)
       return FALSE;
     else if (!GST_M3U8 (previous_variant->data)->iframe && new_bandwidth ==
         GST_M3U8 (g_list_first (demux->client->main->lists)->data)->bandwidth)
@@ -1915,11 +1991,13 @@
   demux->current_timestamp = timestamp;
   demux->current_duration = duration;
   demux->starting_fragment = TRUE;
+  demux->reset_crypto = TRUE;
   demux->current_key = key;
   demux->current_iv = iv;
 
   /* Reset last flow return */
   demux->last_ret = GST_FLOW_OK;
+  g_clear_error (&demux->last_error);
 
   if (!gst_hls_demux_update_source (demux, next_fragment_uri,
           demux->client->main ? demux->client->main->uri : NULL,
@@ -1970,9 +2048,15 @@
 
   if (demux->last_ret != GST_FLOW_OK) {
     gst_element_set_state (demux->src, GST_STATE_NULL);
-    if (*err == NULL)
-      *err = g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
-          "Failed to download fragment");
+    if (*err == NULL) {
+      if (demux->last_error) {
+        *err = demux->last_error;
+        demux->last_error = NULL;
+      } else {
+        *err = g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_FAILED,
+            "Failed to download fragment");
+      }
+    }
   } else {
     gst_element_set_state (demux->src, GST_STATE_READY);
     if (demux->segment.rate > 0)
diff --git a/ext/hls/gsthlsdemux.h b/ext/hls/gsthlsdemux.h
index 988965c..76f6f84 100644
--- a/ext/hls/gsthlsdemux.h
+++ b/ext/hls/gsthlsdemux.h
@@ -121,10 +121,12 @@
   GstClockTime current_timestamp;
   GstClockTime current_duration;
   gboolean starting_fragment;
+  gboolean reset_crypto;
   gint64 download_start_time;
   gint64 download_total_time;
   gint64 download_total_bytes;
   GstFlowReturn last_ret;
+  GError *last_error;
 
   /* decryption tooling */
 #ifdef HAVE_NETTLE
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index 5c7fd17..d1b3ed4 100644
--- a/ext/hls/m3u8.c
+++ b/ext/hls/m3u8.c
@@ -30,6 +30,25 @@
 
 #define GST_CAT_DEFAULT fragmented_debug
 
+#if !GLIB_CHECK_VERSION (2, 33, 4)
+#define g_list_copy_deep gst_g_list_copy_deep
+static GList *
+gst_g_list_copy_deep (GList * list, GCopyFunc func, gpointer user_data)
+{
+  list = g_list_copy (list);
+
+  if (func != NULL) {
+    GList *l;
+
+    for (l = list; l != NULL; l = l->next) {
+      l->data = func (l->data, user_data);
+    }
+  }
+
+  return list;
+}
+#endif
+
 static GstM3U8 *gst_m3u8_new (void);
 static void gst_m3u8_free (GstM3U8 * m3u8);
 static gboolean gst_m3u8_update (GstM3U8 * m3u8, gchar * data,
@@ -50,13 +69,18 @@
 }
 
 static void
-gst_m3u8_set_uri (GstM3U8 * self, gchar * uri)
+gst_m3u8_set_uri (GstM3U8 * self, gchar * uri, gchar * base_uri, gchar * name)
 {
   g_return_if_fail (self != NULL);
 
-  if (self->uri)
-    g_free (self->uri);
+  g_free (self->uri);
   self->uri = uri;
+
+  g_free (self->base_uri);
+  self->base_uri = base_uri;
+
+  g_free (self->name);
+  self->name = name;
 }
 
 static void
@@ -65,8 +89,9 @@
   g_return_if_fail (self != NULL);
 
   g_free (self->uri);
+  g_free (self->base_uri);
+  g_free (self->name);
   g_free (self->codecs);
-  g_free (self->key);
 
   g_list_foreach (self->files, (GFunc) gst_m3u8_media_file_free, NULL);
   g_list_free (self->files);
@@ -106,6 +131,84 @@
   g_free (self);
 }
 
+static GstM3U8MediaFile *
+gst_m3u8_media_file_copy (const GstM3U8MediaFile * self, gpointer user_data)
+{
+  g_return_val_if_fail (self != NULL, NULL);
+
+  return gst_m3u8_media_file_new (g_strdup (self->uri), g_strdup (self->title),
+      self->duration, self->sequence);
+}
+
+static GstM3U8 *
+_m3u8_copy (const GstM3U8 * self, GstM3U8 * parent)
+{
+  GstM3U8 *dup;
+
+  g_return_val_if_fail (self != NULL, NULL);
+
+  dup = gst_m3u8_new ();
+  dup->uri = g_strdup (self->uri);
+  dup->base_uri = g_strdup (self->base_uri);
+  dup->name = g_strdup (self->name);
+  dup->endlist = self->endlist;
+  dup->version = self->version;
+  dup->targetduration = self->targetduration;
+  dup->allowcache = self->allowcache;
+  dup->bandwidth = self->bandwidth;
+  dup->program_id = self->program_id;
+  dup->codecs = g_strdup (self->codecs);
+  dup->width = self->width;
+  dup->height = self->height;
+  dup->iframe = self->iframe;
+  dup->files =
+      g_list_copy_deep (self->files, (GCopyFunc) gst_m3u8_media_file_copy,
+      NULL);
+
+  /* private */
+  dup->last_data = g_strdup (self->last_data);
+  dup->lists = g_list_copy_deep (self->lists, (GCopyFunc) _m3u8_copy, dup);
+  dup->iframe_lists =
+      g_list_copy_deep (self->iframe_lists, (GCopyFunc) _m3u8_copy, dup);
+  /* NOTE: current_variant will get set in gst_m3u8_copy () */
+  dup->parent = parent;
+  dup->mediasequence = self->mediasequence;
+  return dup;
+}
+
+static GstM3U8 *
+gst_m3u8_copy (const GstM3U8 * self)
+{
+  GList *entry;
+  guint n;
+
+  GstM3U8 *dup = _m3u8_copy (self, NULL);
+
+  if (self->current_variant != NULL) {
+    for (n = 0, entry = self->lists; entry; entry = entry->next, n++) {
+      if (entry == self->current_variant) {
+        dup->current_variant = g_list_nth (dup->lists, n);
+        break;
+      }
+    }
+
+    if (!dup->current_variant) {
+      for (n = 0, entry = self->iframe_lists; entry; entry = entry->next, n++) {
+        if (entry == self->current_variant) {
+          dup->current_variant = g_list_nth (dup->iframe_lists, n);
+          break;
+        }
+      }
+
+      if (!dup->current_variant) {
+        GST_ERROR ("Failed to determine current playlist");
+      }
+    }
+  }
+
+  return dup;
+}
+
 static gboolean
 int_from_string (gchar * ptr, gchar ** endptr, gint * val)
 {
@@ -238,6 +341,28 @@
   return TRUE;
 }
 
+static gchar *
+unquote_string (gchar * string)
+{
+  gchar *string_ret;
+
+  string_ret = strchr (string, '"');
+  if (string_ret != NULL) {
+    /* found initialization quotation mark of string */
+    string = string_ret + 1;
+    string_ret = strchr (string, '"');
+    if (string_ret != NULL) {
+      /* found finalizing quotation mark of string */
+      string_ret[0] = '\0';
+    } else {
+      GST_WARNING
+          ("wrong string unqouting - cannot find finalizing quotation mark");
+      return NULL;
+    }
+  }
+  return string;
+}
+
 static gint
 _m3u8_compare_uri (GstM3U8 * a, gchar * uri)
 {
@@ -264,6 +389,7 @@
   gchar *title, *end;
   gboolean discontinuity = FALSE;
   GstM3U8 *list;
+  gchar *current_key = NULL;
   gboolean have_iv = FALSE;
   guint8 iv[16] = { 0, };
   gint64 size = -1, offset = -1;
@@ -317,12 +443,13 @@
       *r = '\0';
 
     if (data[0] != '#' && data[0] != '\0') {
+      gchar *name = data;
       if (duration <= 0 && list == NULL) {
         GST_LOG ("%s: got line without EXTINF or EXTSTREAMINF, dropping", data);
         goto next_line;
       }
 
-      data = uri_join (self->uri, data);
+      data = uri_join (self->base_uri ? self->base_uri : self->uri, data);
       if (data == NULL)
         goto next_line;
 
@@ -333,7 +460,7 @@
           gst_m3u8_free (list);
           g_free (data);
         } else {
-          gst_m3u8_set_uri (list, data);
+          gst_m3u8_set_uri (list, data, NULL, g_strdup (name));
           self->lists = g_list_append (self->lists, list);
         }
         list = NULL;
@@ -344,13 +471,13 @@
             self->mediasequence++);
 
         /* set encryption params */
-        file->key = g_strdup (self->key);
+        file->key = current_key ? g_strdup (current_key) : NULL;
         if (file->key) {
           if (have_iv) {
             memcpy (file->iv, iv, sizeof (iv));
           } else {
             guint8 *iv = file->iv + 12;
-            GST_WRITE_UINT32_BE (iv + 12, file->sequence);
+            GST_WRITE_UINT32_BE (iv, file->sequence);
           }
         }
 
@@ -394,6 +521,7 @@
       GstM3U8 *new_list;
 
       new_list = gst_m3u8_new ();
+      new_list->parent = self;
       new_list->iframe = iframe;
       data = data + (iframe ? 26 : 18);
       while (data && parse_attributes (&data, &a, &v)) {
@@ -417,22 +545,27 @@
               GST_WARNING ("Error while reading RESOLUTION height");
           }
         } else if (iframe && g_str_equal (a, "URI")) {
+          gchar *name;
           gchar *uri = g_strdup (v);
           gchar *urip = uri;
-          int len = strlen (uri);
 
-          /* handle the \"uri\" case */
-          if (uri[len - 1] == '"')
-            uri[len - 1] = '\0';
-          if (uri[0] == '"')
-            uri += 1;
+          uri = unquote_string (uri);
+          if (uri) {
+            uri = uri_join (self->base_uri ? self->base_uri : self->uri, uri);
 
-          uri = uri_join (self->uri, uri);
+            uri = uri_join (self->base_uri ? self->base_uri : self->uri, uri);
+            if (uri == NULL) {
+              g_free (urip);
+              continue;
+            }
+            name = g_strdup (uri);
+
+            gst_m3u8_set_uri (new_list, uri, NULL, name);
+          } else {
+            GST_WARNING
+                ("Cannot remove quotation marks from i-frame-stream URI");
+          }
           g_free (urip);
-
-          if (uri == NULL)
-            continue;
-          gst_m3u8_set_uri (new_list, uri);
         }
       }
 
@@ -470,21 +603,21 @@
 
       /* IV and KEY are only valid until the next #EXT-X-KEY */
       have_iv = FALSE;
-      g_free (self->key);
-      self->key = NULL;
+      g_free (current_key);
+      current_key = NULL;
       while (data && parse_attributes (&data, &a, &v)) {
         if (g_str_equal (a, "URI")) {
           gchar *key = g_strdup (v);
           gchar *keyp = key;
-          int len = strlen (key);
 
-          /* handle the \"key\" case */
-          if (key[len - 1] == '"')
-            key[len - 1] = '\0';
-          if (key[0] == '"')
-            key += 1;
-
-          self->key = uri_join (self->uri, key);
+          key = unquote_string (key);
+          if (key) {
+            current_key =
+                uri_join (self->base_uri ? self->base_uri : self->uri, key);
+          } else {
+            GST_WARNING
+                ("Cannot remove quotation marks from decryption key URI");
+          }
           g_free (keyp);
         } else if (g_str_equal (a, "IV")) {
           gchar *ivp = v;
@@ -558,6 +691,9 @@
     data = g_utf8_next_char (end);      /* skip \n */
   }
 
+  g_free (current_key);
+  current_key = NULL;
+
   /* reorder playlists by bitrate */
   if (self->lists) {
     gchar *top_variant_uri = NULL;
@@ -591,7 +727,7 @@
 }
 
 GstM3U8Client *
-gst_m3u8_client_new (const gchar * uri)
+gst_m3u8_client_new (const gchar * uri, const gchar * base_uri)
 {
   GstM3U8Client *client;
 
@@ -604,7 +740,7 @@
   client->sequence_position = 0;
   client->update_failed_count = 0;
   g_mutex_init (&client->lock);
-  gst_m3u8_set_uri (client->main, g_strdup (uri));
+  gst_m3u8_set_uri (client->main, g_strdup (uri), g_strdup (base_uri), NULL);
 
   return client;
 }
@@ -679,6 +815,92 @@
   return ret;
 }
 
+static gint
+_find_m3u8_list_match (const GstM3U8 * a, const GstM3U8 * b)
+{
+  if (g_strcmp0 (a->name, b->name) == 0 &&
+      a->bandwidth == b->bandwidth &&
+      a->program_id == b->program_id &&
+      g_strcmp0 (a->codecs, b->codecs) == 0 &&
+      a->width == b->width &&
+      a->height == b->height && a->iframe == b->iframe) {
+    return 0;
+  }
+
+  return 1;
+}
+
+gboolean
+gst_m3u8_client_update_variant_playlist (GstM3U8Client * self, gchar * data,
+    const gchar * uri, const gchar * base_uri)
+{
+  gboolean ret = FALSE;
+  GList *list_entry, *unmatched_lists;
+  GstM3U8Client *new_client;
+  GstM3U8 *old;
+
+  g_return_val_if_fail (self != NULL, FALSE);
+
+  new_client = gst_m3u8_client_new (uri, base_uri);
+  if (gst_m3u8_client_update (new_client, data)) {
+    if (!new_client->main->lists) {
+      GST_ERROR
+          ("Cannot update variant playlist: New playlist is not a variant playlist");
+      gst_m3u8_client_free (new_client);
+      return FALSE;
+    }
+
+    GST_M3U8_CLIENT_LOCK (self);
+
+    if (!self->main->lists) {
+      GST_ERROR
+          ("Cannot update variant playlist: Current playlist is not a variant playlist");
+      goto out;
+    }
+
+    /* Now see if the variant playlist still has the same lists */
+    unmatched_lists = g_list_copy (self->main->lists);
+    for (list_entry = new_client->main->lists; list_entry;
+        list_entry = list_entry->next) {
+      GList *match = g_list_find_custom (unmatched_lists, list_entry->data,
+          (GCompareFunc) _find_m3u8_list_match);
+      if (match)
+        unmatched_lists = g_list_remove_link (unmatched_lists, match);
+    }
+
+    if (unmatched_lists != NULL) {
+      g_list_free (unmatched_lists);
+
+      /* We should attempt to handle the case where playlists are dropped/replaced,
+       * and possibly switch over to a comparable (not neccessarily identical)
+       * playlist.
+       */
+      GST_FIXME
+          ("Cannot update variant playlist, unable to match all playlists");
+      goto out;
+    }
+
+    /* Switch out the variant playlist */
+    old = self->main;
+
+    self->main = gst_m3u8_copy (new_client->main);
+    if (self->main->lists)
+      self->current = self->main->current_variant->data;
+    else
+      self->current = self->main;
+
+    gst_m3u8_free (old);
+
+    ret = TRUE;
+
+  out:
+    GST_M3U8_CLIENT_UNLOCK (self);
+  }
+
+  gst_m3u8_client_free (new_client);
+  return ret;
+}
+
 static gboolean
 _find_current (GstM3U8MediaFile * file, GstM3U8Client * client)
 {
diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h
index 096287a..2344b22 100644
--- a/ext/hls/m3u8.h
+++ b/ext/hls/m3u8.h
@@ -37,13 +37,16 @@
 
 struct _GstM3U8
 {
-  gchar *uri;
+  gchar *uri;                   /* actually downloaded URI */
+  gchar *base_uri;              /* URI to use as base for resolving relative URIs.
+                                 * This will be different to uri in case of redirects */
+  gchar *name;                  /* This will be the "name" of the playlist, the original
+                                 * relative/absolute uri in a variant playlist */
 
   gboolean endlist;             /* if ENDLIST has been reached */
   gint version;                 /* last EXT-X-VERSION */
   GstClockTime targetduration;  /* last EXT-X-TARGETDURATION */
   gboolean allowcache;          /* last EXT-X-ALLOWCACHE */
-  gchar *key;
 
   gint bandwidth;
   gint program_id;
@@ -85,9 +88,10 @@
 };
 
 
-GstM3U8Client *gst_m3u8_client_new (const gchar * uri);
+GstM3U8Client *gst_m3u8_client_new (const gchar * uri, const gchar * base_uri);
 void gst_m3u8_client_free (GstM3U8Client * client);
 gboolean gst_m3u8_client_update (GstM3U8Client * client, gchar * data);
+gboolean gst_m3u8_client_update_variant_playlist (GstM3U8Client * client, gchar * data, const gchar * uri, const gchar * base_uri);
 void gst_m3u8_client_set_current (GstM3U8Client * client, GstM3U8 * m3u8);
 gboolean gst_m3u8_client_get_next_fragment (GstM3U8Client * client,
     gboolean * discontinuity, const gchar ** uri, GstClockTime * duration,
diff --git a/ext/kate/Makefile.in b/ext/kate/Makefile.in
index ccf04da..5f7d5a1 100644
--- a/ext/kate/Makefile.in
+++ b/ext/kate/Makefile.in
@@ -350,6 +350,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -436,6 +438,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -727,6 +730,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstkate.la
 
 # sources used to compile this plug-in
diff --git a/ext/ladspa/Makefile.in b/ext/ladspa/Makefile.in
index 046164c..aacfedf 100644
--- a/ext/ladspa/Makefile.in
+++ b/ext/ladspa/Makefile.in
@@ -349,6 +349,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -435,6 +437,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -726,6 +729,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstladspa.la
 libgstladspa_la_SOURCES = \
 	gstladspautils.c \
diff --git a/ext/libmms/Makefile.in b/ext/libmms/Makefile.in
index d6cbd6a..2f98ebd 100644
--- a/ext/libmms/Makefile.in
+++ b/ext/libmms/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmms.la 
 libgstmms_la_SOURCES = gstmms.c
 libgstmms_la_CFLAGS = $(GST_CFLAGS) $(LIBMMS_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
diff --git a/ext/libvisual/Makefile.in b/ext/libvisual/Makefile.in
index ce7121e..c34c4c0 100644
--- a/ext/libvisual/Makefile.in
+++ b/ext/libvisual/Makefile.in
@@ -343,6 +343,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -429,6 +431,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -720,6 +723,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstlibvisualgl.la
 libgstlibvisualgl_la_SOURCES = visual-gl.c
 libgstlibvisualgl_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(LIBVISUAL_CFLAGS) \
diff --git a/ext/lv2/Makefile.in b/ext/lv2/Makefile.in
index a7600f9..dc90d97 100644
--- a/ext/lv2/Makefile.in
+++ b/ext/lv2/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstlv2.la
 libgstlv2_la_SOURCES = gstlv2.c
 libgstlv2_la_CFLAGS = \
diff --git a/ext/mimic/Makefile.in b/ext/mimic/Makefile.in
index c658cb2..492210a 100644
--- a/ext/mimic/Makefile.in
+++ b/ext/mimic/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmimic.la
 libgstmimic_la_SOURCES = gstmimic.c gstmimdec.c gstmimenc.c
 libgstmimic_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(MIMIC_CFLAGS)
diff --git a/ext/modplug/Makefile.in b/ext/modplug/Makefile.in
index bda2181..8f3b7ca 100644
--- a/ext/modplug/Makefile.in
+++ b/ext/modplug/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmodplug.la
 libgstmodplug_la_SOURCES = gstmodplug.cc
 libgstmodplug_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MODPLUG_CFLAGS)
diff --git a/ext/mpeg2enc/Makefile.in b/ext/mpeg2enc/Makefile.in
index cf49d20..b63c44c 100644
--- a/ext/mpeg2enc/Makefile.in
+++ b/ext/mpeg2enc/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpeg2enc.la
 libgstmpeg2enc_la_SOURCES = \
 	gstmpeg2enc.cc \
diff --git a/ext/mpeg2enc/gstmpeg2encoptions.cc b/ext/mpeg2enc/gstmpeg2encoptions.cc
index ae4a738..b27a70f 100644
--- a/ext/mpeg2enc/gstmpeg2encoptions.cc
+++ b/ext/mpeg2enc/gstmpeg2encoptions.cc
@@ -335,7 +335,7 @@
   /* general encoding stream options */
   g_object_class_install_property (klass, ARG_BITRATE,
       g_param_spec_int ("bitrate", "Bitrate", "Compressed video bitrate (kbps)",
-          0, 10 * 1000, DEFAULT_BITRATE,
+          0, 40 * 1000, DEFAULT_BITRATE,
           (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
   g_object_class_install_property (klass, ARG_NONVIDEO_BITRATE,
       g_param_spec_int ("non-video-bitrate", "Non-video bitrate",
diff --git a/ext/mpg123/Makefile.in b/ext/mpg123/Makefile.in
index d326250..e7f019f 100644
--- a/ext/mpg123/Makefile.in
+++ b/ext/mpg123/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpg123.la
 libgstmpg123_la_SOURCES = gstmpg123audiodec.c
 libgstmpg123_la_CFLAGS = -DGST_USE_UNSTABLE_API \
diff --git a/ext/mplex/Makefile.in b/ext/mplex/Makefile.in
index 3d0f426..7e567f1 100644
--- a/ext/mplex/Makefile.in
+++ b/ext/mplex/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmplex.la
 libgstmplex_la_SOURCES = \
 	gstmplex.cc \
diff --git a/ext/musepack/Makefile.in b/ext/musepack/Makefile.in
index 8b03a56..80857d5 100644
--- a/ext/musepack/Makefile.in
+++ b/ext/musepack/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmusepack.la
 libgstmusepack_la_SOURCES = \
 	gstmusepackdec.c \
diff --git a/ext/mythtv/Makefile.in b/ext/mythtv/Makefile.in
index 8e8078f..d812f83 100644
--- a/ext/mythtv/Makefile.in
+++ b/ext/mythtv/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmythtvsrc.la
 libgstmythtvsrc_la_SOURCES = \
 		gstmythtvsrc.c
diff --git a/ext/nas/Makefile.in b/ext/nas/Makefile.in
index 17e5f7d..524d50e 100644
--- a/ext/nas/Makefile.in
+++ b/ext/nas/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstnassink.la
 libgstnassink_la_SOURCES = nassink.c
 libgstnassink_la_CFLAGS = \
diff --git a/ext/neon/Makefile.in b/ext/neon/Makefile.in
index 4c47f79..0997ef0 100644
--- a/ext/neon/Makefile.in
+++ b/ext/neon/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstneonhttpsrc.la
 libgstneonhttpsrc_la_SOURCES = gstneonhttpsrc.c
 libgstneonhttpsrc_la_CFLAGS = $(GST_CFLAGS) $(NEON_CFLAGS) 
diff --git a/ext/ofa/Makefile.in b/ext/ofa/Makefile.in
index 3625750..19b5fc0 100644
--- a/ext/ofa/Makefile.in
+++ b/ext/ofa/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstofa.la
 libgstofa_la_SOURCES = gstofa.c
 libgstofa_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
diff --git a/ext/openal/Makefile.in b/ext/openal/Makefile.in
index 799f1f6..b8337b1 100644
--- a/ext/openal/Makefile.in
+++ b/ext/openal/Makefile.in
@@ -349,6 +349,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -435,6 +437,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -726,6 +729,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopenal.la
 
 # sources used to compile this plug-in
diff --git a/ext/opencv/Makefile.in b/ext/opencv/Makefile.in
index 86aa7b0..15483ff 100644
--- a/ext/opencv/Makefile.in
+++ b/ext/opencv/Makefile.in
@@ -385,6 +385,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -471,6 +473,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -762,6 +765,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopencv.la
 
 # sources used to compile this plug-in
diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp
index 0b62ab1..749c96e 100644
--- a/ext/opencv/MotionCells.cpp
+++ b/ext/opencv/MotionCells.cpp
@@ -146,7 +146,8 @@
       : p_framerate <= 10 ? sumframecnt = 2
       : p_framerate <= 15 ? sumframecnt = 3
       : p_framerate <= 20 ? sumframecnt = 4
-      : p_framerate <= 25 ? sumframecnt = 5 : sumframecnt = 0 : sumframecnt = 0;
+      : p_framerate <= 25 ? sumframecnt = 5
+      : p_framerate <= 30 ? sumframecnt = 6 : sumframecnt = 0 : sumframecnt = 0;
 
   m_framecnt++;
   m_changed_datafile = p_changed_datafile;
@@ -199,7 +200,6 @@
     if (motionmaskcells_count > 0)
       performMotionMask (motionmaskcellsidx, motionmaskcells_count);
     if (getIsNonZero (m_pbwImage)) {    //detect Motion
-      GST_DEBUG ("DETECT MOTION \n");
       if (m_MotionCells.size () > 0)    //it contains previous motioncells what we used when frames dropped
         m_MotionCells.clear ();
       if (transparencyimg)
diff --git a/ext/opencv/gstmotioncells.c b/ext/opencv/gstmotioncells.c
index d5e037e..0a3c0c2 100644
--- a/ext/opencv/gstmotioncells.c
+++ b/ext/opencv/gstmotioncells.c
@@ -376,19 +376,19 @@
   filter->diff_timestamp = -1;
   gettimeofday (&filter->tv, NULL);
   filter->starttime = 1000 * filter->tv.tv_sec;
-  filter->previous_motion = false;
-  filter->changed_datafile = false;
-  filter->postallmotion = false;
-  filter->usealpha = true;
-  filter->firstdatafile = false;
-  filter->firstgridx = true;
-  filter->firstgridy = true;
-  filter->changed_gridx = false;
-  filter->changed_gridy = false;
-  filter->firstframe = true;
-  filter->changed_startime = false;
-  filter->sent_init_error_msg = false;
-  filter->sent_save_error_msg = false;
+  filter->previous_motion = FALSE;
+  filter->changed_datafile = FALSE;
+  filter->postallmotion = FALSE;
+  filter->usealpha = TRUE;
+  filter->firstdatafile = FALSE;
+  filter->firstgridx = TRUE;
+  filter->firstgridy = TRUE;
+  filter->changed_gridx = FALSE;
+  filter->changed_gridy = FALSE;
+  filter->firstframe = TRUE;
+  filter->changed_startime = FALSE;
+  filter->sent_init_error_msg = FALSE;
+  filter->sent_save_error_msg = FALSE;
   filter->thickness = THICKNESS_DEF;
 
   filter->datafileidx = 0;
@@ -417,14 +417,14 @@
     case PROP_GRID_X:
       filter->gridx = g_value_get_int (value);
       if (filter->prevgridx != filter->gridx && !filter->firstframe) {
-        filter->changed_gridx = true;
+        filter->changed_gridx = TRUE;
       }
       filter->prevgridx = filter->gridx;
       break;
     case PROP_GRID_Y:
       filter->gridy = g_value_get_int (value);
       if (filter->prevgridy != filter->gridy && !filter->firstframe) {
-        filter->changed_gridy = true;
+        filter->changed_gridy = TRUE;
       }
       filter->prevgridy = filter->gridy;
       break;
@@ -457,7 +457,7 @@
       break;
     case PROP_DATE:
       if (!filter->firstframe) {
-        filter->changed_startime = true;
+        filter->changed_startime = TRUE;
       }
       filter->starttime = g_value_get_long (value);
       break;
@@ -966,7 +966,7 @@
           motioncellscolor, motioncells_count, motioncellsidx, starttime,
           datafile, changed_datafile, thickness, filter->id);
 
-      if ((success == 1) && (filter->sent_init_error_msg == false)) {
+      if ((success == 1) && (filter->sent_init_error_msg == FALSE)) {
         char *initfailedreason;
         int initerrorcode;
         GstStructure *s;
@@ -979,7 +979,7 @@
         gst_element_post_message (GST_ELEMENT (filter), m);
         filter->sent_init_error_msg = TRUE;
       }
-      if ((success == -1) && (filter->sent_save_error_msg == false)) {
+      if ((success == -1) && (filter->sent_save_error_msg == FALSE)) {
         char *savefailedreason;
         int saveerrorcode;
         GstStructure *s;
@@ -992,7 +992,8 @@
         gst_element_post_message (GST_ELEMENT (filter), m);
         filter->sent_save_error_msg = TRUE;
       }
-      if (success == -2) {      //frame dropped
+      if (success == -2) {
+        GST_LOG_OBJECT (filter, "frame dropped");
         gst_buffer_unmap (buf, &info);
         filter->prev_buff_timestamp = filter->cur_buff_timestamp;
         //free
@@ -1019,11 +1020,12 @@
         detectedmotioncells = getMotionCellsIdx (filter->id);
         if (detectedmotioncells) {
           filter->consecutive_motion++;
-          if ((filter->previous_motion == false)
+          if ((filter->previous_motion == FALSE)
               && (filter->consecutive_motion >= minimum_motion_frames)) {
             GstStructure *s;
             GstMessage *m;
-            filter->previous_motion = true;
+            GST_DEBUG_OBJECT (filter, "motion started, post msg on the bus");
+            filter->previous_motion = TRUE;
             filter->motion_begin_timestamp = GST_BUFFER_TIMESTAMP (buf);
             s = gst_structure_new ("motion", "motion_cells_indices",
                 G_TYPE_STRING, detectedmotioncells, "motion_begin",
@@ -1033,6 +1035,7 @@
           } else if (filter->postallmotion) {
             GstStructure *s;
             GstMessage *m;
+            GST_DEBUG_OBJECT (filter, "motion, post msg on the bus");
             filter->motion_timestamp = GST_BUFFER_TIMESTAMP (buf);
             s = gst_structure_new ("motion", "motion_cells_indices",
                 G_TYPE_STRING, detectedmotioncells, "motion", G_TYPE_UINT64,
@@ -1054,11 +1057,11 @@
                         filter->last_motion_timestamp) / 1000000000l) >=
                 filter->gap)
             && (filter->last_motion_timestamp > 0)) {
-          GST_DEBUG ("POST MOTION FINISHED MSG\n");
           if (filter->previous_motion) {
             GstStructure *s;
             GstMessage *m;
-            filter->previous_motion = false;
+            GST_DEBUG_OBJECT (filter, "motion finished, post msg on the bus");
+            filter->previous_motion = FALSE;
             s = gst_structure_new ("motion", "motion_finished", G_TYPE_UINT64,
                 filter->last_motion_timestamp, NULL);
             m = gst_message_new_element (GST_OBJECT (filter), s);
@@ -1071,7 +1074,7 @@
         if ((last_buf_timestamp -
                 (filter->last_motion_timestamp / 1000000000l)) >=
             filter->postnomotion) {
-          GST_DEBUG ("POST NO MOTION MSG\n");
+          GST_DEBUG_OBJECT (filter, "post no motion msg on the bus");
           if ((last_buf_timestamp -
                   (filter->last_nomotion_notified / 1000000000l)) >=
               filter->postnomotion) {
diff --git a/ext/opencv/motioncells_wrapper.cpp b/ext/opencv/motioncells_wrapper.cpp
index 9452216..dc52443 100644
--- a/ext/opencv/motioncells_wrapper.cpp
+++ b/ext/opencv/motioncells_wrapper.cpp
@@ -54,7 +54,7 @@
 #include "motioncells_wrapper.h"
 
 static int instanceCounter = 0;
-static gboolean element_id_was_max = false;
+static bool element_id_was_max = false;
 
 MotionCells *mc;
 char p_str[] = "idx failed";
diff --git a/ext/openexr/Makefile.in b/ext/openexr/Makefile.in
index d762c85..4b018c7 100644
--- a/ext/openexr/Makefile.in
+++ b/ext/openexr/Makefile.in
@@ -364,6 +364,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -450,6 +452,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -741,6 +744,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopenexr.la
 libgstopenexr_la_SOURCES = gstopenexrdec.cpp gstopenexr.c
 libgstopenexr_la_CFLAGS = \
diff --git a/ext/openjpeg/Makefile.in b/ext/openjpeg/Makefile.in
index 84fa98b..ce64543 100644
--- a/ext/openjpeg/Makefile.in
+++ b/ext/openjpeg/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopenjpeg.la
 libgstopenjpeg_la_SOURCES = gstopenjpegdec.c gstopenjpegenc.c gstopenjpeg.c
 libgstopenjpeg_la_CFLAGS = \
diff --git a/ext/openni2/Makefile.in b/ext/openni2/Makefile.in
index 27ecd57..e4fbb20 100644
--- a/ext/openni2/Makefile.in
+++ b/ext/openni2/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopenni2.la
 
 # sources used to compile this plug-in
diff --git a/ext/opus/Makefile.in b/ext/opus/Makefile.in
index 5ed734b..673a3c7 100644
--- a/ext/opus/Makefile.in
+++ b/ext/opus/Makefile.in
@@ -349,6 +349,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -435,6 +437,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -726,6 +729,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopus.la
 libgstopus_la_SOURCES = gstopus.c gstopusdec.c gstopusenc.c gstopusparse.c gstopusheader.c gstopuscommon.c gstrtpopuspay.c gstrtpopusdepay.c
 libgstopus_la_CFLAGS = \
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index 02190f9..195d88f 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -786,15 +786,24 @@
 {
   guint8 *bdata = NULL, *data, *mdata = NULL;
   gsize bsize, size;
-  gsize bytes = enc->frame_samples * enc->n_channels * 2;
+  gsize bytes;
   gint ret = GST_FLOW_OK;
   GstMapInfo map;
   GstMapInfo omap;
   gint outsize;
   GstBuffer *outbuf;
 
+  guint max_payload_size;
+  gint frame_samples;
+
   g_mutex_lock (&enc->property_lock);
 
+  bytes = enc->frame_samples * enc->n_channels * 2;
+  max_payload_size = enc->max_payload_size;
+  frame_samples = enc->frame_samples;
+
+  g_mutex_unlock (&enc->property_lock);
+
   if (G_LIKELY (buf)) {
     gst_buffer_map (buf, &map, GST_MAP_READ);
     bdata = map.data;
@@ -818,21 +827,21 @@
 
   g_assert (size == bytes);
 
-  outbuf = gst_buffer_new_and_alloc (enc->max_payload_size * enc->n_channels);
+  outbuf = gst_buffer_new_and_alloc (max_payload_size * enc->n_channels);
   if (!outbuf)
     goto done;
 
   GST_DEBUG_OBJECT (enc, "encoding %d samples (%d bytes)",
-      enc->frame_samples, (int) bytes);
+      frame_samples, (int) bytes);
 
   gst_buffer_map (outbuf, &omap, GST_MAP_WRITE);
 
   GST_DEBUG_OBJECT (enc, "encoding %d samples (%d bytes)",
-      enc->frame_samples, (int) bytes);
+      frame_samples, (int) bytes);
 
   outsize =
       opus_multistream_encode (enc->state, (const gint16 *) data,
-      enc->frame_samples, omap.data, enc->max_payload_size * enc->n_channels);
+      frame_samples, omap.data, max_payload_size * enc->n_channels);
 
   gst_buffer_unmap (outbuf, &omap);
 
@@ -840,10 +849,10 @@
     GST_ERROR_OBJECT (enc, "Encoding failed: %d", outsize);
     ret = GST_FLOW_ERROR;
     goto done;
-  } else if (outsize > enc->max_payload_size) {
+  } else if (outsize > max_payload_size) {
     GST_WARNING_OBJECT (enc,
         "Encoded size %d is higher than max payload size (%d bytes)",
-        outsize, enc->max_payload_size);
+        outsize, max_payload_size);
     ret = GST_FLOW_ERROR;
     goto done;
   }
@@ -853,13 +862,12 @@
 
   ret =
       gst_audio_encoder_finish_frame (GST_AUDIO_ENCODER (enc), outbuf,
-      enc->frame_samples);
+      frame_samples);
 
 done:
 
   if (bdata)
     gst_buffer_unmap (buf, &map);
-  g_mutex_unlock (&enc->property_lock);
 
   if (mdata)
     g_free (mdata);
diff --git a/ext/resindvd/Makefile.in b/ext/resindvd/Makefile.in
index e652566..90f58b0 100644
--- a/ext/resindvd/Makefile.in
+++ b/ext/resindvd/Makefile.in
@@ -354,6 +354,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -440,6 +442,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -731,6 +734,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstresindvd.la
 libgstresindvd_la_SOURCES = \
         plugin.c \
diff --git a/ext/rsvg/Makefile.in b/ext/rsvg/Makefile.in
index b06eefc..eacc183 100644
--- a/ext/rsvg/Makefile.in
+++ b/ext/rsvg/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstrsvg.la
 libgstrsvg_la_SOURCES = gstrsvg.c gstrsvgdec.c gstrsvgoverlay.c
 libgstrsvg_la_CFLAGS = \
diff --git a/ext/rtmp/Makefile.in b/ext/rtmp/Makefile.in
index b60874d..525d1e2 100644
--- a/ext/rtmp/Makefile.in
+++ b/ext/rtmp/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstrtmp.la
 libgstrtmp_la_SOURCES = gstrtmpsrc.c gstrtmpsink.c gstrtmp.c
 noinst_HEADERS = gstrtmpsrc.h gstrtmpsink.h
diff --git a/ext/rtmp/gstrtmp.c b/ext/rtmp/gstrtmp.c
index 2b9dfbe..76173f3 100644
--- a/ext/rtmp/gstrtmp.c
+++ b/ext/rtmp/gstrtmp.c
@@ -34,11 +34,61 @@
 #include "gstrtmpsrc.h"
 #include "gstrtmpsink.h"
 
+#ifndef GST_DISABLE_GST_DEBUG
+GST_DEBUG_CATEGORY_STATIC (rtmp_debug);
+
+static void
+gst_rtmp_log_callback (int level, const gchar * fmt, va_list vl)
+{
+  GstDebugLevel gst_level;
+
+  switch (level) {
+    case RTMP_LOGCRIT:
+    case RTMP_LOGERROR:
+      gst_level = GST_LEVEL_ERROR;
+      break;
+    case RTMP_LOGWARNING:
+      gst_level = GST_LEVEL_WARNING;
+      break;
+    case RTMP_LOGDEBUG:
+      gst_level = GST_LEVEL_DEBUG;
+      break;
+    default:
+      gst_level = GST_LEVEL_INFO;
+      break;
+  }
+
+  gst_debug_log_valist (rtmp_debug, gst_level, "", "", 0, NULL, fmt, vl);
+}
+
+static void
+_set_debug_level (void)
+{
+  GstDebugLevel gst_level;
+
+  RTMP_LogSetCallback (gst_rtmp_log_callback);
+  gst_level = gst_debug_category_get_threshold (rtmp_debug);
+  if (gst_level >= GST_LEVEL_LOG)
+    RTMP_LogSetLevel (RTMP_LOGALL);
+  else if (gst_level >= GST_LEVEL_DEBUG)
+    RTMP_LogSetLevel (RTMP_LOGDEBUG);
+  else if (gst_level >= GST_LEVEL_INFO)
+    RTMP_LogSetLevel (RTMP_LOGINFO);
+  else if (gst_level >= GST_LEVEL_WARNING)
+    RTMP_LogSetLevel (RTMP_LOGWARNING);
+}
+#endif
+
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
   gboolean ret;
 
+#ifndef GST_DISABLE_GST_DEBUG
+  GST_DEBUG_CATEGORY_INIT (rtmp_debug, "rtmp", 0, "libRTMP logging");
+  _set_debug_level ();
+#endif
+
   ret = gst_element_register (plugin, "rtmpsrc", GST_RANK_PRIMARY,
       GST_TYPE_RTMP_SRC);
   ret &= gst_element_register (plugin, "rtmpsink", GST_RANK_PRIMARY,
diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c
index b6c4048..f178146 100644
--- a/ext/rtmp/gstrtmpsrc.c
+++ b/ext/rtmp/gstrtmpsrc.c
@@ -416,7 +416,7 @@
 
       gst_query_parse_position (query, &format, NULL);
       if (format == GST_FORMAT_TIME) {
-        gst_query_set_duration (query, format, src->last_timestamp);
+        gst_query_set_position (query, format, src->last_timestamp);
         ret = TRUE;
       }
       break;
diff --git a/ext/sbc/Makefile.in b/ext/sbc/Makefile.in
index 949acfa..f56095c 100644
--- a/ext/sbc/Makefile.in
+++ b/ext/sbc/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsbc.la
 noinst_HEADERS = \
 	gstsbcdec.h \
diff --git a/ext/schroedinger/Makefile.in b/ext/schroedinger/Makefile.in
index 5c6a1bf..58a878c 100644
--- a/ext/schroedinger/Makefile.in
+++ b/ext/schroedinger/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstschro.la
 noinst_HEADERS = \
 	gstschroutils.h
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c
index a584740..cb755c2 100644
--- a/ext/schroedinger/gstschroenc.c
+++ b/ext/schroedinger/gstschroenc.c
@@ -400,6 +400,15 @@
   schro_enc->video_format->frame_rate_numerator = GST_VIDEO_INFO_FPS_N (info);
   schro_enc->video_format->frame_rate_denominator = GST_VIDEO_INFO_FPS_D (info);
 
+  /* Seems that schroenc doesn't like unknown framerates, so let's pick
+   * the random value 30 FPS if the framerate is unknown.
+   */
+  if (schro_enc->video_format->frame_rate_denominator == 0 ||
+      schro_enc->video_format->frame_rate_numerator == 0) {
+    schro_enc->video_format->frame_rate_numerator = 30;
+    schro_enc->video_format->frame_rate_denominator = 1;
+  }
+
   schro_enc->video_format->width = GST_VIDEO_INFO_WIDTH (info);
   schro_enc->video_format->height = GST_VIDEO_INFO_HEIGHT (info);
   schro_enc->video_format->clean_width = GST_VIDEO_INFO_WIDTH (info);
@@ -448,9 +457,9 @@
 
   /* Finally set latency */
   latency = gst_util_uint64_scale (GST_SECOND,
-      GST_VIDEO_INFO_FPS_D (info) *
+      schro_enc->video_format->frame_rate_denominator *
       (int) schro_encoder_setting_get_double (schro_enc->encoder,
-          "queue_depth"), GST_VIDEO_INFO_FPS_N (info));
+          "queue_depth"), schro_enc->video_format->frame_rate_numerator);
   gst_video_encoder_set_latency (base_video_encoder, latency, latency);
 
   schro_video_format_set_std_colour_spec (schro_enc->video_format,
diff --git a/ext/sdl/Makefile.in b/ext/sdl/Makefile.in
index d0472f9..f31b26c 100644
--- a/ext/sdl/Makefile.in
+++ b/ext/sdl/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsdl.la 
 libgstsdl_la_SOURCES = \
 	gstsdl.c \
diff --git a/ext/smoothstreaming/Makefile.in b/ext/smoothstreaming/Makefile.in
index 4875022..44464cb 100644
--- a/ext/smoothstreaming/Makefile.in
+++ b/ext/smoothstreaming/Makefile.in
@@ -350,6 +350,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -436,6 +438,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -727,6 +730,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsmoothstreaming.la
 libgstsmoothstreaming_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
     $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
index 14954f0..d76654e 100644
--- a/ext/smoothstreaming/gstmssdemux.c
+++ b/ext/smoothstreaming/gstmssdemux.c
@@ -915,7 +915,6 @@
 gst_mss_demux_process_manifest (GstMssDemux * mssdemux)
 {
   GstQuery *query;
-  gchar *uri = NULL;
   gboolean ret;
   GSList *iter;
 
@@ -925,15 +924,24 @@
   query = gst_query_new_uri ();
   ret = gst_pad_peer_query (mssdemux->sinkpad, query);
   if (ret) {
+    gchar *uri, *redirect_uri;
+    gboolean permanent;
     gchar *baseurl_end;
-    gst_query_parse_uri (query, &uri);
-    GST_INFO_OBJECT (mssdemux, "Upstream is using URI: %s", uri);
 
-    mssdemux->manifest_uri = g_strdup (uri);
-    baseurl_end = g_strrstr (uri, "/Manifest");
+    gst_query_parse_uri (query, &uri);
+    gst_query_parse_uri_redirection (query, &redirect_uri);
+    gst_query_parse_uri_redirection_permanent (query, &permanent);
+
+    GST_INFO_OBJECT (mssdemux, "Upstream is using URI: %s (redirect: %s)", uri,
+        GST_STR_NULL (redirect_uri));
+
+    mssdemux->manifest_uri = g_strdup ((permanent
+            && redirect_uri) ? redirect_uri : uri);
+    mssdemux->base_url = g_strdup (redirect_uri ? redirect_uri : uri);
+    baseurl_end = g_strrstr (mssdemux->base_url, "/Manifest");
     if (baseurl_end == NULL) {
       /* second try */
-      baseurl_end = g_strrstr (uri, "/manifest");
+      baseurl_end = g_strrstr (mssdemux->base_url, "/manifest");
     }
 
     if (baseurl_end) {
@@ -943,7 +951,8 @@
       GST_WARNING_OBJECT (mssdemux, "Stream's URI didn't end with /manifest");
     }
 
-    mssdemux->base_url = uri;
+    g_free (uri);
+    g_free (redirect_uri);
   }
   gst_query_unref (query);
 
@@ -998,12 +1007,35 @@
   GstUriDownloader *downloader;
   GstFragment *manifest_data;
   GstBuffer *manifest_buffer;
+  gchar *baseurl_end;
 
   downloader = gst_uri_downloader_new ();
 
   manifest_data =
       gst_uri_downloader_fetch_uri (downloader, mssdemux->manifest_uri, NULL,
       TRUE, TRUE, TRUE, NULL);
+
+  g_free (mssdemux->manifest_uri);
+  g_free (mssdemux->base_url);
+  mssdemux->manifest_uri = g_strdup ((manifest_data->redirect_permanent
+          && manifest_data->
+          redirect_uri) ? manifest_data->redirect_uri : manifest_data->uri);
+  mssdemux->base_url =
+      g_strdup (manifest_data->
+      redirect_uri ? manifest_data->redirect_uri : manifest_data->uri);
+  baseurl_end = g_strrstr (mssdemux->base_url, "/Manifest");
+  if (baseurl_end == NULL) {
+    /* second try */
+    baseurl_end = g_strrstr (mssdemux->base_url, "/manifest");
+  }
+
+  if (baseurl_end) {
+    /* set the new end of the string */
+    baseurl_end[0] = '\0';
+  } else {
+    GST_WARNING_OBJECT (mssdemux, "Stream's URI didn't end with /manifest");
+  }
+
   manifest_buffer = gst_fragment_get_buffer (manifest_data);
   g_object_unref (manifest_data);
 
diff --git a/ext/sndfile/Makefile.in b/ext/sndfile/Makefile.in
index e8fb9e5..4ef2c9c 100644
--- a/ext/sndfile/Makefile.in
+++ b/ext/sndfile/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsndfile.la
 libgstsndfile_la_SOURCES = gstsf.c gstsfdec.c
 libgstsndfile_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SNDFILE_CFLAGS)
diff --git a/ext/sndio/Makefile.in b/ext/sndio/Makefile.in
index be47f4b..d417f3e 100644
--- a/ext/sndio/Makefile.in
+++ b/ext/sndio/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsndio.la
 libgstsndio_la_SOURCES = gstsndio.c sndiosink.c sndiosrc.c 
 libgstsndio_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/ext/soundtouch/Makefile.in b/ext/soundtouch/Makefile.in
index f5842dd..621fd03 100644
--- a/ext/soundtouch/Makefile.in
+++ b/ext/soundtouch/Makefile.in
@@ -365,6 +365,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -451,6 +453,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -742,6 +745,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsoundtouch.la
 libgstsoundtouch_la_SOURCES = \
 	plugin.c \
diff --git a/ext/spandsp/Makefile.in b/ext/spandsp/Makefile.in
index dc4d851..4b5d5f7 100644
--- a/ext/spandsp/Makefile.in
+++ b/ext/spandsp/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstspandsp.la
 libgstspandsp_la_SOURCES = gstspandsp.c gstspanplc.c gstdtmfdetect.c
 libgstspandsp_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(SPANDSP_CFLAGS)
diff --git a/ext/spc/Makefile.in b/ext/spc/Makefile.in
index 831c799..0fb1016 100644
--- a/ext/spc/Makefile.in
+++ b/ext/spc/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstspc.la
 libgstspc_la_SOURCES = gstspc.c tag.c
 libgstspc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(SPC_CFLAGS)
diff --git a/ext/srtp/Makefile.in b/ext/srtp/Makefile.in
index a7446c9..b4ca809 100644
--- a/ext/srtp/Makefile.in
+++ b/ext/srtp/Makefile.in
@@ -355,6 +355,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -441,6 +443,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -732,6 +735,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsrtp.la
 libgstsrtp_la_SOURCES = \
 	gstsrtp.c 	\
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index b82a0a6..5d42f44 100644
--- a/ext/srtp/gstsrtpdec.c
+++ b/ext/srtp/gstsrtpdec.c
@@ -88,6 +88,13 @@
  * subsequent packet is dropped, until a new key is set and the stream
  * has been updated.
  *
+ * If a stream is to be shared between multiple clients the SRTP
+ * rollover counter for a given SSRC must be set in the caps "roc" field
+ * when the request-key signal is emitted by the decoder. The rollover
+ * counters should have been transmitted by a signaling protocol by some
+ * other means. If no rollover counter is provided by the user, 0 is
+ * used by default.
+ *
  * <refsect2>
  * <title>Example pipelines</title>
  * |[
@@ -114,6 +121,8 @@
 
 #include "gstsrtpdec.h"
 
+#include <srtp/srtp_priv.h>
+
 GST_DEBUG_CATEGORY_STATIC (gst_srtp_dec_debug);
 #define GST_CAT_DEFAULT gst_srtp_dec_debug
 
@@ -203,6 +212,7 @@
 {
   guint32 ssrc;
 
+  guint32 roc;
   GstBuffer *key;
   GstSrtpCipherType rtp_cipher;
   GstSrtpAuthType rtp_auth;
@@ -216,6 +226,7 @@
       stream->rtp_auth != GST_SRTP_AUTH_NULL ||         \
       stream->rtcp_auth != GST_SRTP_AUTH_NULL)
 
+
 /* initialize the srtpdec's class */
 static void
 gst_srtp_dec_class_init (GstSrtpDecClass * klass)
@@ -238,11 +249,14 @@
       "A SRTP and SRTCP decoder",
       "Gabriel Millaire <millaire.gabriel@collabora.com>");
 
+  /* Install callbacks */
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_srtp_dec_change_state);
+
   klass->clear_streams = GST_DEBUG_FUNCPTR (gst_srtp_dec_clear_streams);
   klass->remove_stream = GST_DEBUG_FUNCPTR (gst_srtp_dec_remove_stream);
 
+  /* Install signals */
   /**
    * GstSrtpDec::request-key:
    * @gstsrtpdec: the element on which the signal is emitted
@@ -369,6 +383,7 @@
   gst_element_add_pad (GST_ELEMENT (filter), filter->rtcp_srcpad);
 
   filter->first_session = TRUE;
+  filter->roc_changed = FALSE;
 }
 
 static void
@@ -421,6 +436,7 @@
   if (!rtp_cipher || !rtp_auth || !rtcp_cipher || !rtcp_auth)
     goto error;
 
+  gst_structure_get_uint (s, "roc", &stream->roc);
 
   stream->rtp_cipher = enum_value_from_nick (GST_TYPE_SRTP_CIPHER_TYPE,
       rtp_cipher);
@@ -518,6 +534,17 @@
     gst_buffer_unmap (stream->key, &map);
 
   if (ret == err_status_ok) {
+    srtp_stream_t srtp_stream;
+
+    srtp_stream = srtp_get_stream (filter->session, htonl (ssrc));
+    if (srtp_stream) {
+      /* Here, we just set the ROC, but we also need to set the initial
+       * RTP sequence number later, otherwise libsrtp will not be able
+       * to get the right packet index. */
+      rdbx_set_roc (&srtp_stream->rtp_rdbx, stream->roc);
+      filter->roc_changed = TRUE;
+    }
+
     filter->first_session = FALSE;
     g_hash_table_insert (filter->streams, GUINT_TO_POINTER (stream->ssrc),
         stream);
@@ -672,9 +699,9 @@
   if (caps) {
     stream = update_session_stream_from_caps (filter, ssrc, caps);
     if (stream)
-      GST_DEBUG_OBJECT (filter, "New stream set with SSRC %d", ssrc);
+      GST_DEBUG_OBJECT (filter, "New stream set with SSRC %u", ssrc);
     else
-      GST_WARNING_OBJECT (filter, "Could not set stream with SSRC %d", ssrc);
+      GST_WARNING_OBJECT (filter, "Could not set stream with SSRC %u", ssrc);
     gst_caps_unref (caps);
   }
 
@@ -1016,8 +1043,32 @@
 
   if (is_rtcp)
     err = srtp_unprotect_rtcp (filter->session, map.data, &size);
-  else
+  else {
+    /* If ROC has changed, we know we need to set the initial RTP
+     * sequence number too. */
+    if (filter->roc_changed) {
+      srtp_stream_t stream;
+
+      stream = srtp_get_stream (filter->session, htonl (ssrc));
+
+      if (stream) {
+        guint16 seqnum = 0;
+        GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
+
+        gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf);
+        seqnum = gst_rtp_buffer_get_seq (&rtpbuf);
+        gst_rtp_buffer_unmap (&rtpbuf);
+
+        /* We finally add the RTP sequence number to the current
+         * rollover counter. */
+        stream->rtp_rdbx.index &= ~0xFFFF;
+        stream->rtp_rdbx.index |= seqnum;
+      }
+
+      filter->roc_changed = FALSE;
+    }
     err = srtp_unprotect (filter->session, map.data, &size);
+  }
 
   gst_buffer_unmap (buf, &map);
 
diff --git a/ext/srtp/gstsrtpdec.h b/ext/srtp/gstsrtpdec.h
index 8129dc0..41862e0 100644
--- a/ext/srtp/gstsrtpdec.h
+++ b/ext/srtp/gstsrtpdec.h
@@ -81,6 +81,8 @@
 
   gboolean rtp_has_segment;
   gboolean rtcp_has_segment;
+
+  gboolean roc_changed;
 };
 
 struct _GstSrtpDecClass
diff --git a/ext/srtp/gstsrtpenc.c b/ext/srtp/gstsrtpenc.c
index adee368..20d3e36 100644
--- a/ext/srtp/gstsrtpenc.c
+++ b/ext/srtp/gstsrtpenc.c
@@ -92,6 +92,13 @@
  * subsequent packet is dropped, until a new key is set and the stream
  * has been updated.
  *
+ * If a stream is to be shared between multiple clients it is also
+ * possible to request the internal SRTP rollover counter for a given
+ * SSRC. The rollover counter should be then transmitted and used by the
+ * clients to authenticate and decrypt the packets. Failing to do that
+ * the clients will start with a rollover counter of 0 which will
+ * probably be incorrect if the stream has been transmitted for a
+ * while to other clients.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -108,6 +115,8 @@
 #include "gstsrtp.h"
 #include "gstsrtp-enumtypes.h"
 
+#include <srtp/srtp_priv.h>
+
 GST_DEBUG_CATEGORY_STATIC (gst_srtp_enc_debug);
 #define GST_CAT_DEFAULT gst_srtp_enc_debug
 
@@ -125,6 +134,7 @@
 #define DEFAULT_RTCP_AUTH       DEFAULT_RTP_AUTH
 #define DEFAULT_RANDOM_KEY      FALSE
 #define DEFAULT_REPLAY_WINDOW_SIZE 128
+#define DEFAULT_ALLOW_REPEAT_TX FALSE
 
 #define HAS_CRYPTO(filter) (filter->rtp_cipher != GST_SRTP_CIPHER_NULL || \
       filter->rtcp_cipher != GST_SRTP_CIPHER_NULL ||                      \
@@ -135,6 +145,7 @@
 enum
 {
   SIGNAL_SOFT_LIMIT,
+  SIGNAL_GET_ROLLOVER_COUNTER,
   LAST_SIGNAL
 };
 
@@ -147,7 +158,8 @@
   PROP_RTCP_CIPHER,
   PROP_RTCP_AUTH,
   PROP_RANDOM_KEY,
-  PROP_REPLAY_WINDOW_SIZE
+  PROP_REPLAY_WINDOW_SIZE,
+  PROP_ALLOW_REPEAT_TX
 };
 
 /* the capabilities of the inputs and outputs.
@@ -221,6 +233,28 @@
 
 static void gst_srtp_enc_release_pad (GstElement * element, GstPad * pad);
 
+
+static guint32
+gst_srtp_enc_get_rollover_counter (GstSrtpEnc * filter, guint32 ssrc)
+{
+  guint32 roc = 0;
+  srtp_stream_t stream;
+
+  GST_OBJECT_LOCK (filter);
+
+  GST_DEBUG_OBJECT (filter, "retrieving SRTP Rollover Counter, ssrc: %u", ssrc);
+
+  if (filter->session) {
+    stream = srtp_get_stream (filter->session, htonl (ssrc));
+    if (stream)
+      roc = stream->rtp_rdbx.index >> 16;
+  }
+
+  GST_OBJECT_UNLOCK (filter);
+
+  return roc;
+}
+
 /* initialize the srtpenc's class
  */
 static void
@@ -289,6 +323,13 @@
           "Size of the replay protection window",
           64, 0x8000, DEFAULT_REPLAY_WINDOW_SIZE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_ALLOW_REPEAT_TX,
+      g_param_spec_boolean ("allow-repeat-tx",
+          "Allow repeat packets transmission",
+          "Whether retransmissions of packets with the same sequence number are allowed"
+          "(Note that such repeated transmissions must have the same RTP payload, "
+          "or a severe security weakness is introduced!)",
+          DEFAULT_ALLOW_REPEAT_TX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /**
    * GstSrtpEnc::soft-limit:
@@ -301,6 +342,22 @@
   gst_srtp_enc_signals[SIGNAL_SOFT_LIMIT] =
       g_signal_new ("soft-limit", G_TYPE_FROM_CLASS (klass),
       G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+
+  /**
+   * GstSrtpEnc::get-rollover-counter:
+   * @gstsrtpenc: the element on which the signal is emitted
+   * @ssrc: The unique SSRC of the stream
+   *
+   * Request the SRTP rollover counter for the stream with @ssrc.
+   */
+  gst_srtp_enc_signals[SIGNAL_GET_ROLLOVER_COUNTER] =
+      g_signal_new ("get-rollover-counter", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstSrtpEncClass,
+          get_rollover_counter), NULL, NULL, g_cclosure_marshal_generic,
+      G_TYPE_UINT, 1, G_TYPE_UINT);
+
+  klass->get_rollover_counter =
+      GST_DEBUG_FUNCPTR (gst_srtp_enc_get_rollover_counter);
 }
 
 
@@ -317,6 +374,7 @@
   filter->rtcp_cipher = DEFAULT_RTCP_CIPHER;
   filter->rtcp_auth = DEFAULT_RTCP_AUTH;
   filter->replay_window_size = DEFAULT_REPLAY_WINDOW_SIZE;
+  filter->allow_repeat_tx = DEFAULT_ALLOW_REPEAT_TX;
 }
 
 static guint
@@ -388,6 +446,7 @@
   policy.next = NULL;
 
   policy.window_size = filter->replay_window_size;
+  policy.allow_repeat_tx = filter->allow_repeat_tx;
 
   /* If it is the first stream, create the session
    * If not, add the stream to the session
@@ -604,6 +663,10 @@
       filter->replay_window_size = g_value_get_uint (value);
       break;
 
+    case PROP_ALLOW_REPEAT_TX:
+      filter->allow_repeat_tx = g_value_get_boolean (value);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -642,6 +705,9 @@
     case PROP_REPLAY_WINDOW_SIZE:
       g_value_set_uint (value, filter->replay_window_size);
       break;
+    case PROP_ALLOW_REPEAT_TX:
+      g_value_set_boolean (value, filter->allow_repeat_tx);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1124,6 +1190,7 @@
 
       gst_event_parse_caps (event, &caps);
       ret = gst_srtp_enc_sink_setcaps (pad, filter, caps, is_rtcp);
+      gst_event_unref (event);
       break;
     }
     default:
diff --git a/ext/srtp/gstsrtpenc.h b/ext/srtp/gstsrtpenc.h
index c4bc75c..843af18 100644
--- a/ext/srtp/gstsrtpenc.h
+++ b/ext/srtp/gstsrtpenc.h
@@ -83,11 +83,15 @@
   gboolean key_changed;
 
   guint replay_window_size;
+  gboolean allow_repeat_tx;
 };
 
 struct _GstSrtpEncClass
 {
   GstElementClass parent_class;
+
+  /* action signals */
+  guint32 (*get_rollover_counter) (GstSrtpEnc *encoder, guint32 ssrc);
 };
 
 GType gst_srtp_enc_get_type (void);
diff --git a/ext/teletextdec/Makefile.in b/ext/teletextdec/Makefile.in
index 28f6bd4..e1104af 100644
--- a/ext/teletextdec/Makefile.in
+++ b/ext/teletextdec/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstteletextdec.la
 libgstteletextdec_la_SOURCES = gstteletextdec.c teletext.c
 libgstteletextdec_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(TELETEXTDEC_CFLAGS)
diff --git a/ext/timidity/Makefile.in b/ext/timidity/Makefile.in
index 8f34d90..62ffb51 100644
--- a/ext/timidity/Makefile.in
+++ b/ext/timidity/Makefile.in
@@ -363,6 +363,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -449,6 +451,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -740,6 +743,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 
 # plugindir is set in configure
 plugin_LTLIBRARIES = $(am__append_1) $(am__append_2)
diff --git a/ext/voaacenc/Makefile.in b/ext/voaacenc/Makefile.in
index f0afe55..2d23e9b 100644
--- a/ext/voaacenc/Makefile.in
+++ b/ext/voaacenc/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvoaacenc.la
 libgstvoaacenc_la_SOURCES = \
 	gstvoaac.c \
diff --git a/ext/voamrwbenc/Makefile.in b/ext/voamrwbenc/Makefile.in
index e7d5d91..1704100 100644
--- a/ext/voamrwbenc/Makefile.in
+++ b/ext/voamrwbenc/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvoamrwbenc.la
 libgstvoamrwbenc_la_SOURCES = \
 	gstvoamrwb.c		\
diff --git a/ext/wayland/Makefile.am b/ext/wayland/Makefile.am
index e8edf73..58c1e99 100644
--- a/ext/wayland/Makefile.am
+++ b/ext/wayland/Makefile.am
@@ -1,12 +1,44 @@
 plugin_LTLIBRARIES = libgstwaylandsink.la
 
-libgstwaylandsink_la_SOURCES =  gstwaylandsink.c waylandpool.c
+libgstwaylandsink_la_SOURCES =  \
+	gstwaylandsink.c \
+	waylandpool.c \
+	wldisplay.c \
+	wlwindow.c \
+	wlvideoformat.c \
+	scaler-protocol.c
+
 libgstwaylandsink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
-                               $(WAYLAND_CFLAGS)
-libgstwaylandsink_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-                               -lgstvideo-$(GST_API_VERSION) \
-                               $(WAYLAND_LIBS)
+                               $(WAYLAND_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS)
+libgstwaylandsink_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION) \
+	$(WAYLAND_LIBS) \
+	$(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la
 libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstwaylandsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
-noinst_HEADERS = gstwaylandsink.h waylandpool.h
+noinst_HEADERS = \
+	gstwaylandsink.h \
+	waylandpool.h \
+	wldisplay.h \
+	wlwindow.h \
+	wlvideoformat.h \
+	scaler-client-protocol.h
+
+EXTRA_DIST = scaler.xml
+CLEANFILES = scaler-protocol.c scaler-client-protocol.h
+
+%-protocol.c : %.xml
+	$(wayland_scanner) code < $< > $@
+
+%-client-protocol.h : %.xml
+	$(wayland_scanner) client-header < $< > $@
+
+gstwaylandsink.c: scaler-client-protocol.h
+
+waylandpool.c: scaler-client-protocol.h
+
+wldisplay.c: scaler-client-protocol.h
+
+wlwindow.c: scaler-client-protocol.h
diff --git a/ext/wayland/Makefile.in b/ext/wayland/Makefile.in
index 35bdbd4..ef33004 100644
--- a/ext/wayland/Makefile.in
+++ b/ext/wayland/Makefile.in
@@ -155,10 +155,15 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstwaylandsink_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) \
+	$(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la
 am_libgstwaylandsink_la_OBJECTS =  \
 	libgstwaylandsink_la-gstwaylandsink.lo \
-	libgstwaylandsink_la-waylandpool.lo
+	libgstwaylandsink_la-waylandpool.lo \
+	libgstwaylandsink_la-wldisplay.lo \
+	libgstwaylandsink_la-wlwindow.lo \
+	libgstwaylandsink_la-wlvideoformat.lo \
+	libgstwaylandsink_la-scaler-protocol.lo
 libgstwaylandsink_la_OBJECTS = $(am_libgstwaylandsink_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -346,6 +351,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +439,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,18 +731,37 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwaylandsink.la
-libgstwaylandsink_la_SOURCES = gstwaylandsink.c waylandpool.c
-libgstwaylandsink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
-                               $(WAYLAND_CFLAGS)
+libgstwaylandsink_la_SOURCES = \
+	gstwaylandsink.c \
+	waylandpool.c \
+	wldisplay.c \
+	wlwindow.c \
+	wlvideoformat.c \
+	scaler-protocol.c
 
-libgstwaylandsink_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-                               -lgstvideo-$(GST_API_VERSION) \
-                               $(WAYLAND_LIBS)
+libgstwaylandsink_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+                               $(WAYLAND_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS)
+
+libgstwaylandsink_la_LIBADD = \
+	$(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION) \
+	$(WAYLAND_LIBS) \
+	$(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la
 
 libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstwaylandsink_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-noinst_HEADERS = gstwaylandsink.h waylandpool.h
+noinst_HEADERS = \
+	gstwaylandsink.h \
+	waylandpool.h \
+	wldisplay.h \
+	wlwindow.h \
+	wlvideoformat.h \
+	scaler-client-protocol.h
+
+EXTRA_DIST = scaler.xml
+CLEANFILES = scaler-protocol.c scaler-client-protocol.h
 all: all-am
 
 .SUFFIXES:
@@ -815,7 +842,11 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-gstwaylandsink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-scaler-protocol.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-waylandpool.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-wldisplay.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-wlvideoformat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwaylandsink_la-wlwindow.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -855,6 +886,34 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -c -o libgstwaylandsink_la-waylandpool.lo `test -f 'waylandpool.c' || echo '$(srcdir)/'`waylandpool.c
 
+libgstwaylandsink_la-wldisplay.lo: wldisplay.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -MT libgstwaylandsink_la-wldisplay.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-wldisplay.Tpo -c -o libgstwaylandsink_la-wldisplay.lo `test -f 'wldisplay.c' || echo '$(srcdir)/'`wldisplay.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-wldisplay.Tpo $(DEPDIR)/libgstwaylandsink_la-wldisplay.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wldisplay.c' object='libgstwaylandsink_la-wldisplay.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -c -o libgstwaylandsink_la-wldisplay.lo `test -f 'wldisplay.c' || echo '$(srcdir)/'`wldisplay.c
+
+libgstwaylandsink_la-wlwindow.lo: wlwindow.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -MT libgstwaylandsink_la-wlwindow.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-wlwindow.Tpo -c -o libgstwaylandsink_la-wlwindow.lo `test -f 'wlwindow.c' || echo '$(srcdir)/'`wlwindow.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-wlwindow.Tpo $(DEPDIR)/libgstwaylandsink_la-wlwindow.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wlwindow.c' object='libgstwaylandsink_la-wlwindow.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -c -o libgstwaylandsink_la-wlwindow.lo `test -f 'wlwindow.c' || echo '$(srcdir)/'`wlwindow.c
+
+libgstwaylandsink_la-wlvideoformat.lo: wlvideoformat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -MT libgstwaylandsink_la-wlvideoformat.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-wlvideoformat.Tpo -c -o libgstwaylandsink_la-wlvideoformat.lo `test -f 'wlvideoformat.c' || echo '$(srcdir)/'`wlvideoformat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-wlvideoformat.Tpo $(DEPDIR)/libgstwaylandsink_la-wlvideoformat.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wlvideoformat.c' object='libgstwaylandsink_la-wlvideoformat.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -c -o libgstwaylandsink_la-wlvideoformat.lo `test -f 'wlvideoformat.c' || echo '$(srcdir)/'`wlvideoformat.c
+
+libgstwaylandsink_la-scaler-protocol.lo: scaler-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -MT libgstwaylandsink_la-scaler-protocol.lo -MD -MP -MF $(DEPDIR)/libgstwaylandsink_la-scaler-protocol.Tpo -c -o libgstwaylandsink_la-scaler-protocol.lo `test -f 'scaler-protocol.c' || echo '$(srcdir)/'`scaler-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwaylandsink_la-scaler-protocol.Tpo $(DEPDIR)/libgstwaylandsink_la-scaler-protocol.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='scaler-protocol.c' object='libgstwaylandsink_la-scaler-protocol.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstwaylandsink_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwaylandsink_la_CFLAGS) $(CFLAGS) -c -o libgstwaylandsink_la-scaler-protocol.lo `test -f 'scaler-protocol.c' || echo '$(srcdir)/'`scaler-protocol.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
@@ -972,6 +1031,7 @@
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1069,6 +1129,20 @@
 	uninstall-pluginLTLIBRARIES
 
 
+%-protocol.c : %.xml
+	$(wayland_scanner) code < $< > $@
+
+%-client-protocol.h : %.xml
+	$(wayland_scanner) client-header < $< > $@
+
+gstwaylandsink.c: scaler-client-protocol.h
+
+waylandpool.c: scaler-client-protocol.h
+
+wldisplay.c: scaler-client-protocol.h
+
+wlwindow.c: scaler-client-protocol.h
+
 # 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/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
index e286f32..365df7c 100644
--- a/ext/wayland/gstwaylandsink.c
+++ b/ext/wayland/gstwaylandsink.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2011 Intel Corporation
  * Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
  * Copyright (C) 2012 Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) 2014 Collabora Ltd.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -41,6 +42,11 @@
 #endif
 
 #include "gstwaylandsink.h"
+#include "wlvideoformat.h"
+#include "waylandpool.h"
+
+#include <gst/wayland/wayland.h>
+#include <gst/video/videooverlay.h>
 
 /* signals */
 enum
@@ -53,37 +59,35 @@
 enum
 {
   PROP_0,
-  PROP_WAYLAND_DISPLAY
+  PROP_DISPLAY
 };
 
 GST_DEBUG_CATEGORY (gstwayland_debug);
 #define GST_CAT_DEFAULT gstwayland_debug
 
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-#define CAPS "{xRGB, ARGB}"
-#else
-#define CAPS "{BGRx, BGRA}"
-#endif
-
 static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (CAPS))
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
+        ("{ BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, "
+            "RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, "
+            "YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }"))
     );
 
-/*Fixme: Add more interfaces */
-#define gst_wayland_sink_parent_class parent_class
-G_DEFINE_TYPE (GstWaylandSink, gst_wayland_sink, GST_TYPE_VIDEO_SINK);
-
 static void gst_wayland_sink_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec);
 static void gst_wayland_sink_set_property (GObject * object,
     guint prop_id, const GValue * value, GParamSpec * pspec);
 static void gst_wayland_sink_finalize (GObject * object);
+
+static GstStateChangeReturn gst_wayland_sink_change_state (GstElement * element,
+    GstStateChange transition);
+static void gst_wayland_sink_set_context (GstElement * element,
+    GstContext * context);
+
 static GstCaps *gst_wayland_sink_get_caps (GstBaseSink * bsink,
     GstCaps * filter);
 static gboolean gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
-static gboolean gst_wayland_sink_start (GstBaseSink * bsink);
 static gboolean gst_wayland_sink_preroll (GstBaseSink * bsink,
     GstBuffer * buffer);
 static gboolean
@@ -91,58 +95,27 @@
 static gboolean gst_wayland_sink_render (GstBaseSink * bsink,
     GstBuffer * buffer);
 
-static struct display *create_display (void);
-static void registry_handle_global (void *data, struct wl_registry *registry,
-    uint32_t id, const char *interface, uint32_t version);
-static void frame_redraw_callback (void *data,
-    struct wl_callback *callback, uint32_t time);
-static void create_window (GstWaylandSink * sink, struct display *display,
-    int width, int height);
-static void shm_pool_destroy (struct shm_pool *pool);
+/* VideoOverlay interface */
+static void gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface *
+    iface);
+static void gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay,
+    guintptr handle);
+static void gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay,
+    gint x, gint y, gint w, gint h);
+static void gst_wayland_sink_expose (GstVideoOverlay * overlay);
 
-typedef struct
-{
-  uint32_t wl_format;
-  GstVideoFormat gst_format;
-} wl_VideoFormat;
+/* WaylandVideo interface */
+static void gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface *
+    iface);
+static void gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video);
+static void gst_wayland_sink_end_geometry_change (GstWaylandVideo * video);
 
-static const wl_VideoFormat formats[] = {
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-  {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_xRGB},
-  {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_ARGB},
-#else
-  {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_BGRx},
-  {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_BGRA},
-#endif
-};
-
-static uint32_t
-gst_wayland_format_to_wl_format (GstVideoFormat format)
-{
-  guint i;
-
-  for (i = 0; i < G_N_ELEMENTS (formats); i++)
-    if (formats[i].gst_format == format)
-      return formats[i].wl_format;
-
-  GST_WARNING ("wayland video format not found");
-  return -1;
-}
-
-#ifndef GST_DISABLE_GST_DEBUG
-static const gchar *
-gst_wayland_format_to_string (uint32_t wl_format)
-{
-  guint i;
-  GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
-
-  for (i = 0; i < G_N_ELEMENTS (formats); i++)
-    if (formats[i].wl_format == wl_format)
-      format = formats[i].gst_format;
-
-  return gst_video_format_to_string (format);
-}
-#endif
+#define gst_wayland_sink_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (GstWaylandSink, gst_wayland_sink, GST_TYPE_VIDEO_SINK,
+    G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
+        gst_wayland_sink_videooverlay_init)
+    G_IMPLEMENT_INTERFACE (GST_TYPE_WAYLAND_VIDEO,
+        gst_wayland_sink_waylandvideo_init));
 
 static void
 gst_wayland_sink_class_init (GstWaylandSinkClass * klass)
@@ -165,31 +138,32 @@
   gst_element_class_set_static_metadata (gstelement_class,
       "wayland video sink", "Sink/Video",
       "Output to wayland surface",
-      "Sreerenj Balachandran <sreerenj.balachandran@intel.com>");
+      "Sreerenj Balachandran <sreerenj.balachandran@intel.com>, "
+      "George Kiagiadakis <george.kiagiadakis@collabora.com>");
+
+  gstelement_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_wayland_sink_change_state);
+  gstelement_class->set_context =
+      GST_DEBUG_FUNCPTR (gst_wayland_sink_set_context);
 
   gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_wayland_sink_get_caps);
   gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_wayland_sink_set_caps);
-  gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_wayland_sink_start);
   gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_wayland_sink_preroll);
   gstbasesink_class->propose_allocation =
       GST_DEBUG_FUNCPTR (gst_wayland_sink_propose_allocation);
   gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_wayland_sink_render);
 
-  g_object_class_install_property (gobject_class, PROP_WAYLAND_DISPLAY,
-      g_param_spec_pointer ("wayland-display", "Wayland Display",
-          "Wayland  Display handle created by the application ",
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_DISPLAY,
+      g_param_spec_string ("display", "Wayland Display name", "Wayland "
+          "display name to connect to, if not supplied via the GstContext",
+          NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
 gst_wayland_sink_init (GstWaylandSink * sink)
 {
-  sink->display = NULL;
-  sink->window = NULL;
-  sink->shm_pool = NULL;
-  sink->pool = NULL;
-
-  g_mutex_init (&sink->wayland_lock);
+  g_mutex_init (&sink->display_lock);
+  g_mutex_init (&sink->render_lock);
 }
 
 static void
@@ -199,8 +173,10 @@
   GstWaylandSink *sink = GST_WAYLAND_SINK (object);
 
   switch (prop_id) {
-    case PROP_WAYLAND_DISPLAY:
-      g_value_set_pointer (value, sink->display);
+    case PROP_DISPLAY:
+      GST_OBJECT_LOCK (sink);
+      g_value_set_string (value, sink->display_name);
+      GST_OBJECT_UNLOCK (sink);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -215,8 +191,10 @@
   GstWaylandSink *sink = GST_WAYLAND_SINK (object);
 
   switch (prop_id) {
-    case PROP_WAYLAND_DISPLAY:
-      sink->display = g_value_get_pointer (value);
+    case PROP_DISPLAY:
+      GST_OBJECT_LOCK (sink);
+      sink->display_name = g_value_dup_string (value);
+      GST_OBJECT_UNLOCK (sink);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -225,67 +203,210 @@
 }
 
 static void
-destroy_display (struct display *display)
-{
-  if (display->shm)
-    wl_shm_destroy (display->shm);
-
-  if (display->shell)
-    wl_shell_destroy (display->shell);
-
-  if (display->compositor)
-    wl_compositor_destroy (display->compositor);
-
-  wl_display_flush (display->display);
-  wl_display_disconnect (display->display);
-  free (display);
-}
-
-static void
-destroy_window (struct window *window)
-{
-  if (window->callback)
-    wl_callback_destroy (window->callback);
-
-  if (window->buffer)
-    wl_buffer_destroy (window->buffer);
-
-  if (window->shell_surface)
-    wl_shell_surface_destroy (window->shell_surface);
-
-  if (window->surface)
-    wl_surface_destroy (window->surface);
-
-  free (window);
-}
-
-static void
-shm_pool_destroy (struct shm_pool *pool)
-{
-  munmap (pool->data, pool->size);
-  wl_shm_pool_destroy (pool->pool);
-  free (pool);
-}
-
-static void
 gst_wayland_sink_finalize (GObject * object)
 {
   GstWaylandSink *sink = GST_WAYLAND_SINK (object);
 
   GST_DEBUG_OBJECT (sink, "Finalizing the sink..");
 
+  if (sink->last_buffer)
+    gst_buffer_unref (sink->last_buffer);
+  if (sink->display) {
+    /* see comment about this call in gst_wayland_sink_change_state() */
+    if (sink->pool) {
+      gst_wayland_compositor_release_all_buffers (GST_WAYLAND_BUFFER_POOL
+          (sink->pool));
+    }
+    g_object_unref (sink->display);
+  }
   if (sink->window)
-    destroy_window (sink->window);
-  if (sink->display)
-    destroy_display (sink->display);
-  if (sink->shm_pool)
-    shm_pool_destroy (sink->shm_pool);
+    g_object_unref (sink->window);
+  if (sink->pool)
+    gst_object_unref (sink->pool);
 
-  g_mutex_clear (&sink->wayland_lock);
+  if (sink->display_name)
+    g_free (sink->display_name);
+
+  g_mutex_clear (&sink->display_lock);
+  g_mutex_clear (&sink->render_lock);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
+/* must be called with the display_lock */
+static void
+gst_wayland_sink_set_display_from_context (GstWaylandSink * sink,
+    GstContext * context)
+{
+  struct wl_display *display;
+  GError *error = NULL;
+
+  display = gst_wayland_display_handle_context_get_handle (context);
+  sink->display = gst_wl_display_new_existing (display, FALSE, &error);
+
+  if (error) {
+    GST_ELEMENT_WARNING (sink, RESOURCE, OPEN_READ_WRITE,
+        ("Could not set display handle"),
+        ("Failed to use the external wayland display: '%s'", error->message));
+    g_error_free (error);
+  }
+}
+
+static gboolean
+gst_wayland_sink_find_display (GstWaylandSink * sink)
+{
+  GstQuery *query;
+  GstMessage *msg;
+  GstContext *context = NULL;
+  GError *error = NULL;
+  gboolean ret = TRUE;
+
+  g_mutex_lock (&sink->display_lock);
+
+  if (!sink->display) {
+    /* first query upstream for the needed display handle */
+    query = gst_query_new_context (GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE);
+    if (gst_pad_peer_query (GST_VIDEO_SINK_PAD (sink), query)) {
+      gst_query_parse_context (query, &context);
+      gst_wayland_sink_set_display_from_context (sink, context);
+    }
+    gst_query_unref (query);
+
+    if (G_LIKELY (!sink->display)) {
+      /* now ask the application to set the display handle */
+      msg = gst_message_new_need_context (GST_OBJECT_CAST (sink),
+          GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE);
+
+      g_mutex_unlock (&sink->display_lock);
+      gst_element_post_message (GST_ELEMENT_CAST (sink), msg);
+      /* at this point we expect gst_wayland_sink_set_context
+       * to get called and fill sink->display */
+      g_mutex_lock (&sink->display_lock);
+
+      if (!sink->display) {
+        /* if the application didn't set a display, let's create it ourselves */
+        GST_OBJECT_LOCK (sink);
+        sink->display = gst_wl_display_new (sink->display_name, &error);
+        GST_OBJECT_UNLOCK (sink);
+
+        if (error) {
+          GST_ELEMENT_WARNING (sink, RESOURCE, OPEN_READ_WRITE,
+              ("Could not initialise Wayland output"),
+              ("Failed to create GstWlDisplay: '%s'", error->message));
+          g_error_free (error);
+          ret = FALSE;
+        } else {
+          /* inform the world about the new display */
+          context =
+              gst_wayland_display_handle_context_new (sink->display->display);
+          msg = gst_message_new_have_context (GST_OBJECT_CAST (sink), context);
+          gst_element_post_message (GST_ELEMENT_CAST (sink), msg);
+        }
+      }
+    }
+  }
+
+  g_mutex_unlock (&sink->display_lock);
+
+  return ret;
+}
+
+static GstStateChangeReturn
+gst_wayland_sink_change_state (GstElement * element, GstStateChange transition)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (element);
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (!gst_wayland_sink_find_display (sink))
+        return GST_STATE_CHANGE_FAILURE;
+      break;
+    default:
+      break;
+  }
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_buffer_replace (&sink->last_buffer, NULL);
+      if (sink->window) {
+        if (gst_wl_window_is_toplevel (sink->window)) {
+          g_clear_object (&sink->window);
+        } else {
+          /* remove buffer from surface, show nothing */
+          wl_surface_attach (sink->window->surface, NULL, 0, 0);
+          wl_surface_damage (sink->window->surface, 0, 0,
+              sink->window->surface_width, sink->window->surface_height);
+          wl_surface_commit (sink->window->surface);
+          wl_display_flush (sink->display->display);
+        }
+      }
+      break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      g_mutex_lock (&sink->display_lock);
+      /* If we had a toplevel window, we most likely have our own connection
+       * to the display too, and it is a good idea to disconnect and allow
+       * potentially the application to embed us with GstVideoOverlay
+       * (which requires to re-use the same display connection as the parent
+       * surface). If we didn't have a toplevel window, then the display
+       * connection that we have is definitely shared with the application
+       * and it's better to keep it around (together with the window handle)
+       * to avoid requesting them again from the application if/when we are
+       * restarted (GstVideoOverlay behaves like that in other sinks)
+       */
+      if (sink->display && !sink->window) {     /* -> the window was toplevel */
+        /* Force all buffers to return to the pool, regardless of
+         * whether the compositor has released them or not. We are
+         * going to kill the display, so we need to return all buffers
+         * to be destroyed before this happens.
+         * Note that this is done here instead of the pool destructor
+         * because the buffers hold a reference to the pool. Also,
+         * the buffers can only be unref'ed from the display's event loop
+         * and the pool holds a reference to the display. If we drop
+         * our references here, when the compositor releases the buffers,
+         * they will be unref'ed from the event loop thread, which will
+         * unref the pool and therefore the display, which will try to
+         * stop the thread from within itself and cause a deadlock.
+         */
+        if (sink->pool) {
+          gst_wayland_compositor_release_all_buffers (GST_WAYLAND_BUFFER_POOL
+              (sink->pool));
+        }
+        g_clear_object (&sink->display);
+        g_clear_object (&sink->pool);
+      }
+      g_mutex_unlock (&sink->display_lock);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static void
+gst_wayland_sink_set_context (GstElement * element, GstContext * context)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (element);
+
+  if (gst_context_has_context_type (context,
+          GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE)) {
+    g_mutex_lock (&sink->display_lock);
+    if (G_LIKELY (!sink->display))
+      gst_wayland_sink_set_display_from_context (sink, context);
+    else
+      GST_WARNING_OBJECT (element, "changing display handle is not supported");
+    g_mutex_unlock (&sink->display_lock);
+  }
+
+  if (GST_ELEMENT_CLASS (parent_class)->set_context)
+    GST_ELEMENT_CLASS (parent_class)->set_context (element, context);
+}
+
 static GstCaps *
 gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter)
 {
@@ -295,6 +416,34 @@
   sink = GST_WAYLAND_SINK (bsink);
 
   caps = gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink));
+
+  g_mutex_lock (&sink->display_lock);
+
+  if (sink->display) {
+    GValue list = G_VALUE_INIT;
+    GValue value = G_VALUE_INIT;
+    GArray *formats;
+    gint i;
+    enum wl_shm_format fmt;
+
+    g_value_init (&list, GST_TYPE_LIST);
+    g_value_init (&value, G_TYPE_STRING);
+
+    formats = sink->display->formats;
+    for (i = 0; i < formats->len; i++) {
+      fmt = g_array_index (formats, uint32_t, i);
+      g_value_set_string (&value, gst_wayland_format_to_string (fmt));
+      gst_value_list_append_value (&list, &value);
+    }
+
+    caps = gst_caps_make_writable (caps);
+    gst_structure_set_value (gst_caps_get_structure (caps, 0), "format", &list);
+
+    GST_DEBUG_OBJECT (sink, "display caps: %" GST_PTR_FORMAT, caps);
+  }
+
+  g_mutex_unlock (&sink->display_lock);
+
   if (filter) {
     GstCaps *intersection;
 
@@ -303,135 +452,61 @@
     gst_caps_unref (caps);
     caps = intersection;
   }
+
   return caps;
 }
 
-static void
-shm_format (void *data, struct wl_shm *wl_shm, uint32_t format)
-{
-  struct display *d = data;
-
-  d->formats |= (1 << format);
-}
-
-struct wl_shm_listener shm_listenter = {
-  shm_format
-};
-
-static void
-registry_handle_global (void *data, struct wl_registry *registry,
-    uint32_t id, const char *interface, uint32_t version)
-{
-  struct display *d = data;
-
-  if (strcmp (interface, "wl_compositor") == 0) {
-    d->compositor =
-        wl_registry_bind (registry, id, &wl_compositor_interface, 1);
-  } else if (strcmp (interface, "wl_shell") == 0) {
-    d->shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
-  } else if (strcmp (interface, "wl_shm") == 0) {
-    d->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);
-    wl_shm_add_listener (d->shm, &shm_listenter, d);
-  }
-}
-
-static const struct wl_registry_listener registry_listener = {
-  registry_handle_global
-};
-
-static struct display *
-create_display (void)
-{
-  struct display *display;
-
-  display = malloc (sizeof *display);
-  display->display = wl_display_connect (NULL);
-
-  if (display->display == NULL) {
-    free (display);
-    return NULL;
-  }
-
-  display->registry = wl_display_get_registry (display->display);
-  wl_registry_add_listener (display->registry, &registry_listener, display);
-
-  wl_display_roundtrip (display->display);
-  if (display->shm == NULL) {
-    GST_ERROR ("No wl_shm global..");
-    return NULL;
-  }
-
-  wl_display_roundtrip (display->display);
-
-  wl_display_get_fd (display->display);
-
-  return display;
-}
-
-static gboolean
-gst_wayland_sink_format_from_caps (uint32_t * wl_format, GstCaps * caps)
-{
-  GstStructure *structure;
-  const gchar *format;
-  GstVideoFormat fmt;
-
-  structure = gst_caps_get_structure (caps, 0);
-  format = gst_structure_get_string (structure, "format");
-  fmt = gst_video_format_from_string (format);
-
-  *wl_format = gst_wayland_format_to_wl_format (fmt);
-
-  return (*wl_format != -1);
-}
-
 static gboolean
 gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
 {
   GstWaylandSink *sink;
-  GstBufferPool *newpool, *oldpool;
+  GstBufferPool *newpool;
   GstVideoInfo info;
+  enum wl_shm_format format;
+  GArray *formats;
+  gint i;
   GstStructure *structure;
   static GstAllocationParams params = { 0, 0, 0, 15, };
-  guint size;
 
   sink = GST_WAYLAND_SINK (bsink);
 
-  GST_LOG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps);
+  GST_DEBUG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps);
 
+  /* extract info from caps */
   if (!gst_video_info_from_caps (&info, caps))
     goto invalid_format;
 
-  if (!gst_wayland_sink_format_from_caps (&sink->format, caps))
+  format = gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&info));
+  if ((gint) format == -1)
     goto invalid_format;
 
-  if (!(sink->display->formats & (1 << sink->format))) {
-    GST_DEBUG_OBJECT (sink, "%s not available",
-        gst_wayland_format_to_string (sink->format));
-    return FALSE;
+  /* verify we support the requested format */
+  formats = sink->display->formats;
+  for (i = 0; i < formats->len; i++) {
+    if (g_array_index (formats, uint32_t, i) == format)
+      break;
   }
 
-  sink->video_width = info.width;
-  sink->video_height = info.height;
-  size = info.size;
+  if (i >= formats->len)
+    goto unsupported_format;
 
   /* create a new pool for the new configuration */
-  newpool = gst_wayland_buffer_pool_new (sink);
-
-  if (!newpool) {
-    GST_DEBUG_OBJECT (sink, "Failed to create new pool");
-    return FALSE;
-  }
+  newpool = gst_wayland_buffer_pool_new (sink->display);
+  if (!newpool)
+    goto pool_failed;
 
   structure = gst_buffer_pool_get_config (newpool);
-  gst_buffer_pool_config_set_params (structure, caps, size, 2, 0);
+  gst_buffer_pool_config_set_params (structure, caps, info.size, 2, 0);
   gst_buffer_pool_config_set_allocator (structure, NULL, &params);
   if (!gst_buffer_pool_set_config (newpool, structure))
     goto config_failed;
 
-  oldpool = sink->pool;
-  sink->pool = newpool;
-  if (oldpool)
-    gst_object_unref (oldpool);
+  /* store the video info */
+  sink->video_info = info;
+  sink->video_info_changed = TRUE;
+
+  gst_object_replace ((GstObject **) & sink->pool, (GstObject *) newpool);
+  gst_object_unref (newpool);
 
   return TRUE;
 
@@ -441,6 +516,17 @@
         "Could not locate image format from caps %" GST_PTR_FORMAT, caps);
     return FALSE;
   }
+unsupported_format:
+  {
+    GST_DEBUG_OBJECT (sink, "Format %s is not available on the display",
+        gst_wayland_format_to_string (format));
+    return FALSE;
+  }
+pool_failed:
+  {
+    GST_DEBUG_OBJECT (sink, "Failed to create new pool");
+    return FALSE;
+  }
 config_failed:
   {
     GST_DEBUG_OBJECT (bsink, "failed setting config");
@@ -448,90 +534,11 @@
   }
 }
 
-static void
-handle_ping (void *data, struct wl_shell_surface *shell_surface,
-    uint32_t serial)
-{
-  wl_shell_surface_pong (shell_surface, serial);
-}
-
-static void
-handle_configure (void *data, struct wl_shell_surface *shell_surface,
-    uint32_t edges, int32_t width, int32_t height)
-{
-}
-
-static void
-handle_popup_done (void *data, struct wl_shell_surface *shell_surface)
-{
-}
-
-static const struct wl_shell_surface_listener shell_surface_listener = {
-  handle_ping,
-  handle_configure,
-  handle_popup_done
-};
-
-static void
-create_window (GstWaylandSink * sink, struct display *display, int width,
-    int height)
-{
-  struct window *window;
-
-  if (sink->window)
-    return;
-
-  g_mutex_lock (&sink->wayland_lock);
-
-  window = malloc (sizeof *window);
-  window->display = display;
-  window->width = width;
-  window->height = height;
-  window->redraw_pending = FALSE;
-
-  window->surface = wl_compositor_create_surface (display->compositor);
-
-  window->shell_surface = wl_shell_get_shell_surface (display->shell,
-      window->surface);
-
-  g_return_if_fail (window->shell_surface);
-
-  wl_shell_surface_add_listener (window->shell_surface,
-      &shell_surface_listener, window);
-
-  wl_shell_surface_set_toplevel (window->shell_surface);
-
-  sink->window = window;
-
-  g_mutex_unlock (&sink->wayland_lock);
-}
-
-static gboolean
-gst_wayland_sink_start (GstBaseSink * bsink)
-{
-  GstWaylandSink *sink = (GstWaylandSink *) bsink;
-  gboolean result = TRUE;
-
-  GST_DEBUG_OBJECT (sink, "start");
-
-  if (!sink->display)
-    sink->display = create_display ();
-
-  if (sink->display == NULL) {
-    GST_ELEMENT_ERROR (bsink, RESOURCE, OPEN_READ_WRITE,
-        ("Could not initialise Wayland output"),
-        ("Could not create Wayland display"));
-    return FALSE;
-  }
-
-  return result;
-}
-
 static gboolean
 gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
 {
   GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
-  GstBufferPool *pool;
+  GstBufferPool *pool = NULL;
   GstStructure *config;
   GstCaps *caps;
   guint size;
@@ -542,10 +549,8 @@
   if (caps == NULL)
     goto no_caps;
 
-  g_mutex_lock (&sink->wayland_lock);
-  if ((pool = sink->pool))
-    gst_object_ref (pool);
-  g_mutex_unlock (&sink->wayland_lock);
+  if (sink->pool)
+    pool = gst_object_ref (sink->pool);
 
   if (pool != NULL) {
     GstCaps *pcaps;
@@ -569,7 +574,7 @@
       goto invalid_caps;
 
     GST_DEBUG_OBJECT (sink, "create new pool");
-    pool = gst_wayland_buffer_pool_new (sink);
+    pool = gst_wayland_buffer_pool_new (sink->display);
 
     /* the normal size of a frame */
     size = info.size;
@@ -615,8 +620,11 @@
 static void
 frame_redraw_callback (void *data, struct wl_callback *callback, uint32_t time)
 {
-  struct window *window = (struct window *) data;
-  window->redraw_pending = FALSE;
+  GstWaylandSink *sink = data;
+
+  GST_LOG ("frame_redraw_cb");
+
+  g_atomic_int_set (&sink->redraw_pending, FALSE);
   wl_callback_destroy (callback);
 }
 
@@ -624,31 +632,86 @@
   frame_redraw_callback
 };
 
+/* must be called with the render lock */
+static void
+render_last_buffer (GstWaylandSink * sink)
+{
+  GstWlMeta *meta;
+  struct wl_surface *surface;
+  struct wl_callback *callback;
+
+  meta = gst_buffer_get_wl_meta (sink->last_buffer);
+  surface = gst_wl_window_get_wl_surface (sink->window);
+
+  g_atomic_int_set (&sink->redraw_pending, TRUE);
+  callback = wl_surface_frame (surface);
+  wl_callback_add_listener (callback, &frame_callback_listener, sink);
+
+  /* Here we essentially add a reference to the buffer. This represents
+   * the fact that the compositor is using the buffer and it should
+   * not return back to the pool and be reused until the compositor
+   * releases it. The release is handled internally in the pool */
+  gst_wayland_compositor_acquire_buffer (meta->pool, sink->last_buffer);
+
+  wl_surface_attach (surface, meta->wbuffer, 0, 0);
+  wl_surface_damage (surface, 0, 0, sink->window->surface_width,
+      sink->window->surface_height);
+
+  wl_surface_commit (surface);
+  wl_display_flush (sink->display->display);
+}
+
 static GstFlowReturn
 gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
 {
   GstWaylandSink *sink = GST_WAYLAND_SINK (bsink);
-  GstVideoRectangle src, dst, res;
   GstBuffer *to_render;
   GstWlMeta *meta;
-  GstFlowReturn ret;
-  struct window *window;
-  struct display *display;
+  GstFlowReturn ret = GST_FLOW_OK;
+
+  g_mutex_lock (&sink->render_lock);
 
   GST_LOG_OBJECT (sink, "render buffer %p", buffer);
-  if (!sink->window)
-    create_window (sink, sink->display, sink->video_width, sink->video_height);
 
-  window = sink->window;
-  display = sink->display;
+  if (G_UNLIKELY (!sink->window)) {
+    /* ask for window handle. Unlock render_lock while doing that because
+     * set_window_handle & friends will lock it in this context */
+    g_mutex_unlock (&sink->render_lock);
+    gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (sink));
+    g_mutex_lock (&sink->render_lock);
+
+    if (sink->window) {
+      /* inform the window about our caps */
+      gst_wl_window_set_video_info (sink->window, &sink->video_info);
+    } else {
+      /* if we were not provided a window, create one ourselves */
+      sink->window =
+          gst_wl_window_new_toplevel (sink->display, &sink->video_info);
+    }
+    sink->video_info_changed = FALSE;
+  }
+
+  /* drop buffers until we get a frame callback */
+  if (g_atomic_int_get (&sink->redraw_pending) == TRUE)
+    goto done;
+
+  if (G_UNLIKELY (sink->video_info_changed)) {
+    gst_wl_window_set_video_info (sink->window, &sink->video_info);
+    sink->video_info_changed = FALSE;
+  }
+
+  /* now that we have for sure set the video info on the window, it must have
+   * a valid size, otherwise this means that the application has called
+   * set_window_handle() without calling set_render_rectangle(), which is
+   * absolutely necessary for us.
+   */
+  if (G_UNLIKELY (sink->window->surface_width == 0 ||
+          sink->window->surface_height == 0))
+    goto no_window_size;
 
   meta = gst_buffer_get_wl_meta (buffer);
 
-  if (window->redraw_pending) {
-    wl_display_dispatch (display->display);
-  }
-
-  if (meta && meta->sink == sink) {
+  if (meta && meta->pool->display == sink->display) {
     GST_LOG_OBJECT (sink, "buffer %p from our pool, writing directly", buffer);
     to_render = buffer;
   } else {
@@ -668,49 +731,176 @@
     gst_buffer_map (buffer, &src, GST_MAP_READ);
     gst_buffer_fill (to_render, 0, src.data, src.size);
     gst_buffer_unmap (buffer, &src);
-
-    meta = gst_buffer_get_wl_meta (to_render);
   }
 
-  src.w = sink->video_width;
-  src.h = sink->video_height;
-  dst.w = sink->window->width;
-  dst.h = sink->window->height;
-
-  gst_video_sink_center_rect (src, dst, &res, FALSE);
-
-  wl_surface_attach (sink->window->surface, meta->wbuffer, 0, 0);
-  wl_surface_damage (sink->window->surface, 0, 0, res.w, res.h);
-  window->redraw_pending = TRUE;
-  window->callback = wl_surface_frame (window->surface);
-  wl_callback_add_listener (window->callback, &frame_callback_listener, window);
-  wl_surface_commit (window->surface);
-  wl_display_dispatch (display->display);
+  gst_buffer_replace (&sink->last_buffer, to_render);
+  render_last_buffer (sink);
 
   if (buffer != to_render)
     gst_buffer_unref (to_render);
-  return GST_FLOW_OK;
+  goto done;
 
+no_window_size:
+  {
+    GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
+        ("Window has no size set"),
+        ("Make sure you set the size after calling set_window_handle"));
+    ret = GST_FLOW_ERROR;
+    goto done;
+  }
 no_buffer:
   {
     GST_WARNING_OBJECT (sink, "could not create image");
-    return ret;
+    goto done;
   }
 no_pool:
   {
     GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
         ("Internal error: can't allocate images"),
         ("We don't have a bufferpool negotiated"));
-    return GST_FLOW_ERROR;
+    ret = GST_FLOW_ERROR;
+    goto done;
   }
 activate_failed:
   {
     GST_ERROR_OBJECT (sink, "failed to activate bufferpool.");
     ret = GST_FLOW_ERROR;
+    goto done;
+  }
+done:
+  {
+    g_mutex_unlock (&sink->render_lock);
     return ret;
   }
 }
 
+static void
+gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface * iface)
+{
+  iface->set_window_handle = gst_wayland_sink_set_window_handle;
+  iface->set_render_rectangle = gst_wayland_sink_set_render_rectangle;
+  iface->expose = gst_wayland_sink_expose;
+}
+
+static void
+gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+  struct wl_surface *surface = (struct wl_surface *) handle;
+
+  g_return_if_fail (sink != NULL);
+
+  g_mutex_lock (&sink->render_lock);
+
+  GST_DEBUG_OBJECT (sink, "Setting window handle %" GST_PTR_FORMAT,
+      (void *) handle);
+
+  g_clear_object (&sink->window);
+
+  if (handle) {
+    if (G_LIKELY (gst_wayland_sink_find_display (sink))) {
+      /* we cannot use our own display with an external window handle */
+      if (G_UNLIKELY (sink->display->own_display)) {
+        GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_READ_WRITE,
+            ("Application did not provide a wayland display handle"),
+            ("waylandsink cannot use an externally-supplied surface without "
+                "an externally-supplied display handle. Consider providing a "
+                "display handle from your application with GstContext"));
+      } else {
+        sink->window = gst_wl_window_new_in_surface (sink->display, surface);
+      }
+    } else {
+      GST_ERROR_OBJECT (sink, "Failed to find display handle, "
+          "ignoring window handle");
+    }
+  }
+
+  g_mutex_unlock (&sink->render_lock);
+}
+
+static void
+gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay,
+    gint x, gint y, gint w, gint h)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+
+  g_return_if_fail (sink != NULL);
+
+  g_mutex_lock (&sink->render_lock);
+  if (!sink->window) {
+    g_mutex_unlock (&sink->render_lock);
+    GST_WARNING_OBJECT (sink,
+        "set_render_rectangle called without window, ignoring");
+    return;
+  }
+
+  GST_DEBUG_OBJECT (sink, "window geometry changed to (%d, %d) %d x %d",
+      x, y, w, h);
+  gst_wl_window_set_render_rectangle (sink->window, x, y, w, h);
+
+  g_mutex_unlock (&sink->render_lock);
+}
+
+static void
+gst_wayland_sink_expose (GstVideoOverlay * overlay)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (overlay);
+
+  g_return_if_fail (sink != NULL);
+
+  GST_DEBUG_OBJECT (sink, "expose");
+
+  g_mutex_lock (&sink->render_lock);
+  if (sink->last_buffer && g_atomic_int_get (&sink->redraw_pending) == FALSE) {
+    GST_DEBUG_OBJECT (sink, "redrawing last buffer");
+    render_last_buffer (sink);
+  }
+  g_mutex_unlock (&sink->render_lock);
+}
+
+static void
+gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface * iface)
+{
+  iface->begin_geometry_change = gst_wayland_sink_begin_geometry_change;
+  iface->end_geometry_change = gst_wayland_sink_end_geometry_change;
+}
+
+static void
+gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (video);
+  g_return_if_fail (sink != NULL);
+
+  g_mutex_lock (&sink->render_lock);
+  if (!sink->window || !sink->window->subsurface) {
+    g_mutex_unlock (&sink->render_lock);
+    GST_INFO_OBJECT (sink,
+        "begin_geometry_change called without window, ignoring");
+    return;
+  }
+
+  wl_subsurface_set_sync (sink->window->subsurface);
+  g_mutex_unlock (&sink->render_lock);
+}
+
+static void
+gst_wayland_sink_end_geometry_change (GstWaylandVideo * video)
+{
+  GstWaylandSink *sink = GST_WAYLAND_SINK (video);
+  g_return_if_fail (sink != NULL);
+
+  g_mutex_lock (&sink->render_lock);
+  if (!sink->window || !sink->window->subsurface) {
+    g_mutex_unlock (&sink->render_lock);
+    GST_INFO_OBJECT (sink,
+        "end_geometry_change called without window, ignoring");
+    return;
+  }
+
+  wl_subsurface_set_desync (sink->window->subsurface);
+  g_mutex_unlock (&sink->render_lock);
+}
+
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h
index cb3383e..afbed40 100644
--- a/ext/wayland/gstwaylandsink.h
+++ b/ext/wayland/gstwaylandsink.h
@@ -22,26 +22,16 @@
 #ifndef __GST_WAYLAND_VIDEO_SINK_H__
 #define __GST_WAYLAND_VIDEO_SINK_H__
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <unistd.h>
-
 #include <gst/gst.h>
 #include <gst/video/video.h>
-#include <gst/video/gstvideosink.h>
-#include <gst/video/gstvideometa.h>
 
 #include <wayland-client.h>
 
+#include "wldisplay.h"
+#include "wlwindow.h"
+
+G_BEGIN_DECLS
+
 #define GST_TYPE_WAYLAND_SINK \
 	    (gst_wayland_sink_get_type())
 #define GST_WAYLAND_SINK(obj) \
@@ -55,55 +45,26 @@
 #define GST_WAYLAND_SINK_GET_CLASS(inst) \
         (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass))
 
-struct  display
-{
-  struct wl_display *display;
-  struct wl_registry *registry;
-  struct wl_compositor *compositor;
-  struct wl_shell *shell;
-  struct wl_shm *shm;
-  uint32_t formats;
-};
-
-struct window
-{
-  struct display *display;
-  int width, height;
-  struct wl_surface *surface;
-  struct wl_shell_surface *shell_surface;
-  struct wl_buffer *buffer;
-  struct wl_callback *callback;
-  guint redraw_pending :1;
-
-};
-
-struct shm_pool {
-  struct wl_shm_pool *pool;
-  size_t size;
-  size_t used;
-  void *data;
-};
-
 typedef struct _GstWaylandSink GstWaylandSink;
 typedef struct _GstWaylandSinkClass GstWaylandSinkClass;
 
-#include "waylandpool.h"
-
 struct _GstWaylandSink
 {
   GstVideoSink parent;
 
-  struct display *display;
-  struct window *window;
-  struct shm_pool *shm_pool;
-
+  GMutex display_lock;
+  GstWlDisplay *display;
+  GstWlWindow *window;
   GstBufferPool *pool;
 
-  GMutex wayland_lock;
+  gboolean video_info_changed;
+  GstVideoInfo video_info;
 
-  gint video_width;
-  gint video_height;
-  uint32_t format;
+  gchar *display_name;
+
+  gboolean redraw_pending;
+  GMutex render_lock;
+  GstBuffer *last_buffer;
 };
 
 struct _GstWaylandSinkClass
diff --git a/ext/wayland/scaler-client-protocol.h b/ext/wayland/scaler-client-protocol.h
new file mode 100644
index 0000000..bfdbd16
--- /dev/null
+++ b/ext/wayland/scaler-client-protocol.h
@@ -0,0 +1,146 @@
+/* 
+ * Copyright © 2013-2014 Collabora, Ltd.
+ * 
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied
+ * warranty.
+ * 
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#ifndef SCALER_CLIENT_PROTOCOL_H
+#define SCALER_CLIENT_PROTOCOL_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct wl_scaler;
+struct wl_viewport;
+
+extern const struct wl_interface wl_scaler_interface;
+extern const struct wl_interface wl_viewport_interface;
+
+#ifndef WL_SCALER_ERROR_ENUM
+#define WL_SCALER_ERROR_ENUM
+enum wl_scaler_error {
+	WL_SCALER_ERROR_VIEWPORT_EXISTS = 0,
+};
+#endif /* WL_SCALER_ERROR_ENUM */
+
+#define WL_SCALER_DESTROY	0
+#define WL_SCALER_GET_VIEWPORT	1
+
+static inline void
+wl_scaler_set_user_data(struct wl_scaler *wl_scaler, void *user_data)
+{
+	wl_proxy_set_user_data((struct wl_proxy *) wl_scaler, user_data);
+}
+
+static inline void *
+wl_scaler_get_user_data(struct wl_scaler *wl_scaler)
+{
+	return wl_proxy_get_user_data((struct wl_proxy *) wl_scaler);
+}
+
+static inline void
+wl_scaler_destroy(struct wl_scaler *wl_scaler)
+{
+	wl_proxy_marshal((struct wl_proxy *) wl_scaler,
+			 WL_SCALER_DESTROY);
+
+	wl_proxy_destroy((struct wl_proxy *) wl_scaler);
+}
+
+static inline struct wl_viewport *
+wl_scaler_get_viewport(struct wl_scaler *wl_scaler, struct wl_surface *surface)
+{
+	struct wl_proxy *id;
+
+	id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_scaler,
+			 WL_SCALER_GET_VIEWPORT, &wl_viewport_interface, NULL, surface);
+
+	return (struct wl_viewport *) id;
+}
+
+#ifndef WL_VIEWPORT_ERROR_ENUM
+#define WL_VIEWPORT_ERROR_ENUM
+enum wl_viewport_error {
+	WL_VIEWPORT_ERROR_BAD_VALUE = 0,
+};
+#endif /* WL_VIEWPORT_ERROR_ENUM */
+
+#define WL_VIEWPORT_DESTROY	0
+#define WL_VIEWPORT_SET	1
+#define WL_VIEWPORT_SET_SOURCE	2
+#define WL_VIEWPORT_SET_DESTINATION	3
+
+static inline void
+wl_viewport_set_user_data(struct wl_viewport *wl_viewport, void *user_data)
+{
+	wl_proxy_set_user_data((struct wl_proxy *) wl_viewport, user_data);
+}
+
+static inline void *
+wl_viewport_get_user_data(struct wl_viewport *wl_viewport)
+{
+	return wl_proxy_get_user_data((struct wl_proxy *) wl_viewport);
+}
+
+static inline void
+wl_viewport_destroy(struct wl_viewport *wl_viewport)
+{
+	wl_proxy_marshal((struct wl_proxy *) wl_viewport,
+			 WL_VIEWPORT_DESTROY);
+
+	wl_proxy_destroy((struct wl_proxy *) wl_viewport);
+}
+
+static inline void
+wl_viewport_set(struct wl_viewport *wl_viewport, wl_fixed_t src_x, wl_fixed_t src_y, wl_fixed_t src_width, wl_fixed_t src_height, int32_t dst_width, int32_t dst_height)
+{
+	wl_proxy_marshal((struct wl_proxy *) wl_viewport,
+			 WL_VIEWPORT_SET, src_x, src_y, src_width, src_height, dst_width, dst_height);
+}
+
+static inline void
+wl_viewport_set_source(struct wl_viewport *wl_viewport, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height)
+{
+	wl_proxy_marshal((struct wl_proxy *) wl_viewport,
+			 WL_VIEWPORT_SET_SOURCE, x, y, width, height);
+}
+
+static inline void
+wl_viewport_set_destination(struct wl_viewport *wl_viewport, int32_t width, int32_t height)
+{
+	wl_proxy_marshal((struct wl_proxy *) wl_viewport,
+			 WL_VIEWPORT_SET_DESTINATION, width, height);
+}
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/ext/wayland/scaler-protocol.c b/ext/wayland/scaler-protocol.c
new file mode 100644
index 0000000..badfb98
--- /dev/null
+++ b/ext/wayland/scaler-protocol.c
@@ -0,0 +1,67 @@
+/* 
+ * Copyright © 2013-2014 Collabora, Ltd.
+ * 
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied
+ * warranty.
+ * 
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface wl_viewport_interface;
+
+static const struct wl_interface *types[] = {
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	&wl_viewport_interface,
+	&wl_surface_interface,
+};
+
+static const struct wl_message wl_scaler_requests[] = {
+	{ "destroy", "", types + 0 },
+	{ "get_viewport", "no", types + 6 },
+};
+
+WL_EXPORT const struct wl_interface wl_scaler_interface = {
+	"wl_scaler", 2,
+	2, wl_scaler_requests,
+	0, NULL,
+};
+
+static const struct wl_message wl_viewport_requests[] = {
+	{ "destroy", "", types + 0 },
+	{ "set", "ffffii", types + 0 },
+	{ "set_source", "2ffff", types + 0 },
+	{ "set_destination", "2ii", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface wl_viewport_interface = {
+	"wl_viewport", 2,
+	4, wl_viewport_requests,
+	0, NULL,
+};
+
diff --git a/ext/wayland/scaler.xml b/ext/wayland/scaler.xml
new file mode 100644
index 0000000..e21ae5b
--- /dev/null
+++ b/ext/wayland/scaler.xml
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="scaler">
+
+  <copyright>
+    Copyright © 2013-2014 Collabora, Ltd.
+
+    Permission to use, copy, modify, distribute, and sell this
+    software and its documentation for any purpose is hereby granted
+    without fee, provided that the above copyright notice appear in
+    all copies and that both that copyright notice and this permission
+    notice appear in supporting documentation, and that the name of
+    the copyright holders not be used in advertising or publicity
+    pertaining to distribution of the software without specific,
+    written prior permission.  The copyright holders make no
+    representations about the suitability of this software for any
+    purpose.  It is provided "as is" without express or implied
+    warranty.
+
+    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+    THIS SOFTWARE.
+  </copyright>
+
+  <interface name="wl_scaler" version="2">
+    <description summary="surface cropping and scaling">
+      The global interface exposing surface cropping and scaling
+      capabilities is used to instantiate an interface extension for a
+      wl_surface object. This extended interface will then allow
+      cropping and scaling the surface contents, effectively
+      disconnecting the direct relationship between the buffer and the
+      surface size.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="unbind from the cropping and scaling interface">
+	Informs the server that the client will not be using this
+	protocol object anymore. This does not affect any other objects,
+	wl_viewport objects included.
+      </description>
+    </request>
+
+    <enum name="error">
+      <entry name="viewport_exists" value="0"
+             summary="the surface already has a viewport object associated"/>
+    </enum>
+
+    <request name="get_viewport">
+      <description summary="extend surface interface for crop and scale">
+	Instantiate an interface extension for the given wl_surface to
+	crop and scale its content. If the given wl_surface already has
+	a wl_viewport object associated, the viewport_exists
+	protocol error is raised.
+      </description>
+
+      <arg name="id" type="new_id" interface="wl_viewport"
+           summary="the new viewport interface id"/>
+      <arg name="surface" type="object" interface="wl_surface"
+           summary="the surface"/>
+    </request>
+  </interface>
+
+  <interface name="wl_viewport" version="2">
+    <description summary="crop and scale interface to a wl_surface">
+      An additional interface to a wl_surface object, which allows the
+      client to specify the cropping and scaling of the surface
+      contents.
+
+      This interface allows to define the source rectangle (src_x,
+      src_y, src_width, src_height) from where to take the wl_buffer
+      contents, and scale that to destination size (dst_width,
+      dst_height). This state is double-buffered, and is applied on the
+      next wl_surface.commit.
+
+      The two parts of crop and scale state are independent: the source
+      rectangle, and the destination size. Initially both are unset, that
+      is, no scaling is applied. The whole of the current wl_buffer is
+      used as the source, and the surface size is as defined in
+      wl_surface.attach.
+
+      If the destination size is set, it causes the surface size to become
+      dst_width, dst_height. The source (rectangle) is scaled to exactly
+      this size. This overrides whatever the attached wl_buffer size is,
+      unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
+      has no content and therefore no size. Otherwise, the size is always
+      at least 1x1 in surface coordinates.
+
+      If the source rectangle is set, it defines what area of the
+      wl_buffer is taken as the source. If the source rectangle is set and
+      the destination size is not set, the surface size becomes the source
+      rectangle size rounded up to the nearest integer. If the source size
+      is already exactly integers, this results in cropping without scaling.
+
+      The coordinate transformations from buffer pixel coordinates up to
+      the surface-local coordinates happen in the following order:
+        1. buffer_transform (wl_surface.set_buffer_transform)
+        2. buffer_scale (wl_surface.set_buffer_scale)
+        3. crop and scale (wl_viewport.set*)
+      This means, that the source rectangle coordinates of crop and scale
+      are given in the coordinates after the buffer transform and scale,
+      i.e. in the coordinates that would be the surface-local coordinates
+      if the crop and scale was not applied.
+
+      If the source rectangle is partially or completely outside of the
+      wl_buffer, then the surface contents are undefined (not void), and
+      the surface size is still dst_width, dst_height.
+
+      The x, y arguments of wl_surface.attach are applied as normal to
+      the surface. They indicate how many pixels to remove from the
+      surface size from the left and the top. In other words, they are
+      still in the surface-local coordinate system, just like dst_width
+      and dst_height are.
+
+      If the wl_surface associated with the wl_viewport is destroyed,
+      the wl_viewport object becomes inert.
+
+      If the wl_viewport object is destroyed, the crop and scale
+      state is removed from the wl_surface. The change will be applied
+      on the next wl_surface.commit.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="remove scaling and cropping from the surface">
+	The associated wl_surface's crop and scale state is removed.
+	The change is applied on the next wl_surface.commit.
+      </description>
+    </request>
+
+    <enum name="error">
+      <entry name="bad_value" value="0"
+             summary="negative or zero values in width or height"/>
+    </enum>
+
+    <request name="set">
+      <description summary="set the crop and scale state">
+	Set both source rectangle and destination size of the associated
+	wl_surface. See wl_viewport for the description, and relation to
+	the wl_buffer size.
+
+	The bad_value protocol error is raised if src_width or
+	src_height is negative, or if dst_width or dst_height is not
+	positive.
+
+	The crop and scale state is double-buffered state, and will be
+	applied on the next wl_surface.commit.
+
+	Arguments dst_x and dst_y do not exist here, use the x and y
+	arguments to wl_surface.attach. The x, y, dst_width, and dst_height
+	define the surface-local coordinate system irrespective of the
+	attached wl_buffer size.
+      </description>
+
+      <arg name="src_x" type="fixed" summary="source rectangle x"/>
+      <arg name="src_y" type="fixed" summary="source rectangle y"/>
+      <arg name="src_width" type="fixed" summary="source rectangle width"/>
+      <arg name="src_height" type="fixed" summary="source rectangle height"/>
+      <arg name="dst_width" type="int" summary="surface width"/>
+      <arg name="dst_height" type="int" summary="surface height"/>
+    </request>
+
+    <request name="set_source" since="2">
+      <description summary="set the source rectangle for cropping">
+	Set the source rectangle of the associated wl_surface. See
+	wl_viewport for the description, and relation to the wl_buffer
+	size.
+
+	If width is -1.0 and height is -1.0, the destination size is unset
+	instead. Any other pair of values for width and height that
+	contains zero or negative values raises the bad_value protocol
+	error.
+
+	The crop and scale state is double-buffered state, and will be
+	applied on the next wl_surface.commit.
+      </description>
+
+      <arg name="x" type="fixed" summary="source rectangle x"/>
+      <arg name="y" type="fixed" summary="source rectangle y"/>
+      <arg name="width" type="fixed" summary="source rectangle width"/>
+      <arg name="height" type="fixed" summary="source rectangle height"/>
+    </request>
+
+    <request name="set_destination" since="2">
+      <description summary="set the surface size for scaling">
+	Set the destination size of the associated wl_surface. See
+	wl_viewport for the description, and relation to the wl_buffer
+	size.
+
+	If width is -1 and height is -1, the destination size is unset
+	instead. Any other pair of values for width and height that
+	contains zero or negative values raises the bad_value protocol
+	error.
+
+	The crop and scale state is double-buffered state, and will be
+	applied on the next wl_surface.commit.
+
+	Arguments x and y do not exist here, use the x and y arguments to
+	wl_surface.attach. The x, y, width, and height define the
+	surface-local coordinate system irrespective of the attached
+	wl_buffer size.
+      </description>
+
+      <arg name="width" type="int" summary="surface width"/>
+      <arg name="height" type="int" summary="surface height"/>
+    </request>
+  </interface>
+</protocol>
diff --git a/ext/wayland/waylandpool.c b/ext/wayland/waylandpool.c
index 9eb028a..de20602 100644
--- a/ext/wayland/waylandpool.c
+++ b/ext/wayland/waylandpool.c
@@ -1,7 +1,8 @@
 /* GStreamer
  * Copyright (C) 2012 Intel Corporation
  * Copyright (C) 2012 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
-
+ * Copyright (C) 2014 Collabora Ltd.
+ *
  * 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
@@ -22,16 +23,20 @@
 #include "config.h"
 #endif
 
-/* Object header */
-#include "gstwaylandsink.h"
+#include "waylandpool.h"
+#include "wldisplay.h"
+#include "wlvideoformat.h"
 
-/* Debugging category */
-#include <gst/gstinfo.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
 
-/* Helper functions */
-#include <gst/video/video.h>
-#include <gst/video/gstvideometa.h>
-#include <gst/video/gstvideopool.h>
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
 
 /* wl metadata */
 GType
@@ -51,8 +56,7 @@
 static void
 gst_wl_meta_free (GstWlMeta * meta, GstBuffer * buffer)
 {
-  gst_object_unref (meta->sink);
-  munmap (meta->data, meta->size);
+  GST_DEBUG ("destroying wl_buffer %p", meta->wbuffer);
   wl_buffer_destroy (meta->wbuffer);
 }
 
@@ -74,16 +78,131 @@
 
 /* bufferpool */
 static void gst_wayland_buffer_pool_finalize (GObject * object);
+static gboolean gst_wayland_buffer_pool_set_config (GstBufferPool * pool,
+    GstStructure * config);
+static gboolean gst_wayland_buffer_pool_start (GstBufferPool * pool);
+static gboolean gst_wayland_buffer_pool_stop (GstBufferPool * pool);
+static GstFlowReturn gst_wayland_buffer_pool_alloc (GstBufferPool * pool,
+    GstBuffer ** buffer, GstBufferPoolAcquireParams * params);
 
 #define gst_wayland_buffer_pool_parent_class parent_class
 G_DEFINE_TYPE (GstWaylandBufferPool, gst_wayland_buffer_pool,
     GST_TYPE_BUFFER_POOL);
 
-static gboolean
-wayland_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
+static void
+gst_wayland_buffer_pool_class_init (GstWaylandBufferPoolClass * klass)
 {
-  GstWaylandBufferPool *wpool = GST_WAYLAND_BUFFER_POOL_CAST (pool);
-  GstVideoInfo info;
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstBufferPoolClass *gstbufferpool_class = (GstBufferPoolClass *) klass;
+
+  gobject_class->finalize = gst_wayland_buffer_pool_finalize;
+
+  gstbufferpool_class->set_config = gst_wayland_buffer_pool_set_config;
+  gstbufferpool_class->start = gst_wayland_buffer_pool_start;
+  gstbufferpool_class->stop = gst_wayland_buffer_pool_stop;
+  gstbufferpool_class->alloc_buffer = gst_wayland_buffer_pool_alloc;
+}
+
+static void
+gst_wayland_buffer_pool_init (GstWaylandBufferPool * self)
+{
+  gst_video_info_init (&self->info);
+  g_mutex_init (&self->buffers_map_mutex);
+  self->buffers_map = g_hash_table_new (g_direct_hash, g_direct_equal);
+}
+
+static void
+gst_wayland_buffer_pool_finalize (GObject * object)
+{
+  GstWaylandBufferPool *pool = GST_WAYLAND_BUFFER_POOL_CAST (object);
+
+  if (pool->wl_pool)
+    gst_wayland_buffer_pool_stop (GST_BUFFER_POOL (pool));
+
+  g_mutex_clear (&pool->buffers_map_mutex);
+  g_hash_table_unref (pool->buffers_map);
+
+  g_object_unref (pool->display);
+
+  G_OBJECT_CLASS (gst_wayland_buffer_pool_parent_class)->finalize (object);
+}
+
+static void
+buffer_release (void *data, struct wl_buffer *wl_buffer)
+{
+  GstWaylandBufferPool *self = data;
+  GstBuffer *buffer;
+  GstWlMeta *meta;
+
+  g_mutex_lock (&self->buffers_map_mutex);
+  buffer = g_hash_table_lookup (self->buffers_map, wl_buffer);
+
+  GST_LOG_OBJECT (self, "wl_buffer::release (GstBuffer: %p)", buffer);
+
+  if (buffer) {
+    meta = gst_buffer_get_wl_meta (buffer);
+    if (meta->used_by_compositor) {
+      meta->used_by_compositor = FALSE;
+      /* unlock before unref because stop() may be called from here */
+      g_mutex_unlock (&self->buffers_map_mutex);
+      gst_buffer_unref (buffer);
+      return;
+    }
+  }
+  g_mutex_unlock (&self->buffers_map_mutex);
+}
+
+static const struct wl_buffer_listener buffer_listener = {
+  buffer_release
+};
+
+void
+gst_wayland_compositor_acquire_buffer (GstWaylandBufferPool * self,
+    GstBuffer * buffer)
+{
+  GstWlMeta *meta;
+
+  meta = gst_buffer_get_wl_meta (buffer);
+  g_return_if_fail (meta != NULL);
+  g_return_if_fail (meta->pool == self);
+  g_return_if_fail (meta->used_by_compositor == FALSE);
+
+  meta->used_by_compositor = TRUE;
+  gst_buffer_ref (buffer);
+}
+
+static void
+unref_used_buffers (gpointer key, gpointer value, gpointer data)
+{
+  GstBuffer *buffer = value;
+  GstWlMeta *meta = gst_buffer_get_wl_meta (buffer);
+  GList **to_unref = data;
+
+  if (meta->used_by_compositor) {
+    meta->used_by_compositor = FALSE;
+    *to_unref = g_list_prepend (*to_unref, buffer);
+  }
+}
+
+void
+gst_wayland_compositor_release_all_buffers (GstWaylandBufferPool * self)
+{
+  GList *to_unref = NULL;
+
+  g_mutex_lock (&self->buffers_map_mutex);
+  g_hash_table_foreach (self->buffers_map, unref_used_buffers, &to_unref);
+  g_mutex_unlock (&self->buffers_map_mutex);
+
+  /* unref without the lock because stop() may be called from here */
+  if (to_unref) {
+    g_list_free_full (to_unref, (GDestroyNotify) gst_buffer_unref);
+  }
+}
+
+static gboolean
+gst_wayland_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
+{
+  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL_CAST (pool);
   GstCaps *caps;
 
   if (!gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL))
@@ -93,19 +212,15 @@
     goto no_caps;
 
   /* now parse the caps from the config */
-  if (!gst_video_info_from_caps (&info, caps))
+  if (!gst_video_info_from_caps (&self->info, caps))
     goto wrong_caps;
 
-  GST_LOG_OBJECT (pool, "%dx%d, caps %" GST_PTR_FORMAT, info.width, info.height,
+  GST_LOG_OBJECT (pool, "%dx%d, caps %" GST_PTR_FORMAT,
+      GST_VIDEO_INFO_WIDTH (&self->info), GST_VIDEO_INFO_HEIGHT (&self->info),
       caps);
 
   /*Fixme: Enable metadata checking handling based on the config of pool */
 
-  wpool->caps = gst_caps_ref (caps);
-  wpool->info = info;
-  wpool->width = info.width;
-  wpool->height = info.height;
-
   return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
   /* ERRORS */
 wrong_config:
@@ -126,141 +241,126 @@
   }
 }
 
-static struct wl_shm_pool *
-make_shm_pool (struct display *display, int size, void **data)
+static gboolean
+gst_wayland_buffer_pool_start (GstBufferPool * pool)
 {
-  struct wl_shm_pool *pool;
+  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL (pool);
+  guint size = 0;
   int fd;
   char filename[1024];
   static int init = 0;
 
-  snprintf (filename, 256, "%s-%d-%s", "/tmp/wayland-shm", init++, "XXXXXX");
+  GST_DEBUG_OBJECT (self, "Initializing wayland buffer pool");
+
+  /* configure */
+  size = GST_VIDEO_INFO_SIZE (&self->info) * 15;
+
+  /* allocate shm pool */
+  snprintf (filename, 1024, "%s/%s-%d-%s", g_get_user_runtime_dir (),
+      "wayland-shm", init++, "XXXXXX");
 
   fd = mkstemp (filename);
   if (fd < 0) {
-    GST_ERROR ("open %s failed:", filename);
-    return NULL;
+    GST_ERROR_OBJECT (pool, "opening temp file %s failed: %s", filename,
+        strerror (errno));
+    return FALSE;
   }
   if (ftruncate (fd, size) < 0) {
-    GST_ERROR ("ftruncate failed:..!");
+    GST_ERROR_OBJECT (pool, "ftruncate failed: %s", strerror (errno));
     close (fd);
-    return NULL;
+    return FALSE;
   }
 
-  *data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-  if (*data == MAP_FAILED) {
-    GST_ERROR ("mmap failed: ");
+  self->data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+  if (self->data == MAP_FAILED) {
+    GST_ERROR_OBJECT (pool, "mmap failed: %s", strerror (errno));
     close (fd);
-    return NULL;
+    return FALSE;
   }
 
-  pool = wl_shm_create_pool (display->shm, fd, size);
-
+  self->wl_pool = wl_shm_create_pool (self->display->shm, fd, size);
+  unlink (filename);
   close (fd);
 
-  return pool;
+  self->size = size;
+  self->used = 0;
+
+  return GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
 }
 
-static struct shm_pool *
-shm_pool_create (struct display *display, size_t size)
+static gboolean
+gst_wayland_buffer_pool_stop (GstBufferPool * pool)
 {
-  struct shm_pool *pool = malloc (sizeof *pool);
+  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL (pool);
 
-  if (!pool)
-    return NULL;
+  GST_DEBUG_OBJECT (self, "Stopping wayland buffer pool");
 
-  pool->pool = make_shm_pool (display, size, &pool->data);
-  if (!pool->pool) {
-    free (pool);
-    return NULL;
-  }
+  munmap (self->data, self->size);
+  wl_shm_pool_destroy (self->wl_pool);
 
-  pool->size = size;
-  pool->used = 0;
+  self->wl_pool = NULL;
+  self->size = 0;
+  self->used = 0;
 
-  return pool;
-}
+  /* all buffers are about to be destroyed;
+   * we should no longer do anything with them */
+  g_mutex_lock (&self->buffers_map_mutex);
+  g_hash_table_remove_all (self->buffers_map);
+  g_mutex_unlock (&self->buffers_map_mutex);
 
-static void *
-shm_pool_allocate (struct shm_pool *pool, size_t size, int *offset)
-{
-  if (pool->used + size > pool->size)
-    return NULL;
-
-  *offset = pool->used;
-  pool->used += size;
-
-  return (char *) pool->data + *offset;
-}
-
-/* Start allocating from the beginning of the pool again */
-static void
-shm_pool_reset (struct shm_pool *pool)
-{
-  pool->used = 0;
-}
-
-static GstWlMeta *
-gst_buffer_add_wayland_meta (GstBuffer * buffer, GstWaylandBufferPool * wpool)
-{
-  GstWlMeta *wmeta;
-  GstWaylandSink *sink;
-  void *data;
-  gint offset;
-  guint stride = 0;
-  guint size = 0;
-
-  sink = wpool->sink;
-  stride = wpool->width * 4;
-  size = stride * wpool->height;
-
-  wmeta = (GstWlMeta *) gst_buffer_add_meta (buffer, GST_WL_META_INFO, NULL);
-  wmeta->sink = gst_object_ref (sink);
-
-  /*Fixme: size calculation should be more grcefull, have to consider the padding */
-  if (!sink->shm_pool) {
-    sink->shm_pool = shm_pool_create (sink->display, size * 15);
-    shm_pool_reset (sink->shm_pool);
-  }
-
-  if (!sink->shm_pool) {
-    GST_ERROR ("Failed to create shm_pool");
-    return NULL;
-  }
-
-  data = shm_pool_allocate (sink->shm_pool, size, &offset);
-  if (!data)
-    return NULL;
-
-  wmeta->wbuffer = wl_shm_pool_create_buffer (sink->shm_pool->pool, offset,
-      sink->video_width, sink->video_height, stride, sink->format);
-
-  wmeta->data = data;
-  wmeta->size = size;
-
-  gst_buffer_append_memory (buffer,
-      gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
-          size, 0, size, NULL, NULL));
-
-
-  return wmeta;
+  return GST_BUFFER_POOL_CLASS (parent_class)->stop (pool);
 }
 
 static GstFlowReturn
-wayland_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
+gst_wayland_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
     GstBufferPoolAcquireParams * params)
 {
-  GstWaylandBufferPool *w_pool = GST_WAYLAND_BUFFER_POOL_CAST (pool);
-  GstBuffer *w_buffer;
+  GstWaylandBufferPool *self = GST_WAYLAND_BUFFER_POOL_CAST (pool);
+  gint width, height, stride;
+  gsize size;
+  enum wl_shm_format format;
+  gint offset;
+  void *data;
   GstWlMeta *meta;
 
-  w_buffer = gst_buffer_new ();
-  meta = gst_buffer_add_wayland_meta (w_buffer, w_pool);
-  if (meta == NULL) {
-    gst_buffer_unref (w_buffer);
+  width = GST_VIDEO_INFO_WIDTH (&self->info);
+  height = GST_VIDEO_INFO_HEIGHT (&self->info);
+  stride = GST_VIDEO_INFO_PLANE_STRIDE (&self->info, 0);
+  size = GST_VIDEO_INFO_SIZE (&self->info);
+  format =
+      gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&self->info));
+
+  GST_DEBUG_OBJECT (self, "Allocating buffer of size %" G_GSSIZE_FORMAT
+      " (%d x %d, stride %d), format %s", size, width, height, stride,
+      gst_wayland_format_to_string (format));
+
+  /* try to reserve another memory block from the shm pool */
+  if (self->used + size > self->size)
     goto no_buffer;
-  }
-  *buffer = w_buffer;
+
+  offset = self->used;
+  self->used += size;
+  data = ((gchar *) self->data) + offset;
+
+  /* create buffer and its metadata object */
+  *buffer = gst_buffer_new ();
+  meta = (GstWlMeta *) gst_buffer_add_meta (*buffer, GST_WL_META_INFO, NULL);
+  meta->pool = self;
+  meta->wbuffer = wl_shm_pool_create_buffer (self->wl_pool, offset,
+      width, height, stride, format);
+  meta->used_by_compositor = FALSE;
+
+  /* configure listening to wl_buffer.release */
+  g_mutex_lock (&self->buffers_map_mutex);
+  g_hash_table_insert (self->buffers_map, meta->wbuffer, *buffer);
+  g_mutex_unlock (&self->buffers_map_mutex);
+
+  wl_buffer_add_listener (meta->wbuffer, &buffer_listener, self);
+
+  /* add the allocated memory on the GstBuffer */
+  gst_buffer_append_memory (*buffer,
+      gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
+          size, 0, size, NULL, NULL));
 
   return GST_FLOW_OK;
 
@@ -273,40 +373,13 @@
 }
 
 GstBufferPool *
-gst_wayland_buffer_pool_new (GstWaylandSink * waylandsink)
+gst_wayland_buffer_pool_new (GstWlDisplay * display)
 {
   GstWaylandBufferPool *pool;
 
-  g_return_val_if_fail (GST_IS_WAYLAND_SINK (waylandsink), NULL);
+  g_return_val_if_fail (GST_IS_WL_DISPLAY (display), NULL);
   pool = g_object_new (GST_TYPE_WAYLAND_BUFFER_POOL, NULL);
-  pool->sink = gst_object_ref (waylandsink);
+  pool->display = g_object_ref (display);
 
   return GST_BUFFER_POOL_CAST (pool);
 }
-
-static void
-gst_wayland_buffer_pool_class_init (GstWaylandBufferPoolClass * klass)
-{
-  GObjectClass *gobject_class = (GObjectClass *) klass;
-  GstBufferPoolClass *gstbufferpool_class = (GstBufferPoolClass *) klass;
-
-  gobject_class->finalize = gst_wayland_buffer_pool_finalize;
-
-  gstbufferpool_class->set_config = wayland_buffer_pool_set_config;
-  gstbufferpool_class->alloc_buffer = wayland_buffer_pool_alloc;
-}
-
-static void
-gst_wayland_buffer_pool_init (GstWaylandBufferPool * pool)
-{
-}
-
-static void
-gst_wayland_buffer_pool_finalize (GObject * object)
-{
-  GstWaylandBufferPool *pool = GST_WAYLAND_BUFFER_POOL_CAST (object);
-
-  gst_object_unref (pool->sink);
-
-  G_OBJECT_CLASS (gst_wayland_buffer_pool_parent_class)->finalize (object);
-}
diff --git a/ext/wayland/waylandpool.h b/ext/wayland/waylandpool.h
index 4089da0..ad5020b 100644
--- a/ext/wayland/waylandpool.h
+++ b/ext/wayland/waylandpool.h
@@ -1,6 +1,7 @@
 /* GStreamer Wayland buffer pool
  * Copyright (C) 2012 Intel Corporation
  * Copyright (C) 2012 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+ * Copyright (C) 2014 Collabora Ltd.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -21,16 +22,27 @@
 #ifndef __GST_WAYLAND_BUFFER_POOL_H__
 #define __GST_WAYLAND_BUFFER_POOL_H__
 
+#include <gst/video/video.h>
+#include <gst/video/gstvideometa.h>
+
+#include "wldisplay.h"
+
 G_BEGIN_DECLS
 
-#include "gstwaylandsink.h"
-typedef struct _GstWlMeta GstWlMeta;
+#define GST_TYPE_WAYLAND_BUFFER_POOL      (gst_wayland_buffer_pool_get_type())
+#define GST_IS_WAYLAND_BUFFER_POOL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WAYLAND_BUFFER_POOL))
+#define GST_WAYLAND_BUFFER_POOL(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WAYLAND_BUFFER_POOL, GstWaylandBufferPool))
+#define GST_WAYLAND_BUFFER_POOL_CAST(obj) ((GstWaylandBufferPool*)(obj))
 
 typedef struct _GstWaylandBufferPool GstWaylandBufferPool;
 typedef struct _GstWaylandBufferPoolClass GstWaylandBufferPoolClass;
 
+/* buffer meta */
+typedef struct _GstWlMeta GstWlMeta;
+
 GType gst_wl_meta_api_get_type (void);
 #define GST_WL_META_API_TYPE  (gst_wl_meta_api_get_type())
+
 const GstMetaInfo * gst_wl_meta_get_info (void);
 #define GST_WL_META_INFO  (gst_wl_meta_get_info())
 
@@ -39,30 +51,28 @@
 struct _GstWlMeta {
   GstMeta meta;
 
-  GstWaylandSink *sink;
-
+  GstWaylandBufferPool *pool;
   struct wl_buffer *wbuffer;
-  void *data;
-  size_t size;
+  gboolean used_by_compositor;
 };
 
-/* buffer pool functions */
-#define GST_TYPE_WAYLAND_BUFFER_POOL      (gst_wayland_buffer_pool_get_type())
-#define GST_IS_WAYLAND_BUFFER_POOL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WAYLAND_BUFFER_POOL))
-#define GST_WAYLAND_BUFFER_POOL(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WAYLAND_BUFFER_POOL, GstWaylandBufferPool))
-#define GST_WAYLAND_BUFFER_POOL_CAST(obj) ((GstWaylandBufferPool*)(obj))
-
+/* buffer pool */
 struct _GstWaylandBufferPool
 {
   GstBufferPool bufferpool;
+  GstWlDisplay *display;
 
-  GstWaylandSink *sink;
-
-  /*Fixme: keep all these in GstWaylandBufferPoolPrivate*/
-  GstCaps *caps;
+  /* external configuration */
   GstVideoInfo info;
-  guint width;
-  guint height;
+
+  /* allocation data */
+  struct wl_shm_pool *wl_pool;
+  size_t size;
+  size_t used;
+  void *data;
+
+  GMutex buffers_map_mutex;
+  GHashTable *buffers_map;
 };
 
 struct _GstWaylandBufferPoolClass
@@ -72,7 +82,12 @@
 
 GType gst_wayland_buffer_pool_get_type (void);
 
-GstBufferPool *gst_wayland_buffer_pool_new (GstWaylandSink * waylandsink);
+GstBufferPool *gst_wayland_buffer_pool_new (GstWlDisplay * display);
+
+
+void gst_wayland_compositor_acquire_buffer (GstWaylandBufferPool * self,
+    GstBuffer * buffer);
+void gst_wayland_compositor_release_all_buffers (GstWaylandBufferPool * self);
 
 G_END_DECLS
 
diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c
new file mode 100644
index 0000000..46efab9
--- /dev/null
+++ b/ext/wayland/wldisplay.c
@@ -0,0 +1,268 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "wldisplay.h"
+
+#include <errno.h>
+
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
+
+G_DEFINE_TYPE (GstWlDisplay, gst_wl_display, G_TYPE_OBJECT);
+
+static void gst_wl_display_finalize (GObject * gobject);
+
+static void
+gst_wl_display_class_init (GstWlDisplayClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->finalize = gst_wl_display_finalize;
+}
+
+static void
+gst_wl_display_init (GstWlDisplay * self)
+{
+  self->formats = g_array_new (FALSE, FALSE, sizeof (uint32_t));
+  self->wl_fd_poll = gst_poll_new (TRUE);
+}
+
+static void
+gst_wl_display_finalize (GObject * gobject)
+{
+  GstWlDisplay *self = GST_WL_DISPLAY (gobject);
+
+  gst_poll_set_flushing (self->wl_fd_poll, TRUE);
+
+  if (self->thread)
+    g_thread_join (self->thread);
+
+  g_array_unref (self->formats);
+  gst_poll_free (self->wl_fd_poll);
+
+  if (self->shm)
+    wl_shm_destroy (self->shm);
+
+  if (self->shell)
+    wl_shell_destroy (self->shell);
+
+  if (self->compositor)
+    wl_compositor_destroy (self->compositor);
+
+  if (self->subcompositor)
+    wl_subcompositor_destroy (self->subcompositor);
+
+  if (self->registry)
+    wl_registry_destroy (self->registry);
+
+  if (self->queue)
+    wl_event_queue_destroy (self->queue);
+
+  if (self->own_display) {
+    wl_display_flush (self->display);
+    wl_display_disconnect (self->display);
+  }
+
+  G_OBJECT_CLASS (gst_wl_display_parent_class)->finalize (gobject);
+}
+
+static void
+sync_callback (void *data, struct wl_callback *callback, uint32_t serial)
+{
+  gboolean *done = data;
+  *done = TRUE;
+}
+
+static const struct wl_callback_listener sync_listener = {
+  sync_callback
+};
+
+static gint
+gst_wl_display_roundtrip (GstWlDisplay * self)
+{
+  struct wl_callback *callback;
+  gint ret = 0;
+  gboolean done = FALSE;
+
+  g_return_val_if_fail (self != NULL, -1);
+
+  /* We don't own the display, process only our queue */
+  callback = wl_display_sync (self->display);
+  wl_callback_add_listener (callback, &sync_listener, &done);
+  wl_proxy_set_queue ((struct wl_proxy *) callback, self->queue);
+  while (ret != -1 && !done)
+    ret = wl_display_dispatch_queue (self->display, self->queue);
+  wl_callback_destroy (callback);
+
+  return ret;
+}
+
+static void
+shm_format (void *data, struct wl_shm *wl_shm, uint32_t format)
+{
+  GstWlDisplay *self = data;
+
+  g_array_append_val (self->formats, format);
+}
+
+static const struct wl_shm_listener shm_listener = {
+  shm_format
+};
+
+static void
+registry_handle_global (void *data, struct wl_registry *registry,
+    uint32_t id, const char *interface, uint32_t version)
+{
+  GstWlDisplay *self = data;
+
+  if (g_strcmp0 (interface, "wl_compositor") == 0) {
+    self->compositor = wl_registry_bind (registry, id, &wl_compositor_interface,
+        MIN (version, 3));
+  } else if (g_strcmp0 (interface, "wl_subcompositor") == 0) {
+    self->subcompositor =
+        wl_registry_bind (registry, id, &wl_subcompositor_interface, 1);
+  } else if (g_strcmp0 (interface, "wl_shell") == 0) {
+    self->shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);
+  } else if (g_strcmp0 (interface, "wl_shm") == 0) {
+    self->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);
+    wl_shm_add_listener (self->shm, &shm_listener, self);
+  } else if (g_strcmp0 (interface, "wl_scaler") == 0) {
+    self->scaler = wl_registry_bind (registry, id, &wl_scaler_interface, 2);
+  }
+}
+
+static const struct wl_registry_listener registry_listener = {
+  registry_handle_global
+};
+
+static gpointer
+gst_wl_display_thread_run (gpointer data)
+{
+  GstWlDisplay *self = data;
+  GstPollFD pollfd = GST_POLL_FD_INIT;
+
+  pollfd.fd = wl_display_get_fd (self->display);
+  gst_poll_add_fd (self->wl_fd_poll, &pollfd);
+  gst_poll_fd_ctl_read (self->wl_fd_poll, &pollfd, TRUE);
+
+  /* main loop */
+  while (1) {
+    while (wl_display_prepare_read_queue (self->display, self->queue) != 0)
+      wl_display_dispatch_queue_pending (self->display, self->queue);
+    wl_display_flush (self->display);
+
+    if (gst_poll_wait (self->wl_fd_poll, GST_CLOCK_TIME_NONE) < 0) {
+      gboolean normal = (errno == EBUSY);
+      wl_display_cancel_read (self->display);
+      if (normal)
+        break;
+      else
+        goto error;
+    } else {
+      wl_display_read_events (self->display);
+      wl_display_dispatch_queue_pending (self->display, self->queue);
+    }
+  }
+
+  return NULL;
+
+error:
+  GST_ERROR ("Error communicating with the wayland server");
+  return NULL;
+}
+
+GstWlDisplay *
+gst_wl_display_new (const gchar * name, GError ** error)
+{
+  struct wl_display *display;
+
+  display = wl_display_connect (name);
+
+  if (!display) {
+    *error = g_error_new (g_quark_from_static_string ("GstWlDisplay"), 0,
+        "Failed to connect to the wayland display '%s'",
+        name ? name : "(default)");
+    return NULL;
+  } else {
+    return gst_wl_display_new_existing (display, TRUE, error);
+  }
+}
+
+GstWlDisplay *
+gst_wl_display_new_existing (struct wl_display * display,
+    gboolean take_ownership, GError ** error)
+{
+  GstWlDisplay *self;
+  GError *err = NULL;
+  gint i;
+
+  g_return_val_if_fail (display != NULL, NULL);
+
+  self = g_object_new (GST_TYPE_WL_DISPLAY, NULL);
+  self->display = display;
+  self->own_display = take_ownership;
+
+  self->queue = wl_display_create_queue (self->display);
+  self->registry = wl_display_get_registry (self->display);
+  wl_proxy_set_queue ((struct wl_proxy *) self->registry, self->queue);
+  wl_registry_add_listener (self->registry, &registry_listener, self);
+
+  /* we need exactly 2 roundtrips to discover global objects and their state */
+  for (i = 0; i < 2; i++) {
+    if (gst_wl_display_roundtrip (self) < 0) {
+      *error = g_error_new (g_quark_from_static_string ("GstWlDisplay"), 0,
+          "Error communicating with the wayland display");
+      g_object_unref (self);
+      return NULL;
+    }
+  }
+
+  /* verify we got all the required interfaces */
+#define VERIFY_INTERFACE_EXISTS(var, interface) \
+  if (!self->var) { \
+    g_set_error (error, g_quark_from_static_string ("GstWlDisplay"), 0, \
+        "Could not bind to " interface ". Either it is not implemented in " \
+        "the compositor, or the implemented version doesn't match"); \
+    g_object_unref (self); \
+    return NULL; \
+  }
+
+  VERIFY_INTERFACE_EXISTS (compositor, "wl_compositor");
+  VERIFY_INTERFACE_EXISTS (subcompositor, "wl_subcompositor");
+  VERIFY_INTERFACE_EXISTS (shell, "wl_shell");
+  VERIFY_INTERFACE_EXISTS (shm, "wl_shm");
+  VERIFY_INTERFACE_EXISTS (scaler, "wl_scaler");
+
+#undef VERIFY_INTERFACE_EXISTS
+
+  self->thread = g_thread_try_new ("GstWlDisplay", gst_wl_display_thread_run,
+      self, &err);
+  if (err) {
+    g_propagate_prefixed_error (error, err,
+        "Failed to start thread for the display's events");
+    g_object_unref (self);
+    return NULL;
+  }
+
+  return self;
+}
diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h
new file mode 100644
index 0000000..0224406
--- /dev/null
+++ b/ext/wayland/wldisplay.h
@@ -0,0 +1,76 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GST_WL_DISPLAY_H__
+#define __GST_WL_DISPLAY_H__
+
+#include <gst/gst.h>
+#include <wayland-client.h>
+#include "scaler-client-protocol.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WL_DISPLAY                  (gst_wl_display_get_type ())
+#define GST_WL_DISPLAY(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplay))
+#define GST_IS_WL_DISPLAY(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_DISPLAY))
+#define GST_WL_DISPLAY_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
+#define GST_IS_WL_DISPLAY_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_DISPLAY))
+#define GST_WL_DISPLAY_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplayClass))
+
+typedef struct _GstWlDisplay GstWlDisplay;
+typedef struct _GstWlDisplayClass GstWlDisplayClass;
+
+struct _GstWlDisplay
+{
+  GObject parent_instance;
+
+  /* public objects */
+  struct wl_display *display;
+  struct wl_event_queue *queue;
+
+  /* globals */
+  struct wl_registry *registry;
+  struct wl_compositor *compositor;
+  struct wl_subcompositor *subcompositor;
+  struct wl_shell *shell;
+  struct wl_shm *shm;
+  struct wl_scaler *scaler;
+  GArray *formats;
+
+  /* private */
+  gboolean own_display;
+  GThread *thread;
+  GstPoll *wl_fd_poll;
+};
+
+struct _GstWlDisplayClass
+{
+  GObjectClass parent_class;
+};
+
+GType gst_wl_display_get_type (void);
+
+GstWlDisplay *gst_wl_display_new (const gchar * name, GError ** error);
+GstWlDisplay *gst_wl_display_new_existing (struct wl_display * display,
+    gboolean take_ownership, GError ** error);
+
+G_END_DECLS
+
+#endif /* __GST_WL_DISPLAY_H__ */
diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c
new file mode 100644
index 0000000..f2166f9
--- /dev/null
+++ b/ext/wayland/wlvideoformat.c
@@ -0,0 +1,111 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2011 Intel Corporation
+ * Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+ * Copyright (C) 2012 Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "wlvideoformat.h"
+
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
+
+typedef struct
+{
+  enum wl_shm_format wl_format;
+  GstVideoFormat gst_format;
+} wl_VideoFormat;
+
+static const wl_VideoFormat formats[] = {
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+  {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_xRGB},
+  {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_ARGB},
+  {WL_SHM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_xBGR},
+  {WL_SHM_FORMAT_RGBX8888, GST_VIDEO_FORMAT_RGBx},
+  {WL_SHM_FORMAT_BGRX8888, GST_VIDEO_FORMAT_BGRx},
+  {WL_SHM_FORMAT_ABGR8888, GST_VIDEO_FORMAT_ABGR},
+  {WL_SHM_FORMAT_RGBA8888, GST_VIDEO_FORMAT_RGBA},
+  {WL_SHM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_BGRA},
+#else
+  {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_BGRx},
+  {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_BGRA},
+  {WL_SHM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_RGBx},
+  {WL_SHM_FORMAT_RGBX8888, GST_VIDEO_FORMAT_xBGR},
+  {WL_SHM_FORMAT_BGRX8888, GST_VIDEO_FORMAT_xRGB},
+  {WL_SHM_FORMAT_ABGR8888, GST_VIDEO_FORMAT_RGBA},
+  {WL_SHM_FORMAT_RGBA8888, GST_VIDEO_FORMAT_ABGR},
+  {WL_SHM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_ARGB},
+#endif
+  {WL_SHM_FORMAT_RGB888, GST_VIDEO_FORMAT_RGB},
+  {WL_SHM_FORMAT_BGR888, GST_VIDEO_FORMAT_BGR},
+  {WL_SHM_FORMAT_RGB565, GST_VIDEO_FORMAT_RGB16},
+  {WL_SHM_FORMAT_BGR565, GST_VIDEO_FORMAT_BGR16},
+
+  {WL_SHM_FORMAT_YUYV, GST_VIDEO_FORMAT_YUY2},
+  {WL_SHM_FORMAT_YVYU, GST_VIDEO_FORMAT_YVYU},
+  {WL_SHM_FORMAT_UYVY, GST_VIDEO_FORMAT_UYVY},
+  {WL_SHM_FORMAT_AYUV, GST_VIDEO_FORMAT_AYUV},
+  {WL_SHM_FORMAT_NV12, GST_VIDEO_FORMAT_NV12},
+  {WL_SHM_FORMAT_NV21, GST_VIDEO_FORMAT_NV21},
+  {WL_SHM_FORMAT_NV16, GST_VIDEO_FORMAT_NV16},
+  {WL_SHM_FORMAT_YUV410, GST_VIDEO_FORMAT_YUV9},
+  {WL_SHM_FORMAT_YVU410, GST_VIDEO_FORMAT_YVU9},
+  {WL_SHM_FORMAT_YUV411, GST_VIDEO_FORMAT_Y41B},
+  {WL_SHM_FORMAT_YUV420, GST_VIDEO_FORMAT_I420},
+  {WL_SHM_FORMAT_YVU420, GST_VIDEO_FORMAT_YV12},
+  {WL_SHM_FORMAT_YUV422, GST_VIDEO_FORMAT_Y42B},
+  {WL_SHM_FORMAT_YUV444, GST_VIDEO_FORMAT_v308},
+};
+
+enum wl_shm_format
+gst_video_format_to_wayland_format (GstVideoFormat format)
+{
+  guint i;
+
+  for (i = 0; i < G_N_ELEMENTS (formats); i++)
+    if (formats[i].gst_format == format)
+      return formats[i].wl_format;
+
+  GST_WARNING ("wayland video format not found");
+  return -1;
+}
+
+GstVideoFormat
+gst_wayland_format_to_video_format (enum wl_shm_format wl_format)
+{
+  guint i;
+
+  for (i = 0; i < G_N_ELEMENTS (formats); i++)
+    if (formats[i].wl_format == wl_format)
+      return formats[i].gst_format;
+
+  GST_WARNING ("gst video format not found");
+  return GST_VIDEO_FORMAT_UNKNOWN;
+}
+
+const gchar *
+gst_wayland_format_to_string (enum wl_shm_format wl_format)
+{
+  return gst_video_format_to_string
+      (gst_wayland_format_to_video_format (wl_format));
+}
diff --git a/ext/wayland/wlvideoformat.h b/ext/wayland/wlvideoformat.h
new file mode 100644
index 0000000..72efc81
--- /dev/null
+++ b/ext/wayland/wlvideoformat.h
@@ -0,0 +1,39 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2011 Intel Corporation
+ * Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+ * Copyright (C) 2012 Wim Taymans <wim.taymans@gmail.com>
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GST_WL_VIDEO_FORMAT_H__
+#define __GST_WL_VIDEO_FORMAT_H__
+
+#include <wayland-client.h>
+#include <gst/video/video.h>
+
+G_BEGIN_DECLS
+
+enum wl_shm_format gst_video_format_to_wayland_format (GstVideoFormat format);
+GstVideoFormat gst_wayland_format_to_video_format (enum wl_shm_format wl_format);
+
+const gchar *gst_wayland_format_to_string (enum wl_shm_format wl_format);
+
+G_END_DECLS
+
+#endif
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
new file mode 100644
index 0000000..f58df09
--- /dev/null
+++ b/ext/wayland/wlwindow.c
@@ -0,0 +1,237 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2011 Intel Corporation
+ * Copyright (C) 2011 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "wlwindow.h"
+
+GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
+#define GST_CAT_DEFAULT gstwayland_debug
+
+G_DEFINE_TYPE (GstWlWindow, gst_wl_window, G_TYPE_OBJECT);
+
+static void gst_wl_window_finalize (GObject * gobject);
+
+static void
+handle_ping (void *data, struct wl_shell_surface *shell_surface,
+    uint32_t serial)
+{
+  wl_shell_surface_pong (shell_surface, serial);
+}
+
+static void
+handle_configure (void *data, struct wl_shell_surface *shell_surface,
+    uint32_t edges, int32_t width, int32_t height)
+{
+}
+
+static void
+handle_popup_done (void *data, struct wl_shell_surface *shell_surface)
+{
+}
+
+static const struct wl_shell_surface_listener shell_surface_listener = {
+  handle_ping,
+  handle_configure,
+  handle_popup_done
+};
+
+static void
+gst_wl_window_class_init (GstWlWindowClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->finalize = gst_wl_window_finalize;
+}
+
+static void
+gst_wl_window_init (GstWlWindow * self)
+{
+}
+
+static void
+gst_wl_window_finalize (GObject * gobject)
+{
+  GstWlWindow *self = GST_WL_WINDOW (gobject);
+
+  if (self->shell_surface) {
+    wl_shell_surface_destroy (self->shell_surface);
+  }
+
+  if (self->subsurface) {
+    wl_subsurface_destroy (self->subsurface);
+  }
+
+  wl_viewport_destroy (self->viewport);
+  wl_surface_destroy (self->surface);
+
+  g_clear_object (&self->display);
+
+  G_OBJECT_CLASS (gst_wl_window_parent_class)->finalize (gobject);
+}
+
+static GstWlWindow *
+gst_wl_window_new_internal (GstWlDisplay * display, struct wl_surface *surface)
+{
+  GstWlWindow *window;
+  struct wl_region *region;
+
+  g_return_val_if_fail (surface != NULL, NULL);
+
+  window = g_object_new (GST_TYPE_WL_WINDOW, NULL);
+  window->display = g_object_ref (display);
+  window->surface = surface;
+
+  /* make sure the surface runs on our local queue */
+  wl_proxy_set_queue ((struct wl_proxy *) surface, display->queue);
+
+  window->viewport = wl_scaler_get_viewport (display->scaler, window->surface);
+
+  /* do not accept input */
+  region = wl_compositor_create_region (display->compositor);
+  wl_surface_set_input_region (surface, region);
+  wl_region_destroy (region);
+
+  return window;
+}
+
+GstWlWindow *
+gst_wl_window_new_toplevel (GstWlDisplay * display, GstVideoInfo * video_info)
+{
+  GstWlWindow *window;
+
+  window = gst_wl_window_new_internal (display,
+      wl_compositor_create_surface (display->compositor));
+
+  gst_wl_window_set_video_info (window, video_info);
+  gst_wl_window_set_render_rectangle (window, 0, 0, window->video_width,
+      window->video_height);
+
+  window->shell_surface = wl_shell_get_shell_surface (display->shell,
+      window->surface);
+
+  if (window->shell_surface) {
+    wl_shell_surface_add_listener (window->shell_surface,
+        &shell_surface_listener, window);
+    wl_shell_surface_set_toplevel (window->shell_surface);
+  } else {
+    GST_ERROR ("Unable to get wl_shell_surface");
+
+    g_object_unref (window);
+    return NULL;
+  }
+
+  return window;
+}
+
+GstWlWindow *
+gst_wl_window_new_in_surface (GstWlDisplay * display,
+    struct wl_surface * parent)
+{
+  GstWlWindow *window;
+
+  window = gst_wl_window_new_internal (display,
+      wl_compositor_create_surface (display->compositor));
+
+  window->subsurface = wl_subcompositor_get_subsurface (display->subcompositor,
+      window->surface, parent);
+  wl_subsurface_set_desync (window->subsurface);
+
+  return window;
+}
+
+GstWlDisplay *
+gst_wl_window_get_display (GstWlWindow * window)
+{
+  g_return_val_if_fail (window != NULL, NULL);
+
+  return g_object_ref (window->display);
+}
+
+struct wl_surface *
+gst_wl_window_get_wl_surface (GstWlWindow * window)
+{
+  g_return_val_if_fail (window != NULL, NULL);
+
+  return window->surface;
+}
+
+gboolean
+gst_wl_window_is_toplevel (GstWlWindow * window)
+{
+  g_return_val_if_fail (window != NULL, FALSE);
+
+  return (window->shell_surface != NULL);
+}
+
+static void
+gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit)
+{
+  GstVideoRectangle src, res;
+
+  src.w = window->video_width;
+  src.h = window->video_height;
+  gst_video_sink_center_rect (src, window->render_rectangle, &res, TRUE);
+
+  if (window->subsurface)
+    wl_subsurface_set_position (window->subsurface,
+        window->render_rectangle.x + res.x, window->render_rectangle.y + res.y);
+  wl_viewport_set_destination (window->viewport, res.w, res.h);
+
+  if (commit) {
+    wl_surface_damage (window->surface, 0, 0, res.w, res.h);
+    wl_surface_commit (window->surface);
+  }
+
+  /* this is saved for use in wl_surface_damage */
+  window->surface_width = res.w;
+  window->surface_height = res.h;
+}
+
+void
+gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info)
+{
+  g_return_if_fail (window != NULL);
+
+  window->video_width =
+      gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
+  window->video_height = info->height;
+
+  if (window->render_rectangle.w != 0)
+    gst_wl_window_resize_internal (window, FALSE);
+}
+
+void
+gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
+    gint w, gint h)
+{
+  g_return_if_fail (window != NULL);
+
+  window->render_rectangle.x = x;
+  window->render_rectangle.y = y;
+  window->render_rectangle.w = w;
+  window->render_rectangle.h = h;
+
+  if (window->video_width != 0)
+    gst_wl_window_resize_internal (window, TRUE);
+}
diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h
new file mode 100644
index 0000000..f4cb360
--- /dev/null
+++ b/ext/wayland/wlwindow.h
@@ -0,0 +1,80 @@
+/* GStreamer Wayland video sink
+ *
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __GST_WL_WINDOW_H__
+#define __GST_WL_WINDOW_H__
+
+#include "wldisplay.h"
+#include <gst/video/video.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_WL_WINDOW                  (gst_wl_window_get_type ())
+#define GST_WL_WINDOW(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_WINDOW, GstWlWindow))
+#define GST_IS_WL_WINDOW(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_WINDOW))
+#define GST_WL_WINDOW_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_WINDOW, GstWlWindowClass))
+#define GST_IS_WL_WINDOW_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_WINDOW))
+#define GST_WL_WINDOW_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_WINDOW, GstWlWindowClass))
+
+typedef struct _GstWlWindow GstWlWindow;
+typedef struct _GstWlWindowClass GstWlWindowClass;
+
+struct _GstWlWindow
+{
+  GObject parent_instance;
+
+  GstWlDisplay *display;
+  struct wl_surface *surface;
+  struct wl_subsurface *subsurface;
+  struct wl_viewport *viewport;
+  struct wl_shell_surface *shell_surface;
+
+  /* the size of the destination area where we are overlaying our subsurface */
+  GstVideoRectangle render_rectangle;
+  /* the size of the video in the buffers */
+  gint video_width, video_height;
+  /* the size of the (sub)surface */
+  gint surface_width, surface_height;
+};
+
+struct _GstWlWindowClass
+{
+  GObjectClass parent_class;
+};
+
+GType gst_wl_window_get_type (void);
+
+GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
+        GstVideoInfo * video_info);
+GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
+        struct wl_surface * parent);
+
+GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
+struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);
+gboolean gst_wl_window_is_toplevel (GstWlWindow *window);
+
+/* functions to manipulate the size on non-toplevel windows */
+void gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info);
+void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
+        gint w, gint h);
+
+G_END_DECLS
+
+#endif /* __GST_WL_WINDOW_H__ */
diff --git a/ext/webp/Makefile.in b/ext/webp/Makefile.in
index cfb3cf7..b6edcde 100644
--- a/ext/webp/Makefile.in
+++ b/ext/webp/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwebp.la
 noinst_HEADERS = gstwebpdec.h
 libgstwebp_la_SOURCES = gstwebp.c \
diff --git a/ext/xvid/Makefile.in b/ext/xvid/Makefile.in
index 923368a..724ce18 100644
--- a/ext/xvid/Makefile.in
+++ b/ext/xvid/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstxvid.la
 libgstxvid_la_SOURCES = gstxvidenc.c gstxviddec.c gstxvid.c
 libgstxvid_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(XVID_CFLAGS)
diff --git a/ext/zbar/Makefile.in b/ext/zbar/Makefile.in
index 8d039f4..58db48f 100644
--- a/ext/zbar/Makefile.in
+++ b/ext/zbar/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstzbar.la
 libgstzbar_la_SOURCES = gstzbar.c
 libgstzbar_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ZBAR_CFLAGS)
diff --git a/gst-libs/Makefile.in b/gst-libs/Makefile.in
index 93ed222..5caad41 100644
--- a/gst-libs/Makefile.in
+++ b/gst-libs/Makefile.in
@@ -318,6 +318,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -404,6 +406,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -695,6 +698,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = gst
 all: all-recursive
 
diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am
index 0123469..b3f23f4 100644
--- a/gst-libs/gst/Makefile.am
+++ b/gst-libs/gst/Makefile.am
@@ -6,9 +6,13 @@
 GL_DIR = gl
 endif
 
+if USE_WAYLAND
+WAYLAND_DIR=wayland
+endif
+
 SUBDIRS = interfaces basecamerabinsrc codecparsers \
-	 insertbin uridownloader mpegts $(GL_DIR)
+	 insertbin uridownloader mpegts base video $(GL_DIR) $(WAYLAND_DIR)
 
 noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
 DIST_SUBDIRS = interfaces gl basecamerabinsrc codecparsers \
-	insertbin uridownloader mpegts
+	insertbin uridownloader mpegts wayland base video
diff --git a/gst-libs/gst/Makefile.in b/gst-libs/gst/Makefile.in
index fde8df9..76a3867 100644
--- a/gst-libs/gst/Makefile.in
+++ b/gst-libs/gst/Makefile.in
@@ -320,6 +320,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -406,6 +408,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -697,14 +700,16 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @USE_GLES2_TRUE@GL_DIR = gl
 @USE_OPENGL_TRUE@GL_DIR = gl
+@USE_WAYLAND_TRUE@WAYLAND_DIR = wayland
 SUBDIRS = interfaces basecamerabinsrc codecparsers \
-	 insertbin uridownloader mpegts $(GL_DIR)
+	 insertbin uridownloader mpegts base video $(GL_DIR) $(WAYLAND_DIR)
 
 noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
 DIST_SUBDIRS = interfaces gl basecamerabinsrc codecparsers \
-	insertbin uridownloader mpegts
+	insertbin uridownloader mpegts wayland base video
 
 all: all-recursive
 
diff --git a/gst-libs/gst/base/Makefile.am b/gst-libs/gst/base/Makefile.am
new file mode 100644
index 0000000..5f3dc1f
--- /dev/null
+++ b/gst-libs/gst/base/Makefile.am
@@ -0,0 +1,24 @@
+lib_LTLIBRARIES = libgstbadbase-@GST_API_VERSION@.la
+
+libgstbadbase_@GST_API_VERSION@_la_SOURCES = \
+	gstaggregator.c
+
+libgstbadbase_@GST_API_VERSION@_la_CFLAGS = $(GST_CFLAGS) \
+	-DGST_USE_UNSTABLE_API
+
+libgstbadbase_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS)
+libgstbadbase_@GST_API_VERSION@_la_LDFLAGS = $(GST_LDFLAGS)
+
+libgstbadbase_@GST_API_VERSION@includedir =		\
+	$(includedir)/gstreamer-@GST_API_VERSION@/gst/base
+libgstbadbase_@GST_API_VERSION@include_HEADERS =	\
+	gstaggregator.h
+
+EXTRA_DIST = 
+
+CLEANFILES = *.gcno *.gcda *.gcov
+
+%.c.gcov: .libs/libgstbadbase_@GST_API_VERSION@_la-%.gcda %.c
+	$(GCOV) -b -f -o $^ > $@.out
+
+gcov: $(libgstbadbase_@GST_API_VERSION@_la_SOURCES:=.gcov)
diff --git a/gst-libs/gst/base/Makefile.in b/gst-libs/gst/base/Makefile.in
new file mode 100644
index 0000000..8fc0391
--- /dev/null
+++ b/gst-libs/gst/base/Makefile.in
@@ -0,0 +1,1043 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = gst-libs/gst/base
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/depcomp \
+	$(libgstbadbase_@GST_API_VERSION@include_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+	$(top_srcdir)/common/m4/as-auto-alt.m4 \
+	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
+	$(top_srcdir)/common/m4/as-libtool.m4 \
+	$(top_srcdir)/common/m4/as-version.m4 \
+	$(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+	$(top_srcdir)/common/m4/gst-arch.m4 \
+	$(top_srcdir)/common/m4/gst-args.m4 \
+	$(top_srcdir)/common/m4/gst-check.m4 \
+	$(top_srcdir)/common/m4/gst-default.m4 \
+	$(top_srcdir)/common/m4/gst-dowhile.m4 \
+	$(top_srcdir)/common/m4/gst-error.m4 \
+	$(top_srcdir)/common/m4/gst-feature.m4 \
+	$(top_srcdir)/common/m4/gst-gettext.m4 \
+	$(top_srcdir)/common/m4/gst-glib2.m4 \
+	$(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+	$(top_srcdir)/common/m4/gst-platform.m4 \
+	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+	$(top_srcdir)/common/m4/gst-plugindir.m4 \
+	$(top_srcdir)/common/m4/gst-x11.m4 \
+	$(top_srcdir)/common/m4/gst.m4 \
+	$(top_srcdir)/common/m4/gtk-doc.m4 \
+	$(top_srcdir)/common/m4/introspection.m4 \
+	$(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \
+	$(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libgcrypt.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libgstbadbase_@GST_API_VERSION@_la_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1)
+am_libgstbadbase_@GST_API_VERSION@_la_OBJECTS =  \
+	libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo
+libgstbadbase_@GST_API_VERSION@_la_OBJECTS =  \
+	$(am_libgstbadbase_@GST_API_VERSION@_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libgstbadbase_@GST_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+	--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstbadbase_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) \
+	$(libgstbadbase_@GST_API_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libgstbadbase_@GST_API_VERSION@_la_SOURCES)
+DIST_SOURCES = $(libgstbadbase_@GST_API_VERSION@_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(libgstbadbase_@GST_API_VERSION@include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ACMENC_CFLAGS = @ACMENC_CFLAGS@
+ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APEXSINK_CFLAGS = @APEXSINK_CFLAGS@
+APEXSINK_LIBS = @APEXSINK_LIBS@
+AR = @AR@
+AS = @AS@
+ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@
+ASSRENDER_LIBS = @ASSRENDER_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
+BZ2_LIBS = @BZ2_LIBS@
+CC = @CC@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@
+CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@
+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@
+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@
+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@
+CLUTTER_LIBS = @CLUTTER_LIBS@
+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@
+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DAALA_CFLAGS = @DAALA_CFLAGS@
+DAALA_LIBS = @DAALA_LIBS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DCCP_LIBS = @DCCP_LIBS@
+DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@
+DECKLINK_LIBS = @DECKLINK_LIBS@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECT3D_LIBS = @DIRECT3D_LIBS@
+DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@
+DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
+DIRECTFB_LIBS = @DIRECTFB_LIBS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DIRECTX_CFLAGS = @DIRECTX_CFLAGS@
+DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DTS_LIBS = @DTS_LIBS@
+DUMPBIN = @DUMPBIN@
+DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
+DVDNAV_LIBS = @DVDNAV_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@
+EXEEXT = @EXEEXT@
+EXIF_CFLAGS = @EXIF_CFLAGS@
+EXIF_LIBS = @EXIF_LIBS@
+FAAC_LIBS = @FAAC_LIBS@
+FAAD_IS_NEAAC = @FAAD_IS_NEAAC@
+FAAD_LIBS = @FAAD_LIBS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLITE_CFLAGS = @FLITE_CFLAGS@
+FLITE_LIBS = @FLITE_LIBS@
+FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@
+FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LDFLAGS = @GIO_LDFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GL_OBJCFLAGS = @GL_OBJCFLAGS@
+GME_LIBS = @GME_LIBS@
+GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@
+GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@
+GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
+GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GMYTH_CFLAGS = @GMYTH_CFLAGS@
+GMYTH_LIBS = @GMYTH_LIBS@
+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
+GREP = @GREP@
+GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
+GSETTINGS_LIBS = @GSETTINGS_LIBS@
+GSM_LIBS = @GSM_LIBS@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_AGE = @GST_AGE@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_API_VERSION = @GST_API_VERSION@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CURRENT = @GST_CURRENT@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LIBVERSION = @GST_LIBVERSION@
+GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_OBJCFLAGS = @GST_OBJCFLAGS@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@
+GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@
+GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@
+GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@
+GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@
+GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@
+GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@
+GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@
+GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@
+GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@
+GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_REVISION = @GST_REVISION@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@
+GST_VIDEO_LIBS = @GST_VIDEO_LIBS@
+GTK3_CFLAGS = @GTK3_CFLAGS@
+GTK3_LIBS = @GTK3_LIBS@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_BASE_DIR = @GTK_BASE_DIR@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+G_UDEV_CFLAGS = @G_UDEV_CFLAGS@
+G_UDEV_LIBS = @G_UDEV_LIBS@
+HAVE_CLUTTER = @HAVE_CLUTTER@
+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@
+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECT3D = @HAVE_DIRECT3D@
+HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_DTS = @HAVE_DTS@
+HAVE_EGL = @HAVE_EGL@
+HAVE_FAAC = @HAVE_FAAC@
+HAVE_FAAD = @HAVE_FAAD@
+HAVE_FLITE = @HAVE_FLITE@
+HAVE_GL = @HAVE_GL@
+HAVE_GLES2 = @HAVE_GLES2@
+HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
+HAVE_GSM = @HAVE_GSM@
+HAVE_GTK3 = @HAVE_GTK3@
+HAVE_JPEG = @HAVE_JPEG@
+HAVE_NAS = @HAVE_NAS@
+HAVE_OPENJPEG = @HAVE_OPENJPEG@
+HAVE_PNG = @HAVE_PNG@
+HAVE_SRTP = @HAVE_SRTP@
+HAVE_WASAPI = @HAVE_WASAPI@
+HAVE_WILDMIDI = @HAVE_WILDMIDI@
+HAVE_WINKS = @HAVE_WINKS@
+HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@
+HAVE_X = @HAVE_X@
+HAVE_X11 = @HAVE_X11@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+JPEG_LIBS = @JPEG_LIBS@
+KATE_CFLAGS = @KATE_CFLAGS@
+KATE_LIBS = @KATE_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
+LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDIR = @LIBDIR@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBMMS_CFLAGS = @LIBMMS_CFLAGS@
+LIBMMS_LIBS = @LIBMMS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
+LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
+LIBUSB_LIBS = @LIBUSB_LIBS@
+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@
+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LRDF_CFLAGS = @LRDF_CFLAGS@
+LRDF_LIBS = @LRDF_LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIMIC_CFLAGS = @MIMIC_CFLAGS@
+MIMIC_LIBS = @MIMIC_LIBS@
+MJPEG_CFLAGS = @MJPEG_CFLAGS@
+MJPEG_LIBS = @MJPEG_LIBS@
+MKDIR_P = @MKDIR_P@
+MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
+MODPLUG_LIBS = @MODPLUG_LIBS@
+MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
+MPEG2ENC_LIBS = @MPEG2ENC_LIBS@
+MPG123_CFLAGS = @MPG123_CFLAGS@
+MPG123_LIBS = @MPG123_LIBS@
+MPLEX_CFLAGS = @MPLEX_CFLAGS@
+MPLEX_LDFLAGS = @MPLEX_LDFLAGS@
+MPLEX_LIBS = @MPLEX_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+MUSEPACK_LIBS = @MUSEPACK_LIBS@
+NAS_CFLAGS = @NAS_CFLAGS@
+NAS_LIBS = @NAS_LIBS@
+NEON_CFLAGS = @NEON_CFLAGS@
+NEON_LIBS = @NEON_LIBS@
+NETTLE_CFLAGS = @NETTLE_CFLAGS@
+NETTLE_LIBS = @NETTLE_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OFA_CFLAGS = @OFA_CFLAGS@
+OFA_LIBS = @OFA_LIBS@
+OPENAL_CFLAGS = @OPENAL_CFLAGS@
+OPENAL_LIBS = @OPENAL_LIBS@
+OPENCV_CFLAGS = @OPENCV_CFLAGS@
+OPENCV_LIBS = @OPENCV_LIBS@
+OPENCV_PREFIX = @OPENCV_PREFIX@
+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
+OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
+OPENJPEG_LIBS = @OPENJPEG_LIBS@
+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
+OPENNI2_LIBS = @OPENNI2_LIBS@
+OPUS_CFLAGS = @OPUS_CFLAGS@
+OPUS_LIBS = @OPUS_LIBS@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PVR_CFLAGS = @PVR_CFLAGS@
+PVR_LIBS = @PVR_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
+RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
+RSVG_CFLAGS = @RSVG_CFLAGS@
+RSVG_LIBS = @RSVG_LIBS@
+RTMP_CFLAGS = @RTMP_CFLAGS@
+RTMP_LIBS = @RTMP_LIBS@
+SBC_CFLAGS = @SBC_CFLAGS@
+SBC_LIBS = @SBC_LIBS@
+SCHRO_CFLAGS = @SCHRO_CFLAGS@
+SCHRO_LIBS = @SCHRO_LIBS@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CLUTTER = @SDL_CLUTTER@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHM_LIBS = @SHM_LIBS@
+SLV2_CFLAGS = @SLV2_CFLAGS@
+SLV2_LIBS = @SLV2_LIBS@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+SNDIO_LIBS = @SNDIO_LIBS@
+SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@
+SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@
+SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
+SPANDSP_LIBS = @SPANDSP_LIBS@
+SPC_LIBS = @SPC_LIBS@
+SRTP_LIBS = @SRTP_LIBS@
+SSH2_CFLAGS = @SSH2_CFLAGS@
+SSH2_LIBS = @SSH2_LIBS@
+STRIP = @STRIP@
+TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@
+TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@
+TIGER_CFLAGS = @TIGER_CFLAGS@
+TIGER_LIBS = @TIGER_LIBS@
+TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
+TIMIDITY_LIBS = @TIMIDITY_LIBS@
+USE_GLES2 = @USE_GLES2@
+USE_NLS = @USE_NLS@
+USE_OPENGL = @USE_OPENGL@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VDPAU_CFLAGS = @VDPAU_CFLAGS@
+VDPAU_LIBS = @VDPAU_LIBS@
+VERSION = @VERSION@
+VOAACENC_CFLAGS = @VOAACENC_CFLAGS@
+VOAACENC_LIBS = @VOAACENC_LIBS@
+VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@
+VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@
+WASAPI_LIBS = @WASAPI_LIBS@
+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
+WAYLAND_LIBS = @WAYLAND_LIBS@
+WEBP_CFLAGS = @WEBP_CFLAGS@
+WEBP_LIBS = @WEBP_LIBS@
+WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@
+WILDMIDI_LIBS = @WILDMIDI_LIBS@
+WINKS_LIBS = @WINKS_LIBS@
+WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@
+WINSOCK2_LIBS = @WINSOCK2_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XVID_LIBS = @XVID_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZBAR_CFLAGS = @ZBAR_CFLAGS@
+ZBAR_LIBS = @ZBAR_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
+lib_LTLIBRARIES = libgstbadbase-@GST_API_VERSION@.la
+libgstbadbase_@GST_API_VERSION@_la_SOURCES = \
+	gstaggregator.c
+
+libgstbadbase_@GST_API_VERSION@_la_CFLAGS = $(GST_CFLAGS) \
+	-DGST_USE_UNSTABLE_API
+
+libgstbadbase_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS)
+libgstbadbase_@GST_API_VERSION@_la_LDFLAGS = $(GST_LDFLAGS)
+libgstbadbase_@GST_API_VERSION@includedir = \
+	$(includedir)/gstreamer-@GST_API_VERSION@/gst/base
+
+libgstbadbase_@GST_API_VERSION@include_HEADERS = \
+	gstaggregator.h
+
+EXTRA_DIST = 
+CLEANFILES = *.gcno *.gcda *.gcov
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/base/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gst-libs/gst/base/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libgstbadbase-@GST_API_VERSION@.la: $(libgstbadbase_@GST_API_VERSION@_la_OBJECTS) $(libgstbadbase_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstbadbase_@GST_API_VERSION@_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstbadbase_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstbadbase_@GST_API_VERSION@_la_OBJECTS) $(libgstbadbase_@GST_API_VERSION@_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbadbase_@GST_API_VERSION@_la-gstaggregator.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo: gstaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadbase_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo -MD -MP -MF $(DEPDIR)/libgstbadbase_@GST_API_VERSION@_la-gstaggregator.Tpo -c -o libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo `test -f 'gstaggregator.c' || echo '$(srcdir)/'`gstaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbadbase_@GST_API_VERSION@_la-gstaggregator.Tpo $(DEPDIR)/libgstbadbase_@GST_API_VERSION@_la-gstaggregator.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstaggregator.c' object='libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadbase_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbadbase_@GST_API_VERSION@_la-gstaggregator.lo `test -f 'gstaggregator.c' || echo '$(srcdir)/'`gstaggregator.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-libgstbadbase_@GST_API_VERSION@includeHEADERS: $(libgstbadbase_@GST_API_VERSION@include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(libgstbadbase_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadbase_@GST_API_VERSION@includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)" || exit $$?; \
+	done
+
+uninstall-libgstbadbase_@GST_API_VERSION@includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgstbadbase_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadbase_@GST_API_VERSION@includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgstbadbase_@GST_API_VERSION@includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:  \
+	install-libgstbadbase_@GST_API_VERSION@includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+	uninstall-libgstbadbase_@GST_API_VERSION@includeHEADERS
+
+.MAKE: install-am install-strip
+
+.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-html \
+	install-html-am install-info install-info-am \
+	install-libLTLIBRARIES \
+	install-libgstbadbase_@GST_API_VERSION@includeHEADERS \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am uninstall-libLTLIBRARIES \
+	uninstall-libgstbadbase_@GST_API_VERSION@includeHEADERS
+
+
+%.c.gcov: .libs/libgstbadbase_@GST_API_VERSION@_la-%.gcda %.c
+	$(GCOV) -b -f -o $^ > $@.out
+
+gcov: $(libgstbadbase_@GST_API_VERSION@_la_SOURCES:=.gcov)
+
+# 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/base/gstaggregator.c b/gst-libs/gst/base/gstaggregator.c
new file mode 100644
index 0000000..5006ea5
--- /dev/null
+++ b/gst-libs/gst/base/gstaggregator.c
@@ -0,0 +1,1323 @@
+/* GStreamer
+ * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+ * Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.org>
+ *
+ * gstaggregator.c:
+ *
+ * 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.
+ */
+/**
+ * SECTION: gstaggregator
+ * @short_description: manages a set of pads with the purpose of
+ * aggregating their buffers.
+ * @see_also: gstcollectpads for historical reasons.
+ *
+ * Manages a set of pads with the purpose of aggregating their buffers.
+ * Control is given to the subclass when all pads have data.
+ * <itemizedlist>
+ *  <listitem><para>
+ *    Base class for mixers and muxers. Implementers should at least implement
+ *    the aggregate () vmethod.
+ *  </para></listitem>
+ *  <listitem><para>
+ *    When data is queued on all pads, tha aggregate vmethod is called.
+ *  </para></listitem>
+ *  <listitem><para>
+ *    One can peek at the data on any given GstAggregatorPad with the
+ *    gst_aggregator_pad_get_buffer () method, and take ownership of it
+ *    with the gst_aggregator_pad_steal_buffer () method. When a buffer
+ *    has been taken with steal_buffer (), a new buffer can be queued
+ *    on that pad.
+ *  </para></listitem>
+ *  <listitem><para>
+ *    If the subclass wishes to push a buffer downstream in its aggregate
+ *    implementation, it should do so through the
+ *    gst_aggregator_finish_buffer () method. This method will take care
+ *    of sending and ordering mandatory events such as stream start, caps
+ *    and segment.
+ *  </para></listitem>
+ *  <listitem><para>
+ *    Same goes for EOS events, which should not be pushed directly by the
+ *    subclass, it should instead return GST_FLOW_EOS in its aggregate
+ *    implementation.
+ *  </para></listitem>
+ * </itemizedlist>
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <string.h>             /* strlen */
+
+#include "gstaggregator.h"
+
+
+/*  Might become API */
+static void gst_aggregator_merge_tags (GstAggregator * aggregator,
+    const GstTagList * tags, GstTagMergeMode mode);
+
+GST_DEBUG_CATEGORY_STATIC (aggregator_debug);
+#define GST_CAT_DEFAULT aggregator_debug
+
+/* GstAggregatorPad definitions */
+#define PAD_LOCK_EVENT(pad)   G_STMT_START {                            \
+  GST_LOG_OBJECT (pad, "Taking EVENT lock from thread %p",              \
+        g_thread_self());                                               \
+  g_mutex_lock(&pad->priv->event_lock);                                 \
+  GST_LOG_OBJECT (pad, "Took EVENT lock from thread %p",              \
+        g_thread_self());                                               \
+  } G_STMT_END
+
+#define PAD_UNLOCK_EVENT(pad)  G_STMT_START {                           \
+  GST_LOG_OBJECT (pad, "Releasing EVENT lock from thread %p",          \
+        g_thread_self());                                               \
+  g_mutex_unlock(&pad->priv->event_lock);                               \
+  GST_LOG_OBJECT (pad, "Release EVENT lock from thread %p",          \
+        g_thread_self());                                               \
+  } G_STMT_END
+
+
+#define PAD_WAIT_EVENT(pad)   G_STMT_START {                            \
+  GST_LOG_OBJECT (pad, "Waiting for EVENT on thread %p",               \
+        g_thread_self());                                               \
+  g_cond_wait(&(((GstAggregatorPad* )pad)->priv->event_cond),       \
+      &(pad->priv->event_lock));                                        \
+  GST_LOG_OBJECT (pad, "DONE Waiting for EVENT on thread %p",               \
+        g_thread_self());                                               \
+  } G_STMT_END
+
+#define PAD_BROADCAST_EVENT(pad) {                                          \
+  GST_LOG_OBJECT (pad, "Signaling EVENT from thread %p",               \
+        g_thread_self());                                                   \
+  g_cond_broadcast(&(((GstAggregatorPad* )pad)->priv->event_cond)); \
+  }
+
+struct _GstAggregatorPadPrivate
+{
+  gboolean pending_flush_start;
+  gboolean pending_flush_stop;
+  gboolean pending_eos;
+  gboolean flushing;
+
+  GMutex event_lock;
+  GCond event_cond;
+};
+
+static gboolean
+_aggpad_flush (GstAggregatorPad * aggpad, GstAggregator * agg)
+{
+  GstAggregatorPadClass *klass = GST_AGGREGATOR_PAD_GET_CLASS (aggpad);
+
+  aggpad->eos = FALSE;
+  aggpad->priv->flushing = FALSE;
+
+  if (klass->flush)
+    return klass->flush (aggpad, agg);
+
+  return TRUE;
+}
+
+/*************************************
+ * GstAggregator implementation  *
+ *************************************/
+static GstElementClass *aggregator_parent_class = NULL;
+
+#define MAIN_CONTEXT_LOCK(self) G_STMT_START {                       \
+  GST_LOG_OBJECT (self, "Getting MAIN_CONTEXT_LOCK in thread %p",    \
+        g_thread_self());                                            \
+  g_mutex_lock(&((GstAggregator*)self)->priv->mcontext_lock);    \
+  GST_LOG_OBJECT (self, "Got MAIN_CONTEXT_LOCK in thread %p",        \
+        g_thread_self());                                            \
+} G_STMT_END
+
+#define MAIN_CONTEXT_UNLOCK(self) G_STMT_START {                     \
+  g_mutex_unlock(&((GstAggregator*)self)->priv->mcontext_lock);  \
+  GST_LOG_OBJECT (self, "Unlocked MAIN_CONTEXT_LOCK in thread %p",   \
+        g_thread_self());                                            \
+} G_STMT_END
+
+struct _GstAggregatorPrivate
+{
+  gint padcount;
+
+  GMainContext *mcontext;
+
+  /* Our state is >= PAUSED */
+  gboolean running;
+
+  /* Ensure that when we remove all sources from the maincontext
+   * we can not add any source, avoiding:
+   * "g_source_attach: assertion '!SOURCE_DESTROYED (source)' failed" */
+  GMutex mcontext_lock;
+
+  gboolean send_stream_start;
+  gboolean send_segment;
+  gboolean flush_seeking;
+  gboolean pending_flush_start;
+  gboolean send_eos;
+  GstFlowReturn flow_return;
+
+  GstCaps *srccaps;
+
+  GstTagList *tags;
+  gboolean tags_changed;
+};
+
+typedef struct
+{
+  GstEvent *event;
+  gboolean result;
+  gboolean flush;
+} EventData;
+
+/**
+ * gst_aggregator_iterate_sinkpads:
+ * @self: The #GstAggregator
+ * @func: The function to call.
+ * @user_data: The data to pass to @func.
+ *
+ * Iterate the sinkpads of aggregator to call a function on them.
+ *
+ * This method guarantees that @func will be called only once for each
+ * sink pad.
+ */
+gboolean
+gst_aggregator_iterate_sinkpads (GstAggregator * self,
+    GstAggregatorPadForeachFunc func, gpointer user_data)
+{
+  gboolean result = FALSE;
+  GstIterator *iter;
+  gboolean done = FALSE;
+  GValue item = { 0, };
+  GList *seen_pads = NULL;
+
+  iter = gst_element_iterate_sink_pads (GST_ELEMENT (self));
+
+  if (!iter)
+    goto no_iter;
+
+  while (!done) {
+    switch (gst_iterator_next (iter, &item)) {
+      case GST_ITERATOR_OK:
+      {
+        GstPad *pad;
+
+        pad = g_value_get_object (&item);
+
+        /* if already pushed, skip. FIXME, find something faster to tag pads */
+        if (pad == NULL || g_list_find (seen_pads, pad)) {
+          g_value_reset (&item);
+          break;
+        }
+
+        GST_LOG_OBJECT (self, "calling function on pad %s:%s",
+            GST_DEBUG_PAD_NAME (pad));
+        result = func (self, pad, user_data);
+
+        done = !result;
+
+        seen_pads = g_list_prepend (seen_pads, pad);
+
+        g_value_reset (&item);
+        break;
+      }
+      case GST_ITERATOR_RESYNC:
+        gst_iterator_resync (iter);
+        break;
+      case GST_ITERATOR_ERROR:
+        GST_ERROR_OBJECT (self,
+            "Could not iterate over internally linked pads");
+        done = TRUE;
+        break;
+      case GST_ITERATOR_DONE:
+        done = TRUE;
+        break;
+    }
+  }
+  g_value_unset (&item);
+  gst_iterator_free (iter);
+
+  if (seen_pads == NULL) {
+    GST_DEBUG_OBJECT (self, "No pad seen");
+    return FALSE;
+  }
+
+  g_list_free (seen_pads);
+
+no_iter:
+  return result;
+}
+
+static inline gboolean
+_check_all_pads_with_data_or_eos (GstAggregator * self,
+    GstAggregatorPad * aggpad)
+{
+  if (aggpad->buffer || aggpad->eos) {
+    return TRUE;
+  }
+
+  GST_LOG_OBJECT (aggpad, "Not ready to be aggregated");
+
+  return FALSE;
+}
+
+/**
+ * gst_aggregator_set_src_caps:
+ * @self: The #GstAggregator
+ * @caps: The #GstCaps to set later on the src pad.
+ *
+ * Sets the caps to be used on the src pad.
+ */
+void
+gst_aggregator_set_src_caps (GstAggregator * self, GstCaps * caps)
+{
+  gst_caps_replace (&self->priv->srccaps, caps);
+}
+
+static void
+_reset_flow_values (GstAggregator * self)
+{
+  self->priv->send_stream_start = TRUE;
+  self->priv->send_segment = TRUE;
+  gst_segment_init (&self->segment, GST_FORMAT_TIME);
+}
+
+static inline void
+_push_mandatory_events (GstAggregator * self)
+{
+  GstAggregatorPrivate *priv = self->priv;
+
+  if (g_atomic_int_get (&self->priv->send_stream_start)) {
+    gchar s_id[32];
+
+    GST_INFO_OBJECT (self, "pushing stream start");
+    /* stream-start (FIXME: create id based on input ids) */
+    g_snprintf (s_id, sizeof (s_id), "agg-%08x", g_random_int ());
+    if (!gst_pad_push_event (self->srcpad, gst_event_new_stream_start (s_id))) {
+      GST_WARNING_OBJECT (self->srcpad, "Sending stream start event failed");
+    }
+    g_atomic_int_set (&self->priv->send_stream_start, FALSE);
+  }
+
+  if (self->priv->srccaps) {
+
+    GST_INFO_OBJECT (self, "pushing caps: %" GST_PTR_FORMAT,
+        self->priv->srccaps);
+    if (!gst_pad_push_event (self->srcpad,
+            gst_event_new_caps (self->priv->srccaps))) {
+      GST_WARNING_OBJECT (self->srcpad, "Sending caps event failed");
+    }
+    self->priv->srccaps = NULL;
+  }
+
+  if (g_atomic_int_get (&self->priv->send_segment)) {
+    if (!g_atomic_int_get (&self->priv->flush_seeking)) {
+      GST_INFO_OBJECT (self, "pushing segment");
+      gst_pad_push_event (self->srcpad, gst_event_new_segment (&self->segment));
+      g_atomic_int_set (&self->priv->send_segment, FALSE);
+    }
+  }
+
+  if (priv->tags && priv->tags_changed) {
+    gst_pad_push_event (self->srcpad,
+        gst_event_new_tag (gst_tag_list_ref (priv->tags)));
+    priv->tags_changed = FALSE;
+  }
+}
+
+/**
+ * gst_aggregator_finish_buffer:
+ * @self: The #GstAggregator
+ * @buffer: the #GstBuffer to push.
+ *
+ * This method will take care of sending mandatory events before pushing
+ * the provided buffer.
+ */
+GstFlowReturn
+gst_aggregator_finish_buffer (GstAggregator * self, GstBuffer * buffer)
+{
+  _push_mandatory_events (self);
+
+  if (!g_atomic_int_get (&self->priv->flush_seeking) &&
+      gst_pad_is_active (self->srcpad)) {
+    GST_TRACE_OBJECT (self, "pushing buffer %" GST_PTR_FORMAT, buffer);
+    return gst_pad_push (self->srcpad, buffer);
+  } else {
+    GST_INFO_OBJECT (self, "Not pushing (active: %i, flushing: %i)",
+        g_atomic_int_get (&self->priv->flush_seeking),
+        gst_pad_is_active (self->srcpad));
+    return GST_FLOW_OK;
+  }
+}
+
+static void
+_push_eos (GstAggregator * self)
+{
+  _push_mandatory_events (self);
+
+  self->priv->send_eos = FALSE;
+  gst_pad_push_event (self->srcpad, gst_event_new_eos ());
+}
+
+static void
+_remove_all_sources (GstAggregator * self)
+{
+  GSource *source;
+
+  MAIN_CONTEXT_LOCK (self);
+  while ((source =
+          g_main_context_find_source_by_user_data (self->priv->mcontext,
+              self))) {
+    g_source_destroy (source);
+  }
+  MAIN_CONTEXT_UNLOCK (self);
+}
+
+static gboolean
+aggregate_func (GstAggregator * self)
+{
+  GstAggregatorPrivate *priv = self->priv;
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self);
+
+  GST_LOG_OBJECT (self, "Checking aggregate");
+  while (priv->send_eos && gst_aggregator_iterate_sinkpads (self,
+          (GstAggregatorPadForeachFunc) _check_all_pads_with_data_or_eos,
+          NULL) && priv->running) {
+    GST_TRACE_OBJECT (self, "Actually aggregating!");
+
+    priv->flow_return = klass->aggregate (self);
+
+    if (priv->flow_return == GST_FLOW_EOS) {
+      g_main_context_wakeup (self->priv->mcontext);
+      _remove_all_sources (self);
+      _push_eos (self);
+    }
+
+    if (priv->flow_return == GST_FLOW_FLUSHING &&
+        g_atomic_int_get (&priv->flush_seeking))
+      priv->flow_return = GST_FLOW_OK;
+
+    GST_LOG_OBJECT (self, "flow return is %s",
+        gst_flow_get_name (priv->flow_return));
+
+    if (priv->flow_return != GST_FLOW_OK)
+      break;
+  }
+
+  return G_SOURCE_REMOVE;
+}
+
+static void
+iterate_main_context_func (GstAggregator * self)
+{
+  if (self->priv->running == FALSE) {
+    GST_DEBUG_OBJECT (self, "Not running anymore");
+
+    return;
+  }
+
+  g_main_context_iteration (self->priv->mcontext, TRUE);
+}
+
+static gboolean
+_start (GstAggregator * self)
+{
+  self->priv->running = TRUE;
+  self->priv->send_stream_start = TRUE;
+  self->priv->send_segment = TRUE;
+  self->priv->send_eos = TRUE;
+  self->priv->srccaps = NULL;
+
+  return TRUE;
+}
+
+static gboolean
+_check_pending_flush_stop (GstAggregatorPad * pad)
+{
+  return (!pad->priv->pending_flush_stop && !pad->priv->pending_flush_start);
+}
+
+static gboolean
+_stop_srcpad_task (GstAggregator * self, GstEvent * flush_start)
+{
+  gboolean res = TRUE;
+
+  GST_INFO_OBJECT (self, "%s srcpad task",
+      flush_start ? "Pausing" : "Stopping");
+
+  self->priv->running = FALSE;
+
+  /*  Clean the stack of GSource set on the MainContext */
+  g_main_context_wakeup (self->priv->mcontext);
+  _remove_all_sources (self);
+  if (flush_start) {
+    res = gst_pad_push_event (self->srcpad, flush_start);
+  }
+
+  gst_pad_stop_task (self->srcpad);
+
+  return res;
+}
+
+static void
+_start_srcpad_task (GstAggregator * self)
+{
+  GST_INFO_OBJECT (self, "Starting srcpad task");
+
+  self->priv->running = TRUE;
+  gst_pad_start_task (GST_PAD (self->srcpad),
+      (GstTaskFunction) iterate_main_context_func, self, NULL);
+}
+
+static inline void
+_add_aggregate_gsource (GstAggregator * self)
+{
+  MAIN_CONTEXT_LOCK (self);
+  g_main_context_invoke (self->priv->mcontext, (GSourceFunc) aggregate_func,
+      self);
+  MAIN_CONTEXT_UNLOCK (self);
+}
+
+static GstFlowReturn
+_flush (GstAggregator * self)
+{
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstAggregatorPrivate *priv = self->priv;
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (self);
+
+  GST_DEBUG_OBJECT (self, "Flushing everything");
+  g_atomic_int_set (&priv->send_segment, TRUE);
+  g_atomic_int_set (&priv->flush_seeking, FALSE);
+  g_atomic_int_set (&priv->tags_changed, FALSE);
+  if (klass->flush)
+    ret = klass->flush (self);
+
+  return ret;
+}
+
+static gboolean
+_all_flush_stop_received (GstAggregator * self)
+{
+  GList *tmp;
+  GstAggregatorPad *tmppad;
+
+  GST_OBJECT_LOCK (self);
+  for (tmp = GST_ELEMENT (self)->sinkpads; tmp; tmp = tmp->next) {
+    tmppad = (GstAggregatorPad *) tmp->data;
+
+    if (_check_pending_flush_stop (tmppad) == FALSE) {
+      GST_DEBUG_OBJECT (tmppad, "Is not last %i -- %i",
+          tmppad->priv->pending_flush_start, tmppad->priv->pending_flush_stop);
+      GST_OBJECT_UNLOCK (self);
+      return FALSE;
+    }
+  }
+  GST_OBJECT_UNLOCK (self);
+
+  return TRUE;
+}
+
+/* GstAggregator vmethods default implementations */
+static gboolean
+_sink_event (GstAggregator * self, GstAggregatorPad * aggpad, GstEvent * event)
+{
+  gboolean res = TRUE;
+  GstPad *pad = GST_PAD (aggpad);
+  GstAggregatorPrivate *priv = self->priv;
+  GstAggregatorPadPrivate *padpriv = aggpad->priv;
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_START:
+    {
+      GstBuffer *tmpbuf;
+
+      g_atomic_int_set (&aggpad->priv->flushing, TRUE);
+      /*  Remove pad buffer and wake up the streaming thread */
+      tmpbuf = gst_aggregator_pad_steal_buffer (aggpad);
+      gst_buffer_replace (&tmpbuf, NULL);
+      if (g_atomic_int_compare_and_exchange (&padpriv->pending_flush_start,
+              TRUE, FALSE) == TRUE) {
+        GST_DEBUG_OBJECT (aggpad, "Expecting FLUSH_STOP now");
+        g_atomic_int_set (&padpriv->pending_flush_stop, TRUE);
+      }
+
+      if (g_atomic_int_get (&priv->flush_seeking)) {
+        /* If flush_seeking we forward the first FLUSH_START */
+        if (g_atomic_int_compare_and_exchange (&priv->pending_flush_start,
+                TRUE, FALSE) == TRUE) {
+
+          GST_DEBUG_OBJECT (self, "Flushing, pausing srcpad task");
+          priv->flow_return = GST_FLOW_OK;
+          _stop_srcpad_task (self, event);
+
+          GST_INFO_OBJECT (self, "Getting STREAM_LOCK while seeking");
+          GST_PAD_STREAM_LOCK (self->srcpad);
+          GST_LOG_OBJECT (self, "GOT STREAM_LOCK");
+          event = NULL;
+          goto eat;
+        }
+      }
+
+      /* We forward only in one case: right after flush_seeking */
+      goto eat;
+    }
+    case GST_EVENT_FLUSH_STOP:
+    {
+      GST_DEBUG_OBJECT (aggpad, "Got FLUSH_STOP");
+
+      _aggpad_flush (aggpad, self);
+      if (g_atomic_int_get (&priv->flush_seeking)) {
+        g_atomic_int_set (&aggpad->priv->pending_flush_stop, FALSE);
+
+        if (g_atomic_int_get (&priv->flush_seeking)) {
+          if (_all_flush_stop_received (self)) {
+            /* That means we received FLUSH_STOP/FLUSH_STOP on
+             * all sinkpads -- Seeking is Done... sending FLUSH_STOP */
+            _flush (self);
+            gst_pad_push_event (self->srcpad, event);
+            priv->send_eos = TRUE;
+            event = NULL;
+            _add_aggregate_gsource (self);
+
+            GST_INFO_OBJECT (self, "Releasing source pad STREAM_LOCK");
+            GST_PAD_STREAM_UNLOCK (self->srcpad);
+            _start_srcpad_task (self);
+          }
+        }
+      }
+
+      /* We never forward the event */
+      goto eat;
+    }
+    case GST_EVENT_EOS:
+    {
+      GST_DEBUG_OBJECT (aggpad, "EOS");
+
+      /* We still have a buffer, and we don't want the subclass to have to
+       * check for it. Mark pending_eos, eos will be set when steal_buffer is
+       * called
+       */
+      PAD_LOCK_EVENT (aggpad);
+      if (!aggpad->buffer) {
+        aggpad->eos = TRUE;
+      } else {
+        aggpad->priv->pending_eos = TRUE;
+      }
+      PAD_UNLOCK_EVENT (aggpad);
+
+      _add_aggregate_gsource (self);
+      goto eat;
+    }
+    case GST_EVENT_SEGMENT:
+    {
+      gst_event_copy_segment (event, &aggpad->segment);
+      PAD_UNLOCK_EVENT (aggpad);
+
+      goto eat;
+    }
+    case GST_EVENT_STREAM_START:
+    {
+      goto eat;
+    }
+    case GST_EVENT_TAG:
+    {
+      GstTagList *tags;
+
+      gst_event_parse_tag (event, &tags);
+
+      if (gst_tag_list_get_scope (tags) == GST_TAG_SCOPE_STREAM) {
+        gst_aggregator_merge_tags (self, tags, GST_TAG_MERGE_REPLACE);
+        gst_event_unref (event);
+        event = NULL;
+        goto eat;
+      }
+      break;
+    }
+    default:
+    {
+      break;
+    }
+  }
+
+  GST_DEBUG_OBJECT (pad, "Forwarding event: %" GST_PTR_FORMAT, event);
+  return gst_pad_event_default (pad, GST_OBJECT (self), event);
+
+eat:
+  GST_DEBUG_OBJECT (pad, "Eating event: %" GST_PTR_FORMAT, event);
+  if (event)
+    gst_event_unref (event);
+
+  return res;
+}
+
+static gboolean
+_stop (GstAggregator * agg)
+{
+  _reset_flow_values (agg);
+
+  return TRUE;
+}
+
+/* GstElement vmethods implementations */
+static GstStateChangeReturn
+_change_state (GstElement * element, GstStateChange transition)
+{
+  GstStateChangeReturn ret;
+  GstAggregator *self = GST_AGGREGATOR (element);
+  GstAggregatorClass *agg_class = GST_AGGREGATOR_GET_CLASS (self);
+
+
+  switch (transition) {
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      agg_class->start (self);
+      break;
+    default:
+      break;
+  }
+
+  if ((ret =
+          GST_ELEMENT_CLASS (aggregator_parent_class)->change_state (element,
+              transition)) == GST_STATE_CHANGE_FAILURE)
+    goto failure;
+
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      agg_class->stop (self);
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+
+failure:
+  {
+    GST_ERROR_OBJECT (element, "parent failed state change");
+    return ret;
+  }
+}
+
+static void
+_release_pad (GstElement * element, GstPad * pad)
+{
+  GstBuffer *tmpbuf;
+
+  GstAggregator *self = GST_AGGREGATOR (element);
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
+
+  GST_INFO_OBJECT (pad, "Removing pad");
+
+  g_atomic_int_set (&aggpad->priv->flushing, TRUE);
+  tmpbuf = gst_aggregator_pad_steal_buffer (aggpad);
+  gst_buffer_replace (&tmpbuf, NULL);
+  gst_element_remove_pad (element, pad);
+
+  /* Something changed make sure we try to aggregate */
+  _add_aggregate_gsource (self);
+}
+
+static GstPad *
+_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
+{
+  GstAggregator *self;
+  GstAggregatorPad *agg_pad;
+
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
+  GstAggregatorPrivate *priv = GST_AGGREGATOR (element)->priv;
+
+  self = GST_AGGREGATOR (element);
+
+  if (templ == gst_element_class_get_pad_template (klass, "sink_%u")) {
+    gint serial = 0;
+    gchar *name = NULL;
+
+    GST_OBJECT_LOCK (element);
+    if (req_name == NULL || strlen (req_name) < 6
+        || !g_str_has_prefix (req_name, "sink_")) {
+      /* no name given when requesting the pad, use next available int */
+      priv->padcount++;
+    } else {
+      /* parse serial number from requested padname */
+      serial = g_ascii_strtoull (&req_name[5], NULL, 10);
+      if (serial >= priv->padcount)
+        priv->padcount = serial;
+    }
+
+    name = g_strdup_printf ("sink_%u", priv->padcount);
+    agg_pad = g_object_new (GST_AGGREGATOR_GET_CLASS (self)->sinkpads_type,
+        "name", name, "direction", GST_PAD_SINK, "template", templ, NULL);
+    g_free (name);
+    GST_OBJECT_UNLOCK (element);
+
+  } else {
+    return NULL;
+  }
+
+  GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (agg_pad));
+
+  if (priv->running)
+    gst_pad_set_active (GST_PAD (agg_pad), TRUE);
+
+  /* add the pad to the element */
+  gst_element_add_pad (element, GST_PAD (agg_pad));
+
+  return GST_PAD (agg_pad);
+}
+
+static gboolean
+_src_query (GstAggregator * self, GstQuery * query)
+{
+  gboolean res = TRUE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_SEEKING:
+    {
+      GstFormat format;
+
+      /* don't pass it along as some (file)sink might claim it does
+       * whereas with a collectpads in between that will not likely work */
+      gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
+      gst_query_set_seeking (query, format, FALSE, 0, -1);
+      res = TRUE;
+
+      goto discard;
+    }
+    default:
+      break;
+  }
+
+  return gst_pad_query_default (self->srcpad, GST_OBJECT (self), query);
+
+discard:
+  return res;
+}
+
+static gboolean
+event_forward_func (GstPad * pad, EventData * evdata)
+{
+  gboolean ret = TRUE;
+  GstPad *peer = gst_pad_get_peer (pad);
+  GstAggregatorPadPrivate *padpriv = GST_AGGREGATOR_PAD (pad)->priv;
+
+  if (peer) {
+    ret = gst_pad_send_event (peer, gst_event_ref (evdata->event));
+    GST_DEBUG_OBJECT (pad, "return of event push is %d", ret);
+    gst_object_unref (peer);
+  }
+
+  evdata->result &= ret;
+
+  if (ret == FALSE) {
+    if (GST_EVENT_TYPE (evdata->event) == GST_EVENT_SEEK)
+      GST_ERROR_OBJECT (pad, "Event %" GST_PTR_FORMAT " failed", evdata->event);
+    else
+      GST_INFO_OBJECT (pad, "Event %" GST_PTR_FORMAT " failed", evdata->event);
+
+    if (evdata->flush) {
+      padpriv->pending_flush_start = FALSE;
+      padpriv->pending_flush_stop = FALSE;
+    }
+  }
+
+  /* Always send to all pads */
+  return FALSE;
+}
+
+static gboolean
+_set_flush_pending (GstAggregator * self, GstAggregatorPad * pad,
+    gpointer udata)
+{
+  pad->priv->pending_flush_start = TRUE;
+  pad->priv->pending_flush_stop = FALSE;
+
+  return TRUE;
+}
+
+static gboolean
+_forward_event_to_all_sinkpads (GstAggregator * self, GstEvent * event,
+    gboolean flush)
+{
+  EventData evdata;
+
+  evdata.event = event;
+  evdata.result = TRUE;
+  evdata.flush = flush;
+
+  /* We first need to set all pads as flushing in a first pass
+   * as flush_start flush_stop is sometimes sent synchronously
+   * while we send the seek event */
+  if (flush)
+    gst_aggregator_iterate_sinkpads (self,
+        (GstAggregatorPadForeachFunc) _set_flush_pending, NULL);
+  gst_pad_forward (self->srcpad, (GstPadForwardFunction) event_forward_func,
+      &evdata);
+
+  gst_event_unref (event);
+
+  return evdata.result;
+}
+
+static gboolean
+_do_seek (GstAggregator * self, GstEvent * event)
+{
+  gdouble rate;
+  GstFormat fmt;
+  GstSeekFlags flags;
+  GstSeekType start_type, stop_type;
+  gint64 start, stop;
+  gboolean flush;
+  gboolean res;
+  GstAggregatorPrivate *priv = self->priv;
+
+  gst_event_parse_seek (event, &rate, &fmt, &flags, &start_type,
+      &start, &stop_type, &stop);
+
+  GST_INFO_OBJECT (self, "starting SEEK");
+
+  flush = flags & GST_SEEK_FLAG_FLUSH;
+
+  if (flush) {
+    g_atomic_int_set (&priv->pending_flush_start, TRUE);
+    g_atomic_int_set (&priv->flush_seeking, TRUE);
+  }
+
+  gst_segment_do_seek (&self->segment, rate, fmt, flags, start_type, start,
+      stop_type, stop, NULL);
+
+  /* forward the seek upstream */
+  res = _forward_event_to_all_sinkpads (self, event, flush);
+  event = NULL;
+
+  if (!res) {
+    g_atomic_int_set (&priv->flush_seeking, FALSE);
+    g_atomic_int_set (&priv->pending_flush_start, FALSE);
+  }
+
+  GST_INFO_OBJECT (self, "seek done, result: %d", res);
+
+  return res;
+}
+
+static gboolean
+_src_event (GstAggregator * self, GstEvent * event)
+{
+  gboolean res = TRUE;
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_SEEK:
+    {
+      res = _do_seek (self, event);
+      event = NULL;
+      goto done;
+    }
+    case GST_EVENT_NAVIGATION:
+    {
+      /* navigation is rather pointless. */
+      res = FALSE;
+      gst_event_unref (event);
+      goto done;
+    }
+    default:
+    {
+      break;
+    }
+  }
+
+  return _forward_event_to_all_sinkpads (self, event, FALSE);
+
+done:
+  return res;
+}
+
+static gboolean
+src_event_func (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
+
+  return klass->src_event (GST_AGGREGATOR (parent), event);
+}
+
+static gboolean
+src_query_func (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
+
+  return klass->src_query (GST_AGGREGATOR (parent), query);
+}
+
+static gboolean
+src_activate_mode (GstPad * pad,
+    GstObject * parent, GstPadMode mode, gboolean active)
+{
+  GstAggregator *self = GST_AGGREGATOR (parent);
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
+
+  if (klass->src_activate) {
+    if (klass->src_activate (self, mode, active) == FALSE) {
+      return FALSE;
+    }
+  }
+
+  if (active == TRUE) {
+    switch (mode) {
+      case GST_PAD_MODE_PUSH:
+      {
+        GST_INFO_OBJECT (pad, "Activating pad!");
+        _start_srcpad_task (self);
+        return TRUE;
+      }
+      default:
+      {
+        GST_ERROR_OBJECT (pad, "Only supported mode is PUSH");
+        return FALSE;
+      }
+    }
+  }
+
+  /* deactivating */
+  GST_INFO_OBJECT (self, "Deactivating srcpad");
+  _stop_srcpad_task (self, FALSE);
+
+  return TRUE;
+}
+
+static gboolean
+_sink_query (GstAggregator * self, GstAggregatorPad * aggpad, GstQuery * query)
+{
+  GstPad *pad = GST_PAD (aggpad);
+
+  return gst_pad_query_default (pad, GST_OBJECT (self), query);
+}
+
+/* GObject vmethods implementations */
+static void
+gst_aggregator_class_init (GstAggregatorClass * klass)
+{
+  GstElementClass *gstelement_class = (GstElementClass *) klass;
+
+  aggregator_parent_class = g_type_class_peek_parent (klass);
+  g_type_class_add_private (klass, sizeof (GstAggregatorPrivate));
+
+  GST_DEBUG_CATEGORY_INIT (aggregator_debug, "aggregator",
+      GST_DEBUG_FG_MAGENTA, "GstAggregator");
+
+  klass->sinkpads_type = GST_TYPE_AGGREGATOR_PAD;
+  klass->start = _start;
+  klass->stop = _stop;
+
+  klass->sink_event = _sink_event;
+  klass->sink_query = _sink_query;
+
+  klass->src_event = _src_event;
+  klass->src_query = _src_query;
+
+  gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (_request_new_pad);
+  gstelement_class->release_pad = GST_DEBUG_FUNCPTR (_release_pad);
+  gstelement_class->change_state = GST_DEBUG_FUNCPTR (_change_state);
+}
+
+static void
+gst_aggregator_init (GstAggregator * self, GstAggregatorClass * klass)
+{
+  GstPadTemplate *pad_template;
+  GstAggregatorPrivate *priv;
+
+  g_return_if_fail (klass->aggregate != NULL);
+
+  self->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (self, GST_TYPE_AGGREGATOR,
+      GstAggregatorPrivate);
+
+  priv = self->priv;
+
+  pad_template =
+      gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src");
+  g_return_if_fail (pad_template != NULL);
+
+  priv->padcount = -1;
+  priv->tags_changed = FALSE;
+  _reset_flow_values (self);
+
+  priv->mcontext = g_main_context_new ();
+  self->srcpad = gst_pad_new_from_template (pad_template, "src");
+
+  gst_pad_set_event_function (self->srcpad,
+      GST_DEBUG_FUNCPTR ((GstPadEventFunction) src_event_func));
+  gst_pad_set_query_function (self->srcpad,
+      GST_DEBUG_FUNCPTR ((GstPadQueryFunction) src_query_func));
+  gst_pad_set_activatemode_function (self->srcpad,
+      GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) src_activate_mode));
+
+  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);
+}
+
+/* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
+ * method to get to the padtemplates */
+GType
+gst_aggregator_get_type (void)
+{
+  static volatile gsize type = 0;
+
+  if (g_once_init_enter (&type)) {
+    GType _type;
+    static const GTypeInfo info = {
+      sizeof (GstAggregatorClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gst_aggregator_class_init,
+      NULL,
+      NULL,
+      sizeof (GstAggregator),
+      0,
+      (GInstanceInitFunc) gst_aggregator_init,
+    };
+
+    _type = g_type_register_static (GST_TYPE_ELEMENT,
+        "GstAggregator", &info, G_TYPE_FLAG_ABSTRACT);
+    g_once_init_leave (&type, _type);
+  }
+  return type;
+}
+
+static GstFlowReturn
+_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
+{
+  GstBuffer *actual_buf = buffer;
+  GstAggregator *self = GST_AGGREGATOR (object);
+  GstAggregatorPrivate *priv = self->priv;
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
+  GstAggregatorClass *aggclass = GST_AGGREGATOR_GET_CLASS (object);
+
+  GST_DEBUG_OBJECT (aggpad, "Start chaining a buffer %" GST_PTR_FORMAT, buffer);
+
+  if (g_atomic_int_get (&aggpad->priv->flushing) == TRUE)
+    goto flushing;
+
+  if (g_atomic_int_get (&aggpad->priv->pending_eos) == TRUE)
+    goto eos;
+
+  PAD_LOCK_EVENT (aggpad);
+  if (aggpad->buffer) {
+    GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed");
+    PAD_WAIT_EVENT (aggpad);
+  }
+  PAD_UNLOCK_EVENT (aggpad);
+
+  if (g_atomic_int_get (&aggpad->priv->flushing) == TRUE)
+    goto flushing;
+
+
+  if (aggclass->clip) {
+    aggclass->clip (self, aggpad, buffer, &actual_buf);
+  }
+
+  PAD_LOCK_EVENT (aggpad);
+  if (aggpad->buffer)
+    gst_buffer_unref (aggpad->buffer);
+  aggpad->buffer = actual_buf;
+  PAD_UNLOCK_EVENT (aggpad);
+
+  _add_aggregate_gsource (self);
+
+  GST_DEBUG_OBJECT (aggpad, "Done chaining");
+
+  return priv->flow_return;
+
+flushing:
+
+  GST_DEBUG_OBJECT (aggpad, "We are flushing");
+
+  return GST_FLOW_FLUSHING;
+
+eos:
+
+  GST_DEBUG_OBJECT (pad, "We are EOS already...");
+
+  return GST_FLOW_EOS;
+}
+
+static gboolean
+pad_query_func (GstPad * pad, GstObject * parent, GstQuery * query)
+{
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
+
+  return klass->sink_query (GST_AGGREGATOR (parent),
+      GST_AGGREGATOR_PAD (pad), query);
+}
+
+static gboolean
+pad_event_func (GstPad * pad, GstObject * parent, GstEvent * event)
+{
+  GstAggregatorClass *klass = GST_AGGREGATOR_GET_CLASS (parent);
+
+  return klass->sink_event (GST_AGGREGATOR (parent),
+      GST_AGGREGATOR_PAD (pad), event);
+}
+
+static gboolean
+pad_activate_mode_func (GstPad * pad,
+    GstObject * parent, GstPadMode mode, gboolean active)
+{
+  GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
+
+  if (active == FALSE) {
+    PAD_LOCK_EVENT (aggpad);
+    g_atomic_int_set (&aggpad->priv->flushing, TRUE);
+    gst_buffer_replace (&aggpad->buffer, NULL);
+    PAD_BROADCAST_EVENT (aggpad);
+    PAD_UNLOCK_EVENT (aggpad);
+  } else {
+    g_atomic_int_set (&aggpad->priv->flushing, FALSE);
+    PAD_LOCK_EVENT (aggpad);
+    PAD_BROADCAST_EVENT (aggpad);
+    PAD_UNLOCK_EVENT (aggpad);
+  }
+
+  return TRUE;
+}
+
+/***********************************
+ * GstAggregatorPad implementation  *
+ ************************************/
+G_DEFINE_TYPE (GstAggregatorPad, gst_aggregator_pad, GST_TYPE_PAD);
+
+static void
+_pad_constructed (GObject * object)
+{
+  GstPad *pad = GST_PAD (object);
+
+  gst_pad_set_chain_function (pad,
+      GST_DEBUG_FUNCPTR ((GstPadChainFunction) _chain));
+  gst_pad_set_event_function (pad,
+      GST_DEBUG_FUNCPTR ((GstPadEventFunction) pad_event_func));
+  gst_pad_set_query_function (pad,
+      GST_DEBUG_FUNCPTR ((GstPadQueryFunction) pad_query_func));
+  gst_pad_set_activatemode_function (pad,
+      GST_DEBUG_FUNCPTR ((GstPadActivateModeFunction) pad_activate_mode_func));
+}
+
+static void
+gst_aggregator_pad_class_init (GstAggregatorPadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  g_type_class_add_private (klass, sizeof (GstAggregatorPadPrivate));
+
+  gobject_class->constructed = GST_DEBUG_FUNCPTR (_pad_constructed);
+}
+
+static void
+gst_aggregator_pad_init (GstAggregatorPad * pad)
+{
+  pad->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (pad, GST_TYPE_AGGREGATOR_PAD,
+      GstAggregatorPadPrivate);
+
+  pad->buffer = NULL;
+  g_mutex_init (&pad->priv->event_lock);
+  g_cond_init (&pad->priv->event_cond);
+
+}
+
+/**
+ * gst_aggregator_pad_steal_buffer:
+ * @pad: the pad to get buffer from
+ *
+ * Steal the ref to the buffer currently queued in @pad.
+ *
+ * Returns: (transfer full): The buffer in @pad or NULL if no buffer was
+ *   queued. You should unref the buffer after usage.
+ */
+GstBuffer *
+gst_aggregator_pad_steal_buffer (GstAggregatorPad * pad)
+{
+  GstBuffer *buffer = NULL;
+
+  PAD_LOCK_EVENT (pad);
+  if (pad->buffer) {
+    GST_TRACE_OBJECT (pad, "Consuming buffer");
+    buffer = pad->buffer;
+    pad->buffer = NULL;
+    if (pad->priv->pending_eos) {
+      pad->priv->pending_eos = FALSE;
+      pad->eos = TRUE;
+    }
+    PAD_BROADCAST_EVENT (pad);
+    GST_DEBUG_OBJECT (pad, "Consummed: %" GST_PTR_FORMAT, buffer);
+  }
+  PAD_UNLOCK_EVENT (pad);
+
+  return buffer;
+}
+
+/**
+ * gst_aggregator_pad_get_buffer:
+ * @pad: the pad to get buffer from
+ *
+ * Returns: (transfer full): A reference to the buffer in @pad or
+ * NULL if no buffer was queued. You should unref the buffer after
+ * usage.
+ */
+GstBuffer *
+gst_aggregator_pad_get_buffer (GstAggregatorPad * pad)
+{
+  GstBuffer *buffer = NULL;
+
+  PAD_LOCK_EVENT (pad);
+  if (pad->buffer)
+    buffer = gst_buffer_ref (pad->buffer);
+  PAD_UNLOCK_EVENT (pad);
+
+  return buffer;
+}
+
+/**
+ * gst_aggregator_merge_tags:
+ * @self: a #GstAggregator
+ * @tags: a #GstTagList to merge
+ * @mode: the #GstTagMergeMode to use
+ *
+ * Adds tags to so-called pending tags, which will be processed
+ * before pushing out data downstream.
+ *
+ * Note that this is provided for convenience, and the subclass is
+ * not required to use this and can still do tag handling on its own.
+ *
+ * MT safe.
+ */
+void
+gst_aggregator_merge_tags (GstAggregator * self,
+    const GstTagList * tags, GstTagMergeMode mode)
+{
+  GstTagList *otags;
+
+  g_return_if_fail (GST_IS_AGGREGATOR (self));
+  g_return_if_fail (tags == NULL || GST_IS_TAG_LIST (tags));
+
+  /* FIXME Check if we can use OBJECT lock here! */
+  GST_OBJECT_LOCK (self);
+  if (tags)
+    GST_DEBUG_OBJECT (self, "merging tags %" GST_PTR_FORMAT, tags);
+  otags = self->priv->tags;
+  self->priv->tags = gst_tag_list_merge (self->priv->tags, tags, mode);
+  if (otags)
+    gst_tag_list_unref (otags);
+  self->priv->tags_changed = TRUE;
+  GST_OBJECT_UNLOCK (self);
+}
diff --git a/gst-libs/gst/base/gstaggregator.h b/gst-libs/gst/base/gstaggregator.h
new file mode 100644
index 0000000..507da13
--- /dev/null
+++ b/gst-libs/gst/base/gstaggregator.h
@@ -0,0 +1,261 @@
+/* GStreamer
+ * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@oencreed.com>
+ * Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.org>
+ *
+ * gstaggregator.c:
+ *
+ * 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.
+ */
+
+#ifndef __GST_AGGREGATOR_H__
+#define __GST_AGGREGATOR_H__
+
+#ifndef GST_USE_UNSTABLE_API
+#warning "The Base library from gst-plugins-bad is unstable API and may change in future."
+#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+/**************************
+ * GstAggregator Structs  *
+ *************************/
+
+typedef struct _GstAggregator GstAggregator;
+typedef struct _GstAggregatorPrivate GstAggregatorPrivate;
+typedef struct _GstAggregatorClass GstAggregatorClass;
+
+/************************
+ * GstAggregatorPad API *
+ ***********************/
+
+#define GST_TYPE_AGGREGATOR_PAD            (gst_aggregator_pad_get_type())
+#define GST_AGGREGATOR_PAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AGGREGATOR_PAD, GstAggregatorPad))
+#define GST_AGGREGATOR_PAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AGGREGATOR_PAD, GstAggregatorPadClass))
+#define GST_AGGREGATOR_PAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AGGREGATOR_PAD, GstAggregatorPadClass))
+#define GST_IS_AGGREGATOR_PAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AGGREGATOR_PAD))
+#define GST_IS_AGGREGATOR_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR_PAD))
+
+/****************************
+ * GstAggregatorPad Structs *
+ ***************************/
+
+typedef struct _GstAggregatorPad GstAggregatorPad;
+typedef struct _GstAggregatorPadClass GstAggregatorPadClass;
+typedef struct _GstAggregatorPadPrivate GstAggregatorPadPrivate;
+
+/**
+ * GstAggregatorPad:
+ * @buffer: currently queued buffer.
+ * @segment: last segment received.
+ *
+ * The implementation the GstPad to use with #GstAggregator
+ */
+struct _GstAggregatorPad
+{
+  GstPad                       parent;
+
+  GstBuffer                 *  buffer;
+  GstSegment                   segment;
+  gboolean                     eos;
+
+  /* < Private > */
+  GstAggregatorPadPrivate   *  priv;
+
+  gpointer _gst_reserved[GST_PADDING];
+};
+
+/**
+ * GstAggregatorPadClass:
+ * @flush:    Optional
+ *            Called when the pad has received a flush stop, this is the place
+ *            to flush any information specific to the pad, it allows for individual
+ *            pads to be flushed while others might not be.
+ *
+ */
+struct _GstAggregatorPadClass
+{
+  GstPadClass   parent_class;
+
+  GstFlowReturn (*flush)     (GstAggregatorPad * aggpad, GstAggregator * aggregator);
+
+  /*< private >*/
+  gpointer      _gst_reserved[GST_PADDING];
+};
+
+GType gst_aggregator_pad_get_type           (void);
+
+/****************************
+ * GstAggregatorPad methods *
+ ***************************/
+
+GstBuffer * gst_aggregator_pad_steal_buffer (GstAggregatorPad *  pad);
+GstBuffer * gst_aggregator_pad_get_buffer   (GstAggregatorPad *  pad);
+
+/*********************
+ * GstAggregator API *
+ ********************/
+
+#define GST_TYPE_AGGREGATOR            (gst_aggregator_get_type())
+#define GST_AGGREGATOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AGGREGATOR,GstAggregator))
+#define GST_AGGREGATOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AGGREGATOR,GstAggregatorClass))
+#define GST_AGGREGATOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AGGREGATOR,GstAggregatorClass))
+#define GST_IS_AGGREGATOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AGGREGATOR))
+#define GST_IS_AGGREGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR))
+
+#define GST_FLOW_CUSTOM_SUCCESS        GST_FLOW_NOT_HANDLED
+
+/**
+ * GstAggregator:
+ * @aggregator_pads: #GList of #GstAggregatorPad managed by this #GstAggregator.
+ *
+ * Collectpads object.
+ */
+struct _GstAggregator
+{
+  GstElement               parent;
+
+  GstPad                *  srcpad;
+
+  GstSegment               segment;
+
+  /*< private >*/
+  GstAggregatorPrivate  *  priv;
+
+  gpointer                 _gst_reserved[GST_PADDING];
+};
+
+/**
+ * GstAggregatorClass:
+ * @sinkpads_type:  Optional.
+ *                  The type of the pads that should be created when
+ *                  GstElement.request_new_pad is called.
+ * @flush:          Optional.
+ *                  Called after a succesful flushing seek, once all the flush
+ *                  stops have been received. Flush pad-specific data in
+ *                  #GstAggregatorPad->flush.
+ * @clip:           Optional.
+ *                  Called when a buffer is received on a sink pad, the task
+ *                  of clipping it and translating it to the current segment
+ *                  falls on the subclass.
+ * @sink_event:     Optional.
+ *                  Called when an event is received on a sink pad, the subclass
+ *                  should always chain up.
+ * @sink_query:     Optional.
+ *                  Called when a query is received on a sink pad, the subclass
+ *                  should always chain up.
+ * @src_event:      Optional.
+ *                  Called when an event is received on the src pad, the subclass
+ *                  should always chain up.
+ * @src_query:      Optional.
+ *                  Called when a query is received on the src pad, the subclass
+ *                  should always chain up.
+ * @src_activate:   Optional.
+ *                  Called when the src pad is activated, it will start/stop its
+ *                  pad task right after that call.
+ * @aggregate:      Mandatory.
+ *                  Called when buffers are queued on all sinkpads. Classes
+ *                  should iterate the GstElement->sinkpads and peek or steal
+ *                  buffers from the #GstAggregatorPads. If the subclass returns
+ *                  GST_FLOW_EOS, sending of the eos event will be taken care
+ *                  of. Once / if a buffer has been constructed from the
+ *                  aggregated buffers, the subclass should call _finish_buffer.
+ * @stop:           Optional.
+ *                  Should be linked up first. Called when the
+ *                  element goes from PAUSED to READY. The subclass should free
+ *                  all resources and reset its state.
+ * @start:          Optional.
+ *                  Should be linked up first. Called when the element goes from
+ *                  READY to PAUSED. The subclass should get ready to process
+ *                  aggregated buffers.
+ *
+ * The aggregator base class will handle in a thread-safe way all manners of
+ * concurrent flushes, seeks, pad additions and removals, leaving to the
+ * subclass the responsibility of clipping buffers, and aggregating buffers in
+ * the way the implementor sees fit.
+ *
+ * It will also take care of event ordering (stream-start, segment, eos).
+ *
+ * Basically, a basic implementation will override @aggregate, and call
+ * _finish_buffer from inside that function.
+ */
+struct _GstAggregatorClass {
+  GstElementClass   parent_class;
+
+  GType             sinkpads_type;
+
+  GstFlowReturn     (*flush)          (GstAggregator    *  aggregator);
+
+  GstFlowReturn     (*clip)           (GstAggregator    *  agg,
+                                       GstAggregatorPad *  bpad,
+                                       GstBuffer        *  buf,
+                                       GstBuffer        ** outbuf);
+
+  /* sinkpads virtual methods */
+  gboolean          (*sink_event)     (GstAggregator    *  aggregate,
+                                       GstAggregatorPad *  bpad,
+                                       GstEvent         *  event);
+
+  gboolean          (*sink_query)     (GstAggregator    *  aggregate,
+                                       GstAggregatorPad *  bpad,
+                                       GstQuery         *  query);
+
+  /* srcpad virtual methods */
+  gboolean          (*src_event)      (GstAggregator    *  aggregate,
+                                       GstEvent         *  event);
+
+  gboolean          (*src_query)      (GstAggregator    *  aggregate,
+                                       GstQuery         *  query);
+
+  gboolean          (*src_activate)   (GstAggregator    *  aggregator,
+                                       GstPadMode          mode,
+                                       gboolean            active);
+
+  GstFlowReturn     (*aggregate)      (GstAggregator    *  aggregator);
+
+  gboolean          (*stop)           (GstAggregator    *  aggregator);
+
+  gboolean          (*start)          (GstAggregator    *  aggregator);
+
+  /*< private >*/
+  gpointer          _gst_reserved[GST_PADDING];
+};
+
+/*************************
+ * GstAggregator methods *
+ ************************/
+
+GstFlowReturn  gst_aggregator_finish_buffer         (GstAggregator                *  agg,
+                                                     GstBuffer                    *  buffer);
+void           gst_aggregator_set_src_caps          (GstAggregator                *  agg,
+                                                     GstCaps                      *  caps);
+
+GType gst_aggregator_get_type(void);
+
+/* API that should eventually land in GstElement itself*/
+typedef gboolean (*GstAggregatorPadForeachFunc)    (GstAggregator                 *  self,
+                                                    GstPad                        *  pad,
+                                                    gpointer                         user_data);
+gboolean gst_aggregator_iterate_sinkpads           (GstAggregator                 *  self,
+                                                    GstAggregatorPadForeachFunc      func,
+                                                    gpointer                         user_data);
+
+
+G_END_DECLS
+
+#endif /* __GST_AGGREGATOR_H__ */
diff --git a/gst-libs/gst/basecamerabinsrc/Makefile.in b/gst-libs/gst/basecamerabinsrc/Makefile.in
index 0d8f09c..bfde297 100644
--- a/gst-libs/gst/basecamerabinsrc/Makefile.in
+++ b/gst-libs/gst/basecamerabinsrc/Makefile.in
@@ -335,6 +335,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -421,6 +423,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -712,6 +715,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstbasecamerabinsrc-@GST_API_VERSION@.la
 CLEANFILES = $(BUILT_SOURCES)
 libgstbasecamerabinsrc_@GST_API_VERSION@_la_SOURCES = \
diff --git a/gst-libs/gst/codecparsers/Makefile.in b/gst-libs/gst/codecparsers/Makefile.in
index 5fc74f1..c7fb215 100644
--- a/gst-libs/gst/codecparsers/Makefile.in
+++ b/gst-libs/gst/codecparsers/Makefile.in
@@ -363,6 +363,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -449,6 +451,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -740,6 +743,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstcodecparsers-@GST_API_VERSION@.la
 libgstcodecparsers_@GST_API_VERSION@_la_SOURCES = \
 	gstmpegvideoparser.c gsth264parser.c gstvc1parser.c gstmpeg4parser.c \
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
index db5cd8d..41489b8 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.c
+++ b/gst-libs/gst/codecparsers/gsth264parser.c
@@ -1777,7 +1777,7 @@
 }
 
 /**
- * gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster:
+ * gst_h264_quant_matrix_8x8_get_zigzag_from_raster:
  * @out_quant: (out): The resulting quantization matrix
  * @quant: The source quantization matrix
  *
@@ -1790,7 +1790,7 @@
  * Since: 1.4
  */
 void
-gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
+gst_h264_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
     const guint8 quant[64])
 {
   guint i;
@@ -1815,7 +1815,7 @@
  * Since: 1.4
  */
 void
-gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
+gst_h264_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
     const guint8 quant[64])
 {
   guint i;
@@ -1827,7 +1827,7 @@
 }
 
 /**
- * gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster:
+ * gst_h264_quant_matrix_4x4_get_zigzag_from_raster:
  * @out_quant: (out): The resulting quantization matrix
  * @quant: The source quantization matrix
  *
@@ -1840,7 +1840,7 @@
  * Since: 1.4
  */
 void
-gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
+gst_h264_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
     const guint8 quant[16])
 {
   guint i;
@@ -1865,7 +1865,7 @@
  * Since: 1.4
  */
 void
-gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
+gst_h264_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
     const guint8 quant[16])
 {
   guint i;
@@ -1875,3 +1875,78 @@
   for (i = 0; i < 16; i++)
     out_quant[zigzag_4x4[i]] = quant[i];
 }
+
+/**
+ * gst_h264_video_calculate_framerate:
+ * @sps: Current Sequence Parameter Set
+ * @field_pic_flag: Current @field_pic_flag, obtained from latest slice header
+ * @pic_struct: @pic_struct value if available, 0 otherwise
+ * @fps_num: (out): The resulting fps numerator
+ * @fps_den: (out): The resulting fps denominator
+ *
+ * Calculate framerate of a video sequence using @sps VUI information,
+ * @field_pic_flag from a slice header and @pic_struct from #GstH264PicTiming SEI
+ * message.
+ *
+ * If framerate is variable or can't be determined, @fps_num will be set to 0
+ * and @fps_den to 1.
+ */
+void
+gst_h264_video_calculate_framerate (const GstH264SPS * sps,
+    guint field_pic_flag, guint pic_struct, gint * fps_num, gint * fps_den)
+{
+  gint num = 0;
+  gint den = 1;
+
+  /* To calculate framerate, we use this formula:
+   *          time_scale                1                         1
+   * fps = -----------------  x  ---------------  x  ------------------------
+   *       num_units_in_tick     DeltaTfiDivisor     (field_pic_flag ? 2 : 1)
+   *
+   * See H264 specification E2.1 for more details.
+   */
+
+  if (sps) {
+    if (sps->vui_parameters_present_flag) {
+      const GstH264VUIParams *vui = &sps->vui_parameters;
+      if (vui->timing_info_present_flag && vui->fixed_frame_rate_flag) {
+        int delta_tfi_divisor = 1;
+        num = vui->time_scale;
+        den = vui->num_units_in_tick;
+
+        if (vui->pic_struct_present_flag) {
+          switch (pic_struct) {
+            case 1:
+            case 2:
+              delta_tfi_divisor = 1;
+              break;
+            case 0:
+            case 3:
+            case 4:
+              delta_tfi_divisor = 2;
+              break;
+            case 5:
+            case 6:
+              delta_tfi_divisor = 3;
+              break;
+            case 7:
+              delta_tfi_divisor = 4;
+              break;
+            case 8:
+              delta_tfi_divisor = 6;
+              break;
+          }
+        } else {
+          delta_tfi_divisor = field_pic_flag ? 1 : 2;
+        }
+        den *= delta_tfi_divisor;
+
+        /* Picture is two fields ? */
+        den *= (field_pic_flag ? 2 : 1);
+      }
+    }
+  }
+
+  *fps_num = num;
+  *fps_den = den;
+}
diff --git a/gst-libs/gst/codecparsers/gsth264parser.h b/gst-libs/gst/codecparsers/gsth264parser.h
index dd0b26b..f9e5083 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.h
+++ b/gst-libs/gst/codecparsers/gsth264parser.h
@@ -769,17 +769,20 @@
 GstH264ParserResult gst_h264_parse_pps                (GstH264NalParser *nalparser,
                                                        GstH264NalUnit *nalu, GstH264PPS *pps);
 
-void    gst_h264_video_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
-                                                                const guint8 quant[64]);
+void    gst_h264_quant_matrix_8x8_get_zigzag_from_raster (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
 
-void    gst_h264_video_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
-                                                                const guint8 quant[64]);
+void    gst_h264_quant_matrix_8x8_get_raster_from_zigzag (guint8 out_quant[64],
+                                                          const guint8 quant[64]);
 
-void    gst_h264_video_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
-                                                                const guint8 quant[16]);
+void    gst_h264_quant_matrix_4x4_get_zigzag_from_raster (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
 
-void    gst_h264_video_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
-                                                                const guint8 quant[16]);
+void    gst_h264_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
+                                                          const guint8 quant[16]);
+
+void gst_h264_video_calculate_framerate (const GstH264SPS * sps, guint field_pic_flag,
+    guint pic_struct, gint * fps_num, gint * fps_den);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.c b/gst-libs/gst/codecparsers/gstmpeg4parser.c
index 5acc417..4bf63e5 100644
--- a/gst-libs/gst/codecparsers/gstmpeg4parser.c
+++ b/gst-libs/gst/codecparsers/gstmpeg4parser.c
@@ -32,6 +32,7 @@
 #endif
 
 #include <string.h>
+#include <gst/base/gstbitreader.h>
 #include <gst/base/gstbytereader.h>
 
 
diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.h b/gst-libs/gst/codecparsers/gstmpeg4parser.h
index 4a726e2..c9030b8 100644
--- a/gst-libs/gst/codecparsers/gstmpeg4parser.h
+++ b/gst-libs/gst/codecparsers/gstmpeg4parser.h
@@ -22,7 +22,8 @@
 #define __GST_MPEG4UTIL_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstbitreader.h>
+
+G_BEGIN_DECLS
 
 typedef struct _GstMpeg4VisualObjectSequence    GstMpeg4VisualObjectSequence;
 typedef struct _GstMpeg4VisualObject            GstMpeg4VisualObject;
@@ -577,4 +578,6 @@
                                           GstMpeg4SpriteTrajectory * sprite_trajectory,
                                           const guint8 * data, gsize size);
 
+G_END_DECLS
+
 #endif /* __GST_MPEG4UTIL_H__ */
diff --git a/gst-libs/gst/codecparsers/gstvp8parser.h b/gst-libs/gst/codecparsers/gstvp8parser.h
index 228c254..efe7950 100644
--- a/gst-libs/gst/codecparsers/gstvp8parser.h
+++ b/gst-libs/gst/codecparsers/gstvp8parser.h
@@ -26,6 +26,8 @@
 
 #include <gst/gst.h>
 
+G_BEGIN_DECLS
+
 typedef struct _GstVp8FrameHdr          GstVp8FrameHdr;
 typedef struct _GstVp8QuantIndices      GstVp8QuantIndices;
 typedef struct _GstVp8Segmentation      GstVp8Segmentation;
@@ -331,4 +333,6 @@
 gst_vp8_parser_parse_frame_header (GstVp8Parser * parser,
     GstVp8FrameHdr * frame_hdr, const guint8 * data, gsize size);
 
+G_END_DECLS
+
 #endif /* GST_VP8_PARSER_H */
diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index bdc05f6..d201e3e 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
@@ -20,6 +20,7 @@
         gstglcolorconvert.c \
         gstgldownload.c \
         gstglupload.c \
+        gstgluploadmeta.c \
         gstglwindow.c \
         gstglapi.c \
         gstglfeature.c \
@@ -33,7 +34,6 @@
 	gstglcontext.h \
 	gstglmemory.h \
 	gstglbufferpool.h \
-	gstgles2.h \
 	gstglfilter.h \
 	gstglmixer.h \
 	gstglmixerpad.h \
@@ -41,6 +41,7 @@
 	gstglshader.h \
 	gstglcolorconvert.h \
 	gstgldownload.h \
+	gstgluploadmeta.h \
 	gstglupload.h \
 	gstglapi.h \
 	gstglfeature.h \
@@ -50,6 +51,8 @@
 	gl.h
 
 libgstgl_@GST_API_VERSION@_la_LIBADD = \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
 	$(GMODULE_NO_EXPORT_LIBS) \
 	$(GST_PLUGINS_BASE_LIBS) \
 	-lgstvideo-$(GST_API_VERSION) \
diff --git a/gst-libs/gst/gl/Makefile.in b/gst-libs/gst/gl/Makefile.in
index 975f63f..8cd93ec 100644
--- a/gst-libs/gst/gl/Makefile.in
+++ b/gst-libs/gst/gl/Makefile.in
@@ -173,12 +173,13 @@
 	"$(DESTDIR)$(libgstgl_@GST_API_VERSION@includedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libgstgl_@GST_API_VERSION@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+libgstgl_@GST_API_VERSION@_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_2) \
-	$(am__append_4) $(am__append_6) $(am__append_8) \
-	$(am__append_10) $(am__append_12) $(am__append_14) \
-	$(am__append_16)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__append_2) $(am__append_4) \
+	$(am__append_6) $(am__append_8) $(am__append_10) \
+	$(am__append_12) $(am__append_14) $(am__append_16)
 am_libgstgl_@GST_API_VERSION@_la_OBJECTS =  \
 	libgstgl_@GST_API_VERSION@_la-gstgldisplay.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglcontext.lo \
@@ -191,6 +192,7 @@
 	libgstgl_@GST_API_VERSION@_la-gstglcolorconvert.lo \
 	libgstgl_@GST_API_VERSION@_la-gstgldownload.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglupload.lo \
+	libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglwindow.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglapi.lo \
 	libgstgl_@GST_API_VERSION@_la-gstglfeature.lo \
@@ -427,6 +429,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -513,6 +517,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -804,6 +809,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstgl-@GST_API_VERSION@.la
 SUBDIRS = glprototypes $(am__append_1) $(am__append_3) $(am__append_5) \
 	$(am__append_7) $(am__append_9) $(am__append_11) \
@@ -823,6 +829,7 @@
         gstglcolorconvert.c \
         gstgldownload.c \
         gstglupload.c \
+        gstgluploadmeta.c \
         gstglwindow.c \
         gstglapi.c \
         gstglfeature.c \
@@ -836,7 +843,6 @@
 	gstglcontext.h \
 	gstglmemory.h \
 	gstglbufferpool.h \
-	gstgles2.h \
 	gstglfilter.h \
 	gstglmixer.h \
 	gstglmixerpad.h \
@@ -844,6 +850,7 @@
 	gstglshader.h \
 	gstglcolorconvert.h \
 	gstgldownload.h \
+	gstgluploadmeta.h \
 	gstglupload.h \
 	gstglapi.h \
 	gstglfeature.h \
@@ -852,12 +859,13 @@
 	gstgl_fwd.h \
 	gl.h
 
-libgstgl_@GST_API_VERSION@_la_LIBADD = $(GMODULE_NO_EXPORT_LIBS) \
-	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
-	$(GST_BASE_LIBS) $(GST_LIBS) $(GL_LIBS) $(am__append_2) \
-	$(am__append_4) $(am__append_6) $(am__append_8) \
-	$(am__append_10) $(am__append_12) $(am__append_14) \
-	$(am__append_16)
+libgstgl_@GST_API_VERSION@_la_LIBADD = $(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+	$(GMODULE_NO_EXPORT_LIBS) $(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) \
+	$(GL_LIBS) $(am__append_2) $(am__append_4) $(am__append_6) \
+	$(am__append_8) $(am__append_10) $(am__append_12) \
+	$(am__append_14) $(am__append_16)
 nodist_libgstgl_@GST_API_VERSION@include_HEADERS = \
 	$(built_header_configure)
 
@@ -971,6 +979,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglshader.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglshadervariables.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglupload.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglutils.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglwindow.Plo@am__quote@
 
@@ -1075,6 +1084,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstgl_@GST_API_VERSION@_la-gstglupload.lo `test -f 'gstglupload.c' || echo '$(srcdir)/'`gstglupload.c
 
+libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo: gstgluploadmeta.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo `test -f 'gstgluploadmeta.c' || echo '$(srcdir)/'`gstgluploadmeta.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstgluploadmeta.c' object='libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstgl_@GST_API_VERSION@_la-gstgluploadmeta.lo `test -f 'gstgluploadmeta.c' || echo '$(srcdir)/'`gstgluploadmeta.c
+
 libgstgl_@GST_API_VERSION@_la-gstglwindow.lo: gstglwindow.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgl_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstgl_@GST_API_VERSION@_la-gstglwindow.lo -MD -MP -MF $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglwindow.Tpo -c -o libgstgl_@GST_API_VERSION@_la-gstglwindow.lo `test -f 'gstglwindow.c' || echo '$(srcdir)/'`gstglwindow.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglwindow.Tpo $(DEPDIR)/libgstgl_@GST_API_VERSION@_la-gstglwindow.Plo
diff --git a/gst-libs/gst/gl/android/Makefile.in b/gst-libs/gst/gl/android/Makefile.in
index 15d7474..96be120 100644
--- a/gst-libs/gst/gl/android/Makefile.in
+++ b/gst-libs/gst/gl/android/Makefile.in
@@ -343,6 +343,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -429,6 +431,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -720,6 +723,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-android.la
 libgstgl_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl
 libgstglandroidincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/android
diff --git a/gst-libs/gst/gl/cocoa/Makefile.in b/gst-libs/gst/gl/cocoa/Makefile.in
index 8f7a1bb..6bc9200 100644
--- a/gst-libs/gst/gl/cocoa/Makefile.in
+++ b/gst-libs/gst/gl/cocoa/Makefile.in
@@ -315,6 +315,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -401,6 +403,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -692,6 +695,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-cocoa.la
 libgstgl_cocoa_la_SOURCES = \
 	gstglwindow_cocoa.m \
diff --git a/gst-libs/gst/gl/dispmanx/Makefile.in b/gst-libs/gst/gl/dispmanx/Makefile.in
index 51346f2..cfb5ee3 100644
--- a/gst-libs/gst/gl/dispmanx/Makefile.in
+++ b/gst-libs/gst/gl/dispmanx/Makefile.in
@@ -315,6 +315,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -401,6 +403,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -692,6 +695,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-dispmanx.la
 libgstgl_dispmanx_la_SOURCES = \
 	gstglwindow_dispmanx_egl.c
diff --git a/gst-libs/gst/gl/eagl/Makefile.in b/gst-libs/gst/gl/eagl/Makefile.in
index 4b0bd3f..0823fbd 100644
--- a/gst-libs/gst/gl/eagl/Makefile.in
+++ b/gst-libs/gst/gl/eagl/Makefile.in
@@ -315,6 +315,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -401,6 +403,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -692,6 +695,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-eagl.la
 libgstgl_eagl_la_SOURCES = \
 	gstglwindow_eagl.m \
diff --git a/gst-libs/gst/gl/egl/Makefile.in b/gst-libs/gst/gl/egl/Makefile.in
index 3131307..fcf4d01 100644
--- a/gst-libs/gst/gl/egl/Makefile.in
+++ b/gst-libs/gst/gl/egl/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-egl.la
 libgstgl_egl_la_SOURCES = \
 	gstgldisplay_egl.c \
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c
index d3c8d96..4ccec8d 100644
--- a/gst-libs/gst/gl/egl/gstglcontext_egl.c
+++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c
@@ -447,7 +447,7 @@
   gst_gl_context_egl_activate (context, FALSE);
 
   if (egl->egl_surface)
-    eglDestroySurface (egl->egl_surface, egl->egl_display);
+    eglDestroySurface (egl->egl_display, egl->egl_surface);
 
   if (egl->egl_context)
     eglDestroyContext (egl->egl_display, egl->egl_context);
@@ -509,13 +509,14 @@
 #ifdef GST_GL_LIBEGL_MODULE_NAME
   module_egl = g_module_open (GST_GL_LIBEGL_MODULE_NAME, G_MODULE_BIND_LAZY);
 #else
-  /* This automatically handles the suffix and even .la files */
-  module_egl = g_module_open ("libEGL", G_MODULE_BIND_LAZY);
-
   /* On Linux the .so is only in -dev packages, try with a real soname
    * Proper compilers will optimize away the strcmp */
-  if (!module_egl && strcmp (G_MODULE_SUFFIX, "so") == 0)
+  if (strcmp (G_MODULE_SUFFIX, "so") == 0)
     module_egl = g_module_open ("libEGL.so.1", G_MODULE_BIND_LAZY);
+
+  /* This automatically handles the suffix and even .la files */
+  if (!module_egl)
+    module_egl = g_module_open ("libEGL", G_MODULE_BIND_LAZY);
 #endif
 
   return NULL;
diff --git a/gst-libs/gst/gl/gl.h b/gst-libs/gst/gl/gl.h
index 32cf5fd..4aee9c9 100644
--- a/gst-libs/gst/gl/gl.h
+++ b/gst-libs/gst/gl/gl.h
@@ -21,6 +21,11 @@
 #ifndef __GST_GL_H__
 #define __GST_GL_H__
 
+#ifndef GST_USE_UNSTABLE_API
+#warning "The GL library from gst-plugins-bad is unstable API and may change in future."
+#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
 #include <gst/gl/gstgl_fwd.h>
 #include <gst/gl/gstglconfig.h>
 #include <gst/gl/gstglapi.h>
@@ -32,6 +37,7 @@
 #include <gst/gl/gstglshader.h>
 #include <gst/gl/gstglcolorconvert.h>
 #include <gst/gl/gstglupload.h>
+#include <gst/gl/gstgluploadmeta.h>
 #include <gst/gl/gstgldownload.h>
 #include <gst/gl/gstglmemory.h>
 #include <gst/gl/gstglbufferpool.h>
diff --git a/gst-libs/gst/gl/glprototypes/Makefile.am b/gst-libs/gst/gl/glprototypes/Makefile.am
index 9953b98..6528630 100644
--- a/gst-libs/gst/gl/glprototypes/Makefile.am
+++ b/gst-libs/gst/gl/glprototypes/Makefile.am
@@ -10,5 +10,6 @@
 	gles.h \
 	opengl.h \
 	shaders.h \
-	gstgl_compat.h
+	gstgl_compat.h \
+	gstgl_gles2compat.h
 
diff --git a/gst-libs/gst/gl/glprototypes/Makefile.in b/gst-libs/gst/gl/glprototypes/Makefile.in
index f55f0b2..09d5982 100644
--- a/gst-libs/gst/gl/glprototypes/Makefile.in
+++ b/gst-libs/gst/gl/glprototypes/Makefile.in
@@ -307,6 +307,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -393,6 +395,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -684,6 +687,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 prototypedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/glprototypes
 prototype_HEADERS = \
 	all_functions.h \
@@ -695,7 +699,8 @@
 	gles.h \
 	opengl.h \
 	shaders.h \
-	gstgl_compat.h
+	gstgl_compat.h \
+	gstgl_gles2compat.h
 
 all: all-am
 
diff --git a/gst-libs/gst/gl/glprototypes/base.h b/gst-libs/gst/gl/glprototypes/base.h
index b5f4f31..ab25e7e 100644
--- a/gst-libs/gst/gl/glprototypes/base.h
+++ b/gst-libs/gst/gl/glprototypes/base.h
@@ -42,8 +42,10 @@
 /* These are the core GL functions which we assume will always be
    available */
 GST_GL_EXT_BEGIN (core,
-                  0, 0,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES1 | GST_GL_API_GLES2,
+                  1, 0,
+                  1, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, BindTexture,
@@ -178,8 +180,10 @@
 GST_GL_EXT_FUNCTION (void, PolygonOffset, (GLfloat factor, GLfloat units))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (texture_3d, 1, 2,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (texture_3d,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
+                  1, 2,
+                  255, 255, /* not in either GLES */
                   "OES\0",
                   "texture_3D\0")
 GST_GL_EXT_FUNCTION (void, TexImage3D,
@@ -199,9 +203,10 @@
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (only_in_both_gles_and_gl_1_3,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES1 | GST_GL_API_GLES2,
                   1, 3,
-                  GST_GL_API_GLES1 |
-                  GST_GL_API_GLES2,
+                  1, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, CompressedTexImage2D,
@@ -228,18 +233,21 @@
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (only_in_both_gles_and_gl_1_5,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES1 | GST_GL_API_GLES2,
                   1, 5,
-                  GST_GL_API_GLES1 |
-                  GST_GL_API_GLES2,
+                  1, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, GetBufferParameteriv,
                      (GLenum target, GLenum pname, GLint* params))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (vbos, 1, 5,
-                  GST_GL_API_GLES1 |
-                  GST_GL_API_GLES2,
+GST_GL_EXT_BEGIN (vbos,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES1 | GST_GL_API_GLES2,
+                  1, 5,
+                  1, 0,
                   "ARB\0",
                   "vertex_buffer_object\0")
 GST_GL_EXT_FUNCTION (void, GenBuffers,
@@ -267,11 +275,13 @@
 
 /* Available in GL 1.3, the multitexture extension or GLES. These are
    required */
-GST_GL_EXT_BEGIN (multitexture_part0, 1, 3,
-                GST_GL_API_GLES1 |
-                GST_GL_API_GLES2,
-                "ARB\0",
-                "multitexture\0")
+GST_GL_EXT_BEGIN (multitexture_part0,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES1 | GST_GL_API_GLES2,
+                  1, 3,
+                  1, 0,
+                  "ARB\0",
+                  "multitexture\0")
 GST_GL_EXT_FUNCTION (void, ActiveTexture,
                    (GLenum                texture))
 GST_GL_EXT_END ()
@@ -279,10 +289,12 @@
 
  /* GLES doesn't support mapping buffers in core so this has to be a
    separate check */
-GST_GL_EXT_BEGIN (map_vbos, 1, 5,
-                0, /* not in GLES core */
-                "ARB\0OES\0",
-                "vertex_buffer_object\0mapbuffer\0")
+GST_GL_EXT_BEGIN (map_vbos, 
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
+                  1, 5,
+                  255, 255, /* not in GLES core */
+                  "ARB\0OES\0",
+                  "vertex_buffer_object\0mapbuffer\0")
 GST_GL_EXT_FUNCTION (void *, MapBuffer,
                    (GLenum		 target,
                     GLenum		 access))
@@ -291,8 +303,10 @@
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (gl3,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES2,
                   3, 1,
-                  GST_GL_API_GLES3,
+                  3, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (const GLubyte*, GetStringi,
diff --git a/gst-libs/gst/gl/glprototypes/blending.h b/gst-libs/gst/gl/glprototypes/blending.h
index 1a356c7..8ea5148 100644
--- a/gst-libs/gst/gl/glprototypes/blending.h
+++ b/gst-libs/gst/gl/glprototypes/blending.h
@@ -38,8 +38,11 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-GST_GL_EXT_BEGIN (blending, 1, 2,
+GST_GL_EXT_BEGIN (blending,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  1, 2,
+                  2, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, BlendEquation,
@@ -52,8 +55,11 @@
 GST_GL_EXT_END ()
 
 /* Optional, declared in 1.4 or GLES 1.2 */
-GST_GL_EXT_BEGIN (blend_func_separate, 1, 4,
+GST_GL_EXT_BEGIN (blend_func_separate,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  1, 4,
+                  2, 0,
                   "EXT\0",
                   "blend_func_separate\0")
 GST_GL_EXT_FUNCTION (void, BlendFuncSeparate,
@@ -64,8 +70,11 @@
 GST_GL_EXT_END ()
 
 /* Optional, declared in 2.0 */
-GST_GL_EXT_BEGIN (blend_equation_separate, 2, 0,
+GST_GL_EXT_BEGIN (blend_equation_separate,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  2, 0,
+                  2, 0,
                   "EXT\0",
                   "blend_equation_separate\0")
 GST_GL_EXT_FUNCTION (void, BlendEquationSeparate,
@@ -75,8 +84,10 @@
 
 /* GL and GLES 2.0 apis */
 GST_GL_EXT_BEGIN (two_point_zero_api,
-                  2, 0,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  2, 0,
+                  2, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, StencilFuncSeparate,
diff --git a/gst-libs/gst/gl/glprototypes/eglimage.h b/gst-libs/gst/gl/glprototypes/eglimage.h
index ae93063..0256003 100644
--- a/gst-libs/gst/gl/glprototypes/eglimage.h
+++ b/gst-libs/gst/gl/glprototypes/eglimage.h
@@ -38,8 +38,10 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-GST_GL_EXT_BEGIN (EGL_image, 255, 255,
-                0, /* not in either GLES */
+GST_GL_EXT_BEGIN (EGL_image,
+                GST_GL_API_NONE,
+                255, 255,
+                255, 255, /* not in either GLES */
                 "OES\0",
                 "EGL_image\0")
 GST_GL_EXT_FUNCTION (void, EGLImageTargetTexture2D,
diff --git a/gst-libs/gst/gl/glprototypes/fbo.h b/gst-libs/gst/gl/glprototypes/fbo.h
index b05b91b..d142483 100644
--- a/gst-libs/gst/gl/glprototypes/fbo.h
+++ b/gst-libs/gst/gl/glprototypes/fbo.h
@@ -39,8 +39,10 @@
  */
 
 GST_GL_EXT_BEGIN (offscreen,
-                  3, 0,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  3, 0,
+                  2, 0,
                   /* for some reason the ARB version of this
                      extension doesn't have an ARB suffix for the
                      functions */
@@ -99,8 +101,10 @@
                      (GLuint                framebuffer))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (offscreen_blit, 255, 255,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (offscreen_blit,
+                  GST_GL_API_NONE,
+                  255, 255,
+                  255, 255, /* not in either GLES */
                   "EXT\0ANGLE\0",
                   "framebuffer_blit\0")
 GST_GL_EXT_FUNCTION (void, BlitFramebuffer,
@@ -116,8 +120,10 @@
                       GLenum                filter))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (framebuffer_discard, 255, 255,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (framebuffer_discard, 
+                  GST_GL_API_NONE,
+                  255, 255,
+                  255, 255, /* not in either GLES */
                   "EXT\0",
                   "framebuffer_discard\0")
 GST_GL_EXT_FUNCTION (void, DiscardFramebuffer,
@@ -127,16 +133,22 @@
 GST_GL_EXT_END ()
 
 
-GST_GL_EXT_BEGIN (read_buffer, 1, 0,
-                  GST_GL_API_GLES3,
+GST_GL_EXT_BEGIN (read_buffer,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES2,
+                  1, 0,
+                  3, 0,
                   "NV\0",
                   "read_buffer\0")
 GST_GL_EXT_FUNCTION (void, ReadBuffer,
                      (GLenum mode))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (draw_buffers, 2, 1,
-                  GST_GL_API_GLES3,
+GST_GL_EXT_BEGIN (draw_buffers,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES2,
+                  2, 1,
+                  3, 0,
                   "ARB\0ATI\0NV\0",
                   "draw_buffers\0")
 GST_GL_EXT_FUNCTION (void, DrawBuffers,
diff --git a/gst-libs/gst/gl/glprototypes/fixedfunction.h b/gst-libs/gst/gl/glprototypes/fixedfunction.h
index 759fc16..3aecbd2 100644
--- a/gst-libs/gst/gl/glprototypes/fixedfunction.h
+++ b/gst-libs/gst/gl/glprototypes/fixedfunction.h
@@ -38,8 +38,11 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-GST_GL_EXT_BEGIN (multitexture_part1, 1, 3,
+GST_GL_EXT_BEGIN (multitexture_part1,
+                  GST_GL_API_OPENGL |
                   GST_GL_API_GLES1,
+                  1, 3,
+                  1, 0,
                   "ARB\0",
                   "multitexture\0")
 GST_GL_EXT_FUNCTION (void, ClientActiveTexture,
@@ -49,8 +52,10 @@
 /* These are the core GL functions which are available when the API
    supports fixed-function (ie, GL and GLES1.1) */
 GST_GL_EXT_BEGIN (fixed_function_core,
-                  0, 0,
+                  GST_GL_API_OPENGL |
                   GST_GL_API_GLES1,
+                  0, 0,
+                  1, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, AlphaFunc,
@@ -106,8 +111,9 @@
 
 /* Eventually we want to remove this category */
 GST_GL_EXT_BEGIN (fixed_function_gl_only,
+                  GST_GL_API_OPENGL,
                   0, 0,
-                  0,
+                  0, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, PushAttrib,
diff --git a/gst-libs/gst/gl/glprototypes/gles.h b/gst-libs/gst/gl/glprototypes/gles.h
index c5074da..7d1cd88 100644
--- a/gst-libs/gst/gl/glprototypes/gles.h
+++ b/gst-libs/gst/gl/glprototypes/gles.h
@@ -39,9 +39,10 @@
  */
 
 GST_GL_EXT_BEGIN (only_in_both_gles,
-                  255, 255,
                   GST_GL_API_GLES1 |
                   GST_GL_API_GLES2,
+                  255, 255,
+                  1, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, DepthRangef,
@@ -51,16 +52,18 @@
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (only_in_gles1,
-                255, 255,
                 GST_GL_API_GLES1,
+                255, 255,
+                1, 0,
                 "\0",
                 "\0")
 GST_GL_EXT_FUNCTION (void, ClipPlanef, (GLenum plane, const GLfloat *equation))
 GST_GL_EXT_END ()
 
 GST_GL_EXT_BEGIN (gles2_only_api,
-                  255, 255,
                   GST_GL_API_GLES2,
+                  255, 255,
+                  2, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, ReleaseShaderCompiler, (void))
@@ -77,8 +80,10 @@
                       GLsizei length))
 GST_GL_EXT_END ()
 
-GST_GL_EXT_BEGIN (IMG_multisampled_render_to_texture, 255, 255,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (IMG_multisampled_render_to_texture,
+                  GST_GL_API_NONE,
+                  255, 255,
+                  255, 255, /* not in either GLES */
                   "\0",
                   "IMG_multisampled_render_to_texture\0")
 GST_GL_EXT_FUNCTION (void, RenderbufferStorageMultisampleIMG,
diff --git a/gst-libs/gst/gl/gstgles2.h b/gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h
similarity index 100%
rename from gst-libs/gst/gl/gstgles2.h
rename to gst-libs/gst/gl/glprototypes/gstgl_gles2compat.h
diff --git a/gst-libs/gst/gl/glprototypes/opengl.h b/gst-libs/gst/gl/glprototypes/opengl.h
index a076180..24ba20d 100644
--- a/gst-libs/gst/gl/glprototypes/opengl.h
+++ b/gst-libs/gst/gl/glprototypes/opengl.h
@@ -41,8 +41,9 @@
 /* These are the core GL functions which are only available in big
    GL */
 GST_GL_EXT_BEGIN (only_in_big_gl,
-                  0, 0,
-                  0, /* not in GLES */
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
+                  1, 0,
+                  255, 255, /* not in GLES */
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, GetTexLevelParameteriv,
@@ -52,10 +53,18 @@
                      (GLenum target, GLint level,
                       GLenum format, GLenum type,
                       GLvoid *pixels))
-GST_GL_EXT_FUNCTION (void, ClipPlane,
-                     (GLenum plane, const double *equation))
 GST_GL_EXT_FUNCTION (void, DepthRange,
                      (double near_val, double far_val))
 GST_GL_EXT_FUNCTION (void, DrawBuffer,
                      (GLenum mode))
 GST_GL_EXT_END ()
+
+GST_GL_EXT_BEGIN (only_in_big_gl_compat,
+                  GST_GL_API_OPENGL,
+                  1, 0,
+                  255, 255, /* not in GLES */
+                  "\0",
+                  "\0")
+GST_GL_EXT_FUNCTION (void, ClipPlane,
+                     (GLenum plane, const double *equation))
+GST_GL_EXT_END ()
diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
index 0bc2429..817e479 100644
--- a/gst-libs/gst/gl/glprototypes/shaders.h
+++ b/gst-libs/gst/gl/glprototypes/shaders.h
@@ -40,8 +40,11 @@
 
 /* This lists functions that are unique to GL 2.0 or GLES 2.0 and are
  * not in the old GLSL extensions */
-GST_GL_EXT_BEGIN (shaders_glsl_2_only, 2, 0,
+GST_GL_EXT_BEGIN (shaders_glsl_2_only,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  2, 0,
+                  2, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (GLuint, CreateProgram,
@@ -90,8 +93,11 @@
 
 /* These functions are provided by GL_ARB_shader_objects or are in GL
  * 2.0 core */
-GST_GL_EXT_BEGIN (shader_objects_or_gl2, 2, 0,
+GST_GL_EXT_BEGIN (shader_objects_or_gl2,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  2, 0,
+                  2, 0,
                   "ARB\0",
                   "shader_objects\0")
 GST_GL_EXT_FUNCTION (void, ShaderSource,
@@ -216,8 +222,11 @@
 
 /* These functions are provided by GL_ARB_vertex_shader or are in GL
  * 2.0 core */
-GST_GL_EXT_BEGIN (vertex_shaders, 2, 0,
+GST_GL_EXT_BEGIN (vertex_shaders,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
                   GST_GL_API_GLES2,
+                  2, 0,
+                  2, 0,
                   "ARB\0",
                   "vertex_shader\0")
 GST_GL_EXT_FUNCTION (void, VertexAttribPointer,
@@ -270,8 +279,10 @@
 /* These only list functions that come from the old GLSL extensions.
  * Functions that are common to the extensions and GLSL 2.0 should
  * instead be listed in cogl-glsl-functions.h */
-GST_GL_EXT_BEGIN (shader_objects, 255, 255,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (shader_objects,
+                  GST_GL_API_NONE,
+                  255, 255,
+                  255, 255, /* not in either GLES */
                   "ARB\0",
                   "shader_objects\0")
 GST_GL_EXT_FUNCTION (GLuint, CreateProgramObject,
@@ -303,8 +314,10 @@
 GST_GL_EXT_END ()
 
 /* ARB_fragment_program */
-GST_GL_EXT_BEGIN (arbfp, 255, 255,
-                  0, /* not in either GLES */
+GST_GL_EXT_BEGIN (arbfp,
+                  GST_GL_API_NONE,
+                  255, 255,
+                  255, 255, /* not in either GLES */
                   "ARB\0",
                   "fragment_program\0")
 GST_GL_EXT_FUNCTION (void, GenPrograms,
@@ -329,8 +342,11 @@
 
 /* This lists functions that are unique to GL 2.1 or GLES 3.0 and are
  * not in the old GLSL extensions */
-GST_GL_EXT_BEGIN (shaders_2_1, 2, 1,
-                  GST_GL_API_GLES3,
+GST_GL_EXT_BEGIN (shaders_2_1,
+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
+                  GST_GL_API_GLES2,
+                  2, 1,
+                  3, 0,
                   "\0",
                   "\0")
 GST_GL_EXT_FUNCTION (void, UniformMatrix2x3fv,
diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
index 4b9a094..b0eedc0 100644
--- a/gst-libs/gst/gl/gstgl_fwd.h
+++ b/gst-libs/gst/gl/gstgl_fwd.h
@@ -55,6 +55,10 @@
 typedef struct _GstGLUploadClass GstGLUploadClass;
 typedef struct _GstGLUploadPrivate GstGLUploadPrivate;
 
+typedef struct _GstGLUploadMeta GstGLUploadMeta;
+typedef struct _GstGLUploadMetaClass GstGLUploadMetaClass;
+typedef struct _GstGLUploadMetaPrivate GstGLUploadMetaPrivate;
+
 typedef struct _GstGLColorConvert GstGLColorConvert;
 typedef struct _GstGLColorConvertClass GstGLColorConvertClass;
 typedef struct _GstGLColorConvertPrivate GstGLColorConvertPrivate;
diff --git a/gst-libs/gst/gl/gstglapi.c b/gst-libs/gst/gl/gstglapi.c
index c1fbe8a..5d7e621 100644
--- a/gst-libs/gst/gl/gstglapi.c
+++ b/gst-libs/gst/gl/gstglapi.c
@@ -68,13 +68,6 @@
       str = g_string_new (GST_GL_API_GLES2_NAME);
     }
   }
-  if (api & GST_GL_API_GLES3) {
-    if (str) {
-      g_string_append (str, " " GST_GL_API_GLES3_NAME);
-    } else {
-      str = g_string_new (GST_GL_API_GLES3_NAME);
-    }
-  }
 
 out:
   if (!str)
@@ -117,9 +110,6 @@
       } else if (g_strstr_len (apis, 5, GST_GL_API_GLES2_NAME)) {
         ret |= GST_GL_API_GLES2;
         apis = &apis[5];
-      } else if (g_strstr_len (apis, 5, GST_GL_API_GLES3_NAME)) {
-        ret |= GST_GL_API_GLES3;
-        apis = &apis[5];
       } else {
         GST_ERROR ("Error parsing \'%s\'", apis);
         break;
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h
index 01caecb..b136662 100644
--- a/gst-libs/gst/gl/gstglapi.h
+++ b/gst-libs/gst/gl/gstglapi.h
@@ -62,7 +62,7 @@
 #  include <GLES2/gl2ext.h>
 # endif
 # if !GST_GL_HAVE_OPENGL
-#  include <gst/gl/gstgles2.h>
+#  include <gst/gl/glprototypes/gstgl_gles2compat.h>
 # endif
 #endif
 
@@ -97,7 +97,6 @@
   GST_GL_API_OPENGL3 = (1 << 1),
   GST_GL_API_GLES1 = (1 << 15),
   GST_GL_API_GLES2 = (1 << 16),
-  GST_GL_API_GLES3 = (1 << 17),
 
   GST_GL_API_ANY = G_MAXUINT32
 } GstGLAPI;
@@ -106,7 +105,6 @@
 #define GST_GL_API_OPENGL3_NAME "opengl3"
 #define GST_GL_API_GLES1_NAME "gles1"
 #define GST_GL_API_GLES2_NAME "gles2"
-#define GST_GL_API_GLES3_NAME "gles3"
 
 typedef enum
 {
@@ -120,7 +118,8 @@
   GST_GL_PLATFORM_ANY = G_MAXUINT32
 } GstGLPlatform;
 
-#define GST_GL_EXT_BEGIN(name, min_gl, maj_gl, in_gles, ext_suf, ext_name)
+#define GST_GL_EXT_BEGIN(name, gl_availability, min_gl, maj_gl, gles_maj, \
+    gles_min, ext_suf, ext_name)
 #define GST_GL_EXT_FUNCTION(ret, name, args) \
   ret GSTGLAPI (*name) args;
 #define GST_GL_EXT_END()
diff --git a/gst-libs/gst/gl/gstglbufferpool.c b/gst-libs/gst/gl/gstglbufferpool.c
index 517d05e..e716527 100644
--- a/gst-libs/gst/gl/gstglbufferpool.c
+++ b/gst-libs/gst/gl/gstglbufferpool.c
@@ -51,10 +51,8 @@
   gint im_format;
   GstVideoInfo info;
   gboolean add_videometa;
-#if GST_GL_HAVE_PLATFORM_EGL
   gboolean want_eglimage;
   GstBuffer *last_buffer;
-#endif
 };
 
 static void gst_gl_buffer_pool_finalize (GObject * object);
@@ -129,13 +127,15 @@
 #if GST_GL_HAVE_PLATFORM_EGL
   priv->want_eglimage = (priv->allocator
       && g_strcmp0 (priv->allocator->mem_type, GST_EGL_IMAGE_MEMORY_TYPE) == 0);
+#else
+  priv->want_eglimage = FALSE;
 #endif
 
   if (reset) {
     if (glpool->upload)
       gst_object_unref (glpool->upload);
 
-    glpool->upload = gst_gl_upload_new (glpool->context);
+    glpool->upload = gst_gl_upload_meta_new (glpool->context);
   }
 
   return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
@@ -175,7 +175,7 @@
   GstGLBufferPool *glpool = GST_GL_BUFFER_POOL_CAST (pool);
   GstGLBufferPoolPrivate *priv = glpool->priv;
 
-  gst_gl_upload_set_format (glpool->upload, &priv->info);
+  gst_gl_upload_meta_set_format (glpool->upload, &priv->info);
 
   return GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
 }
@@ -211,7 +211,7 @@
   if (!gst_gl_memory_setup_buffer (glpool->context, info, buf))
     goto mem_create_failed;
 
-  gst_gl_upload_add_video_gl_texture_upload_meta (glpool->upload, buf);
+  gst_gl_upload_meta_add_to_buffer (glpool->upload, buf);
 
   *buffer = buf;
 
@@ -228,6 +228,7 @@
     GST_WARNING_OBJECT (pool, "Could not create GL Memory");
     return GST_FLOW_ERROR;
   }
+
 #if GST_GL_HAVE_PLATFORM_EGL
 egl_image_mem_create_failed:
   {
@@ -243,9 +244,7 @@
     GstBuffer ** buffer, GstBufferPoolAcquireParams * params)
 {
   GstFlowReturn ret = GST_FLOW_OK;
-#if GST_GL_HAVE_PLATFORM_EGL
   GstGLBufferPool *glpool = NULL;
-#endif
 
   ret =
       GST_BUFFER_POOL_CLASS
@@ -253,7 +252,6 @@
   if (ret != GST_FLOW_OK || !*buffer)
     return ret;
 
-#if GST_GL_HAVE_PLATFORM_EGL
   glpool = GST_GL_BUFFER_POOL (bpool);
 
   /* XXX: Don't return the memory we just rendered, glEGLImageTargetTexture2DOES()
@@ -270,7 +268,6 @@
     gst_object_replace ((GstObject **) & oldbuf->pool, (GstObject *) glpool);
     gst_buffer_unref (oldbuf);
   }
-#endif
 
   return ret;
 }
@@ -294,7 +291,14 @@
   return GST_BUFFER_POOL_CAST (pool);
 }
 
-#if GST_GL_HAVE_PLATFORM_EGL
+/**
+ * gst_gl_buffer_pool_replace_last_buffer:
+ * @pool: a #GstGLBufferPool
+ * @buffer: a #GstBuffer
+ *
+ * Set @pool<--  -->s last buffer to @buffer for #GstGLPlatform<--  -->s that
+ * require it.
+ */
 void
 gst_gl_buffer_pool_replace_last_buffer (GstGLBufferPool * pool,
     GstBuffer * buffer)
@@ -304,7 +308,6 @@
 
   gst_buffer_replace (&pool->priv->last_buffer, buffer);
 }
-#endif
 
 static void
 gst_gl_buffer_pool_class_init (GstGLBufferPoolClass * klass)
@@ -335,10 +338,8 @@
   priv->caps = NULL;
   priv->im_format = GST_VIDEO_FORMAT_UNKNOWN;
   priv->add_videometa = TRUE;
-#if GST_GL_HAVE_PLATFORM_EGL
   priv->want_eglimage = FALSE;
   priv->last_buffer = FALSE;
-#endif
 
   gst_video_info_init (&priv->info);
   gst_allocation_params_init (&priv->params);
@@ -352,9 +353,7 @@
 
   GST_LOG_OBJECT (pool, "finalize GL buffer pool %p", pool);
 
-#if GST_GL_HAVE_PLATFORM_EGL
   gst_buffer_replace (&pool->priv->last_buffer, NULL);
-#endif
 
   if (priv->caps)
     gst_caps_unref (priv->caps);
diff --git a/gst-libs/gst/gl/gstglbufferpool.h b/gst-libs/gst/gl/gstglbufferpool.h
index c4dc3ff..cea1175 100644
--- a/gst-libs/gst/gl/gstglbufferpool.h
+++ b/gst-libs/gst/gl/gstglbufferpool.h
@@ -50,7 +50,7 @@
   GstBufferPool bufferpool;
 
   GstGLContext *context;
-  GstGLUpload  *upload;
+  GstGLUploadMeta *upload;
 
   GstGLBufferPoolPrivate *priv;
 };
@@ -66,10 +66,8 @@
 };
 
 GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context);
-#if GST_GL_HAVE_PLATFORM_EGL
 void gst_gl_buffer_pool_replace_last_buffer (GstGLBufferPool * pool,
     GstBuffer * buffer);
-#endif
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
index 5882057..54d8ef7 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.c
+++ b/gst-libs/gst/gl/gstglcolorconvert.c
@@ -41,18 +41,17 @@
  * gst_gl_color_convert_set_texture_scaling().
  */
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static void _do_convert (GstGLContext * context, GstGLColorConvert * convert);
 static gboolean _init_convert (GstGLColorConvert * convert);
 static gboolean _init_convert_fbo (GstGLColorConvert * convert);
-static gboolean _gst_gl_color_convert_perform_unlocked (GstGLColorConvert *
-    convert, GstGLMemory * in_tex[GST_VIDEO_MAX_PLANES],
-    GstGLMemory * out_tex[GST_VIDEO_MAX_PLANES]);
+static GstBuffer *_gst_gl_color_convert_perform_unlocked (GstGLColorConvert *
+    convert, GstBuffer * inbuf);
 
 static gboolean _do_convert_draw (GstGLContext * context,
     GstGLColorConvert * convert);
@@ -291,12 +290,23 @@
     "uniform vec2 tex_scale0;\n"
     "uniform vec2 tex_scale1;\n"
     "uniform vec2 tex_scale2;\n"
+    "uniform float width;\n"
     YUV_TO_RGB_COEFFICIENTS
     "void main(void) {\n"
     "  vec3 yuv;\n"
+    "  vec4 uv_texel;\n"
     "  float r, g, b, a;\n"
+    "  float dx1 = -1.0 / width;\n"
+    "  float dx2 = 0.0;\n"
     "  yuv.x = texture2D(Ytex, v_texcoord * tex_scale0).%c;\n"
-    "  yuv.yz = texture2D(UVtex, v_texcoord * tex_scale1).%c%c;\n"
+    "  float inorder = mod (v_texcoord.x * width, 2.0);\n"
+    "  if (inorder < 1.0) {\n"
+    "    dx2 = -dx1;\n"
+    "    dx1 = 0.0;\n"
+    "  }\n"
+    "  uv_texel.rg = texture2D(Ytex, v_texcoord * tex_scale0 + dx1).r%c;\n"
+    "  uv_texel.ba = texture2D(Ytex, v_texcoord * tex_scale0 + dx2).r%c;\n"
+    "  yuv.yz = uv_texel.%c%c;\n"
     "  yuv += offset;\n"
     "  r = dot(yuv, coeff1);\n"
     "  g = dot(yuv, coeff2);\n"
@@ -315,11 +325,13 @@
     RGB_TO_YUV_COEFFICIENTS
     "void main(void) {\n"
     "  vec4 texel1, texel2;\n"
+    "  vec2 texel3;\n"
     "  float fx, fy, y1, y2, u, v;\n"
     "  fx = v_texcoord.x;\n"
     "  fy = v_texcoord.y;\n"
-    "  texel1 = texture2D(tex, vec2(fx*2.0,     fy)).%c%c%c%c;\n"
-    "  texel2 = texture2D(tex, vec2(fx*2.0+1.0 / width, fy)).%c%c%c%c;\n"
+    "  float inorder = mod (v_texcoord.x * width, 2.0);\n"
+    "  texel1 = texture2D(tex, vec2(fx,     fy)).%c%c%c%c;\n"
+    "  texel2 = texture2D(tex, vec2(fx+1.0 / width, fy)).%c%c%c%c;\n"
     "  y1 = dot(texel1.rgb, coeff1);\n"
     "  y2 = dot(texel2.rgb, coeff1);\n"
     "  u = dot(texel1.rgb, coeff2);\n"
@@ -328,7 +340,14 @@
     "  y2 += offset.x;\n"
     "  u += offset.y;\n"
     "  v += offset.z;\n"
-    "  gl_FragColor = vec4(%s);\n"
+    "  if (inorder < 1.0) {\n"
+    "    texel3.r = %s;\n"
+    "    texel3.g = %s;\n"
+    "  } else {\n"
+    "    texel3.r = %s;\n"
+    "    texel3.g = %s;\n"
+    "  }\n"
+    "  gl_FragColor = vec4(texel3.r, texel3.g, 0.0, 0.0);\n"
     "}\n";
 
 static const gchar text_vertex_shader[] =
@@ -357,15 +376,12 @@
 
 struct _GstGLColorConvertPrivate
 {
-  int n_textures;
   gboolean result;
 
-    gboolean (*draw) (GstGLContext * context, GstGLColorConvert * download);
-
   struct ConvertInfo convert_info;
 
-  GstGLMemory *scratch;
-  GstGLMemory *out_temp[GST_VIDEO_MAX_PLANES];
+  GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
+  GstGLMemory *out_tex[GST_VIDEO_MAX_PLANES];
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_gl_color_convert_debug);
@@ -394,8 +410,6 @@
 gst_gl_color_convert_init (GstGLColorConvert * convert)
 {
   convert->priv = GST_GL_COLOR_CONVERT_GET_PRIVATE (convert);
-
-  g_mutex_init (&convert->lock);
 }
 
 /**
@@ -408,14 +422,11 @@
 gst_gl_color_convert_new (GstGLContext * context)
 {
   GstGLColorConvert *convert;
-  GstGLColorConvertPrivate *priv;
 
   convert = g_object_new (GST_TYPE_GL_COLOR_CONVERT, NULL);
 
   convert->context = gst_object_ref (context);
-  priv = convert->priv;
 
-  priv->draw = _do_convert_draw;
   gst_video_info_set_format (&convert->in_info, GST_VIDEO_FORMAT_ENCODED, 0, 0);
   gst_video_info_set_format (&convert->out_info, GST_VIDEO_FORMAT_ENCODED, 0,
       0);
@@ -437,8 +448,6 @@
     convert->context = NULL;
   }
 
-  g_mutex_clear (&convert->lock);
-
   G_OBJECT_CLASS (gst_gl_color_convert_parent_class)->finalize (object);
 }
 
@@ -455,20 +464,15 @@
   }
 
   for (i = 0; i < convert->priv->convert_info.out_n_textures; i++) {
-    if (convert->priv->out_temp[i])
-      gst_memory_unref ((GstMemory *) convert->priv->out_temp[i]);
-    convert->priv->out_temp[i] = NULL;
+    if (convert->priv->out_tex[i])
+      gst_memory_unref ((GstMemory *) convert->priv->out_tex[i]);
+    convert->priv->out_tex[i] = NULL;
   }
 
   if (convert->shader) {
     gst_object_unref (convert->shader);
     convert->shader = NULL;
   }
-
-  if (convert->priv->scratch) {
-    gst_memory_unref ((GstMemory *) convert->priv->scratch);
-    convert->priv->scratch = NULL;
-  }
 }
 
 static void
@@ -509,67 +513,58 @@
 gst_gl_color_convert_set_format (GstGLColorConvert * convert,
     GstVideoInfo * in_info, GstVideoInfo * out_info)
 {
-  g_mutex_lock (&convert->lock);
+  GST_OBJECT_LOCK (convert);
   _gst_gl_color_convert_set_format_unlocked (convert, in_info, out_info);
-  g_mutex_unlock (&convert->lock);
+  GST_OBJECT_UNLOCK (convert);
 }
 
 /**
  * gst_gl_color_convert_perform:
  * @convert: a #GstGLColorConvert
- * @in_tex: the texture ids for input formatted according to in_info
- * @out_tex: the texture ids for output formatted according to out_info
+ * @inbuf: the texture ids for input formatted according to in_info
  *
- * Converts the data contained in in_tex into out_tex using the formats
- * specified by the #GstVideoInfo<!--  -->s passed to
- * gst_gl_color_convert_set_format() 
+ * Converts the data contained by @inbuf using the formats specified by the
+ * #GstVideoInfo<!--  -->s passed to gst_gl_color_convert_set_format() 
  *
- * Returns: whether the conversion was successful
+ * Returns: a converted #GstBuffer or %NULL%
  */
-gboolean
-gst_gl_color_convert_perform (GstGLColorConvert * convert,
-    GstGLMemory * in_tex[GST_VIDEO_MAX_PLANES],
-    GstGLMemory * out_tex[GST_VIDEO_MAX_PLANES])
+GstBuffer *
+gst_gl_color_convert_perform (GstGLColorConvert * convert, GstBuffer * inbuf)
 {
-  gboolean ret;
+  GstBuffer *ret;
 
   g_return_val_if_fail (convert != NULL, FALSE);
 
-  g_mutex_lock (&convert->lock);
-  ret = _gst_gl_color_convert_perform_unlocked (convert, in_tex, out_tex);
-  g_mutex_unlock (&convert->lock);
+  GST_OBJECT_LOCK (convert);
+  ret = _gst_gl_color_convert_perform_unlocked (convert, inbuf);
+  GST_OBJECT_UNLOCK (convert);
 
   return ret;
 }
 
-static gboolean
+static GstBuffer *
 _gst_gl_color_convert_perform_unlocked (GstGLColorConvert * convert,
-    GstGLMemory * in_tex[GST_VIDEO_MAX_PLANES],
-    GstGLMemory * out_tex[GST_VIDEO_MAX_PLANES])
+    GstBuffer * inbuf)
 {
   g_return_val_if_fail (convert != NULL, FALSE);
-  g_return_val_if_fail (in_tex, FALSE);
-  g_return_val_if_fail (out_tex, FALSE);
+  g_return_val_if_fail (inbuf, FALSE);
 
-  convert->in_tex[0] = in_tex[0];
-  convert->in_tex[1] = in_tex[1];
-  convert->in_tex[2] = in_tex[2];
-  convert->in_tex[3] = in_tex[3];
-  convert->out_tex[0] = out_tex[0];
-  convert->out_tex[1] = out_tex[1];
-  convert->out_tex[2] = out_tex[2];
-  convert->out_tex[3] = out_tex[3];
+  if (gst_video_info_is_equal (&convert->in_info, &convert->out_info))
+    return gst_buffer_ref (inbuf);
 
-  GST_LOG ("Converting %s from %p,%p,%p,%p into %s using %p,%p,%p,%p",
-      gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (&convert->in_info)),
-      in_tex[0], in_tex[1], in_tex[2], in_tex[3],
-      gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (&convert->out_info)),
-      out_tex[0], out_tex[1], out_tex[2], out_tex[3]);
+  convert->inbuf = inbuf;
 
   gst_gl_context_thread_add (convert->context,
       (GstGLContextThreadFunc) _do_convert, convert);
 
-  return convert->priv->result;
+  if (!convert->priv->result) {
+    if (convert->outbuf)
+      gst_object_unref (convert->outbuf);
+    convert->outbuf = NULL;
+    return NULL;
+  }
+
+  return convert->outbuf;
 }
 
 static inline gboolean
@@ -694,6 +689,9 @@
   GstVideoFormat out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info);
   const gchar *out_format_str = gst_video_format_to_string (out_format);
   gchar *pixel_order = _RGB_pixel_order ("rgba", out_format_str);
+  gboolean texture_rg =
+      gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg")
+      || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg");
 
   info->out_n_textures = 1;
 
@@ -724,45 +722,45 @@
       info->shader_tex_names[2] = "Utex";
       break;
     case GST_VIDEO_FORMAT_YUY2:
-      info->frag_prog = g_strdup_printf (frag_YUY2_UYVY_to_RGB, 'r', 'g', 'a',
-          pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
+    {
+      char uv_val = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_YUY2_UYVY_to_RGB, 'r', uv_val,
+          uv_val, 'g', 'a', pixel_order[0], pixel_order[1], pixel_order[2],
+          pixel_order[3]);
       info->in_n_textures = 1;
       info->shader_tex_names[0] = "Ytex";
-      info->shader_tex_names[1] = "UVtex";
-      convert->priv->scratch =
-          (GstGLMemory *) gst_gl_memory_alloc (convert->context,
-          GST_VIDEO_GL_TEXTURE_TYPE_RGBA,
-          GST_VIDEO_INFO_COMP_WIDTH (&convert->in_info, 1),
-          GST_VIDEO_INFO_HEIGHT (&convert->in_info),
-          GST_VIDEO_INFO_PLANE_STRIDE (&convert->in_info, 0));
       break;
+    }
     case GST_VIDEO_FORMAT_NV12:
-      info->frag_prog = g_strdup_printf (frag_NV12_NV21_to_RGB, 'r', 'a',
+    {
+      char val2 = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_NV12_NV21_to_RGB, 'r', val2,
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
       info->in_n_textures = 2;
       info->shader_tex_names[0] = "Ytex";
       info->shader_tex_names[1] = "UVtex";
       break;
+    }
     case GST_VIDEO_FORMAT_NV21:
-      info->frag_prog = g_strdup_printf (frag_NV12_NV21_to_RGB, 'a', 'r',
+    {
+      char val2 = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_NV12_NV21_to_RGB, val2, 'r',
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
       info->in_n_textures = 2;
       info->shader_tex_names[0] = "Ytex";
       info->shader_tex_names[1] = "UVtex";
       break;
+    }
     case GST_VIDEO_FORMAT_UYVY:
-      info->frag_prog = g_strdup_printf (frag_YUY2_UYVY_to_RGB, 'a', 'r', 'b',
-          pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
+    {
+      char y_val = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_YUY2_UYVY_to_RGB, y_val, 'g',
+          'g', 'r', 'b', pixel_order[0], pixel_order[1], pixel_order[2],
+          pixel_order[3]);
       info->in_n_textures = 1;
       info->shader_tex_names[0] = "Ytex";
-      info->shader_tex_names[1] = "UVtex";
-      convert->priv->scratch =
-          (GstGLMemory *) gst_gl_memory_alloc (convert->context,
-          GST_VIDEO_GL_TEXTURE_TYPE_RGBA,
-          GST_VIDEO_INFO_COMP_WIDTH (&convert->in_info, 1),
-          GST_VIDEO_INFO_HEIGHT (&convert->in_info),
-          GST_VIDEO_INFO_PLANE_STRIDE (&convert->in_info, 0));
       break;
+    }
     default:
       break;
   }
@@ -819,14 +817,14 @@
       info->frag_prog = g_strdup_printf (frag_RGB_to_YUY2_UYVY,
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
-          "y1,u,y2,v");
+          "y1", "u", "y2", "v");
       info->out_n_textures = 1;
       break;
     case GST_VIDEO_FORMAT_UYVY:
       info->frag_prog = g_strdup_printf (frag_RGB_to_YUY2_UYVY,
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3],
-          "u,y1,v,y2");
+          "u", "y1", "v", "y2");
       info->out_n_textures = 1;
       break;
     default:
@@ -885,6 +883,9 @@
   GstVideoFormat out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info);
   const gchar *out_format_str = gst_video_format_to_string (out_format);
   gchar *pixel_order = _RGB_pixel_order ("rgba", out_format_str);
+  gboolean texture_rg =
+      gst_gl_context_check_feature (convert->context, "GL_EXT_texture_rg")
+      || gst_gl_context_check_feature (convert->context, "GL_ARB_texture_rg");
 
   info->in_n_textures = 1;
   info->out_n_textures = 1;
@@ -893,16 +894,22 @@
   switch (GST_VIDEO_INFO_FORMAT (&convert->in_info)) {
     case GST_VIDEO_FORMAT_GRAY8:
       info->frag_prog = g_strdup_printf (frag_REORDER, "", pixel_order[0],
-          pixel_order[1], pixel_order[2], pixel_order[3]);
+          pixel_order[0], pixel_order[0], pixel_order[3]);
       break;
     case GST_VIDEO_FORMAT_GRAY16_LE:
-      info->frag_prog = g_strdup_printf (frag_COMPOSE, 'a', 'r',
+    {
+      char val2 = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_COMPOSE, val2, 'r',
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
       break;
+    }
     case GST_VIDEO_FORMAT_GRAY16_BE:
-      info->frag_prog = g_strdup_printf (frag_COMPOSE, 'r', 'a',
+    {
+      char val2 = texture_rg ? 'g' : 'a';
+      info->frag_prog = g_strdup_printf (frag_COMPOSE, 'r', val2,
           pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3]);
       break;
+    }
     default:
       break;
   }
@@ -973,6 +980,16 @@
     goto incompatible_api;
   }
 
+  /* Requires reading from a RG/LA framebuffer... */
+  if (USING_GLES2 (convert->context) &&
+      (GST_VIDEO_INFO_FORMAT (&convert->out_info) == GST_VIDEO_FORMAT_YUY2 ||
+          GST_VIDEO_INFO_FORMAT (&convert->out_info) ==
+          GST_VIDEO_FORMAT_UYVY)) {
+    g_free (info->frag_prog);
+    GST_ERROR ("Conversion requires reading with an unsupported format");
+    goto incompatible_api;
+  }
+
   res =
       gst_gl_context_gen_shader (convert->context, text_vertex_shader,
       info->frag_prog, &convert->shader);
@@ -1125,81 +1142,142 @@
 {
   guint in_width, in_height, out_width, out_height;
   struct ConvertInfo *c_info = &convert->priv->convert_info;
-  GstMapInfo in_infos[GST_VIDEO_MAX_PLANES], out_infos[GST_VIDEO_MAX_PLANES];
+  GstMapInfo out_info[GST_VIDEO_MAX_PLANES], in_info[GST_VIDEO_MAX_PLANES];
   gboolean res = TRUE;
-  gint i = 0;
+  gint i, j = 0;
 
   out_width = GST_VIDEO_INFO_WIDTH (&convert->out_info);
   out_height = GST_VIDEO_INFO_HEIGHT (&convert->out_info);
   in_width = GST_VIDEO_INFO_WIDTH (&convert->in_info);
   in_height = GST_VIDEO_INFO_HEIGHT (&convert->in_info);
 
+  convert->outbuf = NULL;
+
   if (!_init_convert (convert)) {
     convert->priv->result = FALSE;
     return;
   }
 
-  GST_TRACE ("converting to textures:%p,%p,%p,%p dimensions:%ux%u, "
-      "from textures:%p,%p,%p,%p dimensions:%ux%u", convert->out_tex[0],
-      convert->out_tex[1], convert->out_tex[2], convert->out_tex[3],
-      out_width, out_height, convert->in_tex[0], convert->in_tex[1],
-      convert->in_tex[2], convert->in_tex[3], in_width, in_height);
+  convert->outbuf = gst_buffer_new ();
+  if (!gst_gl_memory_setup_buffer (convert->context, &convert->out_info,
+          convert->outbuf)) {
+    convert->priv->result = FALSE;
+    return;
+  }
+
+  gst_buffer_add_video_meta_full (convert->outbuf, 0,
+      GST_VIDEO_INFO_FORMAT (&convert->out_info),
+      GST_VIDEO_INFO_WIDTH (&convert->out_info),
+      GST_VIDEO_INFO_HEIGHT (&convert->out_info),
+      GST_VIDEO_INFO_N_PLANES (&convert->out_info),
+      convert->out_info.offset, convert->out_info.stride);
 
   for (i = 0; i < c_info->in_n_textures; i++) {
-    gst_memory_map ((GstMemory *) convert->in_tex[i], &in_infos[i],
-        GST_MAP_READ | GST_MAP_GL);
+    convert->priv->in_tex[i] =
+        (GstGLMemory *) gst_buffer_peek_memory (convert->inbuf, i);
+    if (!gst_is_gl_memory ((GstMemory *) convert->priv->in_tex[i])) {
+      res = FALSE;
+      goto out;
+    }
+    if (!gst_memory_map ((GstMemory *) convert->priv->in_tex[i], &in_info[i],
+            GST_MAP_READ | GST_MAP_GL)) {
+      res = FALSE;
+      goto out;
+    }
   }
-  for (i = 0; i < c_info->out_n_textures; i++) {
-    if (convert->out_tex[i]->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
-        || convert->out_tex[i]->tex_type ==
-        GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
-        || out_width != convert->out_tex[i]->width
-        || out_height != convert->out_tex[i]->height) {
+
+  for (j = 0; j < c_info->out_n_textures; j++) {
+    GstGLMemory *out_tex =
+        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf, j);
+    if (!gst_is_gl_memory ((GstMemory *) out_tex)) {
+      res = FALSE;
+      goto out;
+    }
+
+    if (out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+        || out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
+        || out_width != out_tex->width || out_height != out_tex->height) {
       /* Luminance formats are not color renderable */
       /* renderering to a framebuffer only renders the intersection of all
        * the attachments i.e. the smallest attachment size */
-      if (!convert->priv->out_temp[i])
-        convert->priv->out_temp[i] =
+      if (!convert->priv->out_tex[j])
+        convert->priv->out_tex[j] =
             (GstGLMemory *) gst_gl_memory_alloc (context,
             GST_VIDEO_GL_TEXTURE_TYPE_RGBA, out_width, out_height, out_width);
     } else {
-      convert->priv->out_temp[i] = convert->out_tex[i];
+      convert->priv->out_tex[j] = out_tex;
     }
-    gst_memory_map ((GstMemory *) convert->priv->out_temp[i], &out_infos[i],
-        GST_MAP_WRITE | GST_MAP_GL);
+
+    if (!gst_memory_map ((GstMemory *) convert->priv->out_tex[j], &out_info[j],
+            GST_MAP_WRITE | GST_MAP_GL)) {
+      res = FALSE;
+      goto out;
+    }
   }
 
-  if (!convert->priv->draw (context, convert))
+  GST_LOG_OBJECT (convert, "converting to textures:%p,%p,%p,%p "
+      "dimensions:%ux%u, from textures:%p,%p,%p,%p dimensions:%ux%u",
+      convert->priv->out_tex[0], convert->priv->out_tex[1],
+      convert->priv->out_tex[2], convert->priv->out_tex[3], out_width,
+      out_height, convert->priv->in_tex[0], convert->priv->in_tex[1],
+      convert->priv->in_tex[2], convert->priv->in_tex[3], in_width, in_height);
+
+  if (!_do_convert_draw (context, convert))
     res = FALSE;
 
-  for (i = 0; i < c_info->in_n_textures; i++) {
-    gst_memory_unmap ((GstMemory *) convert->in_tex[i], &in_infos[i]);
-  }
-  for (i = 0; i < c_info->out_n_textures; i++) {
-    gst_memory_unmap ((GstMemory *) convert->priv->out_temp[i], &out_infos[i]);
+out:
+  for (j--; j >= 0; j--) {
+    GstGLMemory *out_tex =
+        (GstGLMemory *) gst_buffer_peek_memory (convert->outbuf, j);
+    gst_memory_unmap ((GstMemory *) convert->priv->out_tex[j], &out_info[j]);
 
-    if (convert->out_tex[i]->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
-        || convert->out_tex[i]->tex_type ==
-        GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
-        || out_width != convert->out_tex[i]->width
-        || out_height != convert->out_tex[i]->height) {
-      GstGLMemory *gl_mem = convert->out_tex[i];
-      GstMapInfo from_info, to_info;
+    if (out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE
+        || out_tex->tex_type == GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA
+        || out_width != out_tex->width || out_height != out_tex->height) {
+      GstMapInfo to_info, from_info;
 
-      gst_memory_map ((GstMemory *) convert->priv->out_temp[i], &from_info,
-          GST_MAP_READ | GST_MAP_GL);
-      gst_memory_map ((GstMemory *) gl_mem, &to_info,
-          GST_MAP_WRITE | GST_MAP_GL);
-      gst_gl_memory_copy_into_texture (convert->priv->out_temp[i],
-          gl_mem->tex_id, gl_mem->tex_type, gl_mem->width, gl_mem->height,
-          gl_mem->stride, FALSE);
-      gst_memory_unmap ((GstMemory *) gl_mem, &to_info);
-      gst_memory_unmap ((GstMemory *) convert->priv->out_temp[i], &from_info);
+      if (!gst_memory_map ((GstMemory *) convert->priv->out_tex[j], &from_info,
+              GST_MAP_READ | GST_MAP_GL)) {
+        gst_gl_context_set_error (convert->context, "Failed to map "
+            "intermediate memory");
+        res = FALSE;
+        continue;
+      }
+      if (!gst_memory_map ((GstMemory *) out_tex, &to_info,
+              GST_MAP_WRITE | GST_MAP_GL)) {
+        gst_gl_context_set_error (convert->context, "Failed to map "
+            "intermediate memory");
+        res = FALSE;
+        continue;
+      }
+      gst_gl_memory_copy_into_texture (convert->priv->out_tex[j],
+          out_tex->tex_id, out_tex->tex_type, out_tex->width, out_tex->height,
+          out_tex->stride, FALSE);
+      gst_memory_unmap ((GstMemory *) convert->priv->out_tex[j], &from_info);
+      gst_memory_unmap ((GstMemory *) out_tex, &to_info);
     } else {
-      convert->priv->out_temp[i] = NULL;
+      convert->priv->out_tex[j] = NULL;
     }
   }
 
+  /* YV12 the same as I420 except planes 1+2 swapped */
+  if (GST_VIDEO_INFO_FORMAT (&convert->out_info) == GST_VIDEO_FORMAT_YV12) {
+    GstMemory *mem1 = gst_buffer_get_memory (convert->outbuf, 1);
+    GstMemory *mem2 = gst_buffer_get_memory (convert->outbuf, 2);
+
+    gst_buffer_replace_memory (convert->outbuf, 1, mem2);
+    gst_buffer_replace_memory (convert->outbuf, 2, mem1);
+  }
+
+  for (i--; i >= 0; i--) {
+    gst_memory_unmap ((GstMemory *) convert->priv->in_tex[i], &in_info[i]);
+  }
+
+  if (!res) {
+    gst_buffer_unref (convert->outbuf);
+    convert->outbuf = NULL;
+  }
+
   convert->priv->result = res;
   return;
 }
@@ -1237,23 +1315,15 @@
   out_width = GST_VIDEO_INFO_WIDTH (&convert->out_info);
   out_height = GST_VIDEO_INFO_HEIGHT (&convert->out_info);
 
-  /* two sources of the same data */
-  if (convert->priv->scratch) {
-    gst_gl_memory_copy_into_texture (convert->in_tex[0],
-        convert->priv->scratch->tex_id, convert->priv->scratch->tex_type,
-        convert->priv->scratch->width, convert->priv->scratch->height,
-        convert->priv->scratch->stride, TRUE);
-  }
-
   gl->BindFramebuffer (GL_FRAMEBUFFER, convert->fbo);
 
   /* attach the texture to the FBO to renderer to */
   for (i = 0; i < c_info->out_n_textures; i++) {
     /* needed? */
-    gl->BindTexture (GL_TEXTURE_2D, convert->out_tex[i]->tex_id);
+    gl->BindTexture (GL_TEXTURE_2D, convert->priv->out_tex[i]->tex_id);
 
     gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i,
-        GL_TEXTURE_2D, convert->priv->out_temp[i]->tex_id, 0);
+        GL_TEXTURE_2D, convert->priv->out_tex[i]->tex_id, 0);
   }
 
   if (gl->DrawBuffers)
@@ -1278,23 +1348,11 @@
   gl->EnableVertexAttribArray (convert->shader_attr_position_loc);
   gl->EnableVertexAttribArray (convert->shader_attr_texture_loc);
 
-  if (convert->priv->scratch) {
-    gchar *scale_name = g_strdup_printf ("tex_scale%u", c_info->in_n_textures);
-
-    gl->ActiveTexture (GL_TEXTURE0 + c_info->in_n_textures);
-    gl->BindTexture (GL_TEXTURE_2D, convert->priv->scratch->tex_id);
-
-    gst_gl_shader_set_uniform_2fv (convert->shader, scale_name, 1,
-        convert->priv->scratch->tex_scaling);
-
-    g_free (scale_name);
-  }
-
   for (i = c_info->in_n_textures - 1; i >= 0; i--) {
     gchar *scale_name = g_strdup_printf ("tex_scale%u", i);
 
     gl->ActiveTexture (GL_TEXTURE0 + i);
-    gl->BindTexture (GL_TEXTURE_2D, convert->in_tex[i]->tex_id);
+    gl->BindTexture (GL_TEXTURE_2D, convert->priv->in_tex[i]->tex_id);
 
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -1302,7 +1360,7 @@
     gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 
     gst_gl_shader_set_uniform_2fv (convert->shader, scale_name, 1,
-        convert->in_tex[i]->tex_scaling);
+        convert->priv->in_tex[i]->tex_scaling);
 
     g_free (scale_name);
   }
diff --git a/gst-libs/gst/gl/gstglcolorconvert.h b/gst-libs/gst/gl/gstglcolorconvert.h
index 976653d..9b905c7 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.h
+++ b/gst-libs/gst/gl/gstglcolorconvert.h
@@ -46,8 +46,6 @@
   /* <private> */
   GstObject        parent;
 
-  GMutex           lock;
-
   GstGLContext    *context;
 
   /* input data */
@@ -56,8 +54,8 @@
 
   gboolean         initted;
 
-  GstGLMemory *    in_tex[GST_VIDEO_MAX_PLANES];
-  GstGLMemory *    out_tex[GST_VIDEO_MAX_PLANES];
+  GstBuffer *    inbuf;
+  GstBuffer *    outbuf;
 
   /* used for the conversion */
   GLuint           fbo;
@@ -105,9 +103,7 @@
                                              GstVideoInfo * in_info,
                                              GstVideoInfo * out_info);
 
-gboolean gst_gl_color_convert_perform        (GstGLColorConvert * convert,
-                                              GstGLMemory * in_tex[GST_VIDEO_MAX_PLANES],
-                                              GstGLMemory * out_tex[GST_VIDEO_MAX_PLANES]);
+GstBuffer * gst_gl_color_convert_perform    (GstGLColorConvert * convert, GstBuffer * inbuf);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index a2f1909..82d468b 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -55,7 +55,7 @@
 #if GST_GL_HAVE_PLATFORM_EGL
 #include "egl/gstglcontext_egl.h"
 #endif
-#if GST_GL_HAVE_PLATFORM_COCOA
+#if GST_GL_HAVE_PLATFORM_CGL
 #include "cocoa/gstglcontext_cocoa.h"
 #endif
 #if GST_GL_HAVE_PLATFORM_WGL
@@ -77,13 +77,14 @@
 #ifdef GST_GL_LIBGL_MODULE_NAME
   module_opengl = g_module_open (GST_GL_LIBGL_MODULE_NAME, G_MODULE_BIND_LAZY);
 #else
-  /* This automatically handles the suffix and even .la files */
-  module_opengl = g_module_open ("libGL", G_MODULE_BIND_LAZY);
-
   /* On Linux the .so is only in -dev packages, try with a real soname
    * Proper compilers will optimize away the strcmp */
-  if (!module_opengl && strcmp (G_MODULE_SUFFIX, "so") == 0)
+  if (strcmp (G_MODULE_SUFFIX, "so") == 0)
     module_opengl = g_module_open ("libGL.so.1", G_MODULE_BIND_LAZY);
+
+  /* This automatically handles the suffix and even .la files */
+  if (!module_opengl)
+    module_opengl = g_module_open ("libGL", G_MODULE_BIND_LAZY);
 #endif
 
   return NULL;
@@ -101,13 +102,15 @@
   module_gles2 =
       g_module_open (GST_GL_LIBGLESV2_MODULE_NAME, G_MODULE_BIND_LAZY);
 #else
-  /* This automatically handles the suffix and even .la files */
-  module_gles2 = g_module_open ("libGLESv2", G_MODULE_BIND_LAZY);
-
   /* On Linux the .so is only in -dev packages, try with a real soname
    * Proper compilers will optimize away the strcmp */
-  if (!module_gles2 && strcmp (G_MODULE_SUFFIX, "so") == 0)
+  if (strcmp (G_MODULE_SUFFIX, "so") == 0)
     module_gles2 = g_module_open ("libGLESv2.so.2", G_MODULE_BIND_LAZY);
+
+  /* This automatically handles the suffix and even .la files */
+  if (!module_gles2)
+    module_gles2 = g_module_open ("libGLESv2", G_MODULE_BIND_LAZY);
+
 #endif
 
   return NULL;
@@ -149,6 +152,8 @@
 
   gint gl_major;
   gint gl_minor;
+
+  gchar *gl_exts;
 };
 
 typedef struct
@@ -255,18 +260,18 @@
 
   user_choice = g_getenv ("GST_GL_PLATFORM");
   GST_INFO ("creating a context, user choice:%s", user_choice);
+#if GST_GL_HAVE_PLATFORM_GLX
+  if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
+    context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
+#endif
 #if GST_GL_HAVE_PLATFORM_EGL
   if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl")))
     context = GST_GL_CONTEXT (gst_gl_context_egl_new ());
 #endif
-#if GST_GL_HAVE_PLATFORM_COCOA
-  if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cocoa")))
+#if GST_GL_HAVE_PLATFORM_CGL
+  if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl")))
     context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ());
 #endif
-#if GST_GL_HAVE_PLATFORM_GLX
-  if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx")))
-    context = GST_GL_CONTEXT (gst_gl_context_glx_new ());
-#endif
 #if GST_GL_HAVE_PLATFORM_WGL
   if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) {
     context = GST_GL_CONTEXT (gst_gl_context_wgl_new ());
@@ -373,6 +378,8 @@
   g_cond_clear (&context->priv->destroy_cond);
   g_cond_clear (&context->priv->create_cond);
 
+  g_free (context->priv->gl_exts);
+
   G_OBJECT_CLASS (gst_gl_context_parent_class)->finalize (object);
 }
 
@@ -591,58 +598,24 @@
 }
 
 static gboolean
-_create_context_gles2 (GstGLContext * context, gint * gl_major, gint * gl_minor,
-    GError ** error)
-{
-  const GstGLFuncs *gl;
-  GLenum gl_err = GL_NO_ERROR;
-
-  gl = context->gl_vtable;
-
-  GST_INFO ("GL_VERSION: %s", gl->GetString (GL_VERSION));
-  GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s",
-      gl->GetString (GL_SHADING_LANGUAGE_VERSION));
-  GST_INFO ("GL_VENDOR: %s", gl->GetString (GL_VENDOR));
-  GST_INFO ("GL_RENDERER: %s", gl->GetString (GL_RENDERER));
-
-  gl_err = gl->GetError ();
-  if (gl_err != GL_NO_ERROR) {
-    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
-        "glGetString error: 0x%x", gl_err);
-    return FALSE;
-  }
-#if GST_GL_HAVE_GLES2
-  if (!GL_ES_VERSION_2_0) {
-    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_OLD_LIBS,
-        "OpenGL|ES >= 2.0 is required");
-    return FALSE;
-  }
-#endif
-
-  if (gl_major)
-    *gl_major = 2;
-  if (gl_minor)
-    *gl_minor = 0;
-
-  return TRUE;
-}
-
-static gboolean
-_create_context_opengl (GstGLContext * context, gint * gl_major,
+_create_context_info (GstGLContext * context, GstGLAPI gl_api, gint * gl_major,
     gint * gl_minor, GError ** error)
 {
   const GstGLFuncs *gl;
-  guint maj, min;
+  guint maj = 0, min = 0;
   GLenum gl_err = GL_NO_ERROR;
-  GString *opengl_version = NULL;
+  const gchar *opengl_version = NULL;
 
   gl = context->gl_vtable;
 
-  GST_INFO ("GL_VERSION: %s", gl->GetString (GL_VERSION));
-  GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s",
-      gl->GetString (GL_SHADING_LANGUAGE_VERSION));
-  GST_INFO ("GL_VENDOR: %s", gl->GetString (GL_VENDOR));
-  GST_INFO ("GL_RENDERER: %s", gl->GetString (GL_RENDERER));
+  GST_INFO ("GL_VERSION: %s",
+      GST_STR_NULL ((const gchar *) gl->GetString (GL_VERSION)));
+  GST_INFO ("GL_SHADING_LANGUAGE_VERSION: %s", GST_STR_NULL ((const gchar *)
+          gl->GetString (GL_SHADING_LANGUAGE_VERSION)));
+  GST_INFO ("GL_VENDOR: %s",
+      GST_STR_NULL ((const gchar *) gl->GetString (GL_VENDOR)));
+  GST_INFO ("GL_RENDERER: %s",
+      GST_STR_NULL ((const gchar *) gl->GetString (GL_RENDERER)));
 
   gl_err = gl->GetError ();
   if (gl_err != GL_NO_ERROR) {
@@ -650,19 +623,22 @@
         "glGetString error: 0x%x", gl_err);
     return FALSE;
   }
-  opengl_version =
-      g_string_truncate (g_string_new ((gchar *) gl->GetString (GL_VERSION)),
-      3);
 
-  sscanf (opengl_version->str, "%d.%d", &maj, &min);
+  opengl_version = (const gchar *) gl->GetString (GL_VERSION);
+  if (opengl_version && gl_api & GST_GL_API_GLES2)
+    /* gles starts with "OpenGL ES " */
+    opengl_version = &opengl_version[10];
 
-  g_string_free (opengl_version, TRUE);
+  if (opengl_version)
+    sscanf (opengl_version, "%d.%d", &maj, &min);
 
   /* OpenGL > 1.2.0 */
-  if ((maj < 1) || (maj < 2 && maj >= 1 && min < 2)) {
-    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_OLD_LIBS,
-        "OpenGL >= 1.2.0 required, found %u.%u", maj, min);
-    return FALSE;
+  if (gl_api & GST_GL_API_OPENGL || gl_api & GST_GL_API_OPENGL3) {
+    if ((maj < 1) || (maj < 2 && maj >= 1 && min < 2)) {
+      g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_OLD_LIBS,
+          "OpenGL >= 1.2.0 required, found %u.%u", maj, min);
+      return FALSE;
+    }
   }
 
   if (gl_major)
@@ -828,13 +804,8 @@
   }
 
   /* gl api specific code */
-  if (!ret && gl_api & GST_GL_API_OPENGL)
-    ret = _create_context_opengl (context, &context->priv->gl_major,
-        &context->priv->gl_minor, error);
-  if (!ret && gl_api & GST_GL_API_GLES2)
-    ret =
-        _create_context_gles2 (context, &context->priv->gl_major,
-        &context->priv->gl_minor, error);
+  ret = _create_context_info (context, gl_api, &context->priv->gl_major,
+      &context->priv->gl_minor, error);
 
   if (!ret) {
     g_assert (error == NULL || *error != NULL);
@@ -849,17 +820,19 @@
     GST_DEBUG_OBJECT (context, "GL_EXTENSIONS: %s", ext_g_str->str);
     _gst_gl_feature_check_ext_functions (context, context->priv->gl_major,
         context->priv->gl_minor, ext_g_str->str);
+
+    context->priv->gl_exts = g_string_free (ext_g_str, FALSE);
   } else {
     ext_const_c_str = (const gchar *) gl->GetString (GL_EXTENSIONS);
     if (!ext_const_c_str)
       ext_const_c_str = "";
+
     GST_DEBUG_OBJECT (context, "GL_EXTENSIONS: %s", ext_const_c_str);
     _gst_gl_feature_check_ext_functions (context, context->priv->gl_major,
         context->priv->gl_minor, ext_const_c_str);
-  }
 
-  if (ext_g_str)
-    g_string_free (ext_g_str, TRUE);
+    context->priv->gl_exts = g_strdup (ext_const_c_str);
+  }
 
   context->priv->alive = TRUE;
 
@@ -1033,6 +1006,37 @@
 }
 
 /**
+ * gst_gl_context_check_gl_version:
+ * @context: a #GstGLContext
+ * @api: api type required
+ * @maj: major version required
+ * @min: minor version required
+ *
+ * Returns: whether OpenGL context implements the required api and specified
+ * version.
+ */
+gboolean
+gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api,
+    gint maj, gint min)
+{
+  g_return_val_if_fail (GST_GL_IS_CONTEXT (context), FALSE);
+
+  if (maj > context->priv->gl_major)
+    return FALSE;
+
+  if ((gst_gl_context_get_gl_api (context) & api) == GST_GL_API_NONE)
+    return FALSE;
+
+  if (maj < context->priv->gl_major)
+    return TRUE;
+
+  if (min > context->priv->gl_minor)
+    return FALSE;
+
+  return TRUE;
+}
+
+/**
  * gst_gl_context_check_feature:
  * @context: a #GstGLContext
  * @feature: a platform specific feature
@@ -1051,6 +1055,10 @@
   g_return_val_if_fail (feature != NULL, FALSE);
 
   context_class = GST_GL_CONTEXT_GET_CLASS (context);
+
+  if (g_strstr_len (feature, 3, "GL_"))
+    return gst_gl_check_extension (feature, context->priv->gl_exts);
+
   if (!context_class->check_feature)
     return FALSE;
 
diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h
index 269a51d..999b86a 100644
--- a/gst-libs/gst/gl/gstglcontext.h
+++ b/gst-libs/gst/gl/gstglcontext.h
@@ -47,9 +47,11 @@
  */
 typedef void (*GstGLContextThreadFunc) (GstGLContext * context, gpointer data);
 
+#define GST_GL_CONTEXT_TYPE_CGL "gst.gl.context.CGL"
 #define GST_GL_CONTEXT_TYPE_GLX "gst.gl.context.GLX"
 #define GST_GL_CONTEXT_TYPE_EGL "gst.gl.context.EGL"
 #define GST_GL_CONTEXT_TYPE_WGL "gst.gl.context.WGL"
+#define GST_GL_CONTEXT_TYPE_EAGL "gst.gl.context.EAGL"
 
 typedef enum
 {
@@ -133,6 +135,7 @@
 GstGLWindow * gst_gl_context_get_window (GstGLContext *context);
 
 void          gst_gl_context_get_gl_version (GstGLContext *context, gint *maj, gint *min);
+gboolean      gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api, gint maj, gint min);
 gboolean      gst_gl_context_check_feature (GstGLContext *context, const gchar *feature);
 
 /* FIXME: remove */
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index ad1e79f..be596b4 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -134,6 +134,10 @@
   if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11")))
     display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL));
 #endif
+#if GST_GL_HAVE_WINDOW_WAYLAND
+  if (!display && (!user_choice || g_strstr_len (user_choice, 7, "wayland")))
+    display = g_object_new (GST_TYPE_GL_DISPLAY, NULL);
+#endif
 #if GST_GL_HAVE_PLATFORM_EGL
   if (!display && (!platform_choice
           || g_strstr_len (platform_choice, 3, "egl")))
diff --git a/gst-libs/gst/gl/gstgldownload.c b/gst-libs/gst/gl/gstgldownload.c
index bef1e9e..47e277a 100644
--- a/gst-libs/gst/gl/gstgldownload.c
+++ b/gst-libs/gst/gl/gstgldownload.c
@@ -37,13 +37,14 @@
  * A #GstGLDownload can be created with gst_gl_download_new()
  */
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
-static void _do_download (GstGLContext * context, GstGLDownload * download);
+static gboolean _do_download (GstGLDownload * download, guint texture_id,
+    gpointer data[GST_VIDEO_MAX_PLANES]);
 static gboolean _init_download (GstGLDownload * download);
 static gboolean _gst_gl_download_perform_with_data_unlocked (GstGLDownload *
     download, GLuint texture_id, gpointer data[GST_VIDEO_MAX_PLANES]);
@@ -59,7 +60,7 @@
   const gchar *ARGB;
   const gchar *vert_shader;
 
-  gboolean result;
+  GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_gl_download_debug);
@@ -89,8 +90,6 @@
 
   download->priv = GST_GL_DOWNLOAD_GET_PRIVATE (download);
 
-  g_mutex_init (&download->lock);
-
   gst_video_info_init (&download->info);
 }
 
@@ -132,8 +131,6 @@
     download->context = NULL;
   }
 
-  g_mutex_clear (&download->lock);
-
   G_OBJECT_CLASS (gst_gl_download_parent_class)->finalize (object);
 }
 
@@ -143,16 +140,9 @@
   guint i;
 
   for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    if (download->out_tex[i]) {
-      gst_memory_unref ((GstMemory *) download->out_tex[i]);
-      download->out_tex[i] = NULL;
-    }
-  }
-
-  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    if (download->in_tex[i]) {
-      gst_memory_unref ((GstMemory *) download->in_tex[i]);
-      download->in_tex[i] = NULL;
+    if (download->priv->in_tex[i]) {
+      gst_memory_unref ((GstMemory *) download->priv->in_tex[i]);
+      download->priv->in_tex[i] = NULL;
     }
   }
 }
@@ -175,10 +165,10 @@
   g_return_if_fail (GST_VIDEO_INFO_FORMAT (out_info) !=
       GST_VIDEO_FORMAT_ENCODED);
 
-  g_mutex_lock (&download->lock);
+  GST_OBJECT_LOCK (download);
 
   if (gst_video_info_is_equal (&download->info, out_info)) {
-    g_mutex_unlock (&download->lock);
+    GST_OBJECT_UNLOCK (download);
     return;
   }
 
@@ -186,7 +176,7 @@
   download->initted = FALSE;
   download->info = *out_info;
 
-  g_mutex_unlock (&download->lock);
+  GST_OBJECT_UNLOCK (download);
 }
 
 /**
@@ -208,12 +198,10 @@
 
   g_return_val_if_fail (download != NULL, FALSE);
 
-  g_mutex_lock (&download->lock);
-
+  GST_OBJECT_LOCK (download);
   ret =
       _gst_gl_download_perform_with_data_unlocked (download, texture_id, data);
-
-  g_mutex_unlock (&download->lock);
+  GST_OBJECT_UNLOCK (download);
 
   return ret;
 }
@@ -222,7 +210,6 @@
 _gst_gl_download_perform_with_data_unlocked (GstGLDownload * download,
     GLuint texture_id, gpointer data[GST_VIDEO_MAX_PLANES])
 {
-  gpointer temp_data;
   guint i;
 
   g_return_val_if_fail (download != NULL, FALSE);
@@ -236,34 +223,15 @@
     g_return_val_if_fail (data[i] != NULL, FALSE);
   }
 
-  if (!download->in_tex[0])
-    download->in_tex[0] = gst_gl_memory_wrapped_texture (download->context,
-        texture_id, GST_VIDEO_GL_TEXTURE_TYPE_RGBA,
-        GST_VIDEO_INFO_WIDTH (&download->info),
+  if (!download->priv->in_tex[0])
+    download->priv->in_tex[0] =
+        gst_gl_memory_wrapped_texture (download->context, texture_id,
+        GST_VIDEO_GL_TEXTURE_TYPE_RGBA, GST_VIDEO_INFO_WIDTH (&download->info),
         GST_VIDEO_INFO_HEIGHT (&download->info), NULL, NULL);
 
-  download->in_tex[0]->tex_id = texture_id;
+  download->priv->in_tex[0]->tex_id = texture_id;
 
-  if (!download->out_tex[0]) {
-    gst_gl_memory_setup_wrapped (download->context, &download->info,
-        data, download->out_tex);
-  }
-
-  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&download->info); i++) {
-    download->out_tex[i]->data = data[i];
-  }
-
-  if (GST_VIDEO_INFO_FORMAT (&download->info) == GST_VIDEO_FORMAT_YV12) {
-    /* YV12 same as I420 except planes 1+2 swapped */
-    temp_data = download->out_tex[1]->data;
-    download->out_tex[1]->data = download->out_tex[2]->data;
-    download->out_tex[2]->data = temp_data;
-  }
-
-  gst_gl_context_thread_add (download->context,
-      (GstGLContextThreadFunc) _do_download, download);
-
-  return download->priv->result;
+  return _do_download (download, texture_id, data);
 }
 
 static gboolean
@@ -301,33 +269,50 @@
   return TRUE;
 }
 
-static void
-_do_download (GstGLContext * context, GstGLDownload * download)
+static gboolean
+_do_download (GstGLDownload * download, guint texture_id,
+    gpointer data[GST_VIDEO_MAX_PLANES])
 {
   guint out_width, out_height;
+  GstBuffer *inbuf, *outbuf;
   GstMapInfo map_info;
+  gboolean ret = TRUE;
   gint i;
 
   out_width = GST_VIDEO_INFO_WIDTH (&download->info);
   out_height = GST_VIDEO_INFO_HEIGHT (&download->info);
 
   if (!download->initted) {
-    if (!(download->priv->result = _init_download (download)))
-      return;
+    if (!_init_download (download))
+      return FALSE;
   }
 
   GST_TRACE ("doing download of texture:%u (%ux%u)",
-      download->in_tex[0]->tex_id, out_width, out_height);
+      download->priv->in_tex[0]->tex_id, out_width, out_height);
 
-  download->priv->result =
-      gst_gl_color_convert_perform (download->convert, download->in_tex,
-      download->out_tex);
-  if (!download->priv->result)
-    return;
+  inbuf = gst_buffer_new ();
+  gst_buffer_append_memory (inbuf,
+      gst_memory_ref ((GstMemory *) download->priv->in_tex[0]));
+
+  outbuf = gst_gl_color_convert_perform (download->convert, inbuf);
+  if (!outbuf)
+    return FALSE;
 
   for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&download->info); i++) {
-    gst_memory_map ((GstMemory *) download->out_tex[i], &map_info,
-        GST_MAP_READ);
-    gst_memory_unmap ((GstMemory *) download->out_tex[i], &map_info);
+    GstMemory *out_mem = gst_buffer_peek_memory (outbuf, i);
+    gpointer temp_data = ((GstGLMemory *) out_mem)->data;
+    ((GstGLMemory *) out_mem)->data = data[i];
+
+    if (!gst_memory_map (out_mem, &map_info, GST_MAP_READ)) {
+      GST_ERROR_OBJECT (download, "Failed to map memory");
+      ret = FALSE;
+    }
+    gst_memory_unmap (out_mem, &map_info);
+    ((GstGLMemory *) out_mem)->data = temp_data;
   }
+
+  gst_buffer_unref (inbuf);
+  gst_buffer_unref (outbuf);
+
+  return ret;
 }
diff --git a/gst-libs/gst/gl/gstgldownload.h b/gst-libs/gst/gl/gstgldownload.h
index 972c0aa..531e4f4 100644
--- a/gst-libs/gst/gl/gstgldownload.h
+++ b/gst-libs/gst/gl/gstgldownload.h
@@ -46,8 +46,6 @@
   /* <private> */
   GstObject        parent;
 
-  GMutex           lock;
-
   GstGLContext     *context;
   GstGLColorConvert *convert;
 
@@ -56,10 +54,6 @@
 
   gboolean         initted;
 
-  /* used for the conversion */
-  GstGLMemory *    in_tex[GST_VIDEO_MAX_PLANES];
-  GstGLMemory *    out_tex[GST_VIDEO_MAX_PLANES];
-
   GstGLDownloadPrivate *priv;
 
   gpointer _reserved[GST_PADDING];
diff --git a/gst-libs/gst/gl/gstglfeature.c b/gst-libs/gst/gl/gstglfeature.c
index 721ce9c..4a5d876 100644
--- a/gst-libs/gst/gl/gstglfeature.c
+++ b/gst-libs/gst/gl/gstglfeature.c
@@ -54,8 +54,9 @@
 /* Define a set of arrays containing the functions required from GL
    for each feature */
 #define GST_GL_EXT_BEGIN(name,                                            \
+                       gl_availability,                                 \
                        min_gl_major, min_gl_minor,                      \
-                       gles_availability,                               \
+                       min_gles_major, min_gles_minor,                  \
                        namespaces, extension_names)                     \
   static const GstGLFeatureFunction gst_gl_ext_ ## name ## _funcs[] = {
 #define GST_GL_EXT_FUNCTION(ret, name, args)                          \
@@ -66,16 +67,18 @@
 #include "glprototypes/all_functions.h"
 
 #undef GST_GL_EXT_BEGIN
-#define GST_GL_EXT_BEGIN(name,                                          \
-                       min_gl_major, min_gl_minor,                      \
-                       gles_availability,                               \
-                       namespaces, extension_names)                     \
-  { min_gl_major, min_gl_minor, gles_availability, namespaces,          \
-    extension_names,                                                    \
-    gst_gl_ext_ ## name ## _funcs },
 #undef GST_GL_EXT_FUNCTION
-#define GST_GL_EXT_FUNCTION(ret, name, args)
 #undef GST_GL_EXT_END
+
+#define GST_GL_EXT_BEGIN(name,                                          \
+                       gl_availability,                                 \
+                       min_gl_major, min_gl_minor,                      \
+                       min_gles_major, min_gles_minor,                  \
+                       namespaces, extension_names)                     \
+  { G_STRINGIFY (name), gl_availability, min_gl_major, min_gl_minor, min_gles_major,        \
+    min_gles_minor, namespaces, extension_names,                        \
+    gst_gl_ext_ ## name ## _funcs },
+#define GST_GL_EXT_FUNCTION(ret, name, args)
 #define GST_GL_EXT_END()
 
 static const GstGLFeatureData gst_gl_feature_ext_functions_data[] = {
@@ -149,15 +152,25 @@
   const char *suffix = NULL;
   int func_num;
   GstGLFuncs *gst_gl = context->gl_vtable;
+  guint gl_min = 0, gl_maj = 0;
   GstGLAPI gl_api = gst_gl_context_get_gl_api (context);
 
+  if (gl_api & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) {
+    gl_maj = data->min_gl_major;
+    gl_min = data->min_gl_minor;
+  } else if (gl_api & (GST_GL_API_GLES1 | GST_GL_API_GLES2)) {
+    gl_maj = data->min_gles_major;
+    gl_min = data->min_gles_minor;
+  }
+
+  GST_DEBUG ("%s, 0x%x, %d.%d vs 0x%x, %d.%d", data->feature_name,
+      data->gl_availability, gl_maj, gl_min,
+      gst_gl_context_get_gl_api (context), gl_major, gl_minor);
+
   /* First check whether the functions should be directly provided by
      GL */
-  if (((gl_api & GST_GL_API_OPENGL) &&
-          GST_GL_CHECK_GL_VERSION (gl_major, gl_minor,
-              data->min_gl_major, data->min_gl_minor)) ||
-      ((gl_api & GST_GL_API_GLES2) &&
-          (data->gl_availability & GST_GL_API_GLES2))) {
+  if (gst_gl_context_check_gl_version (context, data->gl_availability, gl_maj,
+          gl_min)) {
     in_core = TRUE;
     suffix = "";
   } else {
@@ -217,6 +230,7 @@
    * then set all of the functions pointers to NULL so we can safely
    * do feature testing by just looking at the function pointers */
 error:
+  GST_DEBUG ("failed to find feature %s", data->feature_name);
 
   for (func_num = 0; data->functions[func_num].name; func_num++) {
     *(void **) ((guint8 *) gst_gl +
@@ -224,7 +238,7 @@
   }
 
   if (full_function_name) {
-    GST_TRACE ("failed to find function %s", full_function_name);
+    GST_DEBUG ("failed to find function %s", full_function_name);
     g_free (full_function_name);
   }
 
diff --git a/gst-libs/gst/gl/gstglfeature.h b/gst-libs/gst/gl/gstglfeature.h
index 7860113..0bbcda6 100644
--- a/gst-libs/gst/gl/gstglfeature.h
+++ b/gst-libs/gst/gl/gstglfeature.h
@@ -68,13 +68,19 @@
 
 struct _GstGLFeatureData
 {
-  /* A minimum GL version which the functions should be defined in
-     without needing an extension. Set to 255,255 if it's only
-     provided in an extension */
-  int min_gl_major, min_gl_minor;
+  /* name of the feature */
+  const char *feature_name;
   /* Flags specifying which versions of GL the feature is available
      in core in */
   GstGLAPI gl_availability;
+  /* A minimum GL version which the functions should be defined in
+     without needing an extension. Set to 255, 255 if it's only
+     provided in an extension */
+  int min_gl_major, min_gl_minor;
+  /* A minimum GLES version which the functions should be defined in
+     without needing an extension. Set to 255, 255 if it's only
+     provided in an extension */
+  int min_gles_major, min_gles_minor;
   /* \0 separated list of namespaces to try. Eg "EXT\0ARB\0" */
   const char *namespaces;
   /* \0 separated list of required extension names without the GL_EXT
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 4007ac2..250ae39 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -687,6 +687,41 @@
   return tmp;
 }
 
+/* copies the given caps */
+static GstCaps *
+gst_gl_filter_caps_remove_format_info (GstCaps * caps)
+{
+  GstStructure *st;
+  GstCapsFeatures *f;
+  gint i, n;
+  GstCaps *res;
+
+  res = gst_caps_new_empty ();
+
+  n = gst_caps_get_size (caps);
+  for (i = 0; i < n; i++) {
+    st = gst_caps_get_structure (caps, i);
+    f = gst_caps_get_features (caps, i);
+
+    /* If this is already expressed by the existing caps
+     * skip this structure */
+    if (i > 0 && gst_caps_is_subset_structure_full (res, st, f))
+      continue;
+
+    st = gst_structure_copy (st);
+    /* Only remove format info for the cases when we can actually convert */
+    if (!gst_caps_features_is_any (f)
+        && gst_caps_features_is_equal (f,
+            GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))
+      gst_structure_remove_fields (st, "format", "colorimetry", "chroma-site",
+          "width", "height", NULL);
+
+    gst_caps_append_structure_full (res, st, gst_caps_features_copy (f));
+  }
+
+  return res;
+}
+
 static GstCaps *
 gst_gl_filter_transform_caps (GstBaseTransform * bt,
     GstPadDirection direction, GstCaps * caps, GstCaps * filter)
@@ -694,6 +729,8 @@
   GstCaps *tmp = NULL;
   GstCaps *result = NULL;
 
+  tmp = gst_caps_new_empty ();
+
   if (direction == GST_PAD_SINK) {
     GstCaps *glcaps = gst_gl_filter_set_caps_features (caps,
         GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
@@ -704,18 +741,15 @@
     GstCaps *uploadcaps = gst_gl_filter_set_caps_features (caps,
         GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);
 
-    tmp = gst_caps_new_empty ();
-
     tmp = gst_caps_merge (tmp, glcaps);
 #if GST_GL_HAVE_PLATFORM_EGL
     tmp = gst_caps_merge (tmp, eglcaps);
 #endif
     tmp = gst_caps_merge (tmp, uploadcaps);
-    tmp = gst_caps_merge (tmp, gst_caps_copy (caps));
-  } else {
-    tmp = gst_caps_copy (caps);
   }
 
+  tmp = gst_caps_merge (tmp, gst_gl_filter_caps_remove_format_info (caps));
+
   if (filter) {
     result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
     gst_caps_unref (tmp);
@@ -1151,8 +1185,6 @@
 {
   GstGLFilter *filter;
   GstGLFilterClass *filter_class;
-  GstCaps *in_caps, *out_caps;
-  GstBufferPool *pool;
 
   filter = GST_GL_FILTER (bt);
   filter_class = GST_GL_FILTER_GET_CLASS (bt);
@@ -1161,21 +1193,8 @@
     return GST_FLOW_NOT_NEGOTIATED;
 
   if (!filter->upload) {
-    in_caps = gst_pad_get_current_caps (GST_BASE_TRANSFORM_SINK_PAD (filter));
-    out_caps = gst_pad_get_current_caps (GST_BASE_TRANSFORM_SRC_PAD (filter));
-    pool = gst_base_transform_get_buffer_pool (bt);
-
-    if (GST_IS_GL_BUFFER_POOL (pool)
-        && gst_caps_is_equal_fixed (in_caps, out_caps)) {
-      filter->upload = gst_object_ref (GST_GL_BUFFER_POOL (pool)->upload);
-    } else {
-      filter->upload = gst_gl_upload_new (filter->context);
-    }
+    filter->upload = gst_gl_upload_new (filter->context);
     gst_gl_upload_set_format (filter->upload, &filter->in_info);
-
-    gst_caps_unref (in_caps);
-    gst_caps_unref (out_caps);
-    gst_object_unref (pool);
   }
 
   g_assert (filter_class->filter || filter_class->filter_texture);
diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c
index 4d30a26..2de236b 100644
--- a/gst-libs/gst/gl/gstglframebuffer.c
+++ b/gst-libs/gst/gl/gstglframebuffer.c
@@ -296,9 +296,8 @@
 
   gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height);
 
-#if GST_GL_HAVE_OPENGL
-  gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
-#endif
+  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL)
+    gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
 
   gl->ClearColor (0.0, 0.0, 0.0, 0.0);
   gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -306,9 +305,8 @@
   /* the opengl scene */
   cb (stuff);
 
-#if GST_GL_HAVE_OPENGL
-  gl->DrawBuffer (GL_NONE);
-#endif
+  if (gst_gl_context_get_gl_api (frame->context) & GST_GL_API_OPENGL)
+    gl->DrawBuffer (GL_NONE);
 
   gl->Viewport (viewport_dim[0], viewport_dim[1],
       viewport_dim[2], viewport_dim[3]);
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 45d4c1c..5458255 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -42,11 +42,11 @@
  * Data is uploaded or downloaded from the GPU as is necessary.
  */
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
 #define GST_CAT_DEFUALT GST_CAT_GL_MEMORY
@@ -60,6 +60,12 @@
 #ifndef GL_RG
 #define GL_RG 0x8227
 #endif
+#ifndef GL_R8
+#define GL_R8 0x8229
+#endif
+#ifndef GL_RG8
+#define GL_RG8 0x822B
+#endif
 #ifndef GL_PIXEL_PACK_BUFFER
 #define GL_PIXEL_PACK_BUFFER 0x88EB
 #endif
@@ -69,6 +75,9 @@
 #ifndef GL_STREAM_COPY
 #define GL_STREAM_COPY 0x88E2
 #endif
+#ifndef GL_UNPACK_ROW_LENGTH
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#endif
 
 typedef struct
 {
@@ -181,8 +190,14 @@
 }
 
 GstVideoGLTextureType
-gst_gl_texture_type_from_format (GstVideoFormat v_format, guint plane)
+gst_gl_texture_type_from_format (GstGLContext * context,
+    GstVideoFormat v_format, guint plane)
 {
+  gboolean texture_rg =
+      gst_gl_context_check_feature (context, "GL_EXT_texture_rg")
+      || gst_gl_context_check_feature (context, "GL_ARB_texture_rg");
+  guint n_plane_components;
+
   switch (v_format) {
     case GST_VIDEO_FORMAT_RGBx:
     case GST_VIDEO_FORMAT_BGRx:
@@ -193,43 +208,111 @@
     case GST_VIDEO_FORMAT_ARGB:
     case GST_VIDEO_FORMAT_ABGR:
     case GST_VIDEO_FORMAT_AYUV:
-      return GST_VIDEO_GL_TEXTURE_TYPE_RGBA;
+      n_plane_components = 4;
       break;
     case GST_VIDEO_FORMAT_RGB:
     case GST_VIDEO_FORMAT_BGR:
-      return GST_VIDEO_GL_TEXTURE_TYPE_RGB;
-      break;
-    case GST_VIDEO_FORMAT_GRAY8:
-      return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE;
+      n_plane_components = 3;
       break;
     case GST_VIDEO_FORMAT_GRAY16_BE:
     case GST_VIDEO_FORMAT_GRAY16_LE:
-      return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA;
-      break;
     case GST_VIDEO_FORMAT_YUY2:
     case GST_VIDEO_FORMAT_UYVY:
-      return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA;
+      n_plane_components = 2;
       break;
     case GST_VIDEO_FORMAT_NV12:
     case GST_VIDEO_FORMAT_NV21:
-      if (plane == 0)
-        return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE;
-      return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA;
+      n_plane_components = plane == 0 ? 1 : 2;
       break;
+    case GST_VIDEO_FORMAT_GRAY8:
     case GST_VIDEO_FORMAT_Y444:
     case GST_VIDEO_FORMAT_Y42B:
     case GST_VIDEO_FORMAT_Y41B:
     case GST_VIDEO_FORMAT_I420:
     case GST_VIDEO_FORMAT_YV12:
-      return GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE;
+      n_plane_components = 1;
+      break;
+    default:
+      n_plane_components = 4;
+      g_assert_not_reached ();
+      break;
+  }
+
+  switch (n_plane_components) {
+    case 4:
+      return GST_VIDEO_GL_TEXTURE_TYPE_RGBA;
+      break;
+    case 3:
+      return GST_VIDEO_GL_TEXTURE_TYPE_RGB;
+      break;
+    case 2:
+      return texture_rg ? GST_VIDEO_GL_TEXTURE_TYPE_RG :
+          GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA;
+      break;
+    case 1:
+      return texture_rg ? GST_VIDEO_GL_TEXTURE_TYPE_R :
+          GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE;
       break;
     default:
       g_assert_not_reached ();
       break;
   }
+
   return GST_VIDEO_GL_TEXTURE_TYPE_RGBA;
 }
 
+static inline GLenum
+_sized_gl_format_from_gl_format_type (GLenum format, GLenum type)
+{
+  switch (format) {
+    case GL_RGBA:
+      switch (type) {
+        case GL_UNSIGNED_BYTE:
+          return GL_RGBA8;
+          break;
+      }
+      break;
+    case GL_RGB:
+      switch (type) {
+        case GL_UNSIGNED_BYTE:
+          return GL_RGB8;
+          break;
+        case GL_UNSIGNED_SHORT_5_6_5:
+          return GL_RGB;
+          break;
+      }
+      break;
+    case GL_RG:
+      switch (type) {
+        case GL_UNSIGNED_BYTE:
+          return GL_RG8;
+          break;
+      }
+      break;
+    case GL_RED:
+      switch (type) {
+        case GL_UNSIGNED_BYTE:
+          return GL_R8;
+          break;
+      }
+      break;
+    case GL_LUMINANCE:
+      return GL_LUMINANCE;
+      break;
+    case GL_LUMINANCE_ALPHA:
+      return GL_LUMINANCE_ALPHA;
+      break;
+    case GL_ALPHA:
+      return GL_ALPHA;
+      break;
+    default:
+      break;
+  }
+
+  g_assert_not_reached ();
+  return 0;
+}
+
 static inline guint
 _get_plane_width (GstVideoInfo * info, guint plane)
 {
@@ -266,14 +349,18 @@
 _generate_texture (GstGLContext * context, GenTexture * data)
 {
   const GstGLFuncs *gl = context->gl_vtable;
+  GLenum internal_format;
 
   GST_CAT_TRACE (GST_CAT_GL_MEMORY,
       "Generating texture format:%u type:%u dimensions:%ux%u", data->gl_format,
       data->gl_type, data->width, data->height);
 
+  internal_format =
+      _sized_gl_format_from_gl_format_type (data->gl_format, data->gl_type);
+
   gl->GenTextures (1, &data->result);
   gl->BindTexture (GL_TEXTURE_2D, data->result);
-  gl->TexImage2D (GL_TEXTURE_2D, 0, data->gl_format, data->width,
+  gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format, data->width,
       data->height, 0, data->gl_format, data->gl_type, NULL);
 
   gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -302,16 +389,11 @@
 
   gl_format = _gst_gl_format_from_gl_texture_type (gl_mem->tex_type);
 
-#if GST_GL_HAVE_OPENGL || GST_GL_HAVE_GLES3
   if (USING_OPENGL (context) || USING_GLES3 (context)) {
     gl->PixelStorei (GL_UNPACK_ROW_LENGTH, gl_mem->unpack_length);
-  }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (USING_GLES2 (context)) {
+  } else if (USING_GLES2 (context)) {
     gl->PixelStorei (GL_UNPACK_ALIGNMENT, gl_mem->unpack_length);
   }
-#endif
 
   GST_CAT_LOG (GST_CAT_GL_MEMORY, "upload for texture id:%u, %ux%u",
       gl_mem->tex_id, gl_mem->width, gl_mem->height);
@@ -321,16 +403,12 @@
       gl_format, gl_type, gl_mem->data);
 
   /* Reset to default values */
-#if GST_GL_HAVE_OPENGL || GST_GL_HAVE_GLES3
   if (USING_OPENGL (context) || USING_GLES3 (context)) {
     gl->PixelStorei (GL_UNPACK_ROW_LENGTH, 0);
-  }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (USING_GLES2 (context)) {
+  } else if (USING_GLES2 (context)) {
     gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4);
   }
-#endif
+
   gl->BindTexture (GL_TEXTURE_2D, 0);
 
   GST_GL_MEMORY_FLAG_UNSET (gl_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
@@ -351,13 +429,10 @@
         gl_mem->tex_type);
     return;
   }
-#if GST_GL_HAVE_OPENGL || GST_GL_HAVE_GLES3
+
   if (USING_OPENGL (gl_mem->context) || USING_GLES3 (gl_mem->context)) {
     gl_mem->unpack_length = gl_mem->stride / n_gl_bytes;
-  }
-#endif
-#if GST_GL_HAVE_GLES2
-  if (USING_GLES2 (gl_mem->context)) {
+  } else if (USING_GLES2 (gl_mem->context)) {
     guint j = 8;
 
     while (j >= n_gl_bytes) {
@@ -409,7 +484,6 @@
       }
     }
   }
-#endif
 }
 
 static void
@@ -479,7 +553,7 @@
 {
   gsize maxsize;
 
-  maxsize = _gl_texture_type_n_bytes (tex_type) * stride * height;
+  maxsize = stride * height;
 
   gst_memory_init (GST_MEMORY_CAST (mem), GST_MEMORY_FLAG_NO_SHARE,
       allocator, parent, maxsize, 0, 0, maxsize);
@@ -680,6 +754,14 @@
       goto fbo_error;
     }
 
+    if (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2
+        && (in_gl_format != GL_RGBA || in_gl_type != GL_UNSIGNED_BYTE)) {
+      gst_gl_context_set_error (context, "Cannot copy non RGBA/UNSIGNED_BYTE "
+          "textures on GLES2");
+      gl->BindTexture (GL_TEXTURE_2D, 0);
+      goto fbo_error;
+    }
+
     if (!src->pbo)
       gl->GenBuffers (1, &src->pbo);
 
@@ -1041,7 +1123,8 @@
 
   for (i = 0; i < n_mem; i++) {
     tex_type =
-        gst_gl_texture_type_from_format (GST_VIDEO_INFO_FORMAT (info), i);
+        gst_gl_texture_type_from_format (context, GST_VIDEO_INFO_FORMAT (info),
+        i);
     gl_mem[i] =
         (GstGLMemory *) gst_gl_memory_alloc (context, tex_type,
         _get_plane_width (info, i), _get_plane_height (info, i),
@@ -1079,7 +1162,8 @@
 
   for (i = 0; i < GST_VIDEO_INFO_N_PLANES (info); i++) {
     tex_type =
-        gst_gl_texture_type_from_format (GST_VIDEO_INFO_FORMAT (info), i);
+        gst_gl_texture_type_from_format (context, GST_VIDEO_INFO_FORMAT (info),
+        i);
 
     textures[i] = (GstGLMemory *) gst_gl_memory_wrapped (context, tex_type,
         _get_plane_width (info, i), _get_plane_height (info, i),
diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h
index 535bea7..82c9e88 100644
--- a/gst-libs/gst/gl/gstglmemory.h
+++ b/gst-libs/gst/gl/gstglmemory.h
@@ -173,7 +173,7 @@
                                            gpointer data[GST_VIDEO_MAX_PLANES],
                                            GstGLMemory *textures[GST_VIDEO_MAX_PLANES]);
 
-GstVideoGLTextureType gst_gl_texture_type_from_format (GstVideoFormat v_format, guint plane);
+GstVideoGLTextureType gst_gl_texture_type_from_format (GstGLContext *context, GstVideoFormat v_format, guint plane);
 
 /**
  * GstGLAllocator
diff --git a/gst-libs/gst/gl/gstglmixer.c b/gst-libs/gst/gl/gstglmixer.c
index 89b68db..94ca44f 100644
--- a/gst-libs/gst/gl/gstglmixer.c
+++ b/gst-libs/gst/gl/gstglmixer.c
@@ -36,6 +36,12 @@
 
 #include "gstglmixer.h"
 
+#define gst_gl_mixer_parent_class parent_class
+G_DEFINE_ABSTRACT_TYPE (GstGLMixer, gst_gl_mixer, GST_TYPE_VIDEO_AGGREGATOR);
+static gboolean gst_gl_mixer_do_bufferpool (GstGLMixer * mix,
+    GstCaps * outcaps);
+
+
 #define GST_CAT_DEFAULT gst_gl_mixer_debug
 GST_DEBUG_CATEGORY (gst_gl_mixer_debug);
 
@@ -51,12 +57,6 @@
 static void gst_gl_mixer_pad_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 
-static gboolean gst_gl_mixer_src_event (GstPad * pad, GstObject * object,
-    GstEvent * event);
-static gboolean gst_gl_mixer_sink_event (GstCollectPads * pads,
-    GstCollectData * cdata, GstEvent * event, GstGLMixer * mix);
-static gboolean gst_gl_mixer_src_setcaps (GstPad * pad, GstGLMixer * mix,
-    GstCaps * caps);
 static void gst_gl_mixer_set_context (GstElement * element,
     GstContext * context);
 
@@ -79,7 +79,7 @@
   GstQuery *query;
 };
 
-G_DEFINE_TYPE (GstGLMixerPad, gst_gl_mixer_pad, GST_TYPE_PAD);
+G_DEFINE_TYPE (GstGLMixerPad, gst_gl_mixer_pad, GST_TYPE_VIDEO_AGGREGATOR_PAD);
 
 static void
 gst_gl_mixer_pad_class_init (GstGLMixerPadClass * klass)
@@ -113,203 +113,12 @@
 }
 
 static gboolean
-gst_gl_mixer_update_src_caps (GstGLMixer * mix)
+_negotiated_caps (GstVideoAggregator * vagg, GstCaps * caps)
 {
-  GSList *l;
-  gint best_width = -1, best_height = -1;
-  gdouble best_fps = -1, cur_fps;
-  gint best_fps_n = -1, best_fps_d = -1;
-  gboolean ret = TRUE;
+  GstGLMixer *mix = GST_GL_MIXER (vagg);
+  gboolean ret = gst_gl_mixer_do_bufferpool (mix, caps);
 
-  GST_GL_MIXER_LOCK (mix);
-
-  for (l = mix->sinkpads; l; l = l->next) {
-    GstGLMixerPad *mpad = l->data;
-    gint this_width, this_height;
-    gint fps_n, fps_d;
-    gint width, height;
-
-    fps_n = GST_VIDEO_INFO_FPS_N (&mpad->in_info);
-    fps_d = GST_VIDEO_INFO_FPS_D (&mpad->in_info);
-    width = GST_VIDEO_INFO_WIDTH (&mpad->in_info);
-    height = GST_VIDEO_INFO_HEIGHT (&mpad->in_info);
-
-    if (width == 0 || height == 0)
-      continue;
-
-    this_width = width;
-    this_height = height;
-
-    if (best_width < this_width)
-      best_width = this_width;
-    if (best_height < this_height)
-      best_height = this_height;
-
-    if (fps_d == 0)
-      cur_fps = 0.0;
-    else
-      gst_util_fraction_to_double (fps_n, fps_d, &cur_fps);
-
-    if (best_fps < cur_fps) {
-      best_fps = cur_fps;
-      best_fps_n = fps_n;
-      best_fps_d = fps_d;
-    }
-  }
-
-  if (best_fps_n == 0 || (best_fps_n < 0 && best_fps_d <= 0)) {
-    best_fps_n = 25;
-    best_fps_d = 1;
-    best_fps = 25.0;
-  }
-
-  if (best_width > 0 && best_height > 0 && best_fps > 0.0) {
-    GstCaps *caps, *peercaps;
-    GstStructure *s;
-    GstVideoInfo info;
-
-    if (GST_VIDEO_INFO_FPS_N (&mix->out_info) != best_fps_n ||
-        GST_VIDEO_INFO_FPS_D (&mix->out_info) != best_fps_d) {
-      if (mix->segment.position != -1) {
-        mix->ts_offset = mix->segment.position - mix->segment.start;
-        mix->nframes = 0;
-      }
-    }
-
-    caps = gst_caps_new_empty_simple ("video/x-raw");
-
-    peercaps = gst_pad_peer_query_caps (mix->srcpad, NULL);
-    if (peercaps) {
-      GstCaps *tmp;
-      tmp = gst_caps_intersect (caps, peercaps);
-      gst_caps_unref (caps);
-      gst_caps_unref (peercaps);
-      caps = tmp;
-    }
-
-    if (!gst_caps_is_fixed (caps)) {
-      caps = gst_caps_make_writable (caps);
-
-      caps = gst_caps_truncate (caps);
-
-      s = gst_caps_get_structure (caps, 0);
-      gst_structure_fixate_field_nearest_int (s, "width", best_width);
-      gst_structure_fixate_field_nearest_int (s, "height", best_height);
-      gst_structure_fixate_field_nearest_fraction (s, "framerate", best_fps_n,
-          best_fps_d);
-      gst_structure_fixate_field_string (s, "format", "RGBA");
-
-      gst_structure_get_int (s, "width", &info.width);
-      gst_structure_get_int (s, "height", &info.height);
-      gst_structure_get_fraction (s, "fraction", &info.fps_n, &info.fps_d);
-      GST_DEBUG_OBJECT (mix, "fixated caps to %" GST_PTR_FORMAT, caps);
-    }
-
-    GST_GL_MIXER_UNLOCK (mix);
-    ret = gst_gl_mixer_src_setcaps (mix->srcpad, mix, caps);
-  } else {
-    GST_ERROR_OBJECT (mix, "Invalid caps");
-    GST_GL_MIXER_UNLOCK (mix);
-  }
-
-  return ret;
-}
-
-static gboolean
-gst_gl_mixer_pad_sink_setcaps (GstPad * pad, GstObject * parent, GstCaps * caps)
-{
-  GstGLMixer *mix;
-  GstGLMixerPad *mixpad;
-  GstVideoInfo info;
-  gboolean ret = TRUE;
-
-  GST_INFO_OBJECT (pad, "Setting caps %" GST_PTR_FORMAT, caps);
-
-  mix = GST_GL_MIXER (parent);
-  mixpad = GST_GL_MIXER_PAD (pad);
-
-  if (!gst_video_info_from_caps (&info, caps)) {
-    GST_ERROR_OBJECT (pad, "Failed to parse caps");
-    goto beach;
-  }
-
-  GST_GL_MIXER_LOCK (mix);
-
-  mix->out_info = info;
-  mixpad->in_info = info;
-
-  GST_GL_MIXER_UNLOCK (mix);
-
-  ret = gst_gl_mixer_update_src_caps (mix);
-
-beach:
-  return ret;
-}
-
-static GstCaps *
-gst_gl_mixer_pad_sink_getcaps (GstPad * pad, GstGLMixer * mix, GstCaps * filter)
-{
-  GstCaps *srccaps;
-  GstStructure *s;
-  gint i, n;
-
-  srccaps = gst_pad_get_current_caps (GST_PAD (mix->srcpad));
-  if (srccaps == NULL)
-    srccaps = gst_pad_get_pad_template_caps (GST_PAD (mix->srcpad));
-
-  srccaps = gst_caps_make_writable (srccaps);
-
-  n = gst_caps_get_size (srccaps);
-  for (i = 0; i < n; i++) {
-    s = gst_caps_get_structure (srccaps, i);
-    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-    if (!gst_structure_has_field (s, "pixel-aspect-ratio"))
-      gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
-          NULL);
-  }
-
-  GST_DEBUG_OBJECT (pad, "Returning %" GST_PTR_FORMAT, srccaps);
-
-  return srccaps;
-}
-
-static gboolean
-gst_gl_mixer_pad_sink_acceptcaps (GstPad * pad, GstGLMixer * mix,
-    GstCaps * caps)
-{
-  gboolean ret;
-  GstCaps *accepted_caps;
-  gint i, n;
-  GstStructure *s;
-
-  GST_DEBUG_OBJECT (pad, "%" GST_PTR_FORMAT, caps);
-
-  accepted_caps = gst_pad_get_current_caps (GST_PAD (mix->srcpad));
-  if (accepted_caps == NULL)
-    accepted_caps = gst_pad_get_pad_template_caps (GST_PAD (mix->srcpad));
-
-  accepted_caps = gst_caps_make_writable (accepted_caps);
-  GST_LOG_OBJECT (pad, "src caps %" GST_PTR_FORMAT, accepted_caps);
-
-  n = gst_caps_get_size (accepted_caps);
-  for (i = 0; i < n; i++) {
-    s = gst_caps_get_structure (accepted_caps, i);
-    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-    gst_structure_remove_field (s, "format");
-    if (!gst_structure_has_field (s, "pixel-aspect-ratio"))
-      gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
-          NULL);
-  }
-
-  ret = gst_caps_can_intersect (caps, accepted_caps);
-  GST_INFO_OBJECT (pad, "%saccepted caps %" GST_PTR_FORMAT, (ret ? "" : "not "),
-      caps);
-  GST_INFO_OBJECT (pad, "acceptable caps are %" GST_PTR_FORMAT, accepted_caps);
-  gst_caps_unref (accepted_caps);
+  mix->priv->negotiated = ret;
 
   return ret;
 }
@@ -440,11 +249,11 @@
 }
 
 static gboolean
-gst_gl_mixer_sink_query (GstCollectPads * pads, GstCollectData * data,
-    GstQuery * query, GstGLMixer * mix)
+gst_gl_mixer_sink_query (GstAggregator * agg, GstAggregatorPad * bpad,
+    GstQuery * query)
 {
-  GstPad *pad = data->pad;
   gboolean ret = FALSE;
+  GstGLMixer *mix = GST_GL_MIXER (agg);
 
   GST_TRACE ("QUERY %" GST_PTR_FORMAT, query);
 
@@ -478,27 +287,6 @@
       GST_DEBUG_OBJECT (mix, "ALLOCATION ret %d, %" GST_PTR_FORMAT, ret, query);
       break;
     }
-    case GST_QUERY_CAPS:
-    {
-      GstCaps *filter, *caps;
-
-      gst_query_parse_caps (query, &filter);
-      caps = gst_gl_mixer_pad_sink_getcaps (pad, mix, filter);
-      gst_query_set_caps_result (query, caps);
-      gst_caps_unref (caps);
-      ret = TRUE;
-      break;
-    }
-    case GST_QUERY_ACCEPT_CAPS:
-    {
-      GstCaps *caps;
-
-      gst_query_parse_accept_caps (query, &caps);
-      ret = gst_gl_mixer_pad_sink_acceptcaps (pad, mix, caps);
-      gst_query_set_accept_caps_result (query, ret);
-      ret = TRUE;
-      break;
-    }
     case GST_QUERY_CONTEXT:
     {
       ret = gst_gl_handle_context_query ((GstElement *) mix, query,
@@ -506,7 +294,7 @@
       break;
     }
     default:
-      ret = gst_collect_pads_query_default (pads, data, query, FALSE);
+      ret = GST_AGGREGATOR_CLASS (parent_class)->sink_query (agg, bpad, query);
       break;
   }
 
@@ -542,7 +330,7 @@
         "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
     );
 
-static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
     GST_PAD_SINK,
     GST_PAD_REQUEST,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
@@ -554,100 +342,45 @@
         "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS))
     );
 
-static gboolean gst_gl_mixer_src_query (GstPad * pad, GstObject * object,
-    GstQuery * query);
-static gboolean gst_gl_mixer_src_activate_mode (GstPad * pad,
-    GstObject * parent, GstPadMode mode, gboolean active);
-static GstFlowReturn gst_gl_mixer_sink_clip (GstCollectPads * pads,
-    GstCollectData * data, GstBuffer * buf, GstBuffer ** outbuf,
-    GstGLMixer * mix);
+static gboolean gst_gl_mixer_src_query (GstAggregator * agg, GstQuery * query);
+static GstFlowReturn
+gst_gl_mixer_get_output_buffer (GstVideoAggregator * videoaggregator,
+    GstBuffer ** outbuf);
+static gboolean
+gst_gl_mixer_src_activate_mode (GstAggregator * aggregator, GstPadMode mode,
+    gboolean active);
+static gboolean gst_gl_mixer_stop (GstAggregator * agg);
+static gboolean gst_gl_mixer_start (GstAggregator * agg);
 
-static GstFlowReturn gst_gl_mixer_collected (GstCollectPads * pads,
-    GstGLMixer * mix);
-static GstPad *gst_gl_mixer_request_new_pad (GstElement * element,
-    GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
-static void gst_gl_mixer_release_pad (GstElement * element, GstPad * pad);
+static GstFlowReturn
+gst_gl_mixer_aggregate_frames (GstVideoAggregator * vagg,
+    GstBuffer * outbuffer);
 
 static void gst_gl_mixer_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 static void gst_gl_mixer_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
-static GstStateChangeReturn gst_gl_mixer_change_state (GstElement * element,
-    GstStateChange transition);
 
-static gboolean gst_gl_mixer_query_caps (GstPad * pad, GstObject * parent,
-    GstQuery * query);
-static gboolean gst_gl_mixer_query_duration (GstGLMixer * mix,
-    GstQuery * query);
-static gboolean gst_gl_mixer_query_latency (GstGLMixer * mix, GstQuery * query);
-
-static gboolean gst_gl_mixer_do_bufferpool (GstGLMixer * mix,
-    GstCaps * outcaps);
 static gboolean gst_gl_mixer_decide_allocation (GstGLMixer * mix,
     GstQuery * query);
 static gboolean gst_gl_mixer_set_allocation (GstGLMixer * mix,
     GstBufferPool * pool, GstAllocator * allocator,
     GstAllocationParams * params, GstQuery * query);
 
-static gint64 gst_gl_mixer_do_qos (GstGLMixer * mix, GstClockTime timestamp);
-static void gst_gl_mixer_update_qos (GstGLMixer * mix, gdouble proportion,
-    GstClockTimeDiff diff, GstClockTime timestamp);
-static void gst_gl_mixer_reset_qos (GstGLMixer * mix);
-static void gst_gl_mixer_read_qos (GstGLMixer * mix, gdouble * proportion,
-    GstClockTime * time);
-
-static void gst_gl_mixer_child_proxy_init (gpointer g_iface,
-    gpointer iface_data);
-
-#define gst_gl_mixer_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstGLMixer, gst_gl_mixer, GST_TYPE_ELEMENT,
-    G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY, gst_gl_mixer_child_proxy_init);
-    GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glmixer", 0, "opengl mixer"));
 static void gst_gl_mixer_finalize (GObject * object);
 
-static GObject *
-gst_gl_mixer_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
-    guint index)
-{
-  GstGLMixer *mix = GST_GL_MIXER (child_proxy);
-  GObject *obj;
-
-  GST_GL_MIXER_LOCK (mix);
-  if ((obj = g_slist_nth_data (mix->sinkpads, index)))
-    gst_object_ref (obj);
-  GST_GL_MIXER_UNLOCK (mix);
-  return obj;
-}
-
-static guint
-gst_gl_mixer_child_proxy_get_children_count (GstChildProxy * child_proxy)
-{
-  guint count = 0;
-  GstGLMixer *mix = GST_GL_MIXER (child_proxy);
-
-  GST_GL_MIXER_LOCK (mix);
-  count = mix->numpads;
-  GST_GL_MIXER_UNLOCK (mix);
-  GST_INFO_OBJECT (mix, "Children Count: %d", count);
-  return count;
-}
-
-static void
-gst_gl_mixer_child_proxy_init (gpointer g_iface, gpointer iface_data)
-{
-  GstChildProxyInterface *iface = g_iface;
-
-  GST_INFO ("intializing child proxy interface");
-  iface->get_child_by_index = gst_gl_mixer_child_proxy_get_child_by_index;
-  iface->get_children_count = gst_gl_mixer_child_proxy_get_children_count;
-}
-
 static void
 gst_gl_mixer_class_init (GstGLMixerClass * klass)
 {
   GObjectClass *gobject_class;
   GstElementClass *element_class;
 
+  GstVideoAggregatorClass *videoaggregator_class =
+      (GstVideoAggregatorClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+
+  GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "glmixer", 0, "opengl mixer");
+
   gobject_class = (GObjectClass *) klass;
   element_class = GST_ELEMENT_CLASS (klass);
 
@@ -663,94 +396,54 @@
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&sink_factory));
 
-  element_class->request_new_pad =
-      GST_DEBUG_FUNCPTR (gst_gl_mixer_request_new_pad);
-  element_class->release_pad = GST_DEBUG_FUNCPTR (gst_gl_mixer_release_pad);
-  element_class->change_state = GST_DEBUG_FUNCPTR (gst_gl_mixer_change_state);
   element_class->set_context = GST_DEBUG_FUNCPTR (gst_gl_mixer_set_context);
 
+  agg_class->sinkpads_type = GST_TYPE_GL_MIXER_PAD;
+  agg_class->sink_query = gst_gl_mixer_sink_query;
+  agg_class->src_query = gst_gl_mixer_src_query;
+  agg_class->src_activate = gst_gl_mixer_src_activate_mode;
+  agg_class->stop = gst_gl_mixer_stop;
+  agg_class->start = gst_gl_mixer_start;
+
+  videoaggregator_class->disable_frame_conversion = TRUE;
+  videoaggregator_class->aggregate_frames = gst_gl_mixer_aggregate_frames;
+  videoaggregator_class->get_output_buffer = gst_gl_mixer_get_output_buffer;
+  videoaggregator_class->negotiated_caps = _negotiated_caps;
+
+
   /* Register the pad class */
   g_type_class_ref (GST_TYPE_GL_MIXER_PAD);
 
   klass->set_caps = NULL;
-}
 
-static void
-gst_gl_mixer_collect_free (GstGLMixerCollect * mixcol)
-{
-  if (mixcol->buffer) {
-    gst_buffer_unref (mixcol->buffer);
-    mixcol->buffer = NULL;
-  }
 }
 
 static void
 gst_gl_mixer_reset (GstGLMixer * mix)
 {
-  GstGLMixerPrivate *priv = mix->priv;
-  GSList *l;
-
-  gst_video_info_init (&mix->out_info);
-  mix->ts_offset = 0;
-  mix->nframes = 0;
-
-  gst_segment_init (&mix->segment, GST_FORMAT_TIME);
-  mix->segment.position = -1;
-
   /* clean up collect data */
-  for (l = mix->sinkpads; l; l = l->next) {
-    GstGLMixerPad *p = l->data;
-    GstGLMixerCollect *mixcol = p->mixcol;
+  mix->priv->negotiated = FALSE;
+}
 
-    gst_buffer_replace (&mixcol->buffer, NULL);
-    mixcol->start_time = -1;
-    mixcol->end_time = -1;
-
-    gst_video_info_init (&p->in_info);
-  }
-
-  mix->newseg_pending = TRUE;
-  mix->flush_stop_pending = FALSE;
-
-  priv->negotiated = FALSE;
+static void
+_free_pad_frame_data (gpointer data)
+{
+  g_slice_free1 (sizeof (GstGLMixerFrameData), data);
 }
 
 static void
 gst_gl_mixer_init (GstGLMixer * mix)
 {
-  GstElementClass *klass = GST_ELEMENT_GET_CLASS (mix);
-
   mix->priv = GST_GL_MIXER_GET_PRIVATE (mix);
-
-  mix->srcpad =
-      gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
-          "src"), "src");
-  gst_pad_set_query_function (GST_PAD (mix->srcpad),
-      GST_DEBUG_FUNCPTR (gst_gl_mixer_src_query));
-  gst_pad_set_event_function (GST_PAD (mix->srcpad),
-      GST_DEBUG_FUNCPTR (gst_gl_mixer_src_event));
-  gst_pad_set_activatemode_function (mix->srcpad,
-      GST_DEBUG_FUNCPTR (gst_gl_mixer_src_activate_mode));
-  gst_element_add_pad (GST_ELEMENT (mix), mix->srcpad);
-
-  mix->collect = gst_collect_pads_new ();
-
-  gst_collect_pads_set_function (mix->collect,
-      (GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_gl_mixer_collected), mix);
-  gst_collect_pads_set_event_function (mix->collect,
-      (GstCollectPadsEventFunction) gst_gl_mixer_sink_event, mix);
-  gst_collect_pads_set_query_function (mix->collect,
-      (GstCollectPadsQueryFunction) gst_gl_mixer_sink_query, mix);
-  gst_collect_pads_set_clip_function (mix->collect,
-      (GstCollectPadsClipFunction) gst_gl_mixer_sink_clip, mix);
-
   g_mutex_init (&mix->lock);
-
   mix->array_buffers = 0;
   mix->display = NULL;
   mix->fbo = 0;
   mix->depthbuffer = 0;
 
+  mix->frames = g_ptr_array_new_full (4, _free_pad_frame_data);
+  mix->array_buffers = g_ptr_array_new_full (4, NULL);
+
   /* initialize variables */
   gst_gl_mixer_reset (mix);
 }
@@ -760,245 +453,14 @@
 {
   GstGLMixer *mix = GST_GL_MIXER (object);
 
-  gst_object_unref (mix->collect);
   g_mutex_clear (&mix->lock);
 
+  g_ptr_array_free (mix->frames, TRUE);
+  g_ptr_array_free (mix->array_buffers, TRUE);
+
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-static gboolean
-gst_gl_mixer_query_duration (GstGLMixer * mix, GstQuery * query)
-{
-  GValue item = { 0 };
-  gint64 max;
-  gboolean res;
-  GstFormat format;
-  GstIterator *it;
-  gboolean done;
-
-  /* parse format */
-  gst_query_parse_duration (query, &format, NULL);
-
-  max = -1;
-  res = TRUE;
-  done = FALSE;
-
-  /* Take maximum of all durations */
-  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix));
-  while (!done) {
-    GstIteratorResult ires;
-
-    ires = gst_iterator_next (it, &item);
-    switch (ires) {
-      case GST_ITERATOR_DONE:
-        done = TRUE;
-        break;
-      case GST_ITERATOR_OK:
-      {
-        GstPad *pad;
-        gint64 duration;
-
-        pad = g_value_get_object (&item);
-
-        /* ask sink peer for duration */
-        res &= gst_pad_peer_query_duration (pad, format, &duration);
-        /* take max from all valid return values */
-        if (res) {
-          /* valid unknown length, stop searching */
-          if (duration == -1) {
-            max = duration;
-            done = TRUE;
-          }
-          /* else see if bigger than current max */
-          else if (duration > max)
-            max = duration;
-        }
-        g_value_reset (&item);
-        break;
-      }
-      case GST_ITERATOR_RESYNC:
-        max = -1;
-        res = TRUE;
-        gst_iterator_resync (it);
-        break;
-      default:
-        res = FALSE;
-        done = TRUE;
-        break;
-    }
-  }
-  g_value_reset (&item);
-  gst_iterator_free (it);
-
-  if (res) {
-    /* and store the max */
-    GST_DEBUG_OBJECT (mix, "Total duration in format %s: %"
-        GST_TIME_FORMAT, gst_format_get_name (format), GST_TIME_ARGS (max));
-    gst_query_set_duration (query, format, max);
-  }
-
-  return res;
-}
-
-static gboolean
-gst_gl_mixer_query_caps (GstPad * pad, GstObject * parent, GstQuery * query)
-{
-  GstCaps *filter, *caps;
-  GstGLMixer *mix = GST_GL_MIXER (parent);
-  GstStructure *s;
-  gint n;
-
-  gst_query_parse_caps (query, &filter);
-
-  if (GST_VIDEO_INFO_FORMAT (&mix->out_info) != GST_VIDEO_FORMAT_UNKNOWN) {
-    caps = gst_pad_get_current_caps (mix->srcpad);
-  } else {
-    caps = gst_pad_get_pad_template_caps (mix->srcpad);
-  }
-
-  caps = gst_caps_make_writable (caps);
-
-  n = gst_caps_get_size (caps) - 1;
-  for (; n >= 0; n--) {
-    s = gst_caps_get_structure (caps, n);
-    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-    if (GST_VIDEO_INFO_FPS_D (&mix->out_info) != 0) {
-      gst_structure_set (s,
-          "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-    }
-  }
-  gst_query_set_caps_result (query, caps);
-
-  return TRUE;
-}
-
-static gboolean
-gst_gl_mixer_query_latency (GstGLMixer * mix, GstQuery * query)
-{
-  GValue item = { 0 };
-  GstClockTime min, max;
-  gboolean live;
-  gboolean res;
-  GstIterator *it;
-  gboolean done;
-
-  res = TRUE;
-  done = FALSE;
-  live = FALSE;
-  min = 0;
-  max = GST_CLOCK_TIME_NONE;
-
-  /* Take maximum of all latency values */
-  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix));
-  while (!done) {
-    GstIteratorResult ires;
-
-    ires = gst_iterator_next (it, &item);
-    switch (ires) {
-      case GST_ITERATOR_DONE:
-        done = TRUE;
-        break;
-      case GST_ITERATOR_OK:
-      {
-        GstPad *pad;
-        GstQuery *peerquery;
-        GstClockTime min_cur, max_cur;
-        gboolean live_cur;
-
-        pad = g_value_get_object (&item);
-        peerquery = gst_query_new_latency ();
-
-        /* Ask peer for latency */
-        res &= gst_pad_peer_query (pad, peerquery);
-
-        /* take max from all valid return values */
-        if (res) {
-          gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur);
-
-          if (min_cur > min)
-            min = min_cur;
-
-          if (max_cur != GST_CLOCK_TIME_NONE &&
-              ((max != GST_CLOCK_TIME_NONE && max_cur > max) ||
-                  (max == GST_CLOCK_TIME_NONE)))
-            max = max_cur;
-
-          live = live || live_cur;
-        }
-
-        gst_query_unref (peerquery);
-        g_value_reset (&item);
-        break;
-      }
-      case GST_ITERATOR_RESYNC:
-        live = FALSE;
-        min = 0;
-        max = GST_CLOCK_TIME_NONE;
-        res = TRUE;
-        gst_iterator_resync (it);
-        break;
-      default:
-        res = FALSE;
-        done = TRUE;
-        break;
-    }
-  }
-  g_value_unset (&item);
-  gst_iterator_free (it);
-
-  if (res) {
-    /* store the results */
-    GST_DEBUG_OBJECT (mix, "Calculated total latency: live %s, min %"
-        GST_TIME_FORMAT ", max %" GST_TIME_FORMAT,
-        (live ? "yes" : "no"), GST_TIME_ARGS (min), GST_TIME_ARGS (max));
-    gst_query_set_latency (query, live, min, max);
-  }
-
-  return res;
-}
-
-static void
-gst_gl_mixer_update_qos (GstGLMixer * mix, gdouble proportion,
-    GstClockTimeDiff diff, GstClockTime timestamp)
-{
-  GST_DEBUG_OBJECT (mix,
-      "Updating QoS: proportion %lf, diff %s%" GST_TIME_FORMAT ", timestamp %"
-      GST_TIME_FORMAT, proportion, (diff < 0) ? "-" : "",
-      GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp));
-
-  GST_OBJECT_LOCK (mix);
-  mix->proportion = proportion;
-  if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
-    if (G_UNLIKELY (diff > 0))
-      mix->earliest_time =
-          timestamp + 2 * diff + gst_util_uint64_scale_int (GST_SECOND,
-          GST_VIDEO_INFO_FPS_D (&mix->out_info),
-          GST_VIDEO_INFO_FPS_N (&mix->out_info));
-    else
-      mix->earliest_time = timestamp + diff;
-  } else {
-    mix->earliest_time = GST_CLOCK_TIME_NONE;
-  }
-  GST_OBJECT_UNLOCK (mix);
-}
-
-static void
-gst_gl_mixer_reset_qos (GstGLMixer * mix)
-{
-  gst_gl_mixer_update_qos (mix, 0.5, 0, GST_CLOCK_TIME_NONE);
-  mix->qos_processed = mix->qos_dropped = 0;
-}
-
-static void
-gst_gl_mixer_read_qos (GstGLMixer * mix, gdouble * proportion,
-    GstClockTime * time)
-{
-  GST_OBJECT_LOCK (mix);
-  *proportion = mix->proportion;
-  *time = mix->earliest_time;
-  GST_OBJECT_UNLOCK (mix);
-}
 
 static void
 gst_gl_mixer_set_context (GstElement * element, GstContext * context)
@@ -1022,13 +484,13 @@
 }
 
 static gboolean
-gst_gl_mixer_src_activate_mode (GstPad * pad, GstObject * parent,
-    GstPadMode mode, gboolean active)
+gst_gl_mixer_src_activate_mode (GstAggregator * aggregator, GstPadMode mode,
+    gboolean active)
 {
-  gboolean result = FALSE;
   GstGLMixer *mix;
+  gboolean result = FALSE;
 
-  mix = GST_GL_MIXER (parent);
+  mix = GST_GL_MIXER (aggregator);
 
   switch (mode) {
     case GST_PAD_MODE_PUSH:
@@ -1043,10 +505,44 @@
 }
 
 static gboolean
-gst_gl_mixer_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
+gst_gl_mixer_query_caps (GstPad * pad, GstAggregator * agg, GstQuery * query)
 {
-  GstGLMixer *mix = GST_GL_MIXER (parent);
+  GstCaps *filter, *caps;
+  GstStructure *s;
+  gint n;
+
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+
+  gst_query_parse_caps (query, &filter);
+
+  if (GST_VIDEO_INFO_FORMAT (&vagg->info) != GST_VIDEO_FORMAT_UNKNOWN) {
+    caps = gst_video_info_to_caps (&vagg->info);
+  } else {
+    caps = gst_pad_get_pad_template_caps (agg->srcpad);
+  }
+
+  caps = gst_caps_make_writable (caps);
+
+  n = gst_caps_get_size (caps) - 1;
+  for (; n >= 0; n--) {
+    s = gst_caps_get_structure (caps, n);
+    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+    if (GST_VIDEO_INFO_FPS_D (&vagg->info) != 0) {
+      gst_structure_set (s,
+          "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
+    }
+  }
+  gst_query_set_caps_result (query, caps);
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_mixer_src_query (GstAggregator * agg, GstQuery * query)
+{
   gboolean res = FALSE;
+  GstGLMixer *mix = GST_GL_MIXER (agg);
 
   switch (GST_QUERY_TYPE (query)) {
     case GST_QUERY_CONTEXT:
@@ -1055,43 +551,35 @@
           &mix->display);
       break;
     }
-    case GST_QUERY_POSITION:
-    {
-      GstFormat format;
-
-      gst_query_parse_position (query, &format, NULL);
-
-      switch (format) {
-        case GST_FORMAT_TIME:
-          gst_query_set_position (query, format,
-              gst_segment_to_stream_time (&mix->segment, GST_FORMAT_TIME,
-                  mix->segment.position));
-          res = TRUE;
-          break;
-        default:
-          break;
-      }
-      break;
-    }
-    case GST_QUERY_DURATION:
-      res = gst_gl_mixer_query_duration (mix, query);
-      break;
-    case GST_QUERY_LATENCY:
-      res = gst_gl_mixer_query_latency (mix, query);
-      break;
     case GST_QUERY_CAPS:
-      res = gst_gl_mixer_query_caps (pad, parent, query);
+      res = gst_gl_mixer_query_caps (agg->srcpad, agg, query);
       break;
     default:
-      /* FIXME, needs a custom query handler because we have multiple
-       * sinkpads, send to the master pad until then */
-      res = FALSE;
+      res = GST_AGGREGATOR_CLASS (parent_class)->src_query (agg, query);
       break;
   }
 
   return res;
 }
 
+static GstFlowReturn
+gst_gl_mixer_get_output_buffer (GstVideoAggregator * videoaggregator,
+    GstBuffer ** outbuf)
+{
+  GstGLMixer *mix = GST_GL_MIXER (videoaggregator);
+
+  if (!mix->priv->pool_active) {
+    if (!gst_buffer_pool_set_active (mix->priv->pool, TRUE)) {
+      GST_ELEMENT_ERROR (mix, RESOURCE, SETTINGS,
+          ("failed to activate bufferpool"), ("failed to activate bufferpool"));
+      return GST_FLOW_ERROR;
+    }
+    mix->priv->pool_active = TRUE;
+  }
+
+  return gst_buffer_pool_acquire_buffer (mix->priv->pool, outbuf, NULL);
+}
+
 static gboolean
 gst_gl_mixer_decide_allocation (GstGLMixer * mix, GstQuery * query)
 {
@@ -1105,6 +593,7 @@
   guint idx;
   guint out_width, out_height;
   GstGLContext *other_context = NULL;
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
 
   gst_query_parse_allocation (query, &caps, NULL);
 
@@ -1169,8 +658,8 @@
       goto context_error;
   }
 
-  out_width = GST_VIDEO_INFO_WIDTH (&mix->out_info);
-  out_height = GST_VIDEO_INFO_HEIGHT (&mix->out_info);
+  out_width = GST_VIDEO_INFO_WIDTH (&vagg->info);
+  out_height = GST_VIDEO_INFO_HEIGHT (&vagg->info);
 
   if (!gst_gl_context_gen_fbo (mix->context, out_width, out_height,
           &mix->fbo, &mix->depthbuffer))
@@ -1263,11 +752,12 @@
   GstBufferPool *pool = NULL;
   GstAllocator *allocator;
   GstAllocationParams params;
+  GstAggregator *agg = GST_AGGREGATOR (mix);
 
   /* find a pool for the negotiated caps now */
   GST_DEBUG_OBJECT (mix, "doing allocation query");
   query = gst_query_new_allocation (outcaps, TRUE);
-  if (!gst_pad_peer_query (mix->srcpad, query)) {
+  if (!gst_pad_peer_query (agg->srcpad, query)) {
     /* not a problem, just debug a little */
     GST_DEBUG_OBJECT (mix, "peer ALLOCATION query failed");
   }
@@ -1308,324 +798,23 @@
   }
 }
 
-static gboolean
-gst_gl_mixer_src_setcaps (GstPad * pad, GstGLMixer * mix, GstCaps * caps)
-{
-  GstGLMixerPrivate *priv = mix->priv;
-  GstVideoInfo info;
-  gboolean ret = TRUE;
-
-  GST_INFO_OBJECT (mix, "set src caps: %" GST_PTR_FORMAT, caps);
-
-  if (!gst_video_info_from_caps (&info, caps)) {
-    ret = FALSE;
-    goto done;
-  }
-
-  GST_GL_MIXER_LOCK (mix);
-
-  if (GST_VIDEO_INFO_FPS_N (&mix->out_info) != GST_VIDEO_INFO_FPS_N (&info) ||
-      GST_VIDEO_INFO_FPS_D (&mix->out_info) != GST_VIDEO_INFO_FPS_D (&info)) {
-    if (mix->segment.position != -1) {
-      mix->ts_offset = mix->segment.position - mix->segment.start;
-      mix->nframes = 0;
-    }
-    gst_gl_mixer_reset_qos (mix);
-  }
-
-  mix->out_info = info;
-
-  GST_GL_MIXER_UNLOCK (mix);
-
-  ret = gst_pad_set_caps (mix->srcpad, caps);
-
-  if (ret)
-    ret = gst_gl_mixer_do_bufferpool (mix, caps);
-done:
-  priv->negotiated = ret;
-
-  return ret;
-}
-
-static GstPad *
-gst_gl_mixer_request_new_pad (GstElement * element,
-    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
-{
-  GstGLMixer *mix;
-  GstGLMixerPad *mixpad;
-  GstElementClass *klass = GST_ELEMENT_GET_CLASS (element);
-
-  mix = GST_GL_MIXER (element);
-
-  if (templ == gst_element_class_get_pad_template (klass, "sink_%d")) {
-    gint serial = 0;
-    gchar *name = NULL;
-    GstGLMixerCollect *mixcol = NULL;
-
-    GST_GL_MIXER_LOCK (mix);
-    if (req_name == NULL || strlen (req_name) < 6
-        || !g_str_has_prefix (req_name, "sink_")) {
-      /* no name given when requesting the pad, use next available int */
-      serial = mix->next_sinkpad++;
-    } else {
-      /* parse serial number from requested padname */
-      serial = g_ascii_strtoull (&req_name[5], NULL, 10);
-      if (serial >= mix->next_sinkpad)
-        mix->next_sinkpad = serial + 1;
-    }
-    /* create new pad with the name */
-    name = g_strdup_printf ("sink_%d", serial);
-    mixpad = g_object_new (GST_TYPE_GL_MIXER_PAD, "name", name, "direction",
-        templ->direction, "template", templ, NULL);
-    g_free (name);
-
-    mixcol = (GstGLMixerCollect *)
-        gst_collect_pads_add_pad (mix->collect, GST_PAD (mixpad),
-        sizeof (GstGLMixerCollect),
-        (GstCollectDataDestroyNotify) gst_gl_mixer_collect_free, TRUE);
-
-    /* Keep track of each other */
-    mixcol->mixpad = mixpad;
-    mixpad->mixcol = mixcol;
-
-    mixcol->start_time = -1;
-    mixcol->end_time = -1;
-
-    /* Keep an internal list of mixpads for zordering */
-    mix->sinkpads = g_slist_append (mix->sinkpads, mixpad);
-    mix->numpads++;
-    GST_GL_MIXER_UNLOCK (mix);
-  } else {
-    return NULL;
-  }
-
-  GST_DEBUG_OBJECT (element, "Adding pad %s", GST_PAD_NAME (mixpad));
-
-  /* add the pad to the element */
-  gst_element_add_pad (element, GST_PAD (mixpad));
-  gst_child_proxy_child_added (GST_CHILD_PROXY (mix), G_OBJECT (mixpad),
-      GST_OBJECT_NAME (mixpad));
-
-  return GST_PAD (mixpad);
-}
-
-static void
-gst_gl_mixer_release_pad (GstElement * element, GstPad * pad)
-{
-  GstGLMixer *mix;
-  GstGLMixerPad *mixpad;
-  gboolean update_caps;
-
-  mix = GST_GL_MIXER (element);
-
-  GST_GL_MIXER_LOCK (mix);
-  if (G_UNLIKELY (g_slist_find (mix->sinkpads, pad) == NULL)) {
-    g_warning ("Unknown pad %s", GST_PAD_NAME (pad));
-    goto error;
-  }
-
-  mixpad = GST_GL_MIXER_PAD (pad);
-
-  mix->sinkpads = g_slist_remove (mix->sinkpads, pad);
-  gst_child_proxy_child_removed (GST_CHILD_PROXY (mix), G_OBJECT (mixpad),
-      GST_OBJECT_NAME (mixpad));
-  mix->numpads--;
-
-  update_caps =
-      GST_VIDEO_INFO_FORMAT (&mix->out_info) != GST_VIDEO_FORMAT_UNKNOWN;
-  GST_GL_MIXER_UNLOCK (mix);
-
-  gst_collect_pads_remove_pad (mix->collect, pad);
-
-  if (update_caps)
-    gst_gl_mixer_update_src_caps (mix);
-
-  gst_element_remove_pad (element, pad);
-  return;
-error:
-  GST_GL_MIXER_UNLOCK (mix);
-}
-
-/* try to get a buffer on all pads. As long as the queued value is
- * negative, we skip buffers */
-static gint
-gst_gl_mixer_fill_queues (GstGLMixer * mix,
-    GstClockTime output_start_time, GstClockTime output_end_time)
-{
-  GSList *l;
-  gboolean eos = TRUE;
-  gboolean need_more_data = FALSE;
-
-  for (l = mix->sinkpads; l; l = l->next) {
-    GstGLMixerPad *pad = l->data;
-    GstGLMixerCollect *mixcol = pad->mixcol;
-    GstSegment *segment = &pad->mixcol->collect.segment;
-    GstBuffer *buf;
-
-    buf = gst_collect_pads_peek (mix->collect, &mixcol->collect);
-    if (buf) {
-      GstClockTime start_time, end_time;
-
-      start_time = GST_BUFFER_TIMESTAMP (buf);
-      if (start_time == -1) {
-        gst_buffer_unref (buf);
-        GST_ERROR_OBJECT (pad, "Need timestamped buffers!");
-        return -2;
-      }
-
-      /* FIXME: Make all this work with negative rates */
-
-      if ((mixcol->buffer && start_time < GST_BUFFER_TIMESTAMP (mixcol->buffer))
-          || (mixcol->queued
-              && start_time < GST_BUFFER_TIMESTAMP (mixcol->queued))) {
-        GST_WARNING_OBJECT (pad, "Buffer from the past, dropping");
-        gst_buffer_unref (buf);
-        buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
-        gst_buffer_unref (buf);
-        need_more_data = TRUE;
-        continue;
-      }
-
-      if (mixcol->queued) {
-        end_time = start_time - GST_BUFFER_TIMESTAMP (mixcol->queued);
-        start_time = GST_BUFFER_TIMESTAMP (mixcol->queued);
-        gst_buffer_unref (buf);
-        buf = gst_buffer_ref (mixcol->queued);
-      } else {
-        end_time = GST_BUFFER_DURATION (buf);
-
-        if (end_time == -1) {
-          mixcol->queued = buf;
-          need_more_data = TRUE;
-          continue;
-        }
-      }
-
-      g_assert (start_time != -1 && end_time != -1);
-      end_time += start_time;   /* convert from duration to position */
-
-      if (mixcol->end_time != -1 && mixcol->end_time > end_time) {
-        GST_WARNING_OBJECT (pad, "Buffer from the past, dropping");
-        if (buf == mixcol->queued) {
-          gst_buffer_unref (buf);
-          gst_buffer_replace (&mixcol->queued, NULL);
-        } else {
-          gst_buffer_unref (buf);
-          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
-          gst_buffer_unref (buf);
-        }
-
-        need_more_data = TRUE;
-        continue;
-      }
-
-      /* Check if it's inside the segment */
-      if (start_time >= segment->stop || end_time < segment->start) {
-        GST_DEBUG_OBJECT (pad, "Buffer outside the segment");
-
-        if (buf == mixcol->queued) {
-          gst_buffer_unref (buf);
-          gst_buffer_replace (&mixcol->queued, NULL);
-        } else {
-          gst_buffer_unref (buf);
-          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
-          gst_buffer_unref (buf);
-        }
-
-        need_more_data = TRUE;
-        continue;
-      }
-
-      /* Clip to segment and convert to running time */
-      start_time = MAX (start_time, segment->start);
-      if (segment->stop != -1)
-        end_time = MIN (end_time, segment->stop);
-      start_time =
-          gst_segment_to_running_time (segment, GST_FORMAT_TIME, start_time);
-      end_time =
-          gst_segment_to_running_time (segment, GST_FORMAT_TIME, end_time);
-      g_assert (start_time != -1 && end_time != -1);
-
-      /* Convert to the output segment rate */
-      if (ABS (mix->segment.rate) != 1.0) {
-        start_time *= ABS (mix->segment.rate);
-        end_time *= ABS (mix->segment.rate);
-      }
-
-      if (end_time >= output_start_time && start_time < output_end_time) {
-        GST_DEBUG_OBJECT (pad,
-            "Taking new buffer with start time %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (start_time));
-        gst_buffer_replace (&mixcol->buffer, buf);
-        mixcol->start_time = start_time;
-        mixcol->end_time = end_time;
-
-        if (buf == mixcol->queued) {
-          gst_buffer_unref (buf);
-          gst_buffer_replace (&mixcol->queued, NULL);
-        } else {
-          gst_buffer_unref (buf);
-          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
-          gst_buffer_unref (buf);
-        }
-        eos = FALSE;
-      } else if (start_time >= output_end_time) {
-        GST_DEBUG_OBJECT (pad, "Keeping buffer until %" GST_TIME_FORMAT,
-            GST_TIME_ARGS (start_time));
-        gst_buffer_unref (buf);
-        eos = FALSE;
-      } else {
-        GST_DEBUG_OBJECT (pad, "Too old buffer -- dropping");
-        if (buf == mixcol->queued) {
-          gst_buffer_unref (buf);
-          gst_buffer_replace (&mixcol->queued, NULL);
-        } else {
-          gst_buffer_unref (buf);
-          buf = gst_collect_pads_pop (mix->collect, &mixcol->collect);
-          gst_buffer_unref (buf);
-        }
-
-        need_more_data = TRUE;
-        continue;
-      }
-    } else {
-      if (mixcol->end_time != -1) {
-        if (mixcol->end_time <= output_start_time) {
-          gst_buffer_replace (&mixcol->buffer, NULL);
-          mixcol->start_time = mixcol->end_time = -1;
-          if (!GST_COLLECT_PADS_STATE_IS_SET (mixcol,
-                  GST_COLLECT_PADS_STATE_EOS))
-            need_more_data = TRUE;
-        } else {
-          eos = FALSE;
-        }
-      }
-    }
-  }
-
-  if (need_more_data)
-    return 0;
-  if (eos)
-    return -1;
-
-  return 1;
-}
-
 gboolean
 gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf)
 {
-  GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (mix);
-  GSList *walk = mix->sinkpads;
+  guint i;
+  GList *walk;
+  guint out_tex;
+  gboolean res = TRUE;
+  guint array_index = 0;
   GstVideoFrame out_frame;
   gboolean out_gl_wrapped = FALSE;
-  guint out_tex;
-  guint array_index = 0;
-  guint i;
-  gboolean res = TRUE;
+  GstElement *element = GST_ELEMENT (mix);
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (mix);
+  GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (mix);
 
   GST_TRACE ("Processing buffers");
 
-  if (!gst_video_frame_map (&out_frame, &mix->out_info, outbuf,
+  if (!gst_video_frame_map (&out_frame, &vagg->info, outbuf,
           GST_MAP_WRITE | GST_MAP_GL)) {
     return FALSE;
   }
@@ -1645,42 +834,35 @@
     out_gl_wrapped = TRUE;
   }
 
-  while (walk) {                /* We walk with this list because it's ordered */
+  GST_OBJECT_LOCK (mix);
+  walk = element->sinkpads;
+
+  i = mix->frames->len;
+  g_ptr_array_set_size (mix->frames, element->numsinkpads);
+  for (; i < element->numsinkpads; i++)
+    mix->frames->pdata[i] = g_slice_new0 (GstGLMixerFrameData);
+  while (walk) {
     GstGLMixerPad *pad = GST_GL_MIXER_PAD (walk->data);
-    GstGLMixerCollect *mixcol = pad->mixcol;
+    GstVideoAggregatorPad *vaggpad = walk->data;
+    GstGLMixerFrameData *frame;
 
-    walk = g_slist_next (walk);
+    frame = g_ptr_array_index (mix->frames, array_index);
+    frame->pad = pad;
+    frame->texture = 0;
 
-    if (mixcol->buffer != NULL) {
-      GstClockTime timestamp;
-      gint64 stream_time;
-      GstSegment *seg;
+    walk = g_list_next (walk);
+
+    if (vaggpad->buffer != NULL) {
       guint in_tex;
-      GstGLMixerFrameData *frame;
-
-      frame = g_ptr_array_index (mix->frames, array_index);
-      frame->pad = pad;
-      frame->texture = 0;
-
-      seg = &mixcol->collect.segment;
-
-      timestamp = GST_BUFFER_TIMESTAMP (mixcol->buffer);
-
-      stream_time =
-          gst_segment_to_stream_time (seg, GST_FORMAT_TIME, timestamp);
-
-      /* sync object properties on stream time */
-      if (GST_CLOCK_TIME_IS_VALID (stream_time))
-        gst_object_sync_values (GST_OBJECT (pad), stream_time);
 
       if (!pad->upload) {
         pad->upload = gst_gl_upload_new (mix->context);
 
-        gst_gl_upload_set_format (pad->upload, &pad->in_info);
+        gst_gl_upload_set_format (pad->upload, &vaggpad->info);
       }
 
-      if (!gst_gl_upload_perform_with_buffer (pad->upload, mixcol->buffer,
-              &in_tex)) {
+      if (!gst_gl_upload_perform_with_buffer (pad->upload,
+              vaggpad->buffer, &in_tex)) {
         ++array_index;
         pad->mapped = FALSE;
         continue;
@@ -1706,7 +888,7 @@
 
 out:
   i = 0;
-  walk = mix->sinkpads;
+  walk = GST_ELEMENT (mix)->sinkpads;
   while (walk) {
     GstGLMixerPad *pad = GST_GL_MIXER_PAD (walk->data);
 
@@ -1714,526 +896,61 @@
       gst_gl_upload_release_buffer (pad->upload);
 
     pad->mapped = FALSE;
-    walk = g_slist_next (walk);
+    walk = g_list_next (walk);
     i++;
   }
+  GST_OBJECT_UNLOCK (mix);
 
   gst_video_frame_unmap (&out_frame);
 
   return res;
 }
 
-static void
+static gboolean
 gst_gl_mixer_process_buffers (GstGLMixer * mix, GstBuffer * outbuf)
 {
+  GList *walk;
+  guint i, array_index = 0;
+  GstElement *element = GST_ELEMENT (mix);
   GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (mix);
-  GSList *walk = mix->sinkpads;
-  guint array_index = 0;
 
+  GST_OBJECT_LOCK (mix);
+  walk = GST_ELEMENT (mix)->sinkpads;
+  i = mix->frames->len;
+  g_ptr_array_set_size (mix->frames, element->numsinkpads);
+  for (; i < element->numsinkpads; i++)
+    mix->frames->pdata[i] = g_slice_new0 (GstGLMixerFrameData);
   while (walk) {                /* We walk with this list because it's ordered */
-    GstGLMixerPad *pad = GST_GL_MIXER_PAD (walk->data);
-    GstGLMixerCollect *mixcol = pad->mixcol;
+    GstVideoAggregatorPad *vaggpad = walk->data;
 
-    walk = g_slist_next (walk);
+    walk = g_list_next (walk);
 
-    if (mixcol->buffer != NULL) {
-      GstClockTime timestamp;
-      gint64 stream_time;
-      GstSegment *seg;
-
-      seg = &mixcol->collect.segment;
-
-      timestamp = GST_BUFFER_TIMESTAMP (mixcol->buffer);
-
-      stream_time =
-          gst_segment_to_stream_time (seg, GST_FORMAT_TIME, timestamp);
-
-      /* sync object properties on stream time */
-      if (GST_CLOCK_TIME_IS_VALID (stream_time))
-        gst_object_sync_values (GST_OBJECT (pad), stream_time);
-
+    if (vaggpad->buffer != NULL) {
       /* put buffer into array */
-      mix->array_buffers->pdata[array_index] = mixcol->buffer;
+      mix->array_buffers->pdata[array_index] = vaggpad->buffer;
     }
     ++array_index;
   }
+  GST_OBJECT_UNLOCK (mix);
 
-  mix_class->process_buffers (mix, mix->array_buffers, outbuf);
+  return mix_class->process_buffers (mix, mix->array_buffers, outbuf);
 }
 
-/* Perform qos calculations before processing the next frame. Returns TRUE if
- * the frame should be processed, FALSE if the frame can be dropped entirely */
-static gint64
-gst_gl_mixer_do_qos (GstGLMixer * mix, GstClockTime timestamp)
-{
-  GstClockTime qostime, earliest_time;
-  gdouble proportion;
-  gint64 jitter;
 
-  /* no timestamp, can't do QoS => process frame */
-  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (timestamp))) {
-    GST_LOG_OBJECT (mix, "invalid timestamp, can't do QoS, process frame");
-    return -1;
-  }
-
-  /* get latest QoS observation values */
-  gst_gl_mixer_read_qos (mix, &proportion, &earliest_time);
-
-  /* skip qos if we have no observation (yet) => process frame */
-  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (earliest_time))) {
-    GST_LOG_OBJECT (mix, "no observation yet, process frame");
-    return -1;
-  }
-
-  /* qos is done on running time */
-  qostime =
-      gst_segment_to_running_time (&mix->segment, GST_FORMAT_TIME, timestamp);
-
-  /* see how our next timestamp relates to the latest qos timestamp */
-  GST_LOG_OBJECT (mix, "qostime %" GST_TIME_FORMAT ", earliest %"
-      GST_TIME_FORMAT, GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time));
-
-  jitter = GST_CLOCK_DIFF (qostime, earliest_time);
-  if (qostime != GST_CLOCK_TIME_NONE && jitter > 0) {
-    GST_DEBUG_OBJECT (mix, "we are late, drop frame");
-    return jitter;
-  }
-
-  GST_LOG_OBJECT (mix, "process frame");
-  return jitter;
-}
 
 static GstFlowReturn
-gst_gl_mixer_collected (GstCollectPads * pads, GstGLMixer * mix)
+gst_gl_mixer_aggregate_frames (GstVideoAggregator * vagg, GstBuffer * outbuf)
 {
-  GstGLMixerClass *mix_class;
-  GstFlowReturn ret;
-  GstClockTime output_start_time, output_end_time;
-  GstBuffer *outbuf = NULL;
-  gint res;
-  gint64 jitter;
+  gboolean res = FALSE;
+  GstGLMixer *mix = GST_GL_MIXER (vagg);
+  GstGLMixerClass *mix_class = GST_GL_MIXER_GET_CLASS (vagg);
 
-  g_return_val_if_fail (GST_IS_GL_MIXER (mix), GST_FLOW_ERROR);
+  if (mix_class->process_buffers)
+    res = gst_gl_mixer_process_buffers (mix, outbuf);
+  else if (mix_class->process_textures)
+    res = gst_gl_mixer_process_textures (mix, outbuf);
 
-  mix_class = GST_GL_MIXER_GET_CLASS (mix);
-
-  /* If we're not negotiated yet... */
-  if (GST_VIDEO_INFO_FORMAT (&mix->out_info) == GST_VIDEO_FORMAT_UNKNOWN) {
-    GST_ELEMENT_ERROR (mix, CORE, NEGOTIATION, ("not negotiated"), (NULL));
-    return GST_FLOW_NOT_NEGOTIATED;
-  }
-
-  if (g_atomic_int_compare_and_exchange (&mix->flush_stop_pending, TRUE, FALSE)) {
-    GST_DEBUG_OBJECT (mix, "pending flush stop");
-    gst_pad_push_event (mix->srcpad, gst_event_new_flush_stop (TRUE));
-  }
-
-  GST_GL_MIXER_LOCK (mix);
-
-  if (mix->newseg_pending) {
-    GST_DEBUG_OBJECT (mix, "Sending NEWSEGMENT event");
-    if (!gst_pad_push_event (mix->srcpad,
-            gst_event_new_segment (&mix->segment))) {
-      ret = GST_FLOW_ERROR;
-      goto error;
-    }
-    mix->newseg_pending = FALSE;
-  }
-
-  if (mix->segment.position == -1)
-    output_start_time = mix->segment.start;
-  else
-    output_start_time = mix->segment.position;
-
-  if (output_start_time >= mix->segment.stop) {
-    GST_DEBUG_OBJECT (mix, "Segment done");
-    gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
-    ret = GST_FLOW_EOS;
-    goto error;
-  }
-
-  output_end_time =
-      mix->ts_offset + gst_util_uint64_scale (mix->nframes + 1,
-      GST_SECOND * GST_VIDEO_INFO_FPS_D (&mix->out_info),
-      GST_VIDEO_INFO_FPS_N (&mix->out_info));
-  if (mix->segment.stop != -1)
-    output_end_time = MIN (output_end_time, mix->segment.stop);
-
-  GST_LOG ("got output times start:%" GST_TIME_FORMAT " end:%" GST_TIME_FORMAT,
-      GST_TIME_ARGS (output_start_time), GST_TIME_ARGS (output_end_time));
-
-  res = gst_gl_mixer_fill_queues (mix, output_start_time, output_end_time);
-
-  if (res == 0) {
-    GST_DEBUG_OBJECT (mix, "Need more data for decisions");
-    ret = GST_FLOW_OK;
-    goto error;
-  } else if (res == -1) {
-    GST_DEBUG_OBJECT (mix, "All sinkpads are EOS -- forwarding");
-    gst_pad_push_event (mix->srcpad, gst_event_new_eos ());
-    ret = GST_FLOW_EOS;
-    goto error;
-  } else if (res == -2) {
-    GST_ERROR_OBJECT (mix, "Error collecting buffers");
-    ret = GST_FLOW_ERROR;
-    goto error;
-  }
-
-  jitter = gst_gl_mixer_do_qos (mix, output_start_time);
-  if (jitter <= 0) {
-
-    if (!mix->priv->pool_active) {
-      if (!gst_buffer_pool_set_active (mix->priv->pool, TRUE)) {
-        GST_ELEMENT_ERROR (mix, RESOURCE, SETTINGS,
-            ("failed to activate bufferpool"),
-            ("failed to activate bufferpool"));
-        ret = GST_FLOW_ERROR;
-        goto error;
-      }
-      mix->priv->pool_active = TRUE;
-    }
-
-    ret = gst_buffer_pool_acquire_buffer (mix->priv->pool, &outbuf, NULL);
-    if (ret != GST_FLOW_OK)
-      goto error;
-
-    GST_BUFFER_TIMESTAMP (outbuf) = output_start_time;
-    GST_BUFFER_DURATION (outbuf) = output_end_time - output_start_time;
-
-    if (!mix_class->process_buffers && !mix_class->process_textures) {
-      ret = GST_FLOW_ERROR;
-      g_assert_not_reached ();
-      goto error;
-    }
-
-    if (mix_class->process_buffers)
-      gst_gl_mixer_process_buffers (mix, outbuf);
-    else if (mix_class->process_textures)
-      gst_gl_mixer_process_textures (mix, outbuf);
-
-    mix->qos_processed++;
-  } else {
-    GstMessage *msg;
-
-    mix->qos_dropped++;
-
-    /* TODO: live */
-    msg =
-        gst_message_new_qos (GST_OBJECT_CAST (mix), FALSE,
-        gst_segment_to_running_time (&mix->segment, GST_FORMAT_TIME,
-            output_start_time), gst_segment_to_stream_time (&mix->segment,
-            GST_FORMAT_TIME, output_start_time), output_start_time,
-        output_end_time - output_start_time);
-    gst_message_set_qos_values (msg, jitter, mix->proportion, 1000000);
-    gst_message_set_qos_stats (msg, GST_FORMAT_BUFFERS, mix->qos_processed,
-        mix->qos_dropped);
-    gst_element_post_message (GST_ELEMENT_CAST (mix), msg);
-
-    ret = GST_FLOW_OK;
-  }
-
-  mix->segment.position = output_end_time;
-  mix->nframes++;
-
-  GST_GL_MIXER_UNLOCK (mix);
-  if (outbuf) {
-    GST_LOG_OBJECT (mix,
-        "Pushing buffer with ts %" GST_TIME_FORMAT " and duration %"
-        GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
-        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
-    ret = gst_pad_push (mix->srcpad, outbuf);
-  }
-
-done:
-  return ret;
-
-  /* ERRORS */
-error:
-  {
-    GST_GL_MIXER_UNLOCK (mix);
-    goto done;
-  }
-}
-
-static gboolean
-forward_event_func (GValue * item, GValue * ret, GstEvent * event)
-{
-  GstPad *pad = g_value_get_object (item);
-  gst_event_ref (event);
-  GST_LOG_OBJECT (pad, "About to send event %s", GST_EVENT_TYPE_NAME (event));
-  if (!gst_pad_push_event (pad, event)) {
-    g_value_set_boolean (ret, FALSE);
-    GST_WARNING_OBJECT (pad, "Sending event  %p (%s) failed.",
-        event, GST_EVENT_TYPE_NAME (event));
-  } else {
-    GST_LOG_OBJECT (pad, "Sent event  %p (%s).",
-        event, GST_EVENT_TYPE_NAME (event));
-  }
-  return TRUE;
-}
-
-/* forwards the event to all sinkpads, takes ownership of the
- * event
- *
- * Returns: TRUE if the event could be forwarded on all
- * sinkpads.
- */
-static gboolean
-gst_gl_mixer_push_sink_event (GstGLMixer * mix, GstEvent * event)
-{
-  GstIterator *it;
-  GValue vret = { 0 };
-
-  GST_LOG_OBJECT (mix, "Forwarding event %p (%s)", event,
-      GST_EVENT_TYPE_NAME (event));
-
-  g_value_init (&vret, G_TYPE_BOOLEAN);
-  g_value_set_boolean (&vret, TRUE);
-  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix));
-  gst_iterator_fold (it, (GstIteratorFoldFunction) forward_event_func, &vret,
-      event);
-  gst_iterator_free (it);
-  gst_event_unref (event);
-
-  return g_value_get_boolean (&vret);
-}
-
-static GstFlowReturn
-gst_gl_mixer_sink_clip (GstCollectPads * pads,
-    GstCollectData * data, GstBuffer * buf, GstBuffer ** outbuf,
-    GstGLMixer * mix)
-{
-  GstGLMixerPad *pad = GST_GL_MIXER_PAD (data->pad);
-  GstGLMixerCollect *mixcol = pad->mixcol;
-  GstClockTime start_time, end_time;
-
-  start_time = GST_BUFFER_TIMESTAMP (buf);
-  if (start_time == -1) {
-    GST_ERROR_OBJECT (pad, "Timestamped buffers required!");
-    gst_buffer_unref (buf);
-    return GST_FLOW_ERROR;
-  }
-
-  end_time = GST_BUFFER_DURATION (buf);
-  if (end_time == -1)
-    end_time =
-        gst_util_uint64_scale_int (GST_SECOND,
-        GST_VIDEO_INFO_FPS_D (&pad->in_info),
-        GST_VIDEO_INFO_FPS_N (&pad->in_info));
-  if (end_time == -1) {
-    *outbuf = buf;
-    return GST_FLOW_OK;
-  }
-
-  start_time = MAX (start_time, mixcol->collect.segment.start);
-  start_time =
-      gst_segment_to_running_time (&mixcol->collect.segment,
-      GST_FORMAT_TIME, start_time);
-
-  end_time += GST_BUFFER_TIMESTAMP (buf);
-  if (mixcol->collect.segment.stop != -1)
-    end_time = MIN (end_time, mixcol->collect.segment.stop);
-  end_time =
-      gst_segment_to_running_time (&mixcol->collect.segment,
-      GST_FORMAT_TIME, end_time);
-
-  /* Convert to the output segment rate */
-  if (ABS (mix->segment.rate) != 1.0) {
-    start_time *= ABS (mix->segment.rate);
-    end_time *= ABS (mix->segment.rate);
-  }
-
-  if (mixcol->buffer != NULL && end_time < mixcol->end_time) {
-    gst_buffer_unref (buf);
-    *outbuf = NULL;
-    return GST_FLOW_OK;
-  }
-
-  *outbuf = buf;
-  return GST_FLOW_OK;
-}
-
-static gboolean
-gst_gl_mixer_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
-{
-  GstGLMixer *mix = GST_GL_MIXER (parent);
-  gboolean result;
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_QOS:
-    {
-      GstQOSType type;
-      GstClockTimeDiff diff;
-      GstClockTime timestamp;
-      gdouble proportion;
-
-      gst_event_parse_qos (event, &type, &proportion, &diff, &timestamp);
-
-      gst_gl_mixer_update_qos (mix, proportion, diff, timestamp);
-
-      result = gst_gl_mixer_push_sink_event (mix, event);
-      break;
-    }
-    case GST_EVENT_SEEK:
-    {
-      gdouble rate;
-      GstFormat fmt;
-      GstSeekFlags flags;
-      GstSeekType start_type, stop_type;
-      gint64 start, stop;
-      GSList *l;
-      gdouble abs_rate;
-
-      /* parse the seek parameters */
-      gst_event_parse_seek (event, &rate, &fmt, &flags, &start_type,
-          &start, &stop_type, &stop);
-
-      if (rate <= 0.0) {
-        GST_ERROR_OBJECT (mix, "Negative rates not supported yet");
-        result = FALSE;
-        gst_event_unref (event);
-        break;
-      }
-
-      GST_DEBUG_OBJECT (mix, "Handling SEEK event");
-
-      /* check if we are flushing */
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        /* flushing seek, start flush downstream, the flush will be done
-         * when all pads received a FLUSH_STOP. */
-        gst_pad_push_event (mix->srcpad, gst_event_new_flush_start ());
-
-        /* make sure we accept nothing anymore and return WRONG_STATE */
-        gst_collect_pads_set_flushing (mix->collect, TRUE);
-      }
-
-      /* now wait for the collected to be finished and mark a new
-       * segment */
-      GST_COLLECT_PADS_STREAM_LOCK (mix->collect);
-
-      abs_rate = ABS (rate);
-
-      GST_GL_MIXER_LOCK (mix);
-      for (l = mix->sinkpads; l; l = l->next) {
-        GstGLMixerPad *p = l->data;
-
-        if (flags & GST_SEEK_FLAG_FLUSH) {
-          gst_buffer_replace (&p->mixcol->buffer, NULL);
-          p->mixcol->start_time = p->mixcol->end_time = -1;
-          continue;
-        }
-
-        /* Convert to the output segment rate */
-        if (ABS (mix->segment.rate) != abs_rate) {
-          if (ABS (mix->segment.rate) != 1.0 && p->mixcol->buffer) {
-            p->mixcol->start_time /= ABS (mix->segment.rate);
-            p->mixcol->end_time /= ABS (mix->segment.rate);
-          }
-          if (abs_rate != 1.0 && p->mixcol->buffer) {
-            p->mixcol->start_time *= abs_rate;
-            p->mixcol->end_time *= abs_rate;
-          }
-        }
-      }
-      GST_GL_MIXER_UNLOCK (mix);
-
-      gst_segment_do_seek (&mix->segment, rate, fmt, flags, start_type, start,
-          stop_type, stop, NULL);
-      mix->segment.position = -1;
-      mix->ts_offset = 0;
-      mix->nframes = 0;
-      mix->newseg_pending = TRUE;
-
-      if (flags & GST_SEEK_FLAG_FLUSH) {
-        gst_collect_pads_set_flushing (mix->collect, FALSE);
-
-        /* we can't send FLUSH_STOP here since upstream could start pushing data
-         * after we unlock mix->collect.
-         * We set flush_stop_pending to TRUE instead and send FLUSH_STOP after
-         * forwarding the seek upstream or from gst_gl_mixer_collected,
-         * whichever happens first.
-         */
-        mix->flush_stop_pending = TRUE;
-      }
-
-      GST_COLLECT_PADS_STREAM_UNLOCK (mix->collect);
-
-      gst_gl_mixer_reset_qos (mix);
-
-      result = gst_gl_mixer_push_sink_event (mix, event);
-
-      if (g_atomic_int_compare_and_exchange (&mix->flush_stop_pending, TRUE,
-              FALSE)) {
-        GST_DEBUG_OBJECT (mix, "pending flush stop");
-        gst_pad_push_event (mix->srcpad, gst_event_new_flush_stop (TRUE));
-      }
-
-      break;
-    }
-    case GST_EVENT_NAVIGATION:
-      /* navigation is rather pointless. */
-      result = FALSE;
-      gst_event_unref (event);
-      break;
-    default:
-      /* just forward the rest for now */
-      result = gst_gl_mixer_push_sink_event (mix, event);
-      break;
-  }
-
-  return result;
-}
-
-static gboolean
-gst_gl_mixer_sink_event (GstCollectPads * pads, GstCollectData * cdata,
-    GstEvent * event, GstGLMixer * mix)
-{
-  GstGLMixerPad *pad = GST_GL_MIXER_PAD (cdata->pad);
-  gboolean ret = TRUE;
-
-  GST_DEBUG_OBJECT (pad, "Got %s event on pad %s:%s",
-      GST_EVENT_TYPE_NAME (event), GST_DEBUG_PAD_NAME (pad));
-
-  switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_CAPS:
-    {
-      GstCaps *caps;
-
-      gst_event_parse_caps (event, &caps);
-      ret =
-          gst_gl_mixer_pad_sink_setcaps (GST_PAD (pad), GST_OBJECT (mix), caps);
-      gst_event_unref (event);
-      event = NULL;
-      break;
-    }
-    case GST_EVENT_SEGMENT:{
-      GstSegment seg;
-      gst_event_copy_segment (event, &seg);
-
-      g_assert (seg.format == GST_FORMAT_TIME);
-      break;
-    }
-    case GST_EVENT_FLUSH_STOP:
-      mix->newseg_pending = TRUE;
-      mix->flush_stop_pending = FALSE;
-      gst_gl_mixer_reset_qos (mix);
-      gst_buffer_replace (&pad->mixcol->buffer, NULL);
-      pad->mixcol->start_time = -1;
-      pad->mixcol->end_time = -1;
-
-      gst_segment_init (&mix->segment, GST_FORMAT_TIME);
-      mix->segment.position = -1;
-      mix->ts_offset = 0;
-      mix->nframes = 0;
-      break;
-    default:
-      break;
-  }
-
-  if (event != NULL)
-    return gst_collect_pads_event_default (pads, cdata, event, FALSE);
-
-  return ret;
+  return res ? GST_FLOW_OK : GST_FLOW_ERROR;
 }
 
 static void
@@ -2258,109 +975,101 @@
   }
 }
 
-static GstStateChangeReturn
-gst_gl_mixer_change_state (GstElement * element, GstStateChange transition)
+static gboolean
+_clean_upload (GstAggregator * agg, GstPad * aggpad, gpointer udata)
 {
-  GstGLMixer *mix;
-  GstStateChangeReturn ret;
-  GstGLMixerClass *mixer_class;
+  GstGLMixerPad *pad = GST_GL_MIXER_PAD (aggpad);
 
-  g_return_val_if_fail (GST_IS_GL_MIXER (element), GST_STATE_CHANGE_FAILURE);
-
-  mix = GST_GL_MIXER (element);
-  mixer_class = GST_GL_MIXER_GET_CLASS (mix);
-
-  switch (transition) {
-    case GST_STATE_CHANGE_READY_TO_PAUSED:
-    {
-      guint i;
-
-      mix->array_buffers = g_ptr_array_new_full (mix->numpads, NULL);
-      mix->frames = g_ptr_array_new_full (mix->numpads, NULL);
-
-      g_ptr_array_set_size (mix->array_buffers, mix->numpads);
-      g_ptr_array_set_size (mix->frames, mix->numpads);
-
-      for (i = 0; i < mix->numpads; i++) {
-        mix->frames->pdata[i] = g_slice_new0 (GstGLMixerFrameData);
-      }
-
-      GST_LOG_OBJECT (mix, "starting collectpads");
-      gst_collect_pads_start (mix->collect);
-      break;
-    }
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-    {
-      guint i;
-      GSList *walk = mix->sinkpads;
-
-      GST_LOG_OBJECT (mix, "stopping collectpads");
-      gst_collect_pads_stop (mix->collect);
-
-      for (i = 0; i < mix->numpads; i++) {
-        g_slice_free1 (sizeof (GstGLMixerFrameData), mix->frames->pdata[i]);
-      }
-
-      g_ptr_array_free (mix->array_buffers, TRUE);
-      g_ptr_array_free (mix->frames, TRUE);
-
-      if (mixer_class->reset)
-        mixer_class->reset (mix);
-      if (mix->fbo) {
-        gst_gl_context_del_fbo (mix->context, mix->fbo, mix->depthbuffer);
-        mix->fbo = 0;
-        mix->depthbuffer = 0;
-      }
-      if (mix->download) {
-        gst_object_unref (mix->download);
-        mix->download = NULL;
-      }
-
-      while (walk) {
-        GstGLMixerPad *pad = (GstGLMixerPad *) (walk->data);
-
-        if (pad->upload) {
-          gst_object_unref (pad->upload);
-          pad->upload = NULL;
-        }
-
-        walk = walk->next;
-      }
-
-      if (mix->priv->query) {
-        gst_query_unref (mix->priv->query);
-        mix->priv->query = NULL;
-      }
-
-      if (mix->priv->pool) {
-        gst_object_unref (mix->priv->pool);
-        mix->priv->pool = NULL;
-      }
-
-      if (mix->display) {
-        gst_object_unref (mix->display);
-        mix->display = NULL;
-      }
-
-      if (mix->context) {
-        gst_object_unref (mix->context);
-        mix->context = NULL;
-      }
-      break;
-    }
-    default:
-      break;
+  if (pad->upload) {
+    gst_object_unref (pad->upload);
+    pad->upload = NULL;
   }
 
-  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+  return TRUE;
+}
 
-  switch (transition) {
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_gl_mixer_reset (mix);
-      break;
-    default:
-      break;
+static void
+_free_glmixer_frame_data (GstGLMixerFrameData * frame)
+{
+  g_slice_free1 (sizeof (GstGLMixerFrameData), frame);
+}
+
+static gboolean
+gst_gl_mixer_start (GstAggregator * agg)
+{
+  guint i;
+  GstGLMixer *mix = GST_GL_MIXER (agg);
+  GstElement *element = GST_ELEMENT (agg);
+
+  if (!GST_AGGREGATOR_CLASS (parent_class)->start (agg))
+    return FALSE;
+
+  GST_OBJECT_LOCK (mix);
+  mix->array_buffers = g_ptr_array_new_full (element->numsinkpads,
+      (GDestroyNotify) _free_glmixer_frame_data);
+  mix->frames = g_ptr_array_new_full (element->numsinkpads, NULL);
+
+  g_ptr_array_set_size (mix->array_buffers, element->numsinkpads);
+  g_ptr_array_set_size (mix->frames, element->numsinkpads);
+
+  for (i = 0; i < element->numsinkpads; i++)
+    mix->frames->pdata[i] = g_slice_new0 (GstGLMixerFrameData);
+
+  GST_OBJECT_UNLOCK (mix);
+
+  return TRUE;
+}
+
+static gboolean
+gst_gl_mixer_stop (GstAggregator * agg)
+{
+  guint i;
+  GstGLMixer *mix = GST_GL_MIXER (agg);
+  GstGLMixerClass *mixer_class = GST_GL_MIXER_GET_CLASS (mix);
+
+  if (!GST_AGGREGATOR_CLASS (parent_class)->stop (agg))
+    return FALSE;
+
+  GST_OBJECT_LOCK (agg);
+  for (i = 0; i < GST_ELEMENT (agg)->numsinkpads; i++) {
+    g_slice_free1 (sizeof (GstGLMixerFrameData), mix->frames->pdata[i]);
+  }
+  GST_OBJECT_UNLOCK (agg);
+
+  if (mixer_class->reset)
+    mixer_class->reset (mix);
+  if (mix->fbo) {
+    gst_gl_context_del_fbo (mix->context, mix->fbo, mix->depthbuffer);
+    mix->fbo = 0;
+    mix->depthbuffer = 0;
+  }
+  if (mix->download) {
+    gst_object_unref (mix->download);
+    mix->download = NULL;
   }
 
-  return ret;
+  gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (mix), _clean_upload, NULL);
+
+  if (mix->priv->query) {
+    gst_query_unref (mix->priv->query);
+    mix->priv->query = NULL;
+  }
+
+  if (mix->priv->pool) {
+    gst_object_unref (mix->priv->pool);
+    mix->priv->pool = NULL;
+  }
+
+  if (mix->display) {
+    gst_object_unref (mix->display);
+    mix->display = NULL;
+  }
+
+  if (mix->context) {
+    gst_object_unref (mix->context);
+    mix->context = NULL;
+  }
+  gst_gl_mixer_reset (mix);
+
+  return TRUE;
 }
diff --git a/gst-libs/gst/gl/gstglmixer.h b/gst-libs/gst/gl/gstglmixer.h
index 41dd482..c056e6a 100644
--- a/gst-libs/gst/gl/gstglmixer.h
+++ b/gst-libs/gst/gl/gstglmixer.h
@@ -55,43 +55,19 @@
 
 struct _GstGLMixer
 {
-  GstElement element;
+  GstVideoAggregator vaggregator;
 
   GstGLMixerPrivate *priv;
 
-  /* pad */
-  GstPad *srcpad;
-
   /* Lock to prevent the state to change while blending */
   GMutex lock;
-  /* Sink pads using Collect Pads from core's base library */
-  GstCollectPads *collect;
-
-  /* sinkpads, a GSList of GstGLMixerPads */
-  GSList *sinkpads;
-  gint numpads;
-  /* Next available sinkpad index */
-  gint next_sinkpad;
 
   GPtrArray *array_buffers;
   GPtrArray *frames;
 
-  GstVideoInfo out_info;
   GLuint out_tex_id;
   GstGLDownload *download;
 
-  gboolean newseg_pending;
-  gboolean flush_stop_pending;
-
-  GstSegment segment;
-  GstClockTime ts_offset;
-  guint64 nframes;
-
-  /* sink event handling */
-  gdouble proportion;
-  GstClockTime earliest_time;
-  guint64 qos_processed, qos_dropped;
-
   GstGLDisplay *display;
   GstGLContext *context;
   GLuint fbo;
@@ -100,7 +76,7 @@
 
 struct _GstGLMixerClass
 {
-  GstElementClass parent_class;
+  GstVideoAggregatorClass parent_class;
 
   GstGLMixerSetCaps set_caps;
   GstGLMixerReset reset;
diff --git a/gst-libs/gst/gl/gstglmixerpad.h b/gst-libs/gst/gl/gstglmixerpad.h
index 31f1d99..d2fb829 100644
--- a/gst-libs/gst/gl/gstglmixerpad.h
+++ b/gst-libs/gst/gl/gstglmixerpad.h
@@ -22,7 +22,7 @@
 #define __GST_GL_MIXER_PAD_H__
 
 #include <gst/gst.h>
-#include <gst/base/gstcollectpads.h>
+#include <gst/video/gstvideoaggregator.h>
 
 #include <gst/gl/gstgldisplay.h>
 #include <gst/gl/gstglupload.h>
@@ -41,38 +41,21 @@
 
 typedef struct _GstGLMixerPad GstGLMixerPad;
 typedef struct _GstGLMixerPadClass GstGLMixerPadClass;
-typedef struct _GstGLMixerCollect GstGLMixerCollect;
-
-struct _GstGLMixerCollect
-{
-  GstCollectData collect;       /* we extend the CollectData */
-
-  GstBuffer *queued;
-
-  GstBuffer *buffer;            /* the queued buffer for this pad */
-  GstClockTime start_time;
-  GstClockTime end_time;
-
-  GstGLMixerPad *mixpad;
-};
 
 /* all information needed for one video stream */
 struct _GstGLMixerPad
 {
-  GstPad parent;                /* subclass the pad */
+  GstVideoAggregatorPad parent;                /* subclass the pad */
 
   /* <private> */
   GstGLUpload *upload;
-  GstVideoInfo in_info;
   guint in_tex_id;
   gboolean mapped;
-
-  GstGLMixerCollect *mixcol;
 };
 
 struct _GstGLMixerPadClass
 {
-  GstPadClass parent_class;
+  GstVideoAggregatorPadClass parent_class;
 };
 
 GType gst_gl_mixer_pad_get_type (void);
diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
index f274b77..de56223 100644
--- a/gst-libs/gst/gl/gstglshader.c
+++ b/gst-libs/gst/gl/gstglshader.c
@@ -59,11 +59,11 @@
 #define GST_GL_SHADER_GET_PRIVATE(o)					\
   (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_SHADER, GstGLShaderPrivate))
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 typedef struct _GstGLShaderVTable
 {
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index fb87153..ed54dfe 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -41,49 +41,31 @@
  * A #GstGLUpload can be created with gst_gl_upload_new()
  */
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_api (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static gboolean _upload_memory (GstGLUpload * upload);
-//static gboolean _do_upload_fill (GstGLContext * context, GstGLUpload * upload);
-//static gboolean _do_upload_make (GstGLContext * context, GstGLUpload * upload);
 static gboolean _init_upload (GstGLUpload * upload);
-//static gboolean _init_upload_fbo (GstGLContext * context, GstGLUpload * upload);
 static gboolean _gst_gl_upload_perform_with_data_unlocked (GstGLUpload * upload,
-    GLuint texture_id, gpointer data[GST_VIDEO_MAX_PLANES]);
+    GLuint * texture_id, gpointer data[GST_VIDEO_MAX_PLANES]);
 static void _do_upload_with_meta (GstGLContext * context, GstGLUpload * upload);
 static void gst_gl_upload_reset (GstGLUpload * upload);
 
-/* *INDENT-OFF* */
-
-#define YUV_TO_RGB_COEFFICIENTS \
-      "uniform vec3 offset;\n" \
-      "uniform vec3 rcoeff;\n" \
-      "uniform vec3 gcoeff;\n" \
-      "uniform vec3 bcoeff;\n"
-
-/* FIXME: use the colormatrix support from videoconvert */
-struct TexData
-{
-  guint format, type, width, height;
-  gfloat tex_scaling[2];
-  guint unpack_length;
-};
-
 struct _GstGLUploadPrivate
 {
   gboolean result;
-
-  struct TexData texture_info[GST_VIDEO_MAX_PLANES];
-
-  GstBuffer *buffer;
-  GstVideoFrame frame;
-  GstVideoGLTextureUploadMeta *meta;
   guint tex_id;
+
   gboolean mapped;
+  GstVideoFrame frame;
+
+  GstVideoGLTextureUploadMeta *meta;
+
+  GstBuffer *outbuf;
+  gboolean released;
 };
 
 GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_debug);
@@ -92,10 +74,10 @@
 #define DEBUG_INIT \
   GST_DEBUG_CATEGORY_INIT (gst_gl_upload_debug, "glupload", 0, "upload");
 
-G_DEFINE_TYPE_WITH_CODE (GstGLUpload, gst_gl_upload, GST_TYPE_OBJECT, DEBUG_INIT);
+G_DEFINE_TYPE_WITH_CODE (GstGLUpload, gst_gl_upload, GST_TYPE_OBJECT,
+    DEBUG_INIT);
 static void gst_gl_upload_finalize (GObject * object);
 
-
 #define GST_GL_UPLOAD_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
     GST_TYPE_GL_UPLOAD, GstGLUploadPrivate))
 
@@ -116,8 +98,6 @@
   upload->priv->tex_id = 0;
 
   gst_video_info_set_format (&upload->in_info, GST_VIDEO_FORMAT_ENCODED, 0, 0);
-
-  g_mutex_init (&upload->lock);
 }
 
 /**
@@ -153,8 +133,6 @@
     upload->context = NULL;
   }
 
-  g_mutex_clear (&upload->lock);
-
   G_OBJECT_CLASS (gst_gl_upload_parent_class)->finalize (object);
 }
 
@@ -184,11 +162,13 @@
       upload->in_tex[i] = NULL;
     }
   }
+
+  gst_gl_upload_release_buffer (upload);
 }
 
 static void
 _gst_gl_upload_set_format_unlocked (GstGLUpload * upload,
-    GstVideoInfo *in_info)
+    GstVideoInfo * in_info)
 {
   g_return_if_fail (upload != NULL);
   g_return_if_fail (GST_VIDEO_INFO_FORMAT (in_info) !=
@@ -205,7 +185,6 @@
   upload->initted = FALSE;
 }
 
-
 /**
  * gst_gl_upload_set_format:
  * @upload: a #GstGLUpload
@@ -216,11 +195,9 @@
 void
 gst_gl_upload_set_format (GstGLUpload * upload, GstVideoInfo * in_info)
 {
-  g_mutex_lock (&upload->lock);
-
+  GST_OBJECT_LOCK (upload);
   _gst_gl_upload_set_format_unlocked (upload, in_info);
-
-  g_mutex_unlock (&upload->lock);
+  GST_OBJECT_UNLOCK (upload);
 }
 
 /**
@@ -234,11 +211,9 @@
 {
   GstVideoInfo *ret;
 
-  g_mutex_lock (&upload->lock);
-
+  GST_OBJECT_LOCK (upload);
   ret = &upload->in_info;
-
-  g_mutex_unlock (&upload->lock);
+  GST_OBJECT_UNLOCK (upload);
 
   return ret;
 }
@@ -269,6 +244,8 @@
   g_return_val_if_fail (tex_id != NULL, FALSE);
   g_return_val_if_fail (gst_buffer_n_memory (buffer) > 0, FALSE);
 
+  gst_gl_upload_release_buffer (upload);
+
   /* GstGLMemory */
   mem = gst_buffer_peek_memory (buffer, 0);
 
@@ -283,12 +260,6 @@
       return TRUE;
     }
 
-    if (!upload->out_tex)
-      upload->out_tex = (GstGLMemory *) gst_gl_memory_alloc (upload->context,
-          GST_VIDEO_GL_TEXTURE_TYPE_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),
-          GST_VIDEO_INFO_HEIGHT (&upload->in_info),
-          4 * GST_VIDEO_INFO_WIDTH (&upload->in_info));
-
     GST_LOG_OBJECT (upload, "Attempting upload with GstGLMemory");
     for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->in_info); i++) {
       upload->in_tex[i] = (GstGLMemory *) gst_buffer_peek_memory (buffer, i);
@@ -302,11 +273,10 @@
     }
     return ret;
   }
-
 #if GST_GL_HAVE_PLATFORM_EGL
   if (!upload->priv->tex_id && gst_is_egl_image_memory (mem))
     gst_gl_context_gen_texture (upload->context, &upload->priv->tex_id,
-          GST_VIDEO_FORMAT_RGBA, 0, 0);
+        GST_VIDEO_FORMAT_RGBA, 0, 0);
 #endif
 
   if (!upload->priv->tex_id)
@@ -339,22 +309,16 @@
     GST_ERROR_OBJECT (upload, "Failed to map memory");
     return FALSE;
   }
+  upload->priv->mapped = TRUE;
 
   /* update the video info from the one updated by frame_map using video meta */
   gst_gl_upload_set_format (upload, &upload->priv->frame.info);
 
-  if (!upload->priv->tex_id)
-    gst_gl_context_gen_texture (upload->context, &upload->priv->tex_id,
-        GST_VIDEO_FORMAT_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),
-        GST_VIDEO_INFO_HEIGHT (&upload->in_info));
-
-  if (!gst_gl_upload_perform_with_data (upload, upload->priv->tex_id,
+  if (!gst_gl_upload_perform_with_data (upload, tex_id,
           upload->priv->frame.data)) {
     return FALSE;
   }
 
-  upload->priv->mapped = TRUE;
-  *tex_id = upload->priv->tex_id;
   return TRUE;
 }
 
@@ -365,57 +329,14 @@
 
   if (upload->priv->mapped)
     gst_video_frame_unmap (&upload->priv->frame);
-}
+  upload->priv->mapped = FALSE;
 
-/*
- * Uploads as a result of a call to gst_video_gl_texture_upload_meta_upload().
- * i.e. provider of GstVideoGLTextureUploadMeta
- */
-static gboolean
-_do_upload_for_meta (GstGLUpload * upload, GstVideoGLTextureUploadMeta * meta)
-{
-  GstVideoInfo in_info;
-  GstVideoFrame frame;
-  GstMemory *mem;
-  gboolean ret;
-
-  g_return_val_if_fail (upload != NULL, FALSE);
-  g_return_val_if_fail (meta != NULL, FALSE);
-
-  /* GstGLMemory */
-  mem = gst_buffer_peek_memory (upload->priv->buffer, 0);
-
-  if (gst_is_gl_memory (mem)) {
-    GstGLMemory *gl_mem = (GstGLMemory *) mem;
-
-    upload->in_tex[0] = gl_mem;
-    ret = _upload_memory (upload);
-    upload->in_tex[0] = NULL;
-
-    if (ret)
-      return TRUE;
+  if (upload->priv->outbuf) {
+    gst_buffer_unref (upload->priv->outbuf);
+    upload->priv->outbuf = NULL;
   }
 
-  if (!gst_video_frame_map (&frame, &in_info, upload->priv->buffer,
-          GST_MAP_READ)) {
-    GST_ERROR ("failed to map video frame");
-    return FALSE;
-  }
-
-  /* update the video info from the one updated by frame_map using video meta */
-  gst_gl_upload_set_format (upload, &upload->priv->frame.info);
-
-  if (!upload->priv->tex_id)
-    gst_gl_context_gen_texture (upload->context, &upload->priv->tex_id,
-        GST_VIDEO_FORMAT_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),
-        GST_VIDEO_INFO_HEIGHT (&upload->in_info));
-
-  ret = _gst_gl_upload_perform_with_data_unlocked (upload,
-      upload->out_tex->tex_id, frame.data);
-
-  gst_video_frame_unmap (&frame);
-
-  return ret;
+  upload->priv->released = TRUE;
 }
 
 /*
@@ -466,7 +387,7 @@
     return FALSE;
   }
 
-  g_mutex_lock (&upload->lock);
+  GST_OBJECT_LOCK (upload);
 
   upload->priv->meta = meta;
   if (!upload->priv->tex_id)
@@ -482,107 +403,15 @@
 
   ret = upload->priv->result;
 
-  g_mutex_unlock (&upload->lock);
+  GST_OBJECT_UNLOCK (upload);
 
   return ret;
 }
 
-static gboolean
-_gst_gl_upload_perform_for_gl_texture_upload_meta (GstVideoGLTextureUploadMeta *
-    meta, guint texture_id[4])
-{
-  GstGLUpload *upload;
-  gboolean ret;
-
-  g_return_val_if_fail (meta != NULL, FALSE);
-  g_return_val_if_fail (texture_id != NULL, FALSE);
-
-  upload = meta->user_data;
-
-  g_mutex_lock (&upload->lock);
-
-  if (!upload->initted) {
-    GstVideoInfo in_info;
-    GstVideoMeta *v_meta = gst_buffer_get_video_meta (upload->priv->buffer);
-    gint i;
-
-    if (v_meta == NULL)
-      return FALSE;
-
-    gst_video_info_init (&in_info);
-    in_info.finfo = gst_video_format_get_info (v_meta->format);
-    in_info.width = v_meta->width;
-    in_info.height = v_meta->height;
-
-    for (i = 0; i < in_info.finfo->n_planes; i++) {
-      in_info.offset[i] = v_meta->offset[i];
-      in_info.stride[i] = v_meta->stride[i];
-    }
-
-    _gst_gl_upload_set_format_unlocked (upload, &in_info);
-
-    upload->out_tex = gst_gl_memory_wrapped_texture (upload->context,
-        texture_id[0], GST_VIDEO_GL_TEXTURE_TYPE_RGBA,
-        GST_VIDEO_INFO_WIDTH (&upload->in_info),
-        GST_VIDEO_INFO_HEIGHT (&upload->in_info), NULL, NULL);
-  }
-
-  /* FIXME: kinda breaks the abstraction */
-  if (upload->out_tex->tex_id != texture_id[0]) {
-    upload->out_tex->tex_id = texture_id[0];
-    GST_GL_MEMORY_FLAG_SET (upload->out_tex, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
-  }
-
-  GST_LOG ("Uploading for meta with textures %i,%i,%i,%i", texture_id[0],
-      texture_id[1], texture_id[2], texture_id[3]);
-
-  ret = _do_upload_for_meta (upload, meta);
-
-  g_mutex_unlock (&upload->lock);
-
-  return ret;
-}
-
-/**
- * gst_gl_upload_add_video_gl_texture_upload_meta:
- * @upload: a #GstGLUpload
- * @buffer: a #GstBuffer
- *
- * Adds a #GstVideoGLTextureUploadMeta on @buffer using @upload
- *
- * Returns: whether it was successful
- */
-gboolean
-gst_gl_upload_add_video_gl_texture_upload_meta (GstGLUpload * upload,
-    GstBuffer * buffer)
-{
-  GstVideoGLTextureType texture_types[GST_VIDEO_MAX_PLANES];
-  GstVideoMeta *v_meta;
-  gint i;
-
-  g_return_val_if_fail (upload != NULL, FALSE);
-  g_return_val_if_fail (buffer != NULL, FALSE);
-  v_meta = gst_buffer_get_video_meta (buffer);
-  g_return_val_if_fail (v_meta != NULL, FALSE);
-
-  upload->priv->buffer = buffer;
-
-  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
-    texture_types[i] = gst_gl_texture_type_from_format (v_meta->format, i);
-  }
-
-  gst_buffer_add_video_gl_texture_upload_meta (buffer,
-      GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, 1, texture_types,
-      _gst_gl_upload_perform_for_gl_texture_upload_meta,
-      gst_object_ref (upload), gst_object_ref, gst_object_unref);
-
-  return TRUE;
-}
-
 /**
  * gst_gl_upload_perform_with_data:
  * @upload: a #GstGLUpload
- * @texture_id: the texture id to download
+ * @texture_id: (out): the texture id to upload into
  * @data: where the downloaded data should go
  *
  * Uploads @data into @texture_id. data size and format is specified by
@@ -591,41 +420,29 @@
  * Returns: whether the upload was successful
  */
 gboolean
-gst_gl_upload_perform_with_data (GstGLUpload * upload, GLuint texture_id,
+gst_gl_upload_perform_with_data (GstGLUpload * upload, GLuint * texture_id,
     gpointer data[GST_VIDEO_MAX_PLANES])
 {
   gboolean ret;
 
   g_return_val_if_fail (upload != NULL, FALSE);
 
-  g_mutex_lock (&upload->lock);
-
-  if (!upload->out_tex)
-    upload->out_tex = gst_gl_memory_wrapped_texture (upload->context, texture_id,
-        GST_VIDEO_GL_TEXTURE_TYPE_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),
-        GST_VIDEO_INFO_HEIGHT (&upload->in_info), NULL, NULL);
-
-  /* FIXME: kinda breaks the abstraction */
-  if (upload->out_tex->tex_id != texture_id) {
-    upload->out_tex->tex_id = texture_id;
-    GST_GL_MEMORY_FLAG_SET (upload->out_tex, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
-  }
-
+  GST_OBJECT_LOCK (upload);
   ret = _gst_gl_upload_perform_with_data_unlocked (upload, texture_id, data);
-
-  g_mutex_unlock (&upload->lock);
+  GST_OBJECT_UNLOCK (upload);
 
   return ret;
 }
 
 static gboolean
 _gst_gl_upload_perform_with_data_unlocked (GstGLUpload * upload,
-    GLuint texture_id, gpointer data[GST_VIDEO_MAX_PLANES])
+    GLuint * texture_id, gpointer data[GST_VIDEO_MAX_PLANES])
 {
+  gboolean ret;
   guint i;
 
   g_return_val_if_fail (upload != NULL, FALSE);
-  g_return_val_if_fail (texture_id > 0, FALSE);
+  g_return_val_if_fail (texture_id != NULL, FALSE);
 
   if (!upload->in_tex[0])
     gst_gl_memory_setup_wrapped (upload->context, &upload->in_info, data,
@@ -634,13 +451,15 @@
   for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
     if (upload->in_tex[i] && upload->in_tex[i]->data != data[i]) {
       upload->in_tex[i]->data = data[i];
-      GST_GL_MEMORY_FLAG_SET (upload->in_tex[i], GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+      GST_GL_MEMORY_FLAG_SET (upload->in_tex[i],
+          GST_GL_MEMORY_FLAG_NEED_UPLOAD);
     }
   }
 
-  GST_LOG ("Uploading data into texture %u", texture_id);
+  ret = _upload_memory (upload);
+  *texture_id = upload->out_tex->tex_id;
 
-  return _upload_memory (upload);
+  return ret;
 }
 
 /* Called in the gl thread */
@@ -668,7 +487,12 @@
       GST_VIDEO_INFO_WIDTH (&upload->in_info),
       GST_VIDEO_INFO_HEIGHT (&upload->in_info));
 
-  gst_gl_color_convert_set_format (upload->convert, &upload->in_info, &out_info);
+  gst_gl_color_convert_set_format (upload->convert, &upload->in_info,
+      &out_info);
+
+  upload->out_tex = gst_gl_memory_wrapped_texture (upload->context, 0,
+      GST_VIDEO_GL_TEXTURE_TYPE_RGBA, GST_VIDEO_INFO_WIDTH (&upload->in_info),
+      GST_VIDEO_INFO_HEIGHT (&upload->in_info), NULL, NULL);
 
   upload->initted = TRUE;
 
@@ -683,7 +507,9 @@
 {
   guint in_width, in_height;
   guint in_texture[GST_VIDEO_MAX_PLANES];
-  GstGLMemory *out_texture[GST_VIDEO_MAX_PLANES] = {upload->out_tex, 0, 0, 0};
+  GstBuffer *inbuf;
+  GstVideoFrame out_frame;
+  GstVideoInfo out_info;
   gint i;
 
   in_width = GST_VIDEO_INFO_WIDTH (&upload->in_info);
@@ -695,13 +521,32 @@
     }
   }
 
+  inbuf = gst_buffer_new ();
   for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->in_info); i++) {
     in_texture[i] = upload->in_tex[i]->tex_id;
+    gst_buffer_append_memory (inbuf,
+        gst_memory_ref ((GstMemory *) upload->in_tex[i]));
   }
 
-  GST_TRACE ("uploading to texture:%u with textures:%u,%u,%u dimensions:%ux%u", 
-      out_texture[0]->tex_id, in_texture[0], in_texture[1], in_texture[2],
-      in_width, in_height);
+  GST_TRACE ("uploading with textures:%u,%u,%u dimensions:%ux%u",
+      in_texture[0], in_texture[1], in_texture[2], in_width, in_height);
 
-  return gst_gl_color_convert_perform (upload->convert, upload->in_tex, out_texture);
+  upload->priv->outbuf = gst_gl_color_convert_perform (upload->convert, inbuf);
+  gst_buffer_unref (inbuf);
+
+  gst_video_info_set_format (&out_info, GST_VIDEO_FORMAT_RGBA, in_width,
+      in_height);
+  if (!gst_video_frame_map (&out_frame, &out_info, upload->priv->outbuf,
+          GST_MAP_READ | GST_MAP_GL)) {
+    gst_buffer_unref (upload->priv->outbuf);
+    upload->priv->outbuf = NULL;
+    return FALSE;
+  }
+
+  upload->out_tex->tex_id = *(guint *) out_frame.data[0];
+
+  gst_video_frame_unmap (&out_frame);
+  upload->priv->released = FALSE;
+
+  return TRUE;
 }
diff --git a/gst-libs/gst/gl/gstglupload.h b/gst-libs/gst/gl/gstglupload.h
index 51ee131..21943b9 100644
--- a/gst-libs/gst/gl/gstglupload.h
+++ b/gst-libs/gst/gl/gstglupload.h
@@ -31,7 +31,7 @@
 GType gst_gl_upload_get_type (void);
 #define GST_TYPE_GL_UPLOAD (gst_gl_upload_get_type())
 #define GST_GL_UPLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD,GstGLUpload))
-#define GST_GL_UPLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLUploadClass))
+#define GST_GL_UPLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_UPLOAD,GstGLUploadClass))
 #define GST_IS_GL_UPLOAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_UPLOAD))
 #define GST_IS_GL_UPLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_UPLOAD))
 #define GST_GL_UPLOAD_CAST(obj) ((GstGLUpload*)(obj))
@@ -46,8 +46,6 @@
   /* <private> */
   GstObject        parent;
 
-  GMutex           lock;
-
   GstGLContext    *context;
   GstGLColorConvert *convert;
 
@@ -80,11 +78,9 @@
 void           gst_gl_upload_set_format    (GstGLUpload * upload, GstVideoInfo * in_info);
 GstVideoInfo * gst_gl_upload_get_format    (GstGLUpload * upload);
 
-gboolean gst_gl_upload_add_video_gl_texture_upload_meta (GstGLUpload * upload, GstBuffer * buffer);
-
 gboolean gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer, guint * tex_id);
 void gst_gl_upload_release_buffer (GstGLUpload * upload);
-gboolean gst_gl_upload_perform_with_data          (GstGLUpload * upload, GLuint texture_id,
+gboolean gst_gl_upload_perform_with_data          (GstGLUpload * upload, GLuint * texture_id,
                                                    gpointer data[GST_VIDEO_MAX_PLANES]);
 
 gboolean gst_gl_upload_perform_with_gl_texture_upload_meta (GstGLUpload *upload, GstVideoGLTextureUploadMeta *meta, guint texture_id[4]);
diff --git a/gst-libs/gst/gl/gstgluploadmeta.c b/gst-libs/gst/gl/gstgluploadmeta.c
new file mode 100644
index 0000000..fd71103
--- /dev/null
+++ b/gst-libs/gst/gl/gstgluploadmeta.c
@@ -0,0 +1,376 @@
+/*
+ * GStreamer
+ * Copyright (C) 2012-2014 Matthew Waters <ystree00@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
+
+#include <stdio.h>
+
+#include "gl.h"
+#include "gstgluploadmeta.h"
+
+/**
+ * SECTION:gstgluploadmeta
+ * @short_description: an object that provides #GstVideoGLTextureUploadMeta
+ * @see_also: #GstGLUpload, #GstGLMemory
+ *
+ * #GstGLUploadMeta is an object that uploads data from system memory into GL textures.
+ *
+ * A #GstGLUpload can be created with gst_gl_upload_new()
+ */
+
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
+
+/* *INDENT-OFF* */
+
+struct _GstGLUploadMetaPrivate
+{
+  GstBuffer *buffer;
+  gboolean initted;
+
+  GstGLMemory *in_tex[GST_VIDEO_MAX_PLANES];
+  GstGLMemory *out_tex[GST_VIDEO_MAX_PLANES];
+};
+
+GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_meta_debug);
+#define GST_CAT_DEFAULT gst_gl_upload_meta_debug
+
+#define DEBUG_INIT \
+  GST_DEBUG_CATEGORY_INIT (gst_gl_upload_meta_debug, "gluploadmeta", 0, "uploadmeta");
+
+G_DEFINE_TYPE_WITH_CODE (GstGLUploadMeta, gst_gl_upload_meta, GST_TYPE_OBJECT, DEBUG_INIT);
+static void gst_gl_upload_meta_finalize (GObject * object);
+static void gst_gl_upload_meta_reset (GstGLUploadMeta * upload);
+
+#define GST_GL_UPLOAD_META_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+    GST_TYPE_GL_UPLOAD_META, GstGLUploadMetaPrivate))
+
+static void
+gst_gl_upload_meta_class_init (GstGLUploadMetaClass * klass)
+{
+  g_type_class_add_private (klass, sizeof (GstGLUploadMetaPrivate));
+
+  G_OBJECT_CLASS (klass)->finalize = gst_gl_upload_meta_finalize;
+}
+
+static void
+gst_gl_upload_meta_init (GstGLUploadMeta * upload)
+{
+  upload->priv = GST_GL_UPLOAD_META_GET_PRIVATE (upload);
+
+  upload->context = NULL;
+
+  gst_video_info_set_format (&upload->info, GST_VIDEO_FORMAT_ENCODED, 0, 0);
+}
+
+/**
+ * gst_gl_upload_meta_new:
+ * @context: a #GstGLContext
+ *
+ * Returns: a new #GstGLUploadMeta object
+ */
+GstGLUploadMeta *
+gst_gl_upload_meta_new (GstGLContext * context)
+{
+  GstGLUploadMeta *upload;
+
+  upload = g_object_new (GST_TYPE_GL_UPLOAD_META, NULL);
+
+  upload->context = gst_object_ref (context);
+
+  return upload;
+}
+
+static void
+gst_gl_upload_meta_finalize (GObject * object)
+{
+  GstGLUploadMeta *upload;
+
+  upload = GST_GL_UPLOAD_META (object);
+
+  gst_gl_upload_meta_reset (upload);
+
+  if (upload->context) {
+    gst_object_unref (upload->context);
+    upload->context = NULL;
+  }
+
+  G_OBJECT_CLASS (gst_gl_upload_meta_parent_class)->finalize (object);
+}
+
+static void
+gst_gl_upload_meta_reset (GstGLUploadMeta * upload)
+{
+  guint i;
+
+  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
+    if (upload->priv->out_tex[i]) {
+      gst_memory_unref ((GstMemory *) upload->priv->out_tex[i]);
+      upload->priv->out_tex[i] = NULL;
+    }
+  }
+
+  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
+    if (upload->priv->in_tex[i]) {
+      gst_memory_unref ((GstMemory *) upload->priv->in_tex[i]);
+      upload->priv->in_tex[i] = NULL;
+    }
+  }
+}
+
+static void
+_gst_gl_upload_meta_set_format_unlocked (GstGLUploadMeta * upload,
+    GstVideoInfo *info)
+{
+  g_return_if_fail (upload != NULL);
+  g_return_if_fail (GST_VIDEO_INFO_FORMAT (info) !=
+      GST_VIDEO_FORMAT_UNKNOWN);
+  g_return_if_fail (GST_VIDEO_INFO_FORMAT (info) !=
+      GST_VIDEO_FORMAT_ENCODED);
+
+  if (gst_video_info_is_equal (&upload->info, info))
+    return;
+
+  gst_gl_upload_meta_reset (upload);
+  upload->info = *info;
+  upload->priv->initted = FALSE;
+}
+
+/**
+ * gst_gl_upload_meta_set_format:
+ * @upload: a #GstGLUpload
+ * @info: input #GstVideoInfo
+ *
+ * Initializes @upload with the information required for upload.
+ */
+void
+gst_gl_upload_meta_set_format (GstGLUploadMeta * upload, GstVideoInfo * info)
+{
+  GST_OBJECT_LOCK (upload);
+  _gst_gl_upload_meta_set_format_unlocked (upload, info);
+  GST_OBJECT_UNLOCK (upload);
+}
+
+/**
+ * gst_gl_upload_meta_get_format:
+ * @upload: a #GstGLUpload
+ *
+ * Returns: (transfer none): The #GstVideoInfo set by
+ * gst_gl_upload_meta_set_format()
+ */
+GstVideoInfo *
+gst_gl_upload_meta_get_format (GstGLUploadMeta * upload)
+{
+  GstVideoInfo *ret;
+
+  GST_OBJECT_LOCK (upload);
+  ret = &upload->info;
+  GST_OBJECT_LOCK (upload);
+
+  return ret;
+}
+
+static gboolean
+_perform_with_gl_memory (GstGLUploadMeta * upload, GstVideoGLTextureUploadMeta *
+    meta, guint texture_id[4])
+{
+  gboolean res = TRUE;
+  gint i;
+
+  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->info); i++) {
+    GstGLMemory *in_mem = upload->priv->in_tex[i];
+
+    if (GST_GL_MEMORY_FLAG_IS_SET (in_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD)) {
+      GstMapInfo map_info;
+      guint tex_id;
+
+      tex_id = in_mem->tex_id;
+      in_mem->tex_id = texture_id[i];
+
+      if (!gst_memory_map ((GstMemory *) in_mem, &map_info, GST_MAP_READ | GST_MAP_GL)) {
+        GST_WARNING_OBJECT (upload, "Failed to map GL memory");
+        res = FALSE;
+      }
+      gst_memory_unmap ((GstMemory *) in_mem, &map_info);
+
+      in_mem->tex_id = tex_id;
+      GST_GL_MEMORY_FLAG_SET (in_mem, GST_GL_MEMORY_FLAG_NEED_UPLOAD);
+    } else {
+      GstGLMemory *out_mem;
+
+      if (!upload->priv->out_tex[i])
+        upload->priv->out_tex[i] = gst_gl_memory_wrapped_texture (upload->context,
+            texture_id[i], meta->texture_type[i],
+            GST_VIDEO_INFO_WIDTH (&upload->info),
+            GST_VIDEO_INFO_HEIGHT (&upload->info), NULL, NULL);
+
+      out_mem = upload->priv->out_tex[i];
+
+      if (out_mem->tex_id != texture_id[i]) {
+        out_mem->tex_id = texture_id[i];
+        GST_GL_MEMORY_FLAG_SET (out_mem, GST_GL_MEMORY_FLAG_NEED_DOWNLOAD);
+      }
+
+      if (!(res = gst_gl_memory_copy_into_texture (in_mem, out_mem->tex_id,
+            out_mem->tex_type, out_mem->width, out_mem->height, out_mem->stride,
+            FALSE)))
+        break;
+    }
+  }
+
+  return res;
+}
+
+static gboolean
+_perform_with_data_unlocked (GstGLUploadMeta * upload,
+    GstVideoGLTextureUploadMeta * meta, 
+    gpointer data[GST_VIDEO_MAX_PLANES], guint texture_id[4])
+{
+  guint i;
+
+  for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->info); i++) {
+    if (!upload->priv->in_tex[i])
+      upload->priv->in_tex[i] = gst_gl_memory_wrapped (upload->context,
+          meta->texture_type[i], GST_VIDEO_INFO_WIDTH (&upload->info),
+          GST_VIDEO_INFO_HEIGHT (&upload->info),
+          GST_VIDEO_INFO_PLANE_STRIDE (&upload->info, i), data[i], NULL, NULL);
+
+    upload->priv->in_tex[i]->data = data[i];
+  }
+
+  return _perform_with_gl_memory (upload, meta, texture_id);
+}
+
+static gboolean
+_perform_for_gl_texture_upload_meta (GstVideoGLTextureUploadMeta *
+    meta, guint texture_id[4])
+{
+  GstGLUploadMeta *upload;
+  GstVideoFrame frame;
+//  GstMemory *mem;
+  gboolean ret;
+//  guint i, n;
+
+  g_return_val_if_fail (meta != NULL, FALSE);
+  g_return_val_if_fail (texture_id != NULL, FALSE);
+
+  upload = meta->user_data;
+
+  GST_OBJECT_LOCK (upload);
+
+  if (!upload->priv->initted) {
+    GstVideoInfo info;
+    GstVideoMeta *v_meta = gst_buffer_get_video_meta (upload->priv->buffer);
+    gint i;
+
+    if (!(ret = v_meta != NULL))
+      goto out;
+
+    gst_video_info_init (&info);
+    info.finfo = gst_video_format_get_info (v_meta->format);
+    info.width = v_meta->width;
+    info.height = v_meta->height;
+
+    for (i = 0; i < info.finfo->n_planes; i++) {
+      info.offset[i] = v_meta->offset[i];
+      info.stride[i] = v_meta->stride[i];
+    }
+
+    _gst_gl_upload_meta_set_format_unlocked (upload, &info);
+    upload->priv->initted = TRUE;
+  }
+
+  GST_LOG ("Uploading for meta with textures %i,%i,%i,%i", texture_id[0],
+      texture_id[1], texture_id[2], texture_id[3]);
+#if 0
+  /* GstGLMemory */
+  n = gst_buffer_n_memory (upload->priv->buffer);
+  mem = gst_buffer_peek_memory (upload->priv->buffer, 0);
+
+  if (gst_is_gl_memory (mem) && n == GST_VIDEO_INFO_N_PLANES (&upload->info)) {
+    for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->info); i++)
+      upload->priv->in_tex[i] = (GstGLMemory *) gst_buffer_peek_memory (upload->priv->buffer, i);
+
+    ret = _perform_with_gl_memory (upload, meta, texture_id);
+
+    for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&upload->info); i++)
+      upload->priv->in_tex[i] = NULL;
+
+    if (ret)
+      goto out;
+  }
+#endif
+  if (!(ret = gst_video_frame_map (&frame, &upload->info, upload->priv->buffer,
+          GST_MAP_READ))) {
+    GST_ERROR ("failed to map video frame");
+    goto out;
+  }
+
+  /* update the video info from the one updated by frame_map using video meta */
+  _gst_gl_upload_meta_set_format_unlocked (upload, &frame.info);
+
+  ret = _perform_with_data_unlocked (upload, meta, frame.data, texture_id);
+
+  gst_video_frame_unmap (&frame);
+
+out:
+  GST_OBJECT_UNLOCK (upload);
+  return ret;
+}
+
+/**
+ * gst_gl_upload_meta_add_to_buffer:
+ * @upload: a #GstGLUploadMeta
+ * @buffer: a #GstBuffer
+ *
+ * Adds a #GstVideoGLTextureUploadMeta on @buffer using @upload
+ *
+ * Returns: whether it was successful
+ */
+gboolean
+gst_gl_upload_meta_add_to_buffer (GstGLUploadMeta * upload, GstBuffer * buffer)
+{
+  GstVideoGLTextureType texture_types[GST_VIDEO_MAX_PLANES];
+  GstVideoMeta *v_meta;
+  gint i;
+
+  g_return_val_if_fail (upload != NULL, FALSE);
+  g_return_val_if_fail (buffer != NULL, FALSE);
+  v_meta = gst_buffer_get_video_meta (buffer);
+  g_return_val_if_fail (v_meta != NULL, FALSE);
+
+  upload->priv->buffer = buffer;
+
+  for (i = 0; i < GST_VIDEO_MAX_PLANES; i++) {
+    texture_types[i] = gst_gl_texture_type_from_format (upload->context, v_meta->format, i);
+  }
+
+  gst_buffer_add_video_gl_texture_upload_meta (buffer,
+      GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, 1, texture_types,
+      _perform_for_gl_texture_upload_meta, gst_object_ref (upload),
+      gst_object_ref, gst_object_unref);
+
+  return TRUE;
+}
diff --git a/gst-libs/gst/gl/gstgluploadmeta.h b/gst-libs/gst/gl/gstgluploadmeta.h
new file mode 100644
index 0000000..199be2a
--- /dev/null
+++ b/gst-libs/gst/gl/gstgluploadmeta.h
@@ -0,0 +1,79 @@
+/*
+ * GStreamer
+ * Copyright (C) 2012 Matthew Waters <ystree00@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.
+ */
+
+#ifndef __GST_GL_UPLOAD_META_H__
+#define __GST_GL_UPLOAD_META_H__
+
+#include <gst/video/video.h>
+#include <gst/gstmemory.h>
+
+#include <gst/gl/gstgl_fwd.h>
+
+G_BEGIN_DECLS
+
+GType gst_gl_upload_meta_get_type (void);
+#define GST_TYPE_GL_UPLOAD_META (gst_gl_upload_meta_get_type())
+#define GST_GL_UPLOAD_META(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD_META,GstGLUploadMeta))
+#define GST_GL_UPLOAD_META_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_UPLOAD_META,GstGLUploadMetaClass))
+#define GST_IS_GL_UPLOAD_META(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_UPLOAD_META))
+#define GST_IS_GL_UPLOAD_META_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_UPLOAD_META))
+#define GST_GL_UPLOAD_META_CAST(obj) ((GstGLUploadMeta*)(obj))
+
+/**
+ * GstGLUploadMeta
+ *
+ * Opaque #GstGLUploadMeta object
+ */
+struct _GstGLUploadMeta
+{
+  /* <private> */
+  GstObject        parent;
+
+  GstGLContext    *context;
+
+  /* input data */
+  GstVideoInfo     info;
+
+  /* <private> */
+  GstGLUploadMetaPrivate *priv;
+
+  gpointer _reserved[GST_PADDING];
+};
+
+/**
+ * GstGLUploadMetaClass:
+ *
+ * The #GstGLUploadMetaClass struct only contains private data
+ */
+struct _GstGLUploadMetaClass
+{
+  GstObjectClass object_class;
+};
+
+GstGLUploadMeta * gst_gl_upload_meta_new            (GstGLContext * context);
+
+void           gst_gl_upload_meta_set_format    (GstGLUploadMeta * upload, GstVideoInfo * info);
+GstVideoInfo * gst_gl_upload_meta_get_format    (GstGLUploadMeta * upload);
+
+gboolean       gst_gl_upload_meta_add_to_buffer (GstGLUploadMeta * upload, GstBuffer * buffer);
+
+G_END_DECLS
+
+#endif /* __GST_GL_UPLOAD_META_H__ */
diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c
index d5df84b..2d90714 100644
--- a/gst-libs/gst/gl/gstglutils.c
+++ b/gst-libs/gst/gl/gstglutils.c
@@ -48,11 +48,11 @@
 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
 #endif
 
-#define USING_OPENGL(context) (gst_gl_context_get_gl_apie (context) & GST_GL_API_OPENGL)
-#define USING_OPENGL3(context) (gst_gl_context_get_gl_apie (context) & GST_GL_API_OPENGL3)
-#define USING_GLES(context) (gst_gl_context_get_gl_apie (context) & GST_GL_API_GLES)
-#define USING_GLES2(context) (gst_gl_context_get_gl_apie (context)->gl_api & GST_GL_API_GLES2)
-#define USING_GLES3(context) (gst_gl_context_get_gl_apie (context) & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 static gchar *error_message;
 
diff --git a/gst-libs/gst/gl/gstglutils.h b/gst-libs/gst/gl/gstglutils.h
index 299b53b..13c39ea 100644
--- a/gst-libs/gst/gl/gstglutils.h
+++ b/gst-libs/gst/gl/gstglutils.h
@@ -40,15 +40,6 @@
 } GstGLDisplayProjection;
 
 /**
- * CRCB:
- * @width: new width
- * @height: new height:
- * @data: user data
- *
- * client reshape callback
- */
-typedef void (*CRCB) (GLuint width, GLuint height, gpointer data);
-/**
  * CDCB:
  * @texture: texture to draw
  * @width: new width
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index 329327b..117cfa6 100644
--- a/gst-libs/gst/gl/gstglwindow.c
+++ b/gst-libs/gst/gl/gstglwindow.c
@@ -62,11 +62,11 @@
 #include "dispmanx/gstglwindow_dispmanx_egl.h"
 #endif
 
-#define USING_OPENGL(display) (display->gl_api & GST_GL_API_OPENGL)
-#define USING_OPENGL3(display) (display->gl_api & GST_GL_API_OPENGL3)
-#define USING_GLES(display) (display->gl_api & GST_GL_API_GLES)
-#define USING_GLES2(display) (display->gl_api & GST_GL_API_GLES2)
-#define USING_GLES3(display) (display->gl_api & GST_GL_API_GLES3)
+#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
+#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
+#define USING_GLES(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES, 1, 0))
+#define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0))
+#define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0))
 
 #define GST_CAT_DEFAULT gst_gl_window_debug
 GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
diff --git a/gst-libs/gst/gl/wayland/Makefile.in b/gst-libs/gst/gl/wayland/Makefile.in
index acc49b8..e43ccc5 100644
--- a/gst-libs/gst/gl/wayland/Makefile.in
+++ b/gst-libs/gst/gl/wayland/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,6 +696,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-wayland.la
 libgstgl_wayland_la_SOURCES = \
 	gstglwindow_wayland_egl.c \
diff --git a/gst-libs/gst/gl/win32/Makefile.in b/gst-libs/gst/gl/win32/Makefile.in
index 00f77e4..9e8dff3 100644
--- a/gst-libs/gst/gl/win32/Makefile.in
+++ b/gst-libs/gst/gl/win32/Makefile.in
@@ -321,6 +321,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -407,6 +409,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -698,6 +701,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-win32.la
 libgstgl_win32_la_SOURCES = gstglwindow_win32.c $(am__append_1)
 noinst_HEADERS = gstglwindow_win32.h $(am__append_2)
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c
index be1b4f6..328c3dd 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.c
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c
@@ -43,7 +43,7 @@
 
 struct _GstGLWindowWin32Private
 {
-  gint dummy;
+  GThread *thread;
 };
 
 #define GST_CAT_DEFAULT gst_gl_window_win32_debug
@@ -88,6 +88,7 @@
 gst_gl_window_win32_init (GstGLWindowWin32 * window)
 {
   window->priv = GST_GL_WINDOW_WIN32_GET_PRIVATE (window);
+  window->priv->thread = NULL;
 }
 
 /* Must be called in the gl thread */
@@ -288,11 +289,14 @@
 static void
 gst_gl_window_win32_run (GstGLWindow * window)
 {
+  GstGLWindowWin32 *window_win32 = GST_GL_WINDOW_WIN32 (window);
   gint bRet;
   MSG msg;
 
   GST_INFO ("begin message loop");
 
+  window_win32->priv->thread = g_thread_self ();
+
   while (TRUE) {
     bRet = GetMessage (&msg, NULL, 0, 0);
     if (bRet == 0)
@@ -318,6 +322,7 @@
   GstGLWindowWin32 *window_win32;
 
   window_win32 = GST_GL_WINDOW_WIN32 (window);
+  window_win32->priv->thread = NULL;
 
   if (window_win32 && window_win32->internal_win_id) {
     LRESULT res =
@@ -358,6 +363,16 @@
   GstGLMessage *message;
 
   window_win32 = GST_GL_WINDOW_WIN32 (window);
+
+  if (window_win32->priv->thread == g_thread_self ()) {
+    /* re-entracy... */
+    if (callback)
+      callback (data);
+    if (destroy)
+      destroy (data);
+    return;
+  }
+
   message = g_slice_new (GstGLMessage);
 
   if (window_win32) {
diff --git a/gst-libs/gst/gl/x11/Makefile.in b/gst-libs/gst/gl/x11/Makefile.in
index 9500adf..0331266 100644
--- a/gst-libs/gst/gl/x11/Makefile.in
+++ b/gst-libs/gst/gl/x11/Makefile.in
@@ -352,6 +352,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -438,6 +440,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -729,6 +732,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libgstgl-x11.la
 libgstgl_x11_la_SOURCES = gstgldisplay_x11.c gstglwindow_x11.c \
 	x11_event_source.c $(am__append_1)
diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c
index 54b2094..d097012 100644
--- a/gst-libs/gst/gl/x11/gstglwindow_x11.c
+++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c
@@ -258,9 +258,14 @@
 gst_gl_window_x11_close (GstGLWindow * window)
 {
   GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
+  GstGLDisplay *display = window->display;
   XEvent event;
 
   if (window_x11->device) {
+    /* Avoid BadDrawable Errors... */
+    if (gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_X11)
+      XSync (GST_GL_DISPLAY_X11 (display)->display, FALSE);
+
     if (window_x11->internal_win_id)
       XUnmapWindow (window_x11->device, window_x11->internal_win_id);
 
@@ -539,12 +544,6 @@
           break;
         }
 
-        /* just ignore request that does not come from us
-         * they are un-necessary and it overloads the drawer
-         */
-        if (!event.xexpose.send_event)
-          break;
-
         /* We need to redraw on expose */
         if (window->draw) {
           context = gst_gl_window_get_context (window);
diff --git a/gst-libs/gst/insertbin/Makefile.in b/gst-libs/gst/insertbin/Makefile.in
index 11e7e2e..96b6ebc 100644
--- a/gst-libs/gst/insertbin/Makefile.in
+++ b/gst-libs/gst/insertbin/Makefile.in
@@ -334,6 +334,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -420,6 +422,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -711,6 +714,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstinsertbin-@GST_API_VERSION@.la
 libgstinsertbin_@GST_API_VERSION@_la_SOURCES = gstinsertbin.c
 libgstinsertbin_@GST_API_VERSION@includedir = \
diff --git a/gst-libs/gst/interfaces/Makefile.in b/gst-libs/gst/interfaces/Makefile.in
index 8b25747..21334eb 100644
--- a/gst-libs/gst/interfaces/Makefile.in
+++ b/gst-libs/gst/interfaces/Makefile.in
@@ -364,6 +364,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -450,6 +452,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -741,6 +744,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstphotography-@GST_API_VERSION@.la
 libgstphotographyincludedir = \
         $(includedir)/gstreamer-@GST_API_VERSION@/gst/interfaces
diff --git a/gst-libs/gst/mpegts/Makefile.in b/gst-libs/gst/mpegts/Makefile.in
index 4fbb215..967ac56 100644
--- a/gst-libs/gst/mpegts/Makefile.in
+++ b/gst-libs/gst/mpegts/Makefile.in
@@ -373,6 +373,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -459,6 +461,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -750,6 +753,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgstmpegts-@GST_API_VERSION@.la
 libgstmpegts_@GST_API_VERSION@_la_SOURCES = \
 	gstmpegtssection.c \
diff --git a/gst-libs/gst/mpegts/gst-atsc-section.c b/gst-libs/gst/mpegts/gst-atsc-section.c
index a56be15..8756547 100644
--- a/gst-libs/gst/mpegts/gst-atsc-section.c
+++ b/gst-libs/gst/mpegts/gst-atsc-section.c
@@ -34,101 +34,108 @@
  *
  */
 
-/* Terrestrial Virtual Channel Table TVCT */
-static GstMpegTsAtscTVCTSource *
-_gst_mpegts_atsc_tvct_source_copy (GstMpegTsAtscTVCTSource * source)
+/* Terrestrial/Cable Virtual Channel Table TVCT/CVCT */
+static GstMpegTsAtscVCTSource *
+_gst_mpegts_atsc_vct_source_copy (GstMpegTsAtscVCTSource * source)
 {
-  GstMpegTsAtscTVCTSource *copy;
+  GstMpegTsAtscVCTSource *copy;
 
-  copy = g_slice_dup (GstMpegTsAtscTVCTSource, source);
+  copy = g_slice_dup (GstMpegTsAtscVCTSource, source);
   copy->descriptors = g_ptr_array_ref (source->descriptors);
 
   return copy;
 }
 
 static void
-_gst_mpegts_atsc_tvct_source_free (GstMpegTsAtscTVCTSource * source)
+_gst_mpegts_atsc_vct_source_free (GstMpegTsAtscVCTSource * source)
 {
   if (source->descriptors)
     g_ptr_array_unref (source->descriptors);
-  g_slice_free (GstMpegTsAtscTVCTSource, source);
+  g_slice_free (GstMpegTsAtscVCTSource, source);
 }
 
-G_DEFINE_BOXED_TYPE (GstMpegTsAtscTVCTSource, gst_mpegts_atsc_tvct_source,
-    (GBoxedCopyFunc) _gst_mpegts_atsc_tvct_source_copy,
-    (GFreeFunc) _gst_mpegts_atsc_tvct_source_free);
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscVCTSource, gst_mpegts_atsc_vct_source,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_vct_source_copy,
+    (GFreeFunc) _gst_mpegts_atsc_vct_source_free);
 
-static GstMpegTsAtscTVCT *
-_gst_mpegts_atsc_tvct_copy (GstMpegTsAtscTVCT * tvct)
+static GstMpegTsAtscVCT *
+_gst_mpegts_atsc_vct_copy (GstMpegTsAtscVCT * vct)
 {
-  GstMpegTsAtscTVCT *copy;
+  GstMpegTsAtscVCT *copy;
 
-  copy = g_slice_dup (GstMpegTsAtscTVCT, tvct);
-  copy->sources = g_ptr_array_ref (tvct->sources);
-  copy->descriptors = g_ptr_array_ref (tvct->descriptors);
+  copy = g_slice_dup (GstMpegTsAtscVCT, vct);
+  copy->sources = g_ptr_array_ref (vct->sources);
+  copy->descriptors = g_ptr_array_ref (vct->descriptors);
 
   return copy;
 }
 
 static void
-_gst_mpegts_atsc_tvct_free (GstMpegTsAtscTVCT * tvct)
+_gst_mpegts_atsc_vct_free (GstMpegTsAtscVCT * vct)
 {
-  g_ptr_array_unref (tvct->sources);
-  if (tvct->descriptors)
-    g_ptr_array_unref (tvct->descriptors);
-  g_slice_free (GstMpegTsAtscTVCT, tvct);
+  if (vct->sources)
+    g_ptr_array_unref (vct->sources);
+  if (vct->descriptors)
+    g_ptr_array_unref (vct->descriptors);
+  g_slice_free (GstMpegTsAtscVCT, vct);
 }
 
-G_DEFINE_BOXED_TYPE (GstMpegTsAtscTVCT, gst_mpegts_atsc_tvct,
-    (GBoxedCopyFunc) _gst_mpegts_atsc_tvct_copy,
-    (GFreeFunc) _gst_mpegts_atsc_tvct_free);
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscVCT, gst_mpegts_atsc_vct,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_vct_copy,
+    (GFreeFunc) _gst_mpegts_atsc_vct_free);
 
 static gpointer
-_parse_atsc_tvct (GstMpegTsSection * section)
+_parse_atsc_vct (GstMpegTsSection * section)
 {
-  GstMpegTsAtscTVCT *tvct = NULL;
+  GstMpegTsAtscVCT *vct = NULL;
   guint8 *data, *end, source_nb;
   guint32 tmp32;
   guint16 descriptors_loop_length, tmp16;
   guint i;
+  GError *err = NULL;
 
-  tvct = g_slice_new0 (GstMpegTsAtscTVCT);
+  vct = g_slice_new0 (GstMpegTsAtscVCT);
 
   data = section->data;
   end = data + section->section_length;
 
-  tvct->transport_stream_id = section->subtable_extension;
+  vct->transport_stream_id = section->subtable_extension;
 
   /* Skip already parsed data */
   data += 8;
 
   /* minimum size */
-  if (data - end < 2 + 2 + 4)
+  if (end - data < 2 + 2 + 4)
     goto error;
 
-  tvct->protocol_version = *data;
+  vct->protocol_version = *data;
   data += 1;
 
   source_nb = *data;
   data += 1;
 
-  tvct->sources = g_ptr_array_new_full (source_nb,
-      (GDestroyNotify) _gst_mpegts_atsc_tvct_source_free);
+  vct->sources = g_ptr_array_new_full (source_nb,
+      (GDestroyNotify) _gst_mpegts_atsc_vct_source_free);
 
   for (i = 0; i < source_nb; i++) {
-    GstMpegTsAtscTVCTSource *source;
+    GstMpegTsAtscVCTSource *source;
 
     /* minimum 32 bytes for a entry, 2 bytes second descriptor
        loop-length, 4 bytes crc */
     if (end - data < 32 + 2 + 4)
       goto error;
 
-    source = g_slice_new0 (GstMpegTsAtscTVCTSource);
-    g_ptr_array_add (tvct->sources, source);
+    source = g_slice_new0 (GstMpegTsAtscVCTSource);
+    g_ptr_array_add (vct->sources, source);
 
-    /* FIXME: 7 utf16 charater
-       GST_READ_UINT16_BE x 7 or extern method ? */
-    source->short_name = g_memdup (data, 14);
+    source->short_name =
+        g_convert ((gchar *) data, 14, "utf-8", "utf-16be", NULL, NULL, &err);
+    if (err) {
+      GST_WARNING ("Failed to convert VCT Source short_name to utf-8: %d %s",
+          err->code, err->message);
+      GST_MEMDUMP ("UTF-16 string", data, 14);
+      g_error_free (err);
+    }
     data += 14;
 
     tmp32 = GST_READ_UINT32_BE (data);
@@ -150,7 +157,12 @@
     source->ETM_location = (tmp16 >> 14) & 0x3;
     source->access_controlled = (tmp16 >> 13) & 0x1;
     source->hidden = (tmp16 >> 12) & 0x1;
-    source->hide_guide = (tmp16 >> 10) & 0x1;
+
+    /* only used in CVCT */
+    source->path_select = (tmp16 >> 11) & 0x1;
+    source->out_of_band = (tmp16 >> 10) & 0x1;
+
+    source->hide_guide = (tmp16 >> 9) & 0x1;
     source->service_type = tmp16 & 0x3f;
     data += 2;
 
@@ -176,17 +188,16 @@
   if (end - data < descriptors_loop_length + 4)
     goto error;
 
-  tvct->descriptors =
+  vct->descriptors =
       gst_mpegts_parse_descriptors (data, descriptors_loop_length);
-  if (tvct->descriptors == NULL)
+  if (vct->descriptors == NULL)
     goto error;
   data += descriptors_loop_length;
 
-  return (gpointer) tvct;
+  return (gpointer) vct;
 
 error:
-  if (tvct)
-    _gst_mpegts_atsc_tvct_free (tvct);
+  _gst_mpegts_atsc_vct_free (vct);
 
   return NULL;
 }
@@ -195,12 +206,12 @@
  * gst_mpegts_section_get_atsc_tvct:
  * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_TVCT
  *
- * Returns the #GstMpegTsAtscTVCT contained in the @section
+ * Returns the #GstMpegTsAtscVCT contained in the @section
  *
- * Returns: The #GstMpegTsAtscTVCT contained in the section, or %NULL if an error
+ * Returns: The #GstMpegTsAtscVCT contained in the section, or %NULL if an error
  * happened.
  */
-const GstMpegTsAtscTVCT *
+const GstMpegTsAtscVCT *
 gst_mpegts_section_get_atsc_tvct (GstMpegTsSection * section)
 {
   g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_TVCT,
@@ -209,8 +220,716 @@
 
   if (!section->cached_parsed)
     section->cached_parsed =
-        __common_section_checks (section, 16, _parse_atsc_tvct,
-        (GDestroyNotify) _gst_mpegts_atsc_tvct_free);
+        __common_section_checks (section, 16, _parse_atsc_vct,
+        (GDestroyNotify) _gst_mpegts_atsc_vct_free);
 
-  return (const GstMpegTsAtscTVCT *) section->cached_parsed;
+  return (const GstMpegTsAtscVCT *) section->cached_parsed;
+}
+
+/**
+ * gst_mpegts_section_get_atsc_cvct:
+ * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_CVCT
+ *
+ * Returns the #GstMpegTsAtscVCT contained in the @section
+ *
+ * Returns: The #GstMpegTsAtscVCT contained in the section, or %NULL if an error
+ * happened.
+ */
+const GstMpegTsAtscVCT *
+gst_mpegts_section_get_atsc_cvct (GstMpegTsSection * section)
+{
+  g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_CVCT,
+      NULL);
+  g_return_val_if_fail (section->cached_parsed || section->data, NULL);
+
+  if (!section->cached_parsed)
+    section->cached_parsed =
+        __common_section_checks (section, 16, _parse_atsc_vct,
+        (GDestroyNotify) _gst_mpegts_atsc_vct_free);
+
+  return (const GstMpegTsAtscVCT *) section->cached_parsed;
+}
+
+/* MGT */
+
+static GstMpegTsAtscMGTTable *
+_gst_mpegts_atsc_mgt_table_copy (GstMpegTsAtscMGTTable * mgt_table)
+{
+  GstMpegTsAtscMGTTable *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscMGTTable, mgt_table);
+  copy->descriptors = g_ptr_array_ref (mgt_table->descriptors);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_mgt_table_free (GstMpegTsAtscMGTTable * mgt_table)
+{
+  g_ptr_array_unref (mgt_table->descriptors);
+  g_slice_free (GstMpegTsAtscMGTTable, mgt_table);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscMGTTable, gst_mpegts_atsc_mgt_table,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_mgt_table_copy,
+    (GFreeFunc) _gst_mpegts_atsc_mgt_table_free);
+
+static GstMpegTsAtscMGT *
+_gst_mpegts_atsc_mgt_copy (GstMpegTsAtscMGT * mgt)
+{
+  GstMpegTsAtscMGT *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscMGT, mgt);
+  copy->tables = g_ptr_array_ref (mgt->tables);
+  copy->descriptors = g_ptr_array_ref (mgt->descriptors);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_mgt_free (GstMpegTsAtscMGT * mgt)
+{
+  g_ptr_array_unref (mgt->tables);
+  g_ptr_array_unref (mgt->descriptors);
+  g_slice_free (GstMpegTsAtscMGT, mgt);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscMGT, gst_mpegts_atsc_mgt,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_mgt_copy,
+    (GFreeFunc) _gst_mpegts_atsc_mgt_free);
+
+static gpointer
+_parse_atsc_mgt (GstMpegTsSection * section)
+{
+  GstMpegTsAtscMGT *mgt = NULL;
+  guint i = 0;
+  guint8 *data, *end;
+  guint16 descriptors_loop_length;
+
+  mgt = g_slice_new0 (GstMpegTsAtscMGT);
+
+  data = section->data;
+  end = data + section->section_length;
+
+  /* Skip already parsed data */
+  data += 8;
+
+  mgt->protocol_version = GST_READ_UINT8 (data);
+  data += 1;
+  mgt->tables_defined = GST_READ_UINT16_BE (data);
+  data += 2;
+  mgt->tables = g_ptr_array_new_full (mgt->tables_defined,
+      (GDestroyNotify) _gst_mpegts_atsc_mgt_table_free);
+  for (i = 0; i < mgt->tables_defined && data + 11 < end; i++) {
+    GstMpegTsAtscMGTTable *mgt_table;
+
+    if (data + 11 >= end) {
+      GST_WARNING ("MGT data too short to parse inner table num %d", i);
+      goto error;
+    }
+
+    mgt_table = g_slice_new0 (GstMpegTsAtscMGTTable);
+    g_ptr_array_add (mgt->tables, mgt_table);
+
+    mgt_table->table_type = GST_READ_UINT16_BE (data);
+    data += 2;
+    mgt_table->pid = GST_READ_UINT16_BE (data) & 0x1FFF;
+    data += 2;
+    mgt_table->version_number = GST_READ_UINT8 (data) & 0x1F;
+    data += 1;
+    mgt_table->number_bytes = GST_READ_UINT32_BE (data);
+    data += 4;
+    descriptors_loop_length = GST_READ_UINT16_BE (data) & 0x0FFF;
+    data += 2;
+
+    if (data + descriptors_loop_length >= end) {
+      GST_WARNING ("MGT data too short to parse inner table descriptors (table "
+          "num %d", i);
+      goto error;
+    }
+    mgt_table->descriptors =
+        gst_mpegts_parse_descriptors (data, descriptors_loop_length);
+    data += descriptors_loop_length;
+  }
+
+  descriptors_loop_length = GST_READ_UINT16_BE (data) & 0xFFF;
+  data += 2;
+  if (data + descriptors_loop_length >= end) {
+    GST_WARNING ("MGT data too short to parse descriptors");
+    goto error;
+  }
+  mgt->descriptors =
+      gst_mpegts_parse_descriptors (data, descriptors_loop_length);
+  data += descriptors_loop_length;
+
+  return (gpointer) mgt;
+
+error:
+  _gst_mpegts_atsc_mgt_free (mgt);
+
+  return NULL;
+}
+
+
+/**
+ * gst_mpegts_section_get_atsc_mgt:
+ * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_MGT
+ *
+ * Returns the #GstMpegTsAtscMGT contained in the @section.
+ *
+ * Returns: The #GstMpegTsAtscMGT contained in the section, or %NULL if an error
+ * happened.
+ */
+const GstMpegTsAtscMGT *
+gst_mpegts_section_get_atsc_mgt (GstMpegTsSection * section)
+{
+  g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_MGT,
+      NULL);
+  g_return_val_if_fail (section->cached_parsed || section->data, NULL);
+
+  if (!section->cached_parsed)
+    section->cached_parsed =
+        __common_section_checks (section, 17, _parse_atsc_mgt,
+        (GDestroyNotify) _gst_mpegts_atsc_mgt_free);
+
+  return (const GstMpegTsAtscMGT *) section->cached_parsed;
+}
+
+/* Multi string structure */
+
+static GstMpegTsAtscStringSegment *
+_gst_mpegts_atsc_string_segment_copy (GstMpegTsAtscStringSegment * seg)
+{
+  GstMpegTsAtscStringSegment *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscStringSegment, seg);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_string_segment_free (GstMpegTsAtscStringSegment * seg)
+{
+  if (seg->cached_string)
+    g_free (seg->cached_string);
+  g_slice_free (GstMpegTsAtscStringSegment, seg);
+}
+
+static void
+_gst_mpegts_atsc_string_segment_decode_string (GstMpegTsAtscStringSegment * seg)
+{
+  const gchar *from_encoding;
+
+  g_return_if_fail (seg->cached_string == NULL);
+
+  if (seg->compression_type != 0) {
+    GST_FIXME ("Compressed strings not yet supported");
+    return;
+  }
+
+  /* FIXME add more encodings */
+  switch (seg->mode) {
+    case 0x3F:
+      from_encoding = "UTF-16BE";
+      break;
+    default:
+      from_encoding = NULL;
+      break;
+  }
+
+  if (from_encoding != NULL) {
+    GError *err = NULL;
+
+    seg->cached_string =
+        g_convert ((gchar *) seg->compressed_data,
+        (gssize) seg->compressed_data_size, "UTF-8", from_encoding, NULL, NULL,
+        &err);
+
+    if (err) {
+      GST_WARNING ("Failed to convert input string from codeset %s",
+          from_encoding);
+      g_error_free (err);
+    }
+  } else {
+    seg->cached_string =
+        g_strndup ((gchar *) seg->compressed_data, seg->compressed_data_size);
+  }
+}
+
+const gchar *
+gst_mpegts_atsc_string_segment_get_string (GstMpegTsAtscStringSegment * seg)
+{
+  if (!seg->cached_string)
+    _gst_mpegts_atsc_string_segment_decode_string (seg);
+
+  return seg->cached_string;
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscStringSegment, gst_mpegts_atsc_string_segment,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_string_segment_copy,
+    (GFreeFunc) _gst_mpegts_atsc_string_segment_free);
+
+static GstMpegTsAtscMultString *
+_gst_mpegts_atsc_mult_string_copy (GstMpegTsAtscMultString * mstring)
+{
+  GstMpegTsAtscMultString *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscMultString, mstring);
+  copy->segments = g_ptr_array_ref (mstring->segments);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_mult_string_free (GstMpegTsAtscMultString * mstring)
+{
+  g_ptr_array_unref (mstring->segments);
+  g_slice_free (GstMpegTsAtscMultString, mstring);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscMultString, gst_mpegts_atsc_mult_string,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_mult_string_copy,
+    (GFreeFunc) _gst_mpegts_atsc_mult_string_free);
+
+static GPtrArray *
+_parse_atsc_mult_string (guint8 * data, guint datasize)
+{
+  guint8 num_strings;
+  GPtrArray *res = NULL;
+  guint8 *end = data + datasize;
+  gint i;
+
+  if (datasize > 0) {
+    /* 1 is the minimum entry size, so no need to check here */
+    num_strings = GST_READ_UINT8 (data);
+    data += 1;
+
+    res =
+        g_ptr_array_new_full (num_strings,
+        (GDestroyNotify) _gst_mpegts_atsc_mult_string_free);
+
+    for (i = 0; i < num_strings; i++) {
+      GstMpegTsAtscMultString *mstring;
+      guint8 num_segments;
+      gint j;
+
+      mstring = g_slice_new0 (GstMpegTsAtscMultString);
+      g_ptr_array_add (res, mstring);
+      mstring->segments =
+          g_ptr_array_new_full (num_strings,
+          (GDestroyNotify) _gst_mpegts_atsc_string_segment_free);
+
+      /* each entry needs at least 4 bytes (lang code and segments number) */
+      if (end - data < 4) {
+        GST_WARNING ("Data too short for multstring parsing %d",
+            (gint) (end - data));
+        goto error;
+      }
+
+      mstring->iso_639_langcode[0] = GST_READ_UINT8 (data);
+      data += 1;
+      mstring->iso_639_langcode[1] = GST_READ_UINT8 (data);
+      data += 1;
+      mstring->iso_639_langcode[2] = GST_READ_UINT8 (data);
+      data += 1;
+      num_segments = GST_READ_UINT8 (data);
+      data += 1;
+
+      for (j = 0; j < num_segments; j++) {
+        GstMpegTsAtscStringSegment *seg;
+
+        seg = g_slice_new0 (GstMpegTsAtscStringSegment);
+        g_ptr_array_add (mstring->segments, seg);
+
+        /* each entry needs at least 3 bytes */
+        if (end - data < 3) {
+          GST_WARNING ("Data too short for multstring parsing %d", datasize);
+          goto error;
+        }
+
+        seg->compression_type = GST_READ_UINT8 (data);
+        data += 1;
+        seg->mode = GST_READ_UINT8 (data);
+        data += 1;
+        seg->compressed_data_size = GST_READ_UINT8 (data);
+        data += 1;
+
+        if (end - data < seg->compressed_data_size) {
+          GST_WARNING ("Data too short for multstring parsing %d", datasize);
+          goto error;
+        }
+
+        if (seg->compressed_data_size)
+          seg->compressed_data = data;
+        data += seg->compressed_data_size;
+      }
+
+    }
+  }
+  return res;
+
+error:
+  if (res)
+    g_ptr_array_unref (res);
+  return NULL;
+}
+
+/* EIT */
+
+static GstMpegTsAtscEITEvent *
+_gst_mpegts_atsc_eit_event_copy (GstMpegTsAtscEITEvent * event)
+{
+  GstMpegTsAtscEITEvent *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscEITEvent, event);
+  copy->titles = g_ptr_array_ref (event->titles);
+  copy->descriptors = g_ptr_array_ref (event->descriptors);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_eit_event_free (GstMpegTsAtscEITEvent * event)
+{
+  if (event->titles)
+    g_ptr_array_unref (event->titles);
+  if (event->descriptors)
+    g_ptr_array_unref (event->descriptors);
+  g_slice_free (GstMpegTsAtscEITEvent, event);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscEITEvent, gst_mpegts_atsc_eit_event,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_eit_event_copy,
+    (GFreeFunc) _gst_mpegts_atsc_eit_event_free);
+
+static GstMpegTsAtscEIT *
+_gst_mpegts_atsc_eit_copy (GstMpegTsAtscEIT * eit)
+{
+  GstMpegTsAtscEIT *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscEIT, eit);
+  copy->events = g_ptr_array_ref (eit->events);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_eit_free (GstMpegTsAtscEIT * eit)
+{
+  if (eit->events)
+    g_ptr_array_unref (eit->events);
+  g_slice_free (GstMpegTsAtscEIT, eit);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscEIT, gst_mpegts_atsc_eit,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_eit_copy,
+    (GFreeFunc) _gst_mpegts_atsc_eit_free);
+
+static gpointer
+_parse_atsc_eit (GstMpegTsSection * section)
+{
+  GstMpegTsAtscEIT *eit = NULL;
+  guint i = 0;
+  guint8 *data, *end;
+  guint8 num_events;
+
+  eit = g_slice_new0 (GstMpegTsAtscEIT);
+
+  data = section->data;
+  end = data + section->section_length;
+
+  eit->source_id = section->subtable_extension;
+
+  /* Skip already parsed data */
+  data += 8;
+
+  eit->protocol_version = GST_READ_UINT8 (data);
+  data += 1;
+  num_events = GST_READ_UINT8 (data);
+  data += 1;
+
+  eit->events = g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_atsc_eit_event_free);
+
+  for (i = 0; i < num_events; i++) {
+    GstMpegTsAtscEITEvent *event;
+    guint32 tmp;
+    guint8 text_length;
+    guint16 descriptors_loop_length;
+
+    if (end - data < 12) {
+      GST_WARNING ("PID %d invalid EIT entry length %d with %u events",
+          section->pid, (gint) (end - 4 - data), num_events);
+      goto error;
+    }
+
+    event = g_slice_new0 (GstMpegTsAtscEITEvent);
+    g_ptr_array_add (eit->events, event);
+
+    event->event_id = GST_READ_UINT16_BE (data) & 0x3FFF;
+    data += 2;
+    event->start_time = GST_READ_UINT32_BE (data);
+    data += 4;
+
+    tmp = GST_READ_UINT32_BE (data);
+    data += 4;
+    event->etm_location = (tmp >> 28) & 0x3;
+    event->length_in_seconds = (tmp >> 8) & 0x0FFFFF;
+    text_length = tmp & 0xFF;
+
+    if (text_length > end - data - 4 - 2) {
+      GST_WARNING ("PID %d invalid EIT entry length %d with %u events",
+          section->pid, (gint) (end - 4 - data), num_events);
+      goto error;
+    }
+    event->titles = _parse_atsc_mult_string (data, text_length);
+    data += text_length;
+
+    descriptors_loop_length = GST_READ_UINT16_BE (data) & 0x0FFF;
+    data += 2;
+
+    if (end - data - 4 < descriptors_loop_length) {
+      GST_WARNING ("PID %d invalid EIT entry length %d with %u events",
+          section->pid, (gint) (end - 4 - data), num_events);
+      goto error;
+    }
+
+    event->descriptors =
+        gst_mpegts_parse_descriptors (data, descriptors_loop_length);
+    data += descriptors_loop_length;
+  }
+
+  if (data != end - 4) {
+    GST_WARNING ("PID %d invalid EIT parsed %d length %d",
+        section->pid, (gint) (data - section->data), section->section_length);
+    goto error;
+  }
+
+  return (gpointer) eit;
+
+error:
+  _gst_mpegts_atsc_eit_free (eit);
+
+  return NULL;
+
+}
+
+/**
+ * gst_mpegts_section_get_atsc_eit:
+ * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_EIT
+ *
+ * Returns the #GstMpegTsAtscEIT contained in the @section.
+ *
+ * Returns: The #GstMpegTsAtscEIT contained in the section, or %NULL if an error
+ * happened.
+ */
+const GstMpegTsAtscEIT *
+gst_mpegts_section_get_atsc_eit (GstMpegTsSection * section)
+{
+  g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_EIT,
+      NULL);
+  g_return_val_if_fail (section->cached_parsed || section->data, NULL);
+
+  if (!section->cached_parsed)
+    section->cached_parsed =
+        __common_section_checks (section, 14, _parse_atsc_eit,
+        (GDestroyNotify) _gst_mpegts_atsc_eit_free);
+
+  return (const GstMpegTsAtscEIT *) section->cached_parsed;
+}
+
+
+static GstMpegTsAtscETT *
+_gst_mpegts_atsc_ett_copy (GstMpegTsAtscETT * ett)
+{
+  GstMpegTsAtscETT *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscETT, ett);
+  copy->messages = g_ptr_array_ref (ett->messages);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_ett_free (GstMpegTsAtscETT * ett)
+{
+  if (ett->messages)
+    g_ptr_array_unref (ett->messages);
+  g_slice_free (GstMpegTsAtscETT, ett);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscETT, gst_mpegts_atsc_ett,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_ett_copy,
+    (GFreeFunc) _gst_mpegts_atsc_ett_free);
+
+static gpointer
+_parse_ett (GstMpegTsSection * section)
+{
+  GstMpegTsAtscETT *ett = NULL;
+  guint8 *data, *end;
+
+  ett = g_slice_new0 (GstMpegTsAtscETT);
+
+  data = section->data;
+  end = data + section->section_length;
+
+  ett->ett_table_id_extension = section->subtable_extension;
+
+  /* Skip already parsed data */
+  data += 8;
+
+  ett->protocol_version = GST_READ_UINT8 (data);
+  data += 1;
+  ett->etm_id = GST_READ_UINT32_BE (data);
+  data += 4;
+
+  ett->messages = _parse_atsc_mult_string (data, end - data - 4);
+  data += end - data - 4;
+
+  if (data != end - 4) {
+    GST_WARNING ("PID %d invalid ETT parsed %d length %d",
+        section->pid, (gint) (data - section->data), section->section_length);
+    goto error;
+  }
+
+  return (gpointer) ett;
+
+error:
+  _gst_mpegts_atsc_ett_free (ett);
+
+  return NULL;
+
+}
+
+/**
+ * gst_mpegts_section_get_atsc_ett:
+ * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_ETT
+ *
+ * Returns the #GstMpegTsAtscETT contained in the @section.
+ *
+ * Returns: The #GstMpegTsAtscETT contained in the section, or %NULL if an error
+ * happened.
+ */
+const GstMpegTsAtscETT *
+gst_mpegts_section_get_atsc_ett (GstMpegTsSection * section)
+{
+  g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_ETT,
+      NULL);
+  g_return_val_if_fail (section->cached_parsed || section->data, NULL);
+
+  if (!section->cached_parsed)
+    section->cached_parsed = __common_section_checks (section, 17, _parse_ett,
+        (GDestroyNotify) _gst_mpegts_atsc_ett_free);
+
+  return (const GstMpegTsAtscETT *) section->cached_parsed;
+}
+
+/* STT */
+
+static GstMpegTsAtscSTT *
+_gst_mpegts_atsc_stt_copy (GstMpegTsAtscSTT * stt)
+{
+  GstMpegTsAtscSTT *copy;
+
+  copy = g_slice_dup (GstMpegTsAtscSTT, stt);
+  copy->descriptors = g_ptr_array_ref (stt->descriptors);
+
+  return copy;
+}
+
+static void
+_gst_mpegts_atsc_stt_free (GstMpegTsAtscSTT * stt)
+{
+  if (stt->descriptors)
+    g_ptr_array_unref (stt->descriptors);
+  g_slice_free (GstMpegTsAtscSTT, stt);
+}
+
+G_DEFINE_BOXED_TYPE (GstMpegTsAtscSTT, gst_mpegts_atsc_stt,
+    (GBoxedCopyFunc) _gst_mpegts_atsc_stt_copy,
+    (GFreeFunc) _gst_mpegts_atsc_stt_free);
+
+static gpointer
+_parse_atsc_stt (GstMpegTsSection * section)
+{
+  GstMpegTsAtscSTT *stt = NULL;
+  guint8 *data, *end;
+  guint16 daylight_saving;
+
+  stt = g_slice_new0 (GstMpegTsAtscSTT);
+
+  data = section->data;
+  end = data + section->section_length;
+
+  /* Skip already parsed data */
+  data += 8;
+
+  stt->protocol_version = GST_READ_UINT8 (data);
+  data += 1;
+  stt->system_time = GST_READ_UINT32_BE (data);
+  data += 4;
+  stt->gps_utc_offset = GST_READ_UINT8 (data);
+  data += 1;
+
+  daylight_saving = GST_READ_UINT16_BE (data);
+  data += 2;
+  stt->ds_status = daylight_saving >> 15;
+  stt->ds_dayofmonth = (daylight_saving >> 8) & 0x1F;
+  stt->ds_hour = daylight_saving & 0xFF;
+
+  stt->descriptors = gst_mpegts_parse_descriptors (data, end - data - 4);
+  if (stt->descriptors == NULL)
+    goto error;
+
+  return (gpointer) stt;
+
+error:
+  _gst_mpegts_atsc_stt_free (stt);
+
+  return NULL;
+}
+
+
+/**
+ * gst_mpegts_section_get_atsc_stt:
+ * @section: a #GstMpegTsSection of type %GST_MPEGTS_SECTION_ATSC_STT
+ *
+ * Returns the #GstMpegTsAtscSTT contained in the @section.
+ *
+ * Returns: The #GstMpegTsAtscSTT contained in the section, or %NULL if an error
+ * happened.
+ */
+const GstMpegTsAtscSTT *
+gst_mpegts_section_get_atsc_stt (GstMpegTsSection * section)
+{
+  g_return_val_if_fail (section->section_type == GST_MPEGTS_SECTION_ATSC_STT,
+      NULL);
+  g_return_val_if_fail (section->cached_parsed || section->data, NULL);
+
+  if (!section->cached_parsed)
+    section->cached_parsed =
+        __common_section_checks (section, 20, _parse_atsc_stt,
+        (GDestroyNotify) _gst_mpegts_atsc_stt_free);
+
+  return (const GstMpegTsAtscSTT *) section->cached_parsed;
+}
+
+#define GPS_TO_UTC_TICKS G_GINT64_CONSTANT(315964800)
+static GstDateTime *
+_gst_mpegts_atsc_gps_time_to_datetime (guint32 systemtime, guint8 gps_offset)
+{
+  return gst_date_time_new_from_unix_epoch_utc (systemtime - gps_offset +
+      GPS_TO_UTC_TICKS);
+}
+
+GstDateTime *
+gst_mpegts_atsc_stt_get_datetime_utc (GstMpegTsAtscSTT * stt)
+{
+  if (stt->utc_datetime == NULL)
+    stt->utc_datetime = _gst_mpegts_atsc_gps_time_to_datetime (stt->system_time,
+        stt->gps_utc_offset);
+
+  if (stt->utc_datetime)
+    return gst_date_time_ref (stt->utc_datetime);
+  return NULL;
 }
diff --git a/gst-libs/gst/mpegts/gst-atsc-section.h b/gst-libs/gst/mpegts/gst-atsc-section.h
index dbf5fb1..7851d01 100644
--- a/gst-libs/gst/mpegts/gst-atsc-section.h
+++ b/gst-libs/gst/mpegts/gst-atsc-section.h
@@ -66,21 +66,21 @@
   GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL       = 0xDA,
 } GstMpegTsSectionATSCTableID;
 
-/* TVCT */
-#define GST_TYPE_MPEGTS_ATSC_TVCT (gst_mpegts_atsc_tvct_get_type ())
-#define GST_TYPE_MPEGTS_ATSC_TVCT_SOURCE (gst_mpegts_atsc_tvct_source_get_type ())
+/* TVCT/CVCT */
+#define GST_TYPE_MPEGTS_ATSC_VCT (gst_mpegts_atsc_vct_get_type ())
+#define GST_TYPE_MPEGTS_ATSC_VCT_SOURCE (gst_mpegts_atsc_vct_source_get_type ())
 
-typedef struct _GstMpegTsAtscTVCTSource GstMpegTsAtscTVCTSource;
-typedef struct _GstMpegTsAtscTVCT GstMpegTsAtscTVCT;
+typedef struct _GstMpegTsAtscVCTSource GstMpegTsAtscVCTSource;
+typedef struct _GstMpegTsAtscVCT GstMpegTsAtscVCT;
 
 /**
- * GstMpegTsAtscTVCTSource:
+ * GstMpegTsAtscVCTSource:
  *
- * Source from a @GstMpegTsAtscTVCT
+ * Source from a @GstMpegTsAtscVCT, can be used both for TVCT and CVCT tables
  */
-struct _GstMpegTsAtscTVCTSource
+struct _GstMpegTsAtscVCTSource
 {
-  gunichar2 *short_name;
+  gchar    *short_name;
   guint16   major_channel_number;
   guint16   minor_channel_number;
   guint8    modulation_mode;
@@ -91,6 +91,8 @@
   guint8    ETM_location;
   gboolean  access_controlled;
   gboolean  hidden;
+  gboolean  path_select; /* CVCT only - reserved bit in TVCT */
+  gboolean  out_of_band; /* CVCT only - reserved bit in TVCT */
   gboolean  hide_guide;
   /* FIXME: */
   guint8    service_type;
@@ -99,12 +101,14 @@
 };
 
 /**
- * GstMpegTsAtscTVCT:
+ * GstMpegTsAtscVCT:
  *
- * Terrestrial Virtual Channel Table (A65)
+ * Represents both:
+ *   Terrestrial Virtual Channel Table (A65)
+ *   Cable Virtual Channel Table (A65)
  *
  */
-struct _GstMpegTsAtscTVCT
+struct _GstMpegTsAtscVCT
 {
   guint16   transport_stream_id;
   guint8    protocol_version;
@@ -112,10 +116,179 @@
   GPtrArray *descriptors;
 };
 
-GType gst_mpegts_atsc_tvct_get_type (void);
-GType gst_mpegts_atsc_tvct_source_get_type (void);
+GType gst_mpegts_atsc_vct_get_type (void);
+GType gst_mpegts_atsc_vct_source_get_type (void);
 
-const GstMpegTsAtscTVCT * gst_mpegts_section_get_atsc_tvct (GstMpegTsSection * section);
+const GstMpegTsAtscVCT * gst_mpegts_section_get_atsc_tvct (GstMpegTsSection * section);
+const GstMpegTsAtscVCT * gst_mpegts_section_get_atsc_cvct (GstMpegTsSection * section);
+
+/* MGT */
+#define GST_TYPE_MPEGTS_ATSC_MGT (gst_mpegts_atsc_mgt_get_type ())
+#define GST_TYPE_MPEGTS_ATSC_MGT_TABLE (gst_mpegts_atsc_mgt_table_get_type ())
+
+typedef struct _GstMpegTsAtscMGTTable GstMpegTsAtscMGTTable;
+typedef struct _GstMpegTsAtscMGT GstMpegTsAtscMGT;
+
+typedef enum {
+  GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_EIT0 = 0x0100,
+  GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_EIT127 = 0x017F,
+  GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_ETT0 = 0x0200,
+  GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_ETT127 = 0x027F
+} GstMpegTsAtscMGTTableType;
+
+/**
+ * GstMpegTsAtscMGTTable:
+ *
+ * Source from a @GstMpegTsAtscMGT
+ */
+struct _GstMpegTsAtscMGTTable
+{
+  guint16 table_type;
+  guint16 pid;
+  guint8  version_number;
+  guint32 number_bytes;
+  GPtrArray *descriptors;
+};
+
+/**
+ * GstMpegTsAtscMGT:
+ *
+ * Terrestrial Virtual Channel Table (A65)
+ *
+ */
+struct _GstMpegTsAtscMGT
+{
+  guint8  protocol_version;
+  guint16 tables_defined;
+  GPtrArray *tables;
+  GPtrArray *descriptors;
+};
+
+GType gst_mpegts_atsc_mgt_get_type (void);
+GType gst_mpegts_atsc_mgt_table_get_type (void);
+
+const GstMpegTsAtscMGT * gst_mpegts_section_get_atsc_mgt (GstMpegTsSection * section);
+
+/* Multiple string structure (used in ETT and EIT */
+
+#define GST_TYPE_MPEGTS_ATSC_STRING_SEGMENT (gst_mpegts_atsc_string_segment_get_type())
+#define GST_TYPE_MPEGTS_ATSC_MULT_STRING (gst_mpegts_atsc_mult_string_get_type())
+
+typedef struct _GstMpegTsAtscStringSegment GstMpegTsAtscStringSegment;
+typedef struct _GstMpegTsAtscMultString GstMpegTsAtscMultString;
+
+struct _GstMpegTsAtscStringSegment {
+  guint8 compression_type;
+  guint8 mode;
+  guint8 compressed_data_size;
+  guint8 *compressed_data;
+
+  gchar *cached_string;
+};
+
+const gchar * gst_mpegts_atsc_string_segment_get_string (GstMpegTsAtscStringSegment * seg);
+
+struct _GstMpegTsAtscMultString {
+  gchar      iso_639_langcode[4];
+  GPtrArray *segments;
+};
+
+GType gst_mpegts_atsc_string_segment_get_type (void);
+GType gst_mpegts_atsc_mult_string_get_type (void);
+
+/* EIT */
+
+#define GST_TYPE_MPEGTS_ATSC_EIT_EVENT (gst_mpegts_atsc_eit_event_get_type())
+#define GST_TYPE_MPEGTS_ATSC_EIT (gst_mpegts_atsc_eit_get_type())
+
+typedef struct _GstMpegTsAtscEITEvent GstMpegTsAtscEITEvent;
+typedef struct _GstMpegTsAtscEIT GstMpegTsAtscEIT;
+
+struct _GstMpegTsAtscEITEvent {
+  guint16        event_id;
+  guint32        start_time;
+  guint8         etm_location;
+  guint32        length_in_seconds;
+  GPtrArray     *titles;
+
+  GPtrArray *descriptors;
+};
+
+/**
+ * GstMpegTsAtscEIT:
+ * @events: (element-type GstMpegTsAtscEITEvent): Events
+ *
+ * Event Information Table (ATSC)
+ *
+ */
+struct _GstMpegTsAtscEIT
+{
+  guint16        source_id;
+  guint8         protocol_version;
+
+  GPtrArray     *events;
+};
+
+GType gst_mpegts_atsc_eit_event_get_type (void);
+GType gst_mpegts_atsc_eit_get_type (void);
+
+const GstMpegTsAtscEIT *gst_mpegts_section_get_atsc_eit (GstMpegTsSection *section);
+
+/* ETT */
+
+#define GST_TYPE_MPEGTS_ATSC_ETT (gst_mpegts_atsc_ett_get_type())
+
+typedef struct _GstMpegTsAtscETT GstMpegTsAtscETT;
+
+/**
+ * GstMpegTsAtscETT:
+ * @messages: (element-type GstMpegTsAtscMultString): List of texts
+ *
+ * Extended Text Table (ATSC)
+ *
+ */
+struct _GstMpegTsAtscETT
+{
+  guint16        ett_table_id_extension;
+  guint16        protocol_version;
+  guint32        etm_id;
+
+  GPtrArray     *messages;
+};
+
+GType gst_mpegts_atsc_ett_get_type (void);
+
+const GstMpegTsAtscETT *gst_mpegts_section_get_atsc_ett (GstMpegTsSection *section);
+
+/* STT */
+#define GST_TYPE_MPEGTS_ATSC_STT (gst_mpegts_atsc_stt_get_type ())
+
+typedef struct _GstMpegTsAtscSTT GstMpegTsAtscSTT;
+
+/**
+ * GstMpegTsAtscSTT:
+ *
+ * System Time Table (A65)
+ *
+ */
+struct _GstMpegTsAtscSTT
+{
+  guint8     protocol_version;
+  guint32    system_time;
+  guint8     gps_utc_offset;
+  gboolean   ds_status;
+  guint8     ds_dayofmonth;
+  guint8     ds_hour;
+  GPtrArray *descriptors;
+
+  GstDateTime *utc_datetime;
+};
+
+GType gst_mpegts_atsc_stt_get_type (void);
+
+const GstMpegTsAtscSTT * gst_mpegts_section_get_atsc_stt (GstMpegTsSection * section);
+/* FIXME receive a non-const parameter but we only provide a const getter */
+GstDateTime * gst_mpegts_atsc_stt_get_datetime_utc (GstMpegTsAtscSTT * stt);
 
 G_END_DECLS
 
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index 279a9a9..2376b2e 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -44,7 +44,6 @@
  *   handled in mpegtsbase:
  *   * GST_MTS_DESC_DVB_DATA_BROADCAST_ID
  *   * GST_MTS_DESC_DVB_CAROUSEL_IDENTIFIER
- *   * GST_MTS_DESC_DVB_FREQUENCY_LIST
  */
 
 #define BCD_UN(a) ((a) & 0x0f)
@@ -112,6 +111,79 @@
   return descriptor;
 }
 
+/* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
+static void
+_gst_mpegts_dvb_service_list_item_free (GstMpegTsDVBServiceListItem * item)
+{
+  g_slice_free (GstMpegTsDVBServiceListItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_service_list:
+ * @descriptor: a %GST_MTS_DESC_DVB_SERVICE_LIST #GstMpegTsDescriptor
+ * @list: (out) (transfer full) (element-type GstMpegTsDVBServiceListItem):
+ * the list of services
+ *
+ * Parses out a list of services from the @descriptor:
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegTsDescriptor *
+    descriptor, GPtrArray ** list)
+{
+  guint8 *data, i;
+
+  g_return_val_if_fail (descriptor != NULL && list != NULL, FALSE);
+  /* a entry has 3 bytes, 2 for service id, 1 for service type */
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_SERVICE_LIST, 3, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *list = g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_dvb_service_list_item_free);
+
+  for (i = 0; i < descriptor->length - 2; i += 3) {
+    GstMpegTsDVBServiceListItem *item =
+        g_slice_new0 (GstMpegTsDVBServiceListItem);
+
+    g_ptr_array_add (*list, item);
+    item->service_id = GST_READ_UINT16_BE (data);
+    data += 2;
+
+    item->type = *data;
+    data += 1;
+  }
+
+  return TRUE;
+}
+
+/* GST_MTS_DESC_DVB_STUFFING (0x42) */
+/**
+ * gst_mpegts_descriptor_parse_dvb_stuffing:
+ * @descriptor: a %GST_MTS_DESC_DVB_STUFFING #GstMpegTsDescriptor
+ * @stuffing_bytes: (out): the stuffing bytes
+ *
+ * Parses out the stuffing bytes from the @descriptor.
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegTsDescriptor *
+    descriptor, guint8 ** stuffing_bytes)
+{
+  guint8 *data;
+
+  g_return_val_if_fail (descriptor != NULL && stuffing_bytes != NULL, FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_STUFFING, 0, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *stuffing_bytes = g_memdup (data, descriptor->length);
+
+  return TRUE;
+}
+
 /* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
 /**
  * gst_mpegts_descriptor_parse_satellite_delivery_system:
@@ -316,6 +388,32 @@
   return TRUE;
 }
 
+/* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */
+/**
+ * gst_mpegts_descriptor_parse_dvb_bouquet_name:
+ * @bouquet_name: (out) (transfer full) (allow-none): the bouquet name
+ *
+ * Extracts the bouquet name from @descriptor.
+ *
+ * Returns: %TRUE if parsing succeeded, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegTsDescriptor *
+    descriptor, gchar ** bouquet_name)
+{
+  guint8 *data;
+
+  g_return_val_if_fail (descriptor != NULL && bouquet_name != NULL, FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_BOUQUET_NAME, 1, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *bouquet_name =
+      get_encoding_and_convert ((const gchar *) data, descriptor->length);
+
+  return TRUE;
+}
+
 /* GST_MTS_DESC_DVB_SERVICE (0x48) */
 /**
  * gst_mpegts_descriptor_parse_dvb_service:
@@ -474,8 +572,8 @@
       hand_over = g_slice_new0 (GstMpegTsDVBLinkageMobileHandOver);
       res->linkage_data = (gpointer) hand_over;
 
-      hand_over->origin_type = (*data >> 7) & 0x01;
-      hand_over->hand_over_type = *data & 0x0f;
+      hand_over->origin_type = (*data) & 0x01;
+      hand_over->hand_over_type = (*data >> 4) & 0x0f;
       data += 1;
 
       if (hand_over->hand_over_type ==
@@ -825,10 +923,9 @@
 gst_mpegts_descriptor_parse_dvb_extended_event (const GstMpegTsDescriptor
     * descriptor, GstMpegTsExtendedEventDescriptor * res)
 {
-  guint8 *data, *desc_data;
+  guint8 *data, *pdata;
   guint8 tmp, len_item;
   GstMpegTsExtendedEventItem *item;
-  guint i;
 
   g_return_val_if_fail (descriptor != NULL && res != NULL, FALSE);
   /* Need at least 6 bytes (1 for desc number, 3 for language code, 2 for the loop length) */
@@ -842,37 +939,36 @@
 
   data += 1;
 
-  memcpy (data, res->language_code, 3);
+  memcpy (res->language_code, data, 3);
+  res->language_code[3] = 0;
 
   data += 3;
 
   len_item = *data;
+  if (len_item > descriptor->length - 5)
+    return FALSE;
 
   data += 1;
 
-  res->nb_items = 0;
   res->items = g_ptr_array_new_with_free_func ((GDestroyNotify)
       _gst_mpegts_extended_event_item_free);
 
-  for (i = 0; i < len_item;) {
-    desc_data = data;
+  pdata = data + len_item;
+  while (data < pdata) {
     item = g_slice_new0 (GstMpegTsExtendedEventItem);
     item->item_description =
-        get_encoding_and_convert ((const gchar *) desc_data + 1, *desc_data);
+        get_encoding_and_convert ((const gchar *) data + 1, *data);
 
-    desc_data += *desc_data + 1;
-    i += *desc_data + 1;
+    data += *data + 1;
 
-    item->item =
-        get_encoding_and_convert ((const gchar *) desc_data + 1, *desc_data);
+    item->item = get_encoding_and_convert ((const gchar *) data + 1, *data);
 
-    desc_data += *desc_data + 1;
-    i += *desc_data + 1;
+    data += *data + 1;
 
     g_ptr_array_add (res->items, item);
-    res->nb_items += 1;
   }
-  data += len_item;
+  if (pdata != data)
+    return FALSE;
   res->text = get_encoding_and_convert ((const gchar *) data + 1, *data);
 
   return TRUE;
@@ -911,7 +1007,8 @@
   res->component_tag = *data;
   data += 1;
 
-  memcpy (data, res->language_code, 3);
+  memcpy (res->language_code, data, 3);
+  res->language_code[3] = 0;
   data += 3;
 
   len = descriptor->length - 6;
@@ -1068,7 +1165,8 @@
         g_slice_new0 (GstMpegTsDVBParentalRatingItem);
     g_ptr_array_add (*rating, item);
 
-    memcpy (data, item->country_code, 3);
+    memcpy (item->country_code, data, 3);
+    item->country_code[3] = 0;
     data += 3;
 
     if (g_strcmp0 (item->country_code, "BRA") == 0) {
@@ -1282,14 +1380,238 @@
   return TRUE;
 }
 
+/* GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME (0x5B) */
+static void
+    _gst_mpegts_dvb_multilingual_network_name_item_free
+    (GstMpegTsDvbMultilingualNetworkNameItem * item)
+{
+  g_slice_free (GstMpegTsDvbMultilingualNetworkNameItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_multilingual_network_name:
+ * @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME
+ * #GstMpegTsDescriptor
+ * @network_name_items: (out) (element-type GstMpegTsDvbMultilingualNetworkNameItem):
+ * a #GstMpegTsDvbMultilingualNetworkNameItem
+ *
+ * Parses out the multilingual network name from the @descriptor.
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const
+    GstMpegTsDescriptor * descriptor, GPtrArray ** network_name_items)
+{
+  guint8 *data, i, len;
+  GstMpegTsDvbMultilingualNetworkNameItem *item;
+
+  g_return_val_if_fail (descriptor != NULL && network_name_items != NULL,
+      FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME,
+      5, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *network_name_items = g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_dvb_multilingual_network_name_item_free);
+
+  for (i = 0; i < descriptor->length - 3;) {
+    item = g_slice_new0 (GstMpegTsDvbMultilingualNetworkNameItem);
+    g_ptr_array_add (*network_name_items, item);
+    memcpy (item->language_code, data, 3);
+    data += 3;
+    i += 3;
+
+    len = *data;
+    item->network_name =
+        get_encoding_and_convert ((const gchar *) data + 1, len);
+    data += len + 1;
+    i += len + 1;
+  }
+
+  return TRUE;
+}
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME (0x5C) */
+static void
+    _gst_mpegts_dvb_multilingual_bouquet_name_item_free
+    (GstMpegTsDvbMultilingualBouquetNameItem * item)
+{
+  g_slice_free (GstMpegTsDvbMultilingualBouquetNameItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name:
+ * @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME
+ * #GstMpegTsDescriptor
+ * @bouquet_name_items: (out) (element-type GstMpegTsDvbMultilingualBouquetNameItem):
+ * a #GstMpegTsDvbMultilingualBouquetNameItem
+ *
+ * Parses out the multilingual bouquet name from the @descriptor.
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const
+    GstMpegTsDescriptor * descriptor, GPtrArray ** bouquet_name_items)
+{
+  guint8 *data, i, len;
+  GstMpegTsDvbMultilingualBouquetNameItem *item;
+
+  g_return_val_if_fail (descriptor != NULL && bouquet_name_items != NULL,
+      FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME,
+      5, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *bouquet_name_items = g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_dvb_multilingual_bouquet_name_item_free);
+
+  for (i = 0; i < descriptor->length - 3;) {
+    item = g_slice_new0 (GstMpegTsDvbMultilingualBouquetNameItem);
+    g_ptr_array_add (*bouquet_name_items, item);
+    memcpy (item->language_code, data, 3);
+    data += 3;
+    i += 3;
+
+    len = *data;
+    item->bouquet_name =
+        get_encoding_and_convert ((const gchar *) data + 1, len);
+    data += len + 1;
+    i += len + 1;
+  }
+
+  return TRUE;
+}
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME (0x5D) */
+static void
+    _gst_mpegts_dvb_multilingual_service_name_item_free
+    (GstMpegTsDvbMultilingualServiceNameItem * item)
+{
+  g_slice_free (GstMpegTsDvbMultilingualServiceNameItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_multilingual_service_name:
+ * @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME
+ * #GstMpegTsDescriptor
+ * @service_name_items: (out) (element-type GstMpegTsDvbMultilingualServiceNameItem):
+ * a #GstMpegTsDvbMultilingualServiceNameItem
+ *
+ * Parses out the multilingual service name from the @descriptor.
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const
+    GstMpegTsDescriptor * descriptor, GPtrArray ** service_name_items)
+{
+  guint8 *data, i, len;
+  GstMpegTsDvbMultilingualServiceNameItem *item;
+
+  g_return_val_if_fail (descriptor != NULL && service_name_items != NULL,
+      FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME,
+      7, FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *service_name_items = g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_dvb_multilingual_service_name_item_free);
+
+  for (i = 0; i < descriptor->length - 3;) {
+    item = g_slice_new0 (GstMpegTsDvbMultilingualServiceNameItem);
+    g_ptr_array_add (*service_name_items, item);
+    memcpy (item->language_code, data, 3);
+    data += 3;
+    i += 3;
+
+    len = *data;
+    item->provider_name =
+        get_encoding_and_convert ((const gchar *) data + 1, len);
+    data += len + 1;
+    i += len + 1;
+
+    len = *data;
+    item->service_name =
+        get_encoding_and_convert ((const gchar *) data + 1, len);
+    data += len + 1;
+    i += len + 1;
+  }
+
+  return TRUE;
+}
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT (0x5E) */
+static void
+    _gst_mpegts_dvb_multilingual_component_item_free
+    (GstMpegTsDvbMultilingualComponentItem * item)
+{
+  g_slice_free (GstMpegTsDvbMultilingualComponentItem, item);
+}
+
+/**
+ * gst_mpegts_descriptor_parse_dvb_multilingual_component:
+ * @descriptor: a %GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT
+ * #GstMpegTsDescriptor
+ * @component_tag: the component tag
+ * @component_description_items: (out) (element-type GstMpegTsDvbMultilingualComponentItem):
+ * a #GstMpegTsDvbMultilingualComponentItem
+ *
+ * Parses out the multilingual component from the @descriptor.
+ *
+ * Returns: %TRUE if the parsing happened correctly, else %FALSE.
+ */
+gboolean
+gst_mpegts_descriptor_parse_dvb_multilingual_component (const
+    GstMpegTsDescriptor * descriptor, guint8 * component_tag,
+    GPtrArray ** component_description_items)
+{
+  guint8 *data, i, len;
+  GstMpegTsDvbMultilingualComponentItem *item;
+
+  g_return_val_if_fail (descriptor != NULL
+      && component_description_items != NULL && component_tag != NULL, FALSE);
+  __common_desc_checks (descriptor, GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT, 6,
+      FALSE);
+
+  data = (guint8 *) descriptor->data + 2;
+
+  *component_tag = *data;
+  data += 1;
+
+  *component_description_items =
+      g_ptr_array_new_with_free_func ((GDestroyNotify)
+      _gst_mpegts_dvb_multilingual_component_item_free);
+
+  for (i = 0; i < descriptor->length - 3;) {
+    item = g_slice_new0 (GstMpegTsDvbMultilingualComponentItem);
+    g_ptr_array_add (*component_description_items, item);
+    memcpy (item->language_code, data, 3);
+    data += 3;
+    i += 3;
+
+    len = *data;
+    item->description =
+        get_encoding_and_convert ((const gchar *) data + 1, len);
+    data += len + 1;
+    i += len + 1;
+  }
+
+  return TRUE;
+}
+
 /* GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER (0x5F) */
 /**
  * gst_mpegts_descriptor_parse_dvb_private_data_specifier:
  * @descriptor: a %GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER #GstMpegTsDescriptor
  * @private_data_specifier: (out): the private data specifier id
  * registered by http://www.dvbservices.com/
- * @private_data: (out): additional data or NULL
- * @length: (out): length of %private_data
+ * @private_data: (out) (allow-none): additional data or NULL
+ * @length: (out) (allow-none): length of %private_data
  *
  * Parses out the private data specifier from the @descriptor.
  *
@@ -1311,10 +1633,11 @@
 
   *private_data_specifier = GST_READ_UINT32_BE (data);
 
-  *length = descriptor->length - 4;
+  if (length && private_data) {
+    *length = descriptor->length - 4;
 
-  *private_data = g_memdup (data + 4, *length);
-
+    *private_data = g_memdup (data + 4, *length);
+  }
   return TRUE;
 }
 
@@ -1323,7 +1646,8 @@
  * gst_mpegts_descriptor_parse_dvb_frequency_list:
  * @descriptor: a %GST_MTS_DESC_DVB_FREQUENCY_LIST #GstMpegTsDescriptor
  * @offset: (out): %FALSE in Hz, %TRUE in kHz
- * @list: (out): a list of all frequencies in Hz/kHz depending from %offset
+ * @list: (out) (element-type guint32): a list of all frequencies in Hz/kHz
+ * depending on %offset
  *
  * Parses out a list of frequencies from the @descriptor.
  *
@@ -1414,7 +1738,7 @@
   res->selector_bytes = g_memdup (data, len);
   data += len;
 
-  memcpy (data, res->language_code, 3);
+  memcpy (res->language_code, data, 3);
   data += 3;
 
   res->text = get_encoding_and_convert ((const gchar *) data + 1, *data);
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
index c1c0268..83ad97f 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h
@@ -161,6 +161,11 @@
 
 GstMpegTsDescriptor *gst_mpegts_descriptor_from_dvb_network_name (const gchar * name);
 
+/* GST_MTS_DESC_DVB_STUFFING (0x42) */
+gboolean gst_mpegts_descriptor_parse_dvb_stuffing (const GstMpegTsDescriptor * descriptor,
+                                                   guint8 ** stuffing_bytes);
+
+
 /* GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM (0x43) */
 typedef struct _GstMpegTsSatelliteDeliverySystemDescriptor GstMpegTsSatelliteDeliverySystemDescriptor;
 
@@ -278,6 +283,10 @@
 gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegTsDescriptor *descriptor,
 							    GstMpegTsCableDeliverySystemDescriptor *res);
 
+/* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */
+gboolean gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegTsDescriptor * descriptor,
+                                                       gchar ** bouquet_name);
+
 /* GST_MTS_DESC_DVB_SERVICE (0x48) */
 /**
  * GstMpegTsDVBServiceType:
@@ -330,6 +339,23 @@
 							     const gchar * service_name,
 							     const gchar * service_provider);
 
+/* GST_MTS_DESC_DVB_SERVICE_LIST (0x41) */
+typedef struct _GstMpegTsDVBServiceListItem GstMpegTsDVBServiceListItem;
+
+/**
+ * GstMpegTsDVBServiceListItem:
+ * @service_id: the id of a service
+ * @type: the type of a service
+ */
+struct _GstMpegTsDVBServiceListItem
+{
+  guint16                 service_id;
+  GstMpegTsDVBServiceType type;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_service_list (const GstMpegTsDescriptor * descriptor,
+    GPtrArray ** list);
+
 /* GST_MTS_DESC_DVB_LINKAGE (0x4A) */
 /**
  * GstMpegTsDVBLinkageType:
@@ -447,8 +473,7 @@
  * GstMpegTsExtendedEventDescriptor:
  * @desctiptor_number:
  * @last_descriptor_number:
- * @language_code:
- * @nb_items:
+ * @language_code: NULL terminated language code.
  * @items: (element-type GstMpegTsExtendedEventItem): the #GstMpegTsExtendedEventItem
  * @text:
  *
@@ -458,8 +483,7 @@
 {
   guint8 descriptor_number;
   guint8 last_descriptor_number;
-  gchar  language_code[3];
-  guint8 nb_items;
+  gchar  language_code[4];
   GPtrArray *items;
   gchar *text;
 };
@@ -468,6 +492,17 @@
 							  GstMpegTsExtendedEventDescriptor *res);
 
 /* GST_MTS_DESC_DVB_COMPONENT (0x50) */
+typedef enum {
+  GST_MPEGTS_STREAM_CONTENT_MPEG2_VIDEO          = 0x01,
+  GST_MPEGTS_STREAM_CONTENT_MPEG1_LAYER2_AUDIO   = 0x02,
+  GST_MPEGTS_STREAM_CONTENT_TELETEXT_OR_SUBTITLE = 0x03,
+  GST_MPEGTS_STREAM_CONTENT_AC_3                 = 0x04,
+  GST_MPEGTS_STREAM_CONTENT_AVC                  = 0x05,
+  GST_MPEGTS_STREAM_CONTENT_AAC                  = 0x06,
+  GST_MPEGTS_STREAM_CONTENT_DTS                  = 0x07,
+  GST_MPEGTS_STREAM_CONTENT_SRM_CPCM             = 0x08
+} GstMpegTsComponentStreamContent;
+
 typedef struct _GstMpegTsComponentDescriptor GstMpegTsComponentDescriptor;
 struct _GstMpegTsComponentDescriptor
 {
@@ -475,7 +510,7 @@
   guint8 component_type;
   guint8 component_tag;
   /* FIXME : Make it a separate (allocated, null-terminated) return value  */
-  gchar  language_code[3];
+  gchar  language_code[4];
   gchar *text;
 };
 
@@ -491,6 +526,20 @@
                                                         GArray ** list);
 
 /* GST_MTS_DESC_DVB_CONTENT (0x54) */
+typedef enum {
+  GST_MPEGTS_CONTENT_MOVIE_DRAMA                = 0x01,
+  GST_MPEGTS_CONTENT_NEWS_CURRENT_AFFAIRS       = 0x02,
+  GST_MPEGTS_CONTENT_SHOW_GAME_SHOW             = 0x03,
+  GST_MPEGTS_CONTENT_SPORTS                     = 0x04,
+  GST_MPEGTS_CONTENT_CHILDREN_YOUTH_PROGRAM     = 0x05,
+  GST_MPEGTS_CONTENT_MUSIC_BALLET_DANCE         = 0x06,
+  GST_MPEGTS_CONTENT_ARTS_CULTURE               = 0x07,
+  GST_MPEGTS_CONTENT_SOCIAL_POLITICAL_ECONOMICS = 0x08,
+  GST_MPEGTS_CONTENT_EDUCATION_SCIENCE_FACTUAL  = 0x09,
+  GST_MPEGTS_CONTENT_LEISURE_HOBBIES            = 0x0A,
+  GST_MPEGTS_CONTENT_SPECIAL_CHARACTERISTICS    = 0x0B
+} GstMpegTsContentNibbleHi;
+
 typedef struct _GstMpegTsContent GstMpegTsContent;
 struct _GstMpegTsContent
 {
@@ -513,7 +562,7 @@
  */
 struct _GstMpegTsDVBParentalRatingItem
 {
-  gchar  country_code[3];
+  gchar  country_code[4];
   guint8 rating;
 };
 
@@ -630,6 +679,82 @@
 gboolean gst_mpegts_descriptor_parse_terrestrial_delivery_system (const GstMpegTsDescriptor
               *descriptor, GstMpegTsTerrestrialDeliverySystemDescriptor * res);
 
+/* GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME (0x5B) */
+typedef struct _GstMpegTsDvbMultilingualNetworkNameItem GstMpegTsDvbMultilingualNetworkNameItem;
+
+/**
+ * GstMpegTsDvbMultilingualNetworkNameItem:
+ * @language_code: the ISO 639 language code
+ * @network_name: the network name
+ *
+ * a multilingual network name entry
+ */
+struct _GstMpegTsDvbMultilingualNetworkNameItem
+{
+  gchar language_code[4];
+  gchar *network_name;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_multilingual_network_name (const GstMpegTsDescriptor
+              *descriptor, GPtrArray ** network_name_items);
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME (0x5C) */
+typedef struct _GstMpegTsDvbMultilingualBouquetNameItem GstMpegTsDvbMultilingualBouquetNameItem;
+
+/**
+ * GstMpegTsDvbMultilingualBouquetNameItem:
+ * @language_code: the ISO 639 language code
+ * @bouquet_name: the bouquet name
+ *
+ * a multilingual bouquet name entry
+ */
+struct _GstMpegTsDvbMultilingualBouquetNameItem
+{
+  gchar language_code[4];
+  gchar *bouquet_name;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (const GstMpegTsDescriptor
+              *descriptor, GPtrArray ** bouquet_name_items);
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME (0x5D) */
+typedef struct _GstMpegTsDvbMultilingualServiceNameItem GstMpegTsDvbMultilingualServiceNameItem;
+
+/**
+ * GstMpegTsDvbMultilingualServiceNameItem:
+ * @language_code: the ISO 639 language code
+ * @provider_name: the provider name
+ * @service_name: the service name
+ *
+ * a multilingual service name entry
+ */
+struct _GstMpegTsDvbMultilingualServiceNameItem
+{
+  gchar language_code[4];
+  gchar *provider_name;
+  gchar *service_name;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_multilingual_service_name (const GstMpegTsDescriptor
+              *descriptor, GPtrArray ** service_name_items);
+
+/* GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT (0x5E) */
+typedef struct _GstMpegTsDvbMultilingualComponentItem GstMpegTsDvbMultilingualComponentItem;
+
+/**
+ * GstMpegTsDvbMultilingualComponentItem:
+ * @language_code: the ISO 639 language code
+ * @description: the component description
+ */
+struct _GstMpegTsDvbMultilingualComponentItem
+{
+  gchar language_code[4];
+  gchar *description;
+};
+
+gboolean gst_mpegts_descriptor_parse_dvb_multilingual_component (const GstMpegTsDescriptor
+              *descriptor, guint8 * component_tag, GPtrArray ** component_description_items);
+
 /* GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER (0x5F) */
 gboolean gst_mpegts_descriptor_parse_dvb_private_data_specifier (const GstMpegTsDescriptor
               * descriptor, guint32 * private_data_specifier, guint8 ** private_data,
@@ -655,7 +780,7 @@
   guint16     data_broadcast_id;
   guint8      component_tag;
   guint8      *selector_bytes;
-  gchar       language_code[3];
+  gchar       language_code[4];
   gchar       *text;
 };
 
diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
index 395b9ae..9a89627 100644
--- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
+++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c
@@ -968,7 +968,7 @@
   /* This descriptor loop can be empty, no size check required */
   __common_desc_checks (descriptor, GST_MTS_DESC_DTG_LOGICAL_CHANNEL, 0, FALSE);
 
-  data = (guint8 *) descriptor->data;
+  data = (guint8 *) descriptor->data + 2;
   res->nb_channels = descriptor->length / 4;
 
   for (i = 0; i < res->nb_channels; i++) {
diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c
index 97a7e4a..5167a39 100644
--- a/gst-libs/gst/mpegts/gstmpegtssection.c
+++ b/gst-libs/gst/mpegts/gstmpegtssection.c
@@ -1048,7 +1048,29 @@
       if (pid == 0x0014)
         return GST_MPEGTS_SECTION_TOT;
       break;
+    case GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL:
+      if (pid == 0x1ffb)
+        return GST_MPEGTS_SECTION_ATSC_TVCT;
+      break;
+    case GST_MTS_TABLE_ID_ATSC_CABLE_VIRTUAL_CHANNEL:
+      if (pid == 0x1ffb)
+        return GST_MPEGTS_SECTION_ATSC_CVCT;
+      break;
+    case GST_MTS_TABLE_ID_ATSC_MASTER_GUIDE:
+      if (pid == 0x1ffb)
+        return GST_MPEGTS_SECTION_ATSC_MGT;
+      break;
+    case GST_MTS_TABLE_ID_ATSC_EVENT_INFORMATION:
+      /* FIXME check pids reported on the MGT to confirm expectations */
+      return GST_MPEGTS_SECTION_ATSC_EIT;
+    case GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT:
+      /* FIXME check pids reported on the MGT to confirm expectations */
+      return GST_MPEGTS_SECTION_ATSC_ETT;
       /* FIXME : FILL */
+    case GST_MTS_TABLE_ID_ATSC_SYSTEM_TIME:
+      if (pid == 0x1ffb)
+        return GST_MPEGTS_SECTION_ATSC_STT;
+      break;
     default:
       /* Handle ranges */
       if (table_id >= GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT &&
diff --git a/gst-libs/gst/mpegts/gstmpegtssection.h b/gst-libs/gst/mpegts/gstmpegtssection.h
index eef9de1..291caac 100644
--- a/gst-libs/gst/mpegts/gstmpegtssection.h
+++ b/gst-libs/gst/mpegts/gstmpegtssection.h
@@ -52,6 +52,11 @@
  * @GST_MPEGTS_SECTION_TDT: Time and Date Table (EN 300 468)
  * @GST_MPEGTS_SECTION_TOT: Time Offset Table (EN 300 468)
  * @GST_MPEGTS_SECTION_ATSC_TVCT: ATSC Terrestrial Virtual Channel Table (A65)
+ * @GST_MPEGTS_SECTION_ATSC_CVCT: ATSC Cable Virtual Channel Table (A65)
+ * @GST_MPEGTS_SECTION_ATSC_MGT: ATSC Master Guide Table (A65)
+ * @GST_MPEGTS_SECTION_ATSC_ETT: ATSC Extended Text Table (A65)
+ * @GST_MPEGTS_SECTION_ATSC_EIT: ATSC Event Information Table (A65)
+ * @GST_MPEGTS_SECTION_ATSC_STT: ATSC System Time Table (A65)
  *
  * Types of #GstMpegTsSection that the library handles.
  */
@@ -67,7 +72,12 @@
   GST_MPEGTS_SECTION_SDT, 
   GST_MPEGTS_SECTION_TDT, 
   GST_MPEGTS_SECTION_TOT,
-  GST_MPEGTS_SECTION_ATSC_TVCT
+  GST_MPEGTS_SECTION_ATSC_TVCT,
+  GST_MPEGTS_SECTION_ATSC_CVCT,
+  GST_MPEGTS_SECTION_ATSC_MGT,
+  GST_MPEGTS_SECTION_ATSC_ETT,
+  GST_MPEGTS_SECTION_ATSC_EIT,
+  GST_MPEGTS_SECTION_ATSC_STT
 } GstMpegTsSectionType;
 
 /**
diff --git a/gst-libs/gst/uridownloader/Makefile.in b/gst-libs/gst/uridownloader/Makefile.in
index 6a568cb..147fa18 100644
--- a/gst-libs/gst/uridownloader/Makefile.in
+++ b/gst-libs/gst/uridownloader/Makefile.in
@@ -332,6 +332,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -418,6 +420,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -709,6 +712,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 lib_LTLIBRARIES = libgsturidownloader-@GST_API_VERSION@.la
 libgsturidownloader_@GST_API_VERSION@_la_SOURCES = \
 	gstfragment.c gsturidownloader.c
diff --git a/gst-libs/gst/uridownloader/gstfragment.c b/gst-libs/gst/uridownloader/gstfragment.c
index 33e4d70..2060ea2 100644
--- a/gst-libs/gst/uridownloader/gstfragment.c
+++ b/gst-libs/gst/uridownloader/gstfragment.c
@@ -180,6 +180,8 @@
 {
   GstFragment *fragment = GST_FRAGMENT (gobject);
 
+  g_free (fragment->uri);
+  g_free (fragment->redirect_uri);
   g_free (fragment->name);
   g_mutex_clear (&fragment->priv->lock);
 
diff --git a/gst-libs/gst/uridownloader/gstfragment.h b/gst-libs/gst/uridownloader/gstfragment.h
index d7292b4..bdf04f3 100644
--- a/gst-libs/gst/uridownloader/gstfragment.h
+++ b/gst-libs/gst/uridownloader/gstfragment.h
@@ -41,6 +41,10 @@
 {
   GObject parent;
 
+  gchar * uri;                  /* URI of the fragment */
+  gchar * redirect_uri;         /* Redirect target if any */
+  gboolean redirect_permanent;  /* If the redirect is permanent */
+
   gchar * name;                 /* Name of the fragment */
   gboolean completed;           /* Whether the fragment is complete or not */
   guint64 download_start_time;  /* Epoch time when the download started */
diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c
index 99d88e8..6f2c6b0 100644
--- a/gst-libs/gst/uridownloader/gsturidownloader.c
+++ b/gst-libs/gst/uridownloader/gsturidownloader.c
@@ -195,6 +195,7 @@
   if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
     GError *err = NULL;
     gchar *dbg_info = NULL;
+    gchar *new_error = NULL;
 
     gst_message_parse_error (message, &err, &dbg_info);
     GST_WARNING_OBJECT (downloader,
@@ -202,6 +203,13 @@
         err->message, GST_OBJECT_NAME (message->src));
     GST_DEBUG ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none");
 
+    if (dbg_info)
+      new_error = g_strdup_printf ("%s: %s\n", err->message, dbg_info);
+    if (new_error) {
+      g_free (err->message);
+      err->message = new_error;
+    }
+
     if (!downloader->priv->err)
       downloader->priv->err = err;
     else
@@ -545,10 +553,22 @@
 
       /* set the element state to NULL */
       GST_OBJECT_UNLOCK (downloader);
-      if (download == NULL)
+      if (download == NULL) {
         gst_element_set_state (urisrc, GST_STATE_NULL);
-      else
+      } else {
+        GstQuery *query;
+
+        /* Download successfull, let's query the URI */
+        query = gst_query_new_uri ();
+        if (gst_element_query (urisrc, query)) {
+          gst_query_parse_uri (query, &download->uri);
+          gst_query_parse_uri_redirection (query, &download->redirect_uri);
+          gst_query_parse_uri_redirection_permanent (query,
+              &download->redirect_permanent);
+        }
+        gst_query_unref (query);
         gst_element_set_state (urisrc, GST_STATE_READY);
+      }
       GST_OBJECT_LOCK (downloader);
       gst_element_set_bus (urisrc, NULL);
 
diff --git a/gst-libs/gst/uridownloader/gsturidownloader.h b/gst-libs/gst/uridownloader/gsturidownloader.h
index c40a460..80b8a3e 100644
--- a/gst-libs/gst/uridownloader/gsturidownloader.h
+++ b/gst-libs/gst/uridownloader/gsturidownloader.h
@@ -22,6 +22,11 @@
 #ifndef __GSTURI_DOWNLOADER_H__
 #define __GSTURI_DOWNLOADER_H__
 
+#ifndef GST_USE_UNSTABLE_API
+#warning "The UriDownloaded library from gst-plugins-bad is unstable API and may change in future."
+#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
 #include <glib-object.h>
 #include <gst/gst.h>
 #include "gstfragment.h"
diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
new file mode 100644
index 0000000..579510e
--- /dev/null
+++ b/gst-libs/gst/video/Makefile.am
@@ -0,0 +1,33 @@
+# variables used for enum generation
+ORC_SOURCE=bad-video-orc
+include $(top_srcdir)/common/orc.mak
+
+lib_LTLIBRARIES = libgstbadvideo-@GST_API_VERSION@.la
+
+CLEANFILES =
+
+libgstbadvideo_@GST_API_VERSION@_la_SOURCES = \
+	videoconvert.c gstvideoaggregator.c gstcms.c
+
+nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
+
+libgstbadvideo_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/video
+libgstbadvideo_@GST_API_VERSION@include_HEADERS = \
+	gstvideoaggregatorpad.h \
+	gstvideoaggregator.h
+
+nodist_libgstbadvideo_@GST_API_VERSION@include_HEADERS = $(built_headers)
+
+libgstbadvideo_@GST_API_VERSION@_la_CFLAGS = \
+	-DGST_USE_UNSTABLE_API \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_CFLAGS) $(ORC_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS)
+
+libgstbadvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) -lgstvideo-$(GST_API_VERSION)\
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la $(LIBM)
+libgstbadvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
+
+noinst_HEADERS = gstcms.h videoconvert.h
diff --git a/gst-libs/gst/video/Makefile.in b/gst-libs/gst/video/Makefile.in
new file mode 100644
index 0000000..930e4e0
--- /dev/null
+++ b/gst-libs/gst/video/Makefile.in
@@ -0,0 +1,1253 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# This is a makefile.am fragment to build Orc code.
+#
+# Define ORC_SOURCE and then include this file, such as:
+#
+#  ORC_SOURCE=gstadderorc
+#  include $(top_srcdir)/common/orc.mak
+#
+# This fragment will create tmp-orc.c and gstadderorc.h from
+# gstadderorc.orc.
+#
+# When 'make dist' is run at the top level, or 'make orc-update'
+# in a directory including this fragment, the generated source 
+# files will be copied to $(ORC_SOURCE)-dist.[ch].  These files
+# should be checked in to git, since they are used if Orc is
+# disabled.
+# 
+# Note that this file defines BUILT_SOURCES, so any later usage
+# of BUILT_SOURCES in the Makefile.am that includes this file
+# must use '+='.
+#
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(top_srcdir)/depcomp \
+	$(libgstbadvideo_@GST_API_VERSION@include_HEADERS) \
+	$(noinst_HEADERS)
+subdir = gst-libs/gst/video
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+	$(top_srcdir)/common/m4/as-auto-alt.m4 \
+	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
+	$(top_srcdir)/common/m4/as-libtool.m4 \
+	$(top_srcdir)/common/m4/as-version.m4 \
+	$(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+	$(top_srcdir)/common/m4/gst-arch.m4 \
+	$(top_srcdir)/common/m4/gst-args.m4 \
+	$(top_srcdir)/common/m4/gst-check.m4 \
+	$(top_srcdir)/common/m4/gst-default.m4 \
+	$(top_srcdir)/common/m4/gst-dowhile.m4 \
+	$(top_srcdir)/common/m4/gst-error.m4 \
+	$(top_srcdir)/common/m4/gst-feature.m4 \
+	$(top_srcdir)/common/m4/gst-gettext.m4 \
+	$(top_srcdir)/common/m4/gst-glib2.m4 \
+	$(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+	$(top_srcdir)/common/m4/gst-platform.m4 \
+	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+	$(top_srcdir)/common/m4/gst-plugindir.m4 \
+	$(top_srcdir)/common/m4/gst-x11.m4 \
+	$(top_srcdir)/common/m4/gst.m4 \
+	$(top_srcdir)/common/m4/gtk-doc.m4 \
+	$(top_srcdir)/common/m4/introspection.m4 \
+	$(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \
+	$(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libgcrypt.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" \
+	"$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libgstbadvideo_@GST_API_VERSION@_la_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1)
+am_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS =  \
+	libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo \
+	libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo \
+	libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo
+am__objects_1 = libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo
+nodist_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS = $(am__objects_1)
+libgstbadvideo_@GST_API_VERSION@_la_OBJECTS =  \
+	$(am_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS) \
+	$(nodist_libgstbadvideo_@GST_API_VERSION@_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libgstbadvideo_@GST_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+	--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) \
+	$(CFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libgstbadvideo_@GST_API_VERSION@_la_SOURCES) \
+	$(nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES)
+DIST_SOURCES = $(libgstbadvideo_@GST_API_VERSION@_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(libgstbadvideo_@GST_API_VERSION@include_HEADERS) \
+	$(nodist_libgstbadvideo_@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@
+ACMENC_CFLAGS = @ACMENC_CFLAGS@
+ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APEXSINK_CFLAGS = @APEXSINK_CFLAGS@
+APEXSINK_LIBS = @APEXSINK_LIBS@
+AR = @AR@
+AS = @AS@
+ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@
+ASSRENDER_LIBS = @ASSRENDER_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
+BZ2_LIBS = @BZ2_LIBS@
+CC = @CC@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@
+CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@
+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@
+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@
+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@
+CLUTTER_LIBS = @CLUTTER_LIBS@
+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@
+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DAALA_CFLAGS = @DAALA_CFLAGS@
+DAALA_LIBS = @DAALA_LIBS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DCCP_LIBS = @DCCP_LIBS@
+DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@
+DECKLINK_LIBS = @DECKLINK_LIBS@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECT3D_LIBS = @DIRECT3D_LIBS@
+DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@
+DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
+DIRECTFB_LIBS = @DIRECTFB_LIBS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DIRECTX_CFLAGS = @DIRECTX_CFLAGS@
+DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DTS_LIBS = @DTS_LIBS@
+DUMPBIN = @DUMPBIN@
+DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
+DVDNAV_LIBS = @DVDNAV_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@
+EXEEXT = @EXEEXT@
+EXIF_CFLAGS = @EXIF_CFLAGS@
+EXIF_LIBS = @EXIF_LIBS@
+FAAC_LIBS = @FAAC_LIBS@
+FAAD_IS_NEAAC = @FAAD_IS_NEAAC@
+FAAD_LIBS = @FAAD_LIBS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLITE_CFLAGS = @FLITE_CFLAGS@
+FLITE_LIBS = @FLITE_LIBS@
+FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@
+FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LDFLAGS = @GIO_LDFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GL_OBJCFLAGS = @GL_OBJCFLAGS@
+GME_LIBS = @GME_LIBS@
+GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@
+GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@
+GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
+GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GMYTH_CFLAGS = @GMYTH_CFLAGS@
+GMYTH_LIBS = @GMYTH_LIBS@
+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
+GREP = @GREP@
+GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
+GSETTINGS_LIBS = @GSETTINGS_LIBS@
+GSM_LIBS = @GSM_LIBS@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_AGE = @GST_AGE@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_API_VERSION = @GST_API_VERSION@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CURRENT = @GST_CURRENT@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LIBVERSION = @GST_LIBVERSION@
+GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_OBJCFLAGS = @GST_OBJCFLAGS@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@
+GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@
+GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@
+GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@
+GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@
+GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@
+GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@
+GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@
+GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@
+GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@
+GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_REVISION = @GST_REVISION@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@
+GST_VIDEO_LIBS = @GST_VIDEO_LIBS@
+GTK3_CFLAGS = @GTK3_CFLAGS@
+GTK3_LIBS = @GTK3_LIBS@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_BASE_DIR = @GTK_BASE_DIR@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+G_UDEV_CFLAGS = @G_UDEV_CFLAGS@
+G_UDEV_LIBS = @G_UDEV_LIBS@
+HAVE_CLUTTER = @HAVE_CLUTTER@
+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@
+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECT3D = @HAVE_DIRECT3D@
+HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_DTS = @HAVE_DTS@
+HAVE_EGL = @HAVE_EGL@
+HAVE_FAAC = @HAVE_FAAC@
+HAVE_FAAD = @HAVE_FAAD@
+HAVE_FLITE = @HAVE_FLITE@
+HAVE_GL = @HAVE_GL@
+HAVE_GLES2 = @HAVE_GLES2@
+HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
+HAVE_GSM = @HAVE_GSM@
+HAVE_GTK3 = @HAVE_GTK3@
+HAVE_JPEG = @HAVE_JPEG@
+HAVE_NAS = @HAVE_NAS@
+HAVE_OPENJPEG = @HAVE_OPENJPEG@
+HAVE_PNG = @HAVE_PNG@
+HAVE_SRTP = @HAVE_SRTP@
+HAVE_WASAPI = @HAVE_WASAPI@
+HAVE_WILDMIDI = @HAVE_WILDMIDI@
+HAVE_WINKS = @HAVE_WINKS@
+HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@
+HAVE_X = @HAVE_X@
+HAVE_X11 = @HAVE_X11@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+JPEG_LIBS = @JPEG_LIBS@
+KATE_CFLAGS = @KATE_CFLAGS@
+KATE_LIBS = @KATE_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
+LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDIR = @LIBDIR@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBMMS_CFLAGS = @LIBMMS_CFLAGS@
+LIBMMS_LIBS = @LIBMMS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
+LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
+LIBUSB_LIBS = @LIBUSB_LIBS@
+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@
+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LRDF_CFLAGS = @LRDF_CFLAGS@
+LRDF_LIBS = @LRDF_LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIMIC_CFLAGS = @MIMIC_CFLAGS@
+MIMIC_LIBS = @MIMIC_LIBS@
+MJPEG_CFLAGS = @MJPEG_CFLAGS@
+MJPEG_LIBS = @MJPEG_LIBS@
+MKDIR_P = @MKDIR_P@
+MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
+MODPLUG_LIBS = @MODPLUG_LIBS@
+MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
+MPEG2ENC_LIBS = @MPEG2ENC_LIBS@
+MPG123_CFLAGS = @MPG123_CFLAGS@
+MPG123_LIBS = @MPG123_LIBS@
+MPLEX_CFLAGS = @MPLEX_CFLAGS@
+MPLEX_LDFLAGS = @MPLEX_LDFLAGS@
+MPLEX_LIBS = @MPLEX_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+MUSEPACK_LIBS = @MUSEPACK_LIBS@
+NAS_CFLAGS = @NAS_CFLAGS@
+NAS_LIBS = @NAS_LIBS@
+NEON_CFLAGS = @NEON_CFLAGS@
+NEON_LIBS = @NEON_LIBS@
+NETTLE_CFLAGS = @NETTLE_CFLAGS@
+NETTLE_LIBS = @NETTLE_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OFA_CFLAGS = @OFA_CFLAGS@
+OFA_LIBS = @OFA_LIBS@
+OPENAL_CFLAGS = @OPENAL_CFLAGS@
+OPENAL_LIBS = @OPENAL_LIBS@
+OPENCV_CFLAGS = @OPENCV_CFLAGS@
+OPENCV_LIBS = @OPENCV_LIBS@
+OPENCV_PREFIX = @OPENCV_PREFIX@
+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
+OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
+OPENJPEG_LIBS = @OPENJPEG_LIBS@
+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
+OPENNI2_LIBS = @OPENNI2_LIBS@
+OPUS_CFLAGS = @OPUS_CFLAGS@
+OPUS_LIBS = @OPUS_LIBS@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PVR_CFLAGS = @PVR_CFLAGS@
+PVR_LIBS = @PVR_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
+RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
+RSVG_CFLAGS = @RSVG_CFLAGS@
+RSVG_LIBS = @RSVG_LIBS@
+RTMP_CFLAGS = @RTMP_CFLAGS@
+RTMP_LIBS = @RTMP_LIBS@
+SBC_CFLAGS = @SBC_CFLAGS@
+SBC_LIBS = @SBC_LIBS@
+SCHRO_CFLAGS = @SCHRO_CFLAGS@
+SCHRO_LIBS = @SCHRO_LIBS@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CLUTTER = @SDL_CLUTTER@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHM_LIBS = @SHM_LIBS@
+SLV2_CFLAGS = @SLV2_CFLAGS@
+SLV2_LIBS = @SLV2_LIBS@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+SNDIO_LIBS = @SNDIO_LIBS@
+SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@
+SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@
+SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
+SPANDSP_LIBS = @SPANDSP_LIBS@
+SPC_LIBS = @SPC_LIBS@
+SRTP_LIBS = @SRTP_LIBS@
+SSH2_CFLAGS = @SSH2_CFLAGS@
+SSH2_LIBS = @SSH2_LIBS@
+STRIP = @STRIP@
+TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@
+TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@
+TIGER_CFLAGS = @TIGER_CFLAGS@
+TIGER_LIBS = @TIGER_LIBS@
+TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
+TIMIDITY_LIBS = @TIMIDITY_LIBS@
+USE_GLES2 = @USE_GLES2@
+USE_NLS = @USE_NLS@
+USE_OPENGL = @USE_OPENGL@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VDPAU_CFLAGS = @VDPAU_CFLAGS@
+VDPAU_LIBS = @VDPAU_LIBS@
+VERSION = @VERSION@
+VOAACENC_CFLAGS = @VOAACENC_CFLAGS@
+VOAACENC_LIBS = @VOAACENC_LIBS@
+VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@
+VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@
+WASAPI_LIBS = @WASAPI_LIBS@
+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
+WAYLAND_LIBS = @WAYLAND_LIBS@
+WEBP_CFLAGS = @WEBP_CFLAGS@
+WEBP_LIBS = @WEBP_LIBS@
+WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@
+WILDMIDI_LIBS = @WILDMIDI_LIBS@
+WINKS_LIBS = @WINKS_LIBS@
+WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@
+WINSOCK2_LIBS = @WINSOCK2_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XVID_LIBS = @XVID_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZBAR_CFLAGS = @ZBAR_CFLAGS@
+ZBAR_LIBS = @ZBAR_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
+
+# variables used for enum generation
+ORC_SOURCE = bad-video-orc
+EXTRA_DIST = $(ORC_SOURCE).orc
+ORC_NODIST_SOURCES = tmp-orc.c $(ORC_SOURCE).h
+BUILT_SOURCES = tmp-orc.c $(ORC_SOURCE).h
+orcc_v_gen = $(orcc_v_gen_$(V))
+orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
+orcc_v_gen_0 = @echo "  ORCC   $@";
+cp_v_gen = $(cp_v_gen_$(V))
+cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
+cp_v_gen_0 = @echo "  CP     $@";
+lib_LTLIBRARIES = libgstbadvideo-@GST_API_VERSION@.la
+CLEANFILES = 
+libgstbadvideo_@GST_API_VERSION@_la_SOURCES = \
+	videoconvert.c gstvideoaggregator.c gstcms.c
+
+nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
+libgstbadvideo_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/video
+libgstbadvideo_@GST_API_VERSION@include_HEADERS = \
+	gstvideoaggregatorpad.h \
+	gstvideoaggregator.h
+
+nodist_libgstbadvideo_@GST_API_VERSION@include_HEADERS = $(built_headers)
+libgstbadvideo_@GST_API_VERSION@_la_CFLAGS = \
+	-DGST_USE_UNSTABLE_API \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_CFLAGS) $(ORC_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_BASE_CFLAGS)
+
+libgstbadvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) -lgstvideo-$(GST_API_VERSION)\
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la $(LIBM)
+
+libgstbadvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
+noinst_HEADERS = gstcms.h videoconvert.h
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/orc.mak $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/video/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gst-libs/gst/video/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+$(top_srcdir)/common/orc.mak:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libgstbadvideo-@GST_API_VERSION@.la: $(libgstbadvideo_@GST_API_VERSION@_la_OBJECTS) $(libgstbadvideo_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstbadvideo_@GST_API_VERSION@_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstbadvideo_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstbadvideo_@GST_API_VERSION@_la_OBJECTS) $(libgstbadvideo_@GST_API_VERSION@_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstcms.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-videoconvert.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo: videoconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo -MD -MP -MF $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-videoconvert.Tpo -c -o libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo `test -f 'videoconvert.c' || echo '$(srcdir)/'`videoconvert.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-videoconvert.Tpo $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-videoconvert.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='videoconvert.c' object='libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbadvideo_@GST_API_VERSION@_la-videoconvert.lo `test -f 'videoconvert.c' || echo '$(srcdir)/'`videoconvert.c
+
+libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo: gstvideoaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo -MD -MP -MF $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.Tpo -c -o libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo `test -f 'gstvideoaggregator.c' || echo '$(srcdir)/'`gstvideoaggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.Tpo $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstvideoaggregator.c' object='libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbadvideo_@GST_API_VERSION@_la-gstvideoaggregator.lo `test -f 'gstvideoaggregator.c' || echo '$(srcdir)/'`gstvideoaggregator.c
+
+libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo: gstcms.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo -MD -MP -MF $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstcms.Tpo -c -o libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo `test -f 'gstcms.c' || echo '$(srcdir)/'`gstcms.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstcms.Tpo $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-gstcms.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstcms.c' object='libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbadvideo_@GST_API_VERSION@_la-gstcms.lo `test -f 'gstcms.c' || echo '$(srcdir)/'`gstcms.c
+
+libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo: tmp-orc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo -MD -MP -MF $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.Tpo -c -o libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo `test -f 'tmp-orc.c' || echo '$(srcdir)/'`tmp-orc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.Tpo $(DEPDIR)/libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tmp-orc.c' object='libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstbadvideo_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstbadvideo_@GST_API_VERSION@_la-tmp-orc.lo `test -f 'tmp-orc.c' || echo '$(srcdir)/'`tmp-orc.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-libgstbadvideo_@GST_API_VERSION@includeHEADERS: $(libgstbadvideo_@GST_API_VERSION@include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(libgstbadvideo_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadvideo_@GST_API_VERSION@includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" || exit $$?; \
+	done
+
+uninstall-libgstbadvideo_@GST_API_VERSION@includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgstbadvideo_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadvideo_@GST_API_VERSION@includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
+install-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS: $(nodist_libgstbadvideo_@GST_API_VERSION@include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_libgstbadvideo_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadvideo_@GST_API_VERSION@includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" || exit $$?; \
+	done
+
+uninstall-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_libgstbadvideo_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstbadvideo_@GST_API_VERSION@includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+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
+
+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'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)" "$(DESTDIR)$(libgstbadvideo_@GST_API_VERSION@includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:  \
+	install-libgstbadvideo_@GST_API_VERSION@includeHEADERS \
+	install-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+	uninstall-libgstbadvideo_@GST_API_VERSION@includeHEADERS \
+	uninstall-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-local cscopelist-am \
+	ctags ctags-am dist-hook distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-libgstbadvideo_@GST_API_VERSION@includeHEADERS \
+	install-man \
+	install-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-libLTLIBRARIES \
+	uninstall-libgstbadvideo_@GST_API_VERSION@includeHEADERS \
+	uninstall-nodist_libgstbadvideo_@GST_API_VERSION@includeHEADERS
+
+
+orc-update: tmp-orc.c $(ORC_SOURCE).h
+	$(top_srcdir)/common/gst-indent tmp-orc.c
+	cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c
+	cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h
+
+@HAVE_ORCC_TRUE@tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_TRUE@	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_SOURCE).orc
+
+@HAVE_ORCC_TRUE@$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_TRUE@	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --header --include glib.h -o $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_FALSE@tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
+@HAVE_ORCC_FALSE@	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.c tmp-orc.c
+
+@HAVE_ORCC_FALSE@$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
+@HAVE_ORCC_FALSE@	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.h $(ORC_SOURCE).h
+
+clean-local: clean-orc
+.PHONY: clean-orc
+clean-orc:
+	rm -f tmp-orc.c $(ORC_SOURCE).h
+
+dist-hook: dist-hook-orc
+.PHONY: dist-hook-orc
+
+# we try and copy updated orc -dist files below, but don't fail if it
+# doesn't work as the srcdir might not be writable
+dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
+	$(top_srcdir)/common/gst-indent tmp-orc.c
+	rm -f tmp-orc.c~
+	cmp -s tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || \
+	  cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || true
+	cmp -s $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || \
+	  cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || true
+	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
+	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
+
+# 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/bad-video-orc-dist.c b/gst-libs/gst/video/bad-video-orc-dist.c
new file mode 100644
index 0000000..7818dee
--- /dev/null
+++ b/gst-libs/gst/video/bad-video-orc-dist.c
@@ -0,0 +1,8958 @@
+
+/* autogenerated from bad-video-orc.orc */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <glib.h>
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+typedef int8_t orc_int8;
+typedef int16_t orc_int16;
+typedef int32_t orc_int32;
+typedef int64_t orc_int64;
+typedef uint8_t orc_uint8;
+typedef uint16_t orc_uint16;
+typedef uint32_t orc_uint32;
+typedef uint64_t orc_uint64;
+#define ORC_UINT64_C(x) UINT64_C(x)
+#elif defined(_MSC_VER)
+typedef signed __int8 orc_int8;
+typedef signed __int16 orc_int16;
+typedef signed __int32 orc_int32;
+typedef signed __int64 orc_int64;
+typedef unsigned __int8 orc_uint8;
+typedef unsigned __int16 orc_uint16;
+typedef unsigned __int32 orc_uint32;
+typedef unsigned __int64 orc_uint64;
+#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
+#else
+#include <limits.h>
+typedef signed char orc_int8;
+typedef short orc_int16;
+typedef int orc_int32;
+typedef unsigned char orc_uint8;
+typedef unsigned short orc_uint16;
+typedef unsigned int orc_uint32;
+#if INT_MAX == LONG_MAX
+typedef long long orc_int64;
+typedef unsigned long long orc_uint64;
+#define ORC_UINT64_C(x) (x##ULL)
+#else
+typedef long orc_int64;
+typedef unsigned long orc_uint64;
+#define ORC_UINT64_C(x) (x##UL)
+#endif
+#endif
+typedef union
+{
+  orc_int16 i;
+  orc_int8 x2[2];
+} orc_union16;
+typedef union
+{
+  orc_int32 i;
+  float f;
+  orc_int16 x2[2];
+  orc_int8 x4[4];
+} orc_union32;
+typedef union
+{
+  orc_int64 i;
+  double f;
+  orc_int32 x2[2];
+  float x2f[2];
+  orc_int16 x4[4];
+} orc_union64;
+#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+
+#ifndef ORC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define ORC_INTERNAL __hidden
+#elif defined (__GNUC__)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#else
+#define ORC_INTERNAL
+#endif
+#endif
+
+
+#ifndef DISABLE_ORC
+#include <orc/orc.h>
+#endif
+void video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n);
+void video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n);
+void video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4,
+    int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1,
+    int s1_stride, int n, int m);
+void video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1,
+    int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1,
+    int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1,
+    int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1,
+    int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1,
+    const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+    const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+    int n);
+
+
+/* begin Orc C target preamble */
+#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
+#define ORC_ABS(a) ((a)<0 ? -(a) : (a))
+#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
+#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))
+#define ORC_SB_MAX 127
+#define ORC_SB_MIN (-1-ORC_SB_MAX)
+#define ORC_UB_MAX 255
+#define ORC_UB_MIN 0
+#define ORC_SW_MAX 32767
+#define ORC_SW_MIN (-1-ORC_SW_MAX)
+#define ORC_UW_MAX 65535
+#define ORC_UW_MIN 0
+#define ORC_SL_MAX 2147483647
+#define ORC_SL_MIN (-1-ORC_SL_MAX)
+#define ORC_UL_MAX 4294967295U
+#define ORC_UL_MIN 0
+#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)
+#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)
+#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)
+#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)
+#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)
+#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)
+#define ORC_SWAP_W(x) ((((x)&0xffU)<<8) | (((x)&0xff00U)>>8))
+#define ORC_SWAP_L(x) ((((x)&0xffU)<<24) | (((x)&0xff00U)<<8) | (((x)&0xff0000U)>>8) | (((x)&0xff000000U)>>24))
+#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56))
+#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
+#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff))
+#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
+#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
+#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+/* end Orc C target preamble */
+
+
+
+/* video_convert_orc_memcpy_2d */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var32;
+  orc_int8 var33;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: copyb */
+      var33 = var32;
+      /* 2: storeb */
+      ptr0[i] = var33;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_memcpy_2d (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var32;
+  orc_int8 var33;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: copyb */
+      var33 = var32;
+      /* 2: storeb */
+      ptr0[i] = var33;
+    }
+  }
+
+}
+
+void
+video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 27, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 109, 101, 109, 99, 112, 121, 95, 50, 100, 11,
+        1, 1, 12, 1, 1, 42, 0, 4, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_video_convert_orc_memcpy_2d);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_memcpy_2d");
+      orc_program_set_backup_function (p, _backup_video_convert_orc_memcpy_2d);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_source (p, 1, "s1");
+
+      orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_I420_UYVY */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+
+  ptr0 = (orc_union32 *) d1;
+  ptr1 = (orc_union32 *) d2;
+  ptr4 = (orc_union16 *) s1;
+  ptr5 = (orc_union16 *) s2;
+  ptr6 = (orc_int8 *) s3;
+  ptr7 = (orc_int8 *) s4;
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var33 = ptr6[i];
+    /* 1: loadb */
+    var34 = ptr7[i];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var33;
+      _dest.x2[1] = var34;
+      var39.i = _dest.i;
+    }
+    /* 3: loadw */
+    var35 = ptr4[i];
+    /* 4: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[0];
+      _dest.x2[1] = var35.x2[0];
+      var36.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[1];
+      _dest.x2[1] = var35.x2[1];
+      var36.x2[1] = _dest.i;
+    }
+    /* 5: storel */
+    ptr0[i] = var36;
+    /* 6: loadw */
+    var37 = ptr5[i];
+    /* 7: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[0];
+      _dest.x2[1] = var37.x2[0];
+      var38.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[1];
+      _dest.x2[1] = var37.x2[1];
+      var38.x2[1] = _dest.i;
+    }
+    /* 8: storel */
+    ptr1[i] = var38;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_I420_UYVY (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+  ptr1 = (orc_union32 *) ex->arrays[1];
+  ptr4 = (orc_union16 *) ex->arrays[4];
+  ptr5 = (orc_union16 *) ex->arrays[5];
+  ptr6 = (orc_int8 *) ex->arrays[6];
+  ptr7 = (orc_int8 *) ex->arrays[7];
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var33 = ptr6[i];
+    /* 1: loadb */
+    var34 = ptr7[i];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var33;
+      _dest.x2[1] = var34;
+      var39.i = _dest.i;
+    }
+    /* 3: loadw */
+    var35 = ptr4[i];
+    /* 4: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[0];
+      _dest.x2[1] = var35.x2[0];
+      var36.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[1];
+      _dest.x2[1] = var35.x2[1];
+      var36.x2[1] = _dest.i;
+    }
+    /* 5: storel */
+    ptr0[i] = var36;
+    /* 6: loadw */
+    var37 = ptr5[i];
+    /* 7: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[0];
+      _dest.x2[1] = var37.x2[0];
+      var38.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39.x2[1];
+      _dest.x2[1] = var37.x2[1];
+      var38.x2[1] = _dest.i;
+    }
+    /* 8: storel */
+    ptr1[i] = var38;
+  }
+
+}
+
+void
+video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50,
+        48, 95, 85, 89, 86, 89, 11, 4, 4, 11, 4, 4, 12, 2, 2, 12,
+        2, 2, 12, 1, 1, 12, 1, 1, 20, 2, 196, 32, 6, 7, 21, 1,
+        196, 0, 32, 4, 21, 1, 196, 1, 32, 5, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_UYVY);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_I420_UYVY");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_UYVY);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_destination (p, 4, "d2");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 2, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_source (p, 1, "s4");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_S2,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->arrays[ORC_VAR_S4] = (void *) s4;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_I420_YUY2 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+
+  ptr0 = (orc_union32 *) d1;
+  ptr1 = (orc_union32 *) d2;
+  ptr4 = (orc_union16 *) s1;
+  ptr5 = (orc_union16 *) s2;
+  ptr6 = (orc_int8 *) s3;
+  ptr7 = (orc_int8 *) s4;
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var33 = ptr6[i];
+    /* 1: loadb */
+    var34 = ptr7[i];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var33;
+      _dest.x2[1] = var34;
+      var39.i = _dest.i;
+    }
+    /* 3: loadw */
+    var35 = ptr4[i];
+    /* 4: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var35.x2[0];
+      _dest.x2[1] = var39.x2[0];
+      var36.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var35.x2[1];
+      _dest.x2[1] = var39.x2[1];
+      var36.x2[1] = _dest.i;
+    }
+    /* 5: storel */
+    ptr0[i] = var36;
+    /* 6: loadw */
+    var37 = ptr5[i];
+    /* 7: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var37.x2[0];
+      _dest.x2[1] = var39.x2[0];
+      var38.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var37.x2[1];
+      _dest.x2[1] = var39.x2[1];
+      var38.x2[1] = _dest.i;
+    }
+    /* 8: storel */
+    ptr1[i] = var38;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_I420_YUY2 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+  ptr1 = (orc_union32 *) ex->arrays[1];
+  ptr4 = (orc_union16 *) ex->arrays[4];
+  ptr5 = (orc_union16 *) ex->arrays[5];
+  ptr6 = (orc_int8 *) ex->arrays[6];
+  ptr7 = (orc_int8 *) ex->arrays[7];
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var33 = ptr6[i];
+    /* 1: loadb */
+    var34 = ptr7[i];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var33;
+      _dest.x2[1] = var34;
+      var39.i = _dest.i;
+    }
+    /* 3: loadw */
+    var35 = ptr4[i];
+    /* 4: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var35.x2[0];
+      _dest.x2[1] = var39.x2[0];
+      var36.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var35.x2[1];
+      _dest.x2[1] = var39.x2[1];
+      var36.x2[1] = _dest.i;
+    }
+    /* 5: storel */
+    ptr0[i] = var36;
+    /* 6: loadw */
+    var37 = ptr5[i];
+    /* 7: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var37.x2[0];
+      _dest.x2[1] = var39.x2[0];
+      var38.x2[0] = _dest.i;
+    }
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var37.x2[1];
+      _dest.x2[1] = var39.x2[1];
+      var38.x2[1] = _dest.i;
+    }
+    /* 8: storel */
+    ptr1[i] = var38;
+  }
+
+}
+
+void
+video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50,
+        48, 95, 89, 85, 89, 50, 11, 4, 4, 11, 4, 4, 12, 2, 2, 12,
+        2, 2, 12, 1, 1, 12, 1, 1, 20, 2, 196, 32, 6, 7, 21, 1,
+        196, 0, 4, 32, 21, 1, 196, 1, 5, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_YUY2);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_I420_YUY2");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_YUY2);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_destination (p, 4, "d2");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 2, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_source (p, 1, "s4");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_S2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->arrays[ORC_VAR_S4] = (void *) s4;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_I420_AYUV */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var36;
+#else
+  orc_int8 var36;
+#endif
+  orc_int8 var37;
+  orc_union32 var38;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var39;
+#else
+  orc_int8 var39;
+#endif
+  orc_int8 var40;
+  orc_union32 var41;
+  orc_int8 var42;
+  orc_int8 var43;
+  orc_union16 var44;
+  orc_union16 var45;
+  orc_union16 var46;
+
+  ptr0 = (orc_union32 *) d1;
+  ptr1 = (orc_union32 *) d2;
+  ptr4 = (orc_int8 *) s1;
+  ptr5 = (orc_int8 *) s2;
+  ptr6 = (orc_int8 *) s3;
+  ptr7 = (orc_int8 *) s4;
+
+  /* 3: loadpb */
+  var36 = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+  /* 8: loadpb */
+  var39 = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadupdb */
+    var42 = ptr6[i >> 1];
+    /* 1: loadupdb */
+    var43 = ptr7[i >> 1];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var42;
+      _dest.x2[1] = var43;
+      var44.i = _dest.i;
+    }
+    /* 4: loadb */
+    var37 = ptr4[i];
+    /* 5: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var36;
+      _dest.x2[1] = var37;
+      var45.i = _dest.i;
+    }
+    /* 6: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var45.i;
+      _dest.x2[1] = var44.i;
+      var38.i = _dest.i;
+    }
+    /* 7: storel */
+    ptr0[i] = var38;
+    /* 9: loadb */
+    var40 = ptr5[i];
+    /* 10: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39;
+      _dest.x2[1] = var40;
+      var46.i = _dest.i;
+    }
+    /* 11: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var46.i;
+      _dest.x2[1] = var44.i;
+      var41.i = _dest.i;
+    }
+    /* 12: storel */
+    ptr1[i] = var41;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_I420_AYUV (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  const orc_int8 *ORC_RESTRICT ptr7;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var36;
+#else
+  orc_int8 var36;
+#endif
+  orc_int8 var37;
+  orc_union32 var38;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var39;
+#else
+  orc_int8 var39;
+#endif
+  orc_int8 var40;
+  orc_union32 var41;
+  orc_int8 var42;
+  orc_int8 var43;
+  orc_union16 var44;
+  orc_union16 var45;
+  orc_union16 var46;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+  ptr1 = (orc_union32 *) ex->arrays[1];
+  ptr4 = (orc_int8 *) ex->arrays[4];
+  ptr5 = (orc_int8 *) ex->arrays[5];
+  ptr6 = (orc_int8 *) ex->arrays[6];
+  ptr7 = (orc_int8 *) ex->arrays[7];
+
+  /* 3: loadpb */
+  var36 = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+  /* 8: loadpb */
+  var39 = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadupdb */
+    var42 = ptr6[i >> 1];
+    /* 1: loadupdb */
+    var43 = ptr7[i >> 1];
+    /* 2: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var42;
+      _dest.x2[1] = var43;
+      var44.i = _dest.i;
+    }
+    /* 4: loadb */
+    var37 = ptr4[i];
+    /* 5: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var36;
+      _dest.x2[1] = var37;
+      var45.i = _dest.i;
+    }
+    /* 6: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var45.i;
+      _dest.x2[1] = var44.i;
+      var38.i = _dest.i;
+    }
+    /* 7: storel */
+    ptr0[i] = var38;
+    /* 9: loadb */
+    var40 = ptr5[i];
+    /* 10: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var39;
+      _dest.x2[1] = var40;
+      var46.i = _dest.i;
+    }
+    /* 11: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var46.i;
+      _dest.x2[1] = var44.i;
+      var41.i = _dest.i;
+    }
+    /* 12: storel */
+    ptr1[i] = var41;
+  }
+
+}
+
+void
+video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
+    const guint8 * ORC_RESTRICT s4, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50,
+        48, 95, 65, 89, 85, 86, 11, 4, 4, 11, 4, 4, 12, 1, 1, 12,
+        1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 255, 0, 0, 0, 20, 2,
+        20, 2, 20, 1, 20, 1, 45, 34, 6, 45, 35, 7, 196, 32, 34, 35,
+        196, 33, 16, 4, 195, 0, 33, 32, 196, 33, 16, 5, 195, 1, 33, 32,
+        2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_AYUV);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_I420_AYUV");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_AYUV);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_destination (p, 4, "d2");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_source (p, 1, "s4");
+      orc_program_add_constant (p, 1, 0x000000ff, "c1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+
+      orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T3, ORC_VAR_S3,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T4, ORC_VAR_S4,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->arrays[ORC_VAR_S4] = (void *) s4;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_YUY2_I420 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n)
+{
+  int i;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  const orc_union32 *ORC_RESTRICT ptr5;
+  orc_union32 var35;
+  orc_union32 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  ptr0 = (orc_union16 *) d1;
+  ptr1 = (orc_union16 *) d2;
+  ptr2 = (orc_int8 *) d3;
+  ptr3 = (orc_int8 *) d4;
+  ptr4 = (orc_union32 *) s1;
+  ptr5 = (orc_union32 *) s2;
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var35 = ptr4[i];
+    /* 1: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[0];
+      var39.x2[0] = _src.x2[1];
+      var40.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[1];
+      var39.x2[1] = _src.x2[1];
+      var40.x2[1] = _src.x2[0];
+    }
+    /* 2: storew */
+    ptr0[i] = var40;
+    /* 3: loadl */
+    var36 = ptr5[i];
+    /* 4: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[0];
+      var41.x2[0] = _src.x2[1];
+      var42.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[1];
+      var41.x2[1] = _src.x2[1];
+      var42.x2[1] = _src.x2[0];
+    }
+    /* 5: storew */
+    ptr1[i] = var42;
+    /* 6: avgub */
+    var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1;
+    var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1;
+    /* 7: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var43.i;
+      var37 = _src.x2[1];
+      var38 = _src.x2[0];
+    }
+    /* 8: storeb */
+    ptr3[i] = var37;
+    /* 9: storeb */
+    ptr2[i] = var38;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_YUY2_I420 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  const orc_union32 *ORC_RESTRICT ptr5;
+  orc_union32 var35;
+  orc_union32 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  ptr0 = (orc_union16 *) ex->arrays[0];
+  ptr1 = (orc_union16 *) ex->arrays[1];
+  ptr2 = (orc_int8 *) ex->arrays[2];
+  ptr3 = (orc_int8 *) ex->arrays[3];
+  ptr4 = (orc_union32 *) ex->arrays[4];
+  ptr5 = (orc_union32 *) ex->arrays[5];
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var35 = ptr4[i];
+    /* 1: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[0];
+      var39.x2[0] = _src.x2[1];
+      var40.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[1];
+      var39.x2[1] = _src.x2[1];
+      var40.x2[1] = _src.x2[0];
+    }
+    /* 2: storew */
+    ptr0[i] = var40;
+    /* 3: loadl */
+    var36 = ptr5[i];
+    /* 4: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[0];
+      var41.x2[0] = _src.x2[1];
+      var42.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[1];
+      var41.x2[1] = _src.x2[1];
+      var42.x2[1] = _src.x2[0];
+    }
+    /* 5: storew */
+    ptr1[i] = var42;
+    /* 6: avgub */
+    var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1;
+    var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1;
+    /* 7: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var43.i;
+      var37 = _src.x2[1];
+      var38 = _src.x2[0];
+    }
+    /* 8: storeb */
+    ptr3[i] = var37;
+    /* 9: storeb */
+    ptr2[i] = var38;
+  }
+
+}
+
+void
+video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85, 89,
+        50, 95, 73, 52, 50, 48, 11, 2, 2, 11, 2, 2, 11, 1, 1, 11,
+        1, 1, 12, 4, 4, 12, 4, 4, 20, 2, 20, 2, 20, 2, 21, 1,
+        199, 32, 34, 4, 97, 0, 34, 21, 1, 199, 33, 34, 5, 97, 1, 34,
+        21, 1, 39, 32, 32, 33, 199, 3, 2, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_I420);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_YUY2_I420");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_I420);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_destination (p, 1, "d4");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_source (p, 4, "s2");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_S2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->arrays[ORC_VAR_D4] = d4;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_UYVY_YUY2 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var32 = ptr4[i];
+      /* 1: swapw */
+      var33.x2[0] = ORC_SWAP_W (var32.x2[0]);
+      var33.x2[1] = ORC_SWAP_W (var32.x2[1]);
+      /* 2: storel */
+      ptr0[i] = var33;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_UYVY_YUY2 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var32 = ptr4[i];
+      /* 1: swapw */
+      var33.x2[0] = ORC_SWAP_W (var32.x2[0]);
+      var33.x2[1] = ORC_SWAP_W (var32.x2[1]);
+      /* 2: storel */
+      ptr0[i] = var33;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89,
+        86, 89, 95, 89, 85, 89, 50, 11, 4, 4, 12, 4, 4, 21, 1, 183,
+        0, 4, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_YUY2);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_UYVY_YUY2");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_YUY2);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+
+      orc_program_append_2 (p, "swapw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_420_422 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var32;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_int8 var35;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: copyb */
+      var33 = var32;
+      /* 2: storeb */
+      ptr0[i] = var33;
+      /* 3: loadb */
+      var34 = ptr4[i];
+      /* 4: copyb */
+      var35 = var34;
+      /* 5: storeb */
+      ptr1[i] = var35;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_420_422 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var32;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_int8 var35;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: copyb */
+      var33 = var32;
+      /* 2: storeb */
+      ptr0[i] = var33;
+      /* 3: loadb */
+      var34 = ptr4[i];
+      /* 4: copyb */
+      var35 = var34;
+      /* 5: storeb */
+      ptr1[i] = var35;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 50, 48, 95, 52, 50, 50, 11, 1, 1, 11, 1,
+        1, 12, 1, 1, 42, 0, 4, 42, 1, 4, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_420_422);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_420_422");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_420_422);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_destination (p, 1, "d2");
+      orc_program_add_source (p, 1, "s1");
+
+      orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "copyb", 0, ORC_VAR_D2, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_420_444 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var33;
+  orc_union16 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr4[i];
+      /* 1: splatbw */
+      var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff);
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: storew */
+      ptr1[i] = var34;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_420_444 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var33;
+  orc_union16 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr4[i];
+      /* 1: splatbw */
+      var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff);
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: storew */
+      ptr1[i] = var34;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 50, 48, 95, 52, 52, 52, 11, 2, 2, 11, 2,
+        2, 12, 1, 1, 20, 2, 151, 32, 4, 97, 0, 32, 97, 1, 32, 2,
+        0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_420_444);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_420_444");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_420_444);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_422_444 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var33;
+  orc_union16 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr4[i];
+      /* 1: splatbw */
+      var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff);
+      /* 2: storew */
+      ptr0[i] = var34;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_422_444 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var33;
+  orc_union16 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr4[i];
+      /* 1: splatbw */
+      var34.i = ((var33 & 0xff) << 8) | (var33 & 0xff);
+      /* 2: storew */
+      ptr0[i] = var34;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 50, 50, 95, 52, 52, 52, 11, 2, 2, 12, 1,
+        1, 20, 2, 151, 32, 4, 97, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_422_444);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_422_444");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_422_444);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_444_422 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_int8 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var34 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var34.i;
+        var36 = _src.x2[1];
+        var37 = _src.x2[0];
+      }
+      /* 2: avgub */
+      var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1;
+      /* 3: storeb */
+      ptr0[i] = var35;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_444_422 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_int8 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var34 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var34.i;
+        var36 = _src.x2[1];
+        var37 = _src.x2[0];
+      }
+      /* 2: avgub */
+      var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1;
+      /* 3: storeb */
+      ptr0[i] = var35;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 52, 52, 95, 52, 50, 50, 11, 1, 1, 12, 2,
+        2, 20, 1, 20, 1, 199, 32, 33, 4, 39, 0, 32, 33, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_444_422);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_444_422");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_444_422);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_temporary (p, 1, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_444_420 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  orc_union16 var35;
+  orc_union16 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_int8 var39;
+  orc_int8 var40;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var35 = ptr4[i];
+      /* 1: loadw */
+      var36 = ptr5[i];
+      /* 2: avgub */
+      var38.x2[0] =
+          ((orc_uint8) var35.x2[0] + (orc_uint8) var36.x2[0] + 1) >> 1;
+      var38.x2[1] =
+          ((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var38.i;
+        var39 = _src.x2[1];
+        var40 = _src.x2[0];
+      }
+      /* 4: avgub */
+      var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1;
+      /* 5: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_444_420 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  orc_union16 var35;
+  orc_union16 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_int8 var39;
+  orc_int8 var40;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var35 = ptr4[i];
+      /* 1: loadw */
+      var36 = ptr5[i];
+      /* 2: avgub */
+      var38.x2[0] =
+          ((orc_uint8) var35.x2[0] + (orc_uint8) var36.x2[0] + 1) >> 1;
+      var38.x2[1] =
+          ((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var38.i;
+        var39 = _src.x2[1];
+        var40 = _src.x2[0];
+      }
+      /* 4: avgub */
+      var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1;
+      /* 5: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 52, 52, 95, 52, 50, 48, 11, 1, 1, 12, 2,
+        2, 12, 2, 2, 20, 2, 20, 1, 20, 1, 21, 1, 39, 32, 4, 5,
+        199, 33, 34, 32, 39, 0, 33, 34, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_444_420);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_444_420");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_444_420);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 2, "s2");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T3,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_planar_chroma_422_420 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  orc_int8 var32;
+  orc_int8 var33;
+  orc_int8 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: loadb */
+      var33 = ptr5[i];
+      /* 2: avgub */
+      var34 = ((orc_uint8) var32 + (orc_uint8) var33 + 1) >> 1;
+      /* 3: storeb */
+      ptr0[i] = var34;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_planar_chroma_422_420 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  orc_int8 var32;
+  orc_int8 var33;
+  orc_int8 var34;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var32 = ptr4[i];
+      /* 1: loadb */
+      var33 = ptr5[i];
+      /* 2: avgub */
+      var34 = ((orc_uint8) var32 + (orc_uint8) var33 + 1) >> 1;
+      /* 3: storeb */
+      ptr0[i] = var34;
+    }
+  }
+
+}
+
+void
+video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1,
+    int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 39, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 112, 108, 97, 110, 97, 114, 95, 99, 104, 114,
+        111, 109, 97, 95, 52, 50, 50, 95, 52, 50, 48, 11, 1, 1, 12, 1,
+        1, 12, 1, 1, 39, 0, 4, 5, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_422_420);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_planar_chroma_422_420");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_planar_chroma_422_420);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_source (p, 1, "s2");
+
+      orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_YUY2_AYUV */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var36;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var37;
+#else
+  orc_union16 var37;
+#endif
+  orc_union64 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union32 var41;
+  orc_union32 var42;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 2: loadpb */
+    var37.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var37.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var36 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 3: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var40.x2[0];
+        var41.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var40.x2[1];
+        var41.x2[1] = _dest.i;
+      }
+      /* 4: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var39.i;
+        _dest.x2[1] = var39.i;
+        var42.i = _dest.i;
+      }
+      /* 5: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[0];
+        _dest.x2[1] = var42.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[1];
+        _dest.x2[1] = var42.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storeq */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_YUY2_AYUV (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var36;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var37;
+#else
+  orc_union16 var37;
+#endif
+  orc_union64 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union32 var41;
+  orc_union32 var42;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 2: loadpb */
+    var37.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var37.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var36 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 3: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var40.x2[0];
+        var41.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var40.x2[1];
+        var41.x2[1] = _dest.i;
+      }
+      /* 4: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var39.i;
+        _dest.x2[1] = var39.i;
+        var42.i = _dest.i;
+      }
+      /* 5: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[0];
+        _dest.x2[1] = var42.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[1];
+        _dest.x2[1] = var42.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storeq */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85,
+        89, 50, 95, 65, 89, 85, 86, 11, 8, 8, 12, 4, 4, 14, 2, 255,
+        0, 0, 0, 20, 2, 20, 2, 20, 4, 20, 4, 21, 1, 199, 33, 32,
+        4, 21, 1, 196, 34, 16, 32, 195, 35, 33, 33, 21, 1, 195, 0, 34,
+        35, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_AYUV);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_YUY2_AYUV");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_AYUV);
+      orc_program_add_destination (p, 8, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 2, 0x000000ff, "c1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 4, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_UYVY_AYUV */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var36;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var37;
+#else
+  orc_union16 var37;
+#endif
+  orc_union64 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union32 var41;
+  orc_union32 var42;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 2: loadpb */
+    var37.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var37.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var36 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 3: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var39.x2[0];
+        var41.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var39.x2[1];
+        var41.x2[1] = _dest.i;
+      }
+      /* 4: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var40.i;
+        _dest.x2[1] = var40.i;
+        var42.i = _dest.i;
+      }
+      /* 5: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[0];
+        _dest.x2[1] = var42.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[1];
+        _dest.x2[1] = var42.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storeq */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_UYVY_AYUV (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var36;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var37;
+#else
+  orc_union16 var37;
+#endif
+  orc_union64 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union32 var41;
+  orc_union32 var42;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 2: loadpb */
+    var37.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var37.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var36 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var36.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 3: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var39.x2[0];
+        var41.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var39.x2[1];
+        var41.x2[1] = _dest.i;
+      }
+      /* 4: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var40.i;
+        _dest.x2[1] = var40.i;
+        var42.i = _dest.i;
+      }
+      /* 5: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[0];
+        _dest.x2[1] = var42.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.x2[1];
+        _dest.x2[1] = var42.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storeq */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89,
+        86, 89, 95, 65, 89, 85, 86, 11, 8, 8, 12, 4, 4, 14, 2, 255,
+        0, 0, 0, 20, 2, 20, 2, 20, 4, 20, 4, 21, 1, 199, 32, 33,
+        4, 21, 1, 196, 34, 16, 32, 195, 35, 33, 33, 21, 1, 195, 0, 34,
+        35, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_AYUV);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_UYVY_AYUV");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_AYUV);
+      orc_program_add_destination (p, 8, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 2, 0x000000ff, "c1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 4, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_YUY2_Y42B */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var33;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var33 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[0];
+        var37.x2[0] = _src.x2[1];
+        var34.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[1];
+        var37.x2[1] = _src.x2[1];
+        var34.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var37.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 4: storeb */
+      ptr2[i] = var35;
+      /* 5: storeb */
+      ptr1[i] = var36;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_YUY2_Y42B (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var33;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var33 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[0];
+        var37.x2[0] = _src.x2[1];
+        var34.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[1];
+        var37.x2[1] = _src.x2[1];
+        var34.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var37.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 4: storeb */
+      ptr2[i] = var35;
+      /* 5: storeb */
+      ptr1[i] = var36;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85,
+        89, 50, 95, 89, 52, 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1,
+        12, 4, 4, 20, 2, 21, 1, 199, 32, 0, 4, 199, 2, 1, 32, 2,
+        0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_Y42B);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_YUY2_Y42B");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_Y42B);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 1, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_UYVY_Y42B */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var33;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var33 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[0];
+        var34.x2[0] = _src.x2[1];
+        var37.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[1];
+        var34.x2[1] = _src.x2[1];
+        var37.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var37.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 4: storeb */
+      ptr2[i] = var35;
+      /* 5: storeb */
+      ptr1[i] = var36;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_UYVY_Y42B (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var33;
+  orc_union16 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var33 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[0];
+        var34.x2[0] = _src.x2[1];
+        var37.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var33.x2[1];
+        var34.x2[1] = _src.x2[1];
+        var37.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var34;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var37.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 4: storeb */
+      ptr2[i] = var35;
+      /* 5: storeb */
+      ptr1[i] = var36;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89,
+        86, 89, 95, 89, 52, 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1,
+        12, 4, 4, 20, 2, 21, 1, 199, 0, 32, 4, 199, 2, 1, 32, 2,
+        0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_Y42B);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_UYVY_Y42B");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_Y42B);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 1, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_YUY2_Y444 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_union16 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var35;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_int8 var40;
+  orc_int8 var41;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var35 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var36.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var36.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var36;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var40 = _src.x2[1];
+        var41 = _src.x2[0];
+      }
+      /* 4: splatbw */
+      var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
+      /* 5: storew */
+      ptr1[i] = var37;
+      /* 6: splatbw */
+      var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff);
+      /* 7: storew */
+      ptr2[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_YUY2_Y444 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_union16 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var35;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_int8 var40;
+  orc_int8 var41;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var35 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var36.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var36.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var36;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var40 = _src.x2[1];
+        var41 = _src.x2[0];
+      }
+      /* 4: splatbw */
+      var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
+      /* 5: storew */
+      ptr1[i] = var37;
+      /* 6: splatbw */
+      var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff);
+      /* 7: storew */
+      ptr2[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 85,
+        89, 50, 95, 89, 52, 52, 52, 11, 2, 2, 11, 2, 2, 11, 2, 2,
+        12, 4, 4, 20, 2, 20, 1, 20, 1, 21, 1, 199, 32, 0, 4, 199,
+        34, 33, 32, 151, 1, 33, 151, 2, 34, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_Y444);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_YUY2_Y444");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_YUY2_Y444);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_destination (p, 2, "d3");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_UYVY_Y444 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_union16 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var35;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_int8 var40;
+  orc_int8 var41;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var35 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[0];
+        var36.x2[0] = _src.x2[1];
+        var39.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[1];
+        var36.x2[1] = _src.x2[1];
+        var39.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var36;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var40 = _src.x2[1];
+        var41 = _src.x2[0];
+      }
+      /* 4: splatbw */
+      var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
+      /* 5: storew */
+      ptr1[i] = var37;
+      /* 6: splatbw */
+      var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff);
+      /* 7: storew */
+      ptr2[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_UYVY_Y444 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_union16 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var35;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_int8 var40;
+  orc_int8 var41;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var35 = ptr4[i];
+      /* 1: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[0];
+        var36.x2[0] = _src.x2[1];
+        var39.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var35.x2[1];
+        var36.x2[1] = _src.x2[1];
+        var39.x2[1] = _src.x2[0];
+      }
+      /* 2: storew */
+      ptr0[i] = var36;
+      /* 3: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var40 = _src.x2[1];
+        var41 = _src.x2[0];
+      }
+      /* 4: splatbw */
+      var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
+      /* 5: storew */
+      ptr1[i] = var37;
+      /* 6: splatbw */
+      var38.i = ((var40 & 0xff) << 8) | (var40 & 0xff);
+      /* 7: storew */
+      ptr2[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89,
+        86, 89, 95, 89, 52, 52, 52, 11, 2, 2, 11, 2, 2, 11, 2, 2,
+        12, 4, 4, 20, 2, 20, 1, 20, 1, 21, 1, 199, 0, 32, 4, 199,
+        34, 33, 32, 151, 1, 33, 151, 2, 34, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_Y444);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_UYVY_Y444");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_Y444);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_destination (p, 2, "d3");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_UYVY_I420 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n)
+{
+  int i;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  const orc_union32 *ORC_RESTRICT ptr5;
+  orc_union32 var35;
+  orc_union32 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  ptr0 = (orc_union16 *) d1;
+  ptr1 = (orc_union16 *) d2;
+  ptr2 = (orc_int8 *) d3;
+  ptr3 = (orc_int8 *) d4;
+  ptr4 = (orc_union32 *) s1;
+  ptr5 = (orc_union32 *) s2;
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var35 = ptr4[i];
+    /* 1: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[0];
+      var39.x2[0] = _src.x2[1];
+      var40.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[1];
+      var39.x2[1] = _src.x2[1];
+      var40.x2[1] = _src.x2[0];
+    }
+    /* 2: storew */
+    ptr0[i] = var39;
+    /* 3: loadl */
+    var36 = ptr5[i];
+    /* 4: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[0];
+      var41.x2[0] = _src.x2[1];
+      var42.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[1];
+      var41.x2[1] = _src.x2[1];
+      var42.x2[1] = _src.x2[0];
+    }
+    /* 5: storew */
+    ptr1[i] = var41;
+    /* 6: avgub */
+    var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+    var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+    /* 7: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var43.i;
+      var37 = _src.x2[1];
+      var38 = _src.x2[0];
+    }
+    /* 8: storeb */
+    ptr3[i] = var37;
+    /* 9: storeb */
+    ptr2[i] = var38;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_UYVY_I420 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  const orc_union32 *ORC_RESTRICT ptr5;
+  orc_union32 var35;
+  orc_union32 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  ptr0 = (orc_union16 *) ex->arrays[0];
+  ptr1 = (orc_union16 *) ex->arrays[1];
+  ptr2 = (orc_int8 *) ex->arrays[2];
+  ptr3 = (orc_int8 *) ex->arrays[3];
+  ptr4 = (orc_union32 *) ex->arrays[4];
+  ptr5 = (orc_union32 *) ex->arrays[5];
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var35 = ptr4[i];
+    /* 1: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[0];
+      var39.x2[0] = _src.x2[1];
+      var40.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var35.x2[1];
+      var39.x2[1] = _src.x2[1];
+      var40.x2[1] = _src.x2[0];
+    }
+    /* 2: storew */
+    ptr0[i] = var39;
+    /* 3: loadl */
+    var36 = ptr5[i];
+    /* 4: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[0];
+      var41.x2[0] = _src.x2[1];
+      var42.x2[0] = _src.x2[0];
+    }
+    {
+      orc_union16 _src;
+      _src.i = var36.x2[1];
+      var41.x2[1] = _src.x2[1];
+      var42.x2[1] = _src.x2[0];
+    }
+    /* 5: storew */
+    ptr1[i] = var41;
+    /* 6: avgub */
+    var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+    var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+    /* 7: splitwb */
+    {
+      orc_union16 _src;
+      _src.i = var43.i;
+      var37 = _src.x2[1];
+      var38 = _src.x2[0];
+    }
+    /* 8: storeb */
+    ptr3[i] = var37;
+    /* 9: storeb */
+    ptr2[i] = var38;
+  }
+
+}
+
+void
+video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1,
+    guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3,
+    guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1,
+    const guint8 * ORC_RESTRICT s2, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 85, 89, 86,
+        89, 95, 73, 52, 50, 48, 11, 2, 2, 11, 2, 2, 11, 1, 1, 11,
+        1, 1, 12, 4, 4, 12, 4, 4, 20, 2, 20, 2, 20, 2, 21, 1,
+        199, 34, 32, 4, 97, 0, 34, 21, 1, 199, 34, 33, 5, 97, 1, 34,
+        21, 1, 39, 32, 32, 33, 199, 3, 2, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_I420);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_UYVY_I420");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_UYVY_I420);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_destination (p, 1, "d4");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_source (p, 4, "s2");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_S2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->arrays[ORC_VAR_D4] = d4;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_I420 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, guint8 * ORC_RESTRICT d4, int d4_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  const orc_union64 *ORC_RESTRICT ptr5;
+  orc_union64 var40;
+  orc_union16 var41;
+  orc_union64 var42;
+  orc_union16 var43;
+  orc_int8 var44;
+  orc_int8 var45;
+  orc_union32 var46;
+  orc_union32 var47;
+  orc_union32 var48;
+  orc_union32 var49;
+  orc_union32 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+  orc_int8 var53;
+  orc_int8 var54;
+  orc_int8 var55;
+  orc_int8 var56;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr3 = ORC_PTR_OFFSET (d4, d4_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var40 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.x2[0];
+        var46.x2[0] = _src.x2[1];
+        var47.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var40.x2[1];
+        var46.x2[1] = _src.x2[1];
+        var47.x2[1] = _src.x2[0];
+      }
+      /* 2: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var47.x2[0];
+        var41.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var47.x2[1];
+        var41.x2[1] = _src.x2[1];
+      }
+      /* 3: storew */
+      ptr0[i] = var41;
+      /* 4: loadq */
+      var42 = ptr5[i];
+      /* 5: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var42.x2[0];
+        var48.x2[0] = _src.x2[1];
+        var49.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var42.x2[1];
+        var48.x2[1] = _src.x2[1];
+        var49.x2[1] = _src.x2[0];
+      }
+      /* 6: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var49.x2[0];
+        var43.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var49.x2[1];
+        var43.x2[1] = _src.x2[1];
+      }
+      /* 7: storew */
+      ptr1[i] = var43;
+      /* 8: avgub */
+      var50.x4[0] =
+          ((orc_uint8) var46.x4[0] + (orc_uint8) var48.x4[0] + 1) >> 1;
+      var50.x4[1] =
+          ((orc_uint8) var46.x4[1] + (orc_uint8) var48.x4[1] + 1) >> 1;
+      var50.x4[2] =
+          ((orc_uint8) var46.x4[2] + (orc_uint8) var48.x4[2] + 1) >> 1;
+      var50.x4[3] =
+          ((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1;
+      /* 9: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var50.x2[0];
+        var51.x2[0] = _src.x2[1];
+        var52.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var50.x2[1];
+        var51.x2[1] = _src.x2[1];
+        var52.x2[1] = _src.x2[0];
+      }
+      /* 10: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var52.i;
+        var53 = _src.x2[1];
+        var54 = _src.x2[0];
+      }
+      /* 11: avgub */
+      var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1;
+      /* 12: storeb */
+      ptr2[i] = var44;
+      /* 13: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var51.i;
+        var55 = _src.x2[1];
+        var56 = _src.x2[0];
+      }
+      /* 14: avgub */
+      var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1;
+      /* 15: storeb */
+      ptr3[i] = var45;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_I420 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_union16 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  orc_int8 *ORC_RESTRICT ptr3;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  const orc_union64 *ORC_RESTRICT ptr5;
+  orc_union64 var40;
+  orc_union16 var41;
+  orc_union64 var42;
+  orc_union16 var43;
+  orc_int8 var44;
+  orc_int8 var45;
+  orc_union32 var46;
+  orc_union32 var47;
+  orc_union32 var48;
+  orc_union32 var49;
+  orc_union32 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+  orc_int8 var53;
+  orc_int8 var54;
+  orc_int8 var55;
+  orc_int8 var56;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr3 = ORC_PTR_OFFSET (ex->arrays[3], ex->params[3] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var40 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.x2[0];
+        var46.x2[0] = _src.x2[1];
+        var47.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var40.x2[1];
+        var46.x2[1] = _src.x2[1];
+        var47.x2[1] = _src.x2[0];
+      }
+      /* 2: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var47.x2[0];
+        var41.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var47.x2[1];
+        var41.x2[1] = _src.x2[1];
+      }
+      /* 3: storew */
+      ptr0[i] = var41;
+      /* 4: loadq */
+      var42 = ptr5[i];
+      /* 5: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var42.x2[0];
+        var48.x2[0] = _src.x2[1];
+        var49.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var42.x2[1];
+        var48.x2[1] = _src.x2[1];
+        var49.x2[1] = _src.x2[0];
+      }
+      /* 6: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var49.x2[0];
+        var43.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var49.x2[1];
+        var43.x2[1] = _src.x2[1];
+      }
+      /* 7: storew */
+      ptr1[i] = var43;
+      /* 8: avgub */
+      var50.x4[0] =
+          ((orc_uint8) var46.x4[0] + (orc_uint8) var48.x4[0] + 1) >> 1;
+      var50.x4[1] =
+          ((orc_uint8) var46.x4[1] + (orc_uint8) var48.x4[1] + 1) >> 1;
+      var50.x4[2] =
+          ((orc_uint8) var46.x4[2] + (orc_uint8) var48.x4[2] + 1) >> 1;
+      var50.x4[3] =
+          ((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1;
+      /* 9: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var50.x2[0];
+        var51.x2[0] = _src.x2[1];
+        var52.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var50.x2[1];
+        var51.x2[1] = _src.x2[1];
+        var52.x2[1] = _src.x2[0];
+      }
+      /* 10: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var52.i;
+        var53 = _src.x2[1];
+        var54 = _src.x2[0];
+      }
+      /* 11: avgub */
+      var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1;
+      /* 12: storeb */
+      ptr2[i] = var44;
+      /* 13: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var51.i;
+        var55 = _src.x2[1];
+        var56 = _src.x2[0];
+      }
+      /* 14: avgub */
+      var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1;
+      /* 15: storeb */
+      ptr3[i] = var45;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, guint8 * ORC_RESTRICT d4, int d4_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 73, 52, 50, 48, 11, 2, 2, 11, 2, 2, 11, 1, 1,
+        11, 1, 1, 12, 8, 8, 12, 8, 8, 20, 4, 20, 4, 20, 4, 20,
+        4, 20, 2, 20, 2, 20, 1, 20, 1, 21, 1, 198, 33, 32, 4, 21,
+        1, 189, 0, 32, 21, 1, 198, 34, 32, 5, 21, 1, 189, 1, 32, 21,
+        2, 39, 35, 33, 34, 21, 1, 199, 37, 36, 35, 199, 38, 39, 36, 39,
+        2, 38, 39, 199, 38, 39, 37, 39, 3, 38, 39, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_I420);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_I420");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_I420);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 2, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_destination (p, 1, "d4");
+      orc_program_add_source (p, 8, "s1");
+      orc_program_add_source (p, 8, "s2");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 4, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 1, "t7");
+      orc_program_add_temporary (p, 1, "t8");
+
+      orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D1, ORC_VAR_T1,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D2, ORC_VAR_T1,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 2, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 1, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 0, ORC_VAR_D3, ORC_VAR_T7, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 0, ORC_VAR_D4, ORC_VAR_T7, ORC_VAR_T8,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_D4] = d4;
+  ex->params[ORC_VAR_D4] = d4_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_YUY2 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var37;
+  orc_union32 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var37 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var39.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 4: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[0];
+        var44.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[1];
+        var44.x2[1] = _src.x2[1];
+      }
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var44.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var44.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_YUY2 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var37;
+  orc_union32 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var37 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var39.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 4: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[0];
+        var44.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[1];
+        var44.x2[1] = _src.x2[1];
+      }
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var44.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var44.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 89, 85, 89, 50, 11, 4, 4, 12, 8, 8, 20, 2, 20,
+        2, 20, 2, 20, 4, 20, 4, 21, 1, 198, 36, 35, 4, 198, 33, 34,
+        36, 21, 1, 39, 33, 33, 34, 21, 1, 189, 32, 35, 21, 1, 196, 0,
+        32, 33, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_YUY2);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_YUY2");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_YUY2);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 8, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+      orc_program_add_temporary (p, 4, "t5");
+
+      orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 1, ORC_VAR_T1, ORC_VAR_T4,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_UYVY */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var37;
+  orc_union32 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var37 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var39.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 4: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[0];
+        var44.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[1];
+        var44.x2[1] = _src.x2[1];
+      }
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[0];
+        _dest.x2[1] = var44.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[1];
+        _dest.x2[1] = var44.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_UYVY (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var37;
+  orc_union32 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var37 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[0];
+        var39.x2[0] = _src.x2[1];
+        var40.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var37.x2[1];
+        var39.x2[1] = _src.x2[1];
+        var40.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var39.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 4: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[0];
+        var44.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var40.x2[1];
+        var44.x2[1] = _src.x2[1];
+      }
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[0];
+        _dest.x2[1] = var44.x2[0];
+        var38.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[1];
+        _dest.x2[1] = var44.x2[1];
+        var38.x2[1] = _dest.i;
+      }
+      /* 6: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 85, 89, 86, 89, 11, 4, 4, 12, 8, 8, 20, 2, 20,
+        2, 20, 2, 20, 4, 20, 4, 21, 1, 198, 36, 35, 4, 198, 33, 34,
+        36, 21, 1, 39, 33, 33, 34, 21, 1, 189, 32, 35, 21, 1, 196, 0,
+        33, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_UYVY);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_UYVY");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_UYVY);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 8, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+      orc_program_add_temporary (p, 4, "t5");
+
+      orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 1, ORC_VAR_T1, ORC_VAR_T4,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_Y42B */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union32 var40;
+  orc_union32 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var36 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var36.x2[0];
+        var40.x2[0] = _src.x2[1];
+        var41.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var36.x2[1];
+        var40.x2[1] = _src.x2[1];
+        var41.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var42.i = _src.x2[1];
+        var43.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var44.x2[0] =
+          ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1;
+      var44.x2[1] =
+          ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1;
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var44.i;
+        var37 = _src.x2[1];
+        var38 = _src.x2[0];
+      }
+      /* 5: storeb */
+      ptr2[i] = var37;
+      /* 6: storeb */
+      ptr1[i] = var38;
+      /* 7: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var41.x2[0];
+        var39.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var41.x2[1];
+        var39.x2[1] = _src.x2[1];
+      }
+      /* 8: storew */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_Y42B (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union16 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union64 *ORC_RESTRICT ptr4;
+  orc_union64 var36;
+  orc_int8 var37;
+  orc_int8 var38;
+  orc_union16 var39;
+  orc_union32 var40;
+  orc_union32 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadq */
+      var36 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var36.x2[0];
+        var40.x2[0] = _src.x2[1];
+        var41.x2[0] = _src.x2[0];
+      }
+      {
+        orc_union32 _src;
+        _src.i = var36.x2[1];
+        var40.x2[1] = _src.x2[1];
+        var41.x2[1] = _src.x2[0];
+      }
+      /* 2: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var42.i = _src.x2[1];
+        var43.i = _src.x2[0];
+      }
+      /* 3: avgub */
+      var44.x2[0] =
+          ((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1;
+      var44.x2[1] =
+          ((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1;
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var44.i;
+        var37 = _src.x2[1];
+        var38 = _src.x2[0];
+      }
+      /* 5: storeb */
+      ptr2[i] = var37;
+      /* 6: storeb */
+      ptr1[i] = var38;
+      /* 7: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var41.x2[0];
+        var39.x2[0] = _src.x2[1];
+      }
+      {
+        orc_union16 _src;
+        _src.i = var41.x2[1];
+        var39.x2[1] = _src.x2[1];
+      }
+      /* 8: storew */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 89, 52, 50, 66, 11, 2, 2, 11, 1, 1, 11, 1, 1,
+        12, 8, 8, 20, 4, 20, 4, 20, 2, 20, 2, 21, 1, 198, 33, 32,
+        4, 198, 34, 35, 33, 21, 1, 39, 34, 34, 35, 199, 2, 1, 34, 21,
+        1, 189, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_Y42B);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_Y42B");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_Y42B);
+      orc_program_add_destination (p, 2, "d1");
+      orc_program_add_destination (p, 1, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_source (p, 8, "s1");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 2, "t4");
+
+      orc_program_append_2 (p, "splitlw", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D1, ORC_VAR_T1,
+          ORC_VAR_D1, ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_Y444 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr1 = ORC_PTR_OFFSET (d2, d2_stride * j);
+    ptr2 = ORC_PTR_OFFSET (d3, d3_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var34 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var34.i;
+        var38.i = _src.x2[1];
+        var39.i = _src.x2[0];
+      }
+      /* 2: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var38.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 3: storeb */
+      ptr2[i] = var35;
+      /* 4: storeb */
+      ptr1[i] = var36;
+      /* 5: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var37 = _src.x2[1];
+      }
+      /* 6: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_Y444 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  orc_int8 *ORC_RESTRICT ptr1;
+  orc_int8 *ORC_RESTRICT ptr2;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var34;
+  orc_int8 var35;
+  orc_int8 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr1 = ORC_PTR_OFFSET (ex->arrays[1], ex->params[1] * j);
+    ptr2 = ORC_PTR_OFFSET (ex->arrays[2], ex->params[2] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var34 = ptr4[i];
+      /* 1: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var34.i;
+        var38.i = _src.x2[1];
+        var39.i = _src.x2[0];
+      }
+      /* 2: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var38.i;
+        var35 = _src.x2[1];
+        var36 = _src.x2[0];
+      }
+      /* 3: storeb */
+      ptr2[i] = var35;
+      /* 4: storeb */
+      ptr1[i] = var36;
+      /* 5: select1wb */
+      {
+        orc_union16 _src;
+        _src.i = var39.i;
+        var37 = _src.x2[1];
+      }
+      /* 6: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3,
+    int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 89, 52, 52, 52, 11, 1, 1, 11, 1, 1, 11, 1, 1,
+        12, 4, 4, 20, 2, 20, 2, 198, 33, 32, 4, 199, 2, 1, 33, 189,
+        0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_Y444);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_Y444");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_Y444);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_destination (p, 1, "d2");
+      orc_program_add_destination (p, 1, "d3");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
+          ORC_VAR_D1, ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_D2] = d2;
+  ex->params[ORC_VAR_D2] = d2_stride;
+  ex->arrays[ORC_VAR_D3] = d3;
+  ex->params[ORC_VAR_D3] = d3_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y42B_YUY2 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr5[i];
+      /* 1: loadb */
+      var34 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var33;
+        _dest.x2[1] = var34;
+        var37.i = _dest.i;
+      }
+      /* 3: loadw */
+      var35 = ptr4[i];
+      /* 4: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var35.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var36.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var35.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var36.x2[1] = _dest.i;
+      }
+      /* 5: storel */
+      ptr0[i] = var36;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y42B_YUY2 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr5[i];
+      /* 1: loadb */
+      var34 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var33;
+        _dest.x2[1] = var34;
+        var37.i = _dest.i;
+      }
+      /* 3: loadw */
+      var35 = ptr4[i];
+      /* 4: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var35.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var36.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var35.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var36.x2[1] = _dest.i;
+      }
+      /* 5: storel */
+      ptr0[i] = var36;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        50, 66, 95, 89, 85, 89, 50, 11, 4, 4, 12, 2, 2, 12, 1, 1,
+        12, 1, 1, 20, 2, 196, 32, 5, 6, 21, 1, 196, 0, 4, 32, 2,
+        0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_YUY2);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y42B_YUY2");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_YUY2);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y42B_UYVY */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr5[i];
+      /* 1: loadb */
+      var34 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var33;
+        _dest.x2[1] = var34;
+        var37.i = _dest.i;
+      }
+      /* 3: loadw */
+      var35 = ptr4[i];
+      /* 4: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var35.x2[0];
+        var36.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var35.x2[1];
+        var36.x2[1] = _dest.i;
+      }
+      /* 5: storel */
+      ptr0[i] = var36;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y42B_UYVY (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var33;
+  orc_int8 var34;
+  orc_union16 var35;
+  orc_union32 var36;
+  orc_union16 var37;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var33 = ptr5[i];
+      /* 1: loadb */
+      var34 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var33;
+        _dest.x2[1] = var34;
+        var37.i = _dest.i;
+      }
+      /* 3: loadw */
+      var35 = ptr4[i];
+      /* 4: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[0];
+        _dest.x2[1] = var35.x2[0];
+        var36.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var37.x2[1];
+        _dest.x2[1] = var35.x2[1];
+        var36.x2[1] = _dest.i;
+      }
+      /* 5: storel */
+      ptr0[i] = var36;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        50, 66, 95, 85, 89, 86, 89, 11, 4, 4, 12, 2, 2, 12, 1, 1,
+        12, 1, 1, 20, 2, 196, 32, 5, 6, 21, 1, 196, 0, 32, 4, 2,
+        0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_UYVY);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y42B_UYVY");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_UYVY);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_temporary (p, 2, "t1");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y42B_AYUV */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var36;
+  orc_int8 var37;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var38;
+#else
+  orc_union16 var38;
+#endif
+  orc_union16 var39;
+  orc_union64 var40;
+  orc_union16 var41;
+  orc_union32 var42;
+  orc_union32 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+    /* 3: loadpb */
+    var38.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var38.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var36 = ptr5[i];
+      /* 1: loadb */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36;
+        _dest.x2[1] = var37;
+        var41.i = _dest.i;
+      }
+      /* 4: loadw */
+      var39 = ptr4[i];
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[0];
+        _dest.x2[1] = var39.x2[0];
+        var42.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[1];
+        _dest.x2[1] = var39.x2[1];
+        var42.x2[1] = _dest.i;
+      }
+      /* 6: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.i;
+        _dest.x2[1] = var41.i;
+        var43.i = _dest.i;
+      }
+      /* 7: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var42.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var42.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 8: storeq */
+      ptr0[i] = var40;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y42B_AYUV (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union64 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var36;
+  orc_int8 var37;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union16 var38;
+#else
+  orc_union16 var38;
+#endif
+  orc_union16 var39;
+  orc_union64 var40;
+  orc_union16 var41;
+  orc_union32 var42;
+  orc_union32 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+    /* 3: loadpb */
+    var38.x2[0] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+    var38.x2[1] = (int) 0x000000ff;     /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var36 = ptr5[i];
+      /* 1: loadb */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36;
+        _dest.x2[1] = var37;
+        var41.i = _dest.i;
+      }
+      /* 4: loadw */
+      var39 = ptr4[i];
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[0];
+        _dest.x2[1] = var39.x2[0];
+        var42.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[1];
+        _dest.x2[1] = var39.x2[1];
+        var42.x2[1] = _dest.i;
+      }
+      /* 6: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var41.i;
+        _dest.x2[1] = var41.i;
+        var43.i = _dest.i;
+      }
+      /* 7: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var42.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var42.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 8: storeq */
+      ptr0[i] = var40;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        50, 66, 95, 65, 89, 85, 86, 11, 8, 8, 12, 2, 2, 12, 1, 1,
+        12, 1, 1, 14, 1, 255, 0, 0, 0, 20, 2, 20, 2, 20, 4, 20,
+        4, 196, 32, 5, 6, 21, 1, 196, 35, 16, 4, 195, 34, 32, 32, 21,
+        1, 195, 0, 35, 34, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_AYUV);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y42B_AYUV");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y42B_AYUV);
+      orc_program_add_destination (p, 8, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_constant (p, 1, 0x000000ff, "c1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 4, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y444_YUY2 */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_union16 *ORC_RESTRICT ptr6;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var36 = ptr5[i];
+      /* 1: loadw */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 4: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 5: loadw */
+      var38 = ptr4[i];
+      /* 6: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var39.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var39.x2[1] = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y444_YUY2 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_union16 *ORC_RESTRICT ptr6;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var36 = ptr5[i];
+      /* 1: loadw */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 4: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 5: loadw */
+      var38 = ptr4[i];
+      /* 6: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[0];
+        _dest.x2[1] = var43.x2[0];
+        var39.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var38.x2[1];
+        _dest.x2[1] = var43.x2[1];
+        var39.x2[1] = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        52, 52, 95, 89, 85, 89, 50, 11, 4, 4, 12, 2, 2, 12, 2, 2,
+        12, 2, 2, 20, 2, 20, 4, 20, 2, 20, 2, 21, 1, 196, 33, 5,
+        6, 198, 34, 35, 33, 21, 1, 39, 32, 34, 35, 21, 1, 196, 0, 4,
+        32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_YUY2);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y444_YUY2");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_YUY2);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 2, "s2");
+      orc_program_add_source (p, 2, "s3");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 2, "t4");
+
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y444_UYVY */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_union16 *ORC_RESTRICT ptr6;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var36 = ptr5[i];
+      /* 1: loadw */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 4: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 5: loadw */
+      var38 = ptr4[i];
+      /* 6: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[0];
+        _dest.x2[1] = var38.x2[0];
+        var39.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[1];
+        _dest.x2[1] = var38.x2[1];
+        var39.x2[1] = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y444_UYVY (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union16 *ORC_RESTRICT ptr4;
+  const orc_union16 *ORC_RESTRICT ptr5;
+  const orc_union16 *ORC_RESTRICT ptr6;
+  orc_union16 var36;
+  orc_union16 var37;
+  orc_union16 var38;
+  orc_union32 var39;
+  orc_union32 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadw */
+      var36 = ptr5[i];
+      /* 1: loadw */
+      var37 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[0];
+        _dest.x2[1] = var37.x2[0];
+        var40.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36.x2[1];
+        _dest.x2[1] = var37.x2[1];
+        var40.x2[1] = _dest.i;
+      }
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var40.i;
+        var41.i = _src.x2[1];
+        var42.i = _src.x2[0];
+      }
+      /* 4: avgub */
+      var43.x2[0] =
+          ((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
+      var43.x2[1] =
+          ((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
+      /* 5: loadw */
+      var38 = ptr4[i];
+      /* 6: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[0];
+        _dest.x2[1] = var38.x2[0];
+        var39.x2[0] = _dest.i;
+      }
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var43.x2[1];
+        _dest.x2[1] = var38.x2[1];
+        var39.x2[1] = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var39;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        52, 52, 95, 85, 89, 86, 89, 11, 4, 4, 12, 2, 2, 12, 2, 2,
+        12, 2, 2, 20, 2, 20, 4, 20, 2, 20, 2, 21, 1, 196, 33, 5,
+        6, 198, 34, 35, 33, 21, 1, 39, 32, 34, 35, 21, 1, 196, 0, 32,
+        4, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_UYVY);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y444_UYVY");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_UYVY);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 2, "s1");
+      orc_program_add_source (p, 2, "s2");
+      orc_program_add_source (p, 2, "s3");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 2, "t4");
+
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "avgub", 1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_Y444_AYUV */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var34;
+  orc_int8 var35;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var36;
+#else
+  orc_int8 var36;
+#endif
+  orc_int8 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+    ptr5 = ORC_PTR_OFFSET (s2, s2_stride * j);
+    ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
+
+    /* 3: loadpb */
+    var36 = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var34 = ptr5[i];
+      /* 1: loadb */
+      var35 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var34;
+        _dest.x2[1] = var35;
+        var39.i = _dest.i;
+      }
+      /* 4: loadb */
+      var37 = ptr4[i];
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36;
+        _dest.x2[1] = var37;
+        var40.i = _dest.i;
+      }
+      /* 6: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var40.i;
+        _dest.x2[1] = var39.i;
+        var38.i = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_Y444_AYUV (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var34;
+  orc_int8 var35;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var36;
+#else
+  orc_int8 var36;
+#endif
+  orc_int8 var37;
+  orc_union32 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+    ptr5 = ORC_PTR_OFFSET (ex->arrays[5], ex->params[5] * j);
+    ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
+
+    /* 3: loadpb */
+    var36 = (int) 0x000000ff;   /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var34 = ptr5[i];
+      /* 1: loadb */
+      var35 = ptr6[i];
+      /* 2: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var34;
+        _dest.x2[1] = var35;
+        var39.i = _dest.i;
+      }
+      /* 4: loadb */
+      var37 = ptr4[i];
+      /* 5: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var36;
+        _dest.x2[1] = var37;
+        var40.i = _dest.i;
+      }
+      /* 6: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var40.i;
+        _dest.x2[1] = var39.i;
+        var38.i = _dest.i;
+      }
+      /* 7: storel */
+      ptr0[i] = var38;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride,
+    const guint8 * ORC_RESTRICT s2, int s2_stride,
+    const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 89, 52,
+        52, 52, 95, 65, 89, 85, 86, 11, 4, 4, 12, 1, 1, 12, 1, 1,
+        12, 1, 1, 14, 1, 255, 0, 0, 0, 20, 2, 20, 2, 196, 32, 5,
+        6, 196, 33, 16, 4, 195, 0, 33, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_AYUV);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_Y444_AYUV");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_Y444_AYUV);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_constant (p, 1, 0x000000ff, "c1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_S1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->params[ORC_VAR_S2] = s2_stride;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_S3] = s3_stride;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_ARGB */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = p1;
+    /* 11: loadpw */
+    var49.i = p2;
+    /* 14: loadpw */
+    var50.i = p3;
+    /* 17: loadpw */
+    var51.i = p4;
+    /* 20: loadpw */
+    var52.i = p5;
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var59;
+        _dest.x2[1] = var74;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var75;
+        _dest.x2[1] = var76;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_ARGB (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = ex->params[24];
+    /* 11: loadpw */
+    var49.i = ex->params[25];
+    /* 14: loadpw */
+    var50.i = ex->params[26];
+    /* 17: loadpw */
+    var51.i = ex->params[27];
+    /* 20: loadpw */
+    var52.i = ex->params[28];
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var59;
+        _dest.x2[1] = var74;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var75;
+        _dest.x2[1] = var76;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 65, 82, 71, 66, 11, 4, 4, 12, 4, 4, 14, 1, 128,
+        0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20,
+        1, 20, 1, 20, 1, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20,
+        2, 20, 1, 20, 1, 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198,
+        38, 36, 45, 199, 33, 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37,
+        34, 151, 38, 35, 90, 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39,
+        90, 41, 37, 26, 71, 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40,
+        90, 36, 38, 28, 71, 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44,
+        41, 196, 39, 32, 42, 196, 41, 43, 44, 195, 45, 39, 41, 21, 2, 33,
+        0, 45, 16, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_ARGB);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_ARGB");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_ARGB);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 1, 0x00000080, "c1");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_parameter (p, 2, "p2");
+      orc_program_add_parameter (p, 2, "p3");
+      orc_program_add_parameter (p, 2, "p4");
+      orc_program_add_parameter (p, 2, "p5");
+      orc_program_add_temporary (p, 1, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 2, "t7");
+      orc_program_add_temporary (p, 2, "t8");
+      orc_program_add_temporary (p, 2, "t9");
+      orc_program_add_temporary (p, 2, "t10");
+      orc_program_add_temporary (p, 1, "t11");
+      orc_program_add_temporary (p, 1, "t12");
+      orc_program_add_temporary (p, 1, "t13");
+      orc_program_add_temporary (p, 4, "t14");
+
+      orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5,
+          ORC_VAR_T14, ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T1,
+          ORC_VAR_T11, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T12,
+          ORC_VAR_T13, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T8,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+  ex->params[ORC_VAR_P2] = p2;
+  ex->params[ORC_VAR_P3] = p3;
+  ex->params[ORC_VAR_P4] = p4;
+  ex->params[ORC_VAR_P5] = p5;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_BGRA */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = p1;
+    /* 11: loadpw */
+    var49.i = p2;
+    /* 14: loadpw */
+    var50.i = p3;
+    /* 17: loadpw */
+    var51.i = p4;
+    /* 20: loadpw */
+    var52.i = p5;
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var76;
+        _dest.x2[1] = var75;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var74;
+        _dest.x2[1] = var59;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_BGRA (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = ex->params[24];
+    /* 11: loadpw */
+    var49.i = ex->params[25];
+    /* 14: loadpw */
+    var50.i = ex->params[26];
+    /* 17: loadpw */
+    var51.i = ex->params[27];
+    /* 20: loadpw */
+    var52.i = ex->params[28];
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var76;
+        _dest.x2[1] = var75;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var74;
+        _dest.x2[1] = var59;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 66, 71, 82, 65, 11, 4, 4, 12, 4, 4, 14, 1, 128,
+        0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20,
+        1, 20, 1, 20, 1, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20,
+        2, 20, 1, 20, 1, 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198,
+        38, 36, 45, 199, 33, 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37,
+        34, 151, 38, 35, 90, 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39,
+        90, 41, 37, 26, 71, 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40,
+        90, 36, 38, 28, 71, 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44,
+        41, 196, 41, 44, 43, 196, 39, 42, 32, 195, 45, 41, 39, 21, 2, 33,
+        0, 45, 16, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_BGRA);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_BGRA");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_BGRA);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 1, 0x00000080, "c1");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_parameter (p, 2, "p2");
+      orc_program_add_parameter (p, 2, "p3");
+      orc_program_add_parameter (p, 2, "p4");
+      orc_program_add_parameter (p, 2, "p5");
+      orc_program_add_temporary (p, 1, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 2, "t7");
+      orc_program_add_temporary (p, 2, "t8");
+      orc_program_add_temporary (p, 2, "t9");
+      orc_program_add_temporary (p, 2, "t10");
+      orc_program_add_temporary (p, 1, "t11");
+      orc_program_add_temporary (p, 1, "t12");
+      orc_program_add_temporary (p, 1, "t13");
+      orc_program_add_temporary (p, 4, "t14");
+
+      orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5,
+          ORC_VAR_T14, ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T13,
+          ORC_VAR_T12, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T11,
+          ORC_VAR_T1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T10,
+          ORC_VAR_T8, ORC_VAR_D1);
+      orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+  ex->params[ORC_VAR_P2] = p2;
+  ex->params[ORC_VAR_P3] = p3;
+  ex->params[ORC_VAR_P4] = p4;
+  ex->params[ORC_VAR_P5] = p5;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_ABGR */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = p1;
+    /* 11: loadpw */
+    var49.i = p2;
+    /* 14: loadpw */
+    var50.i = p3;
+    /* 17: loadpw */
+    var51.i = p4;
+    /* 20: loadpw */
+    var52.i = p5;
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var59;
+        _dest.x2[1] = var76;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var75;
+        _dest.x2[1] = var74;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_ABGR (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = ex->params[24];
+    /* 11: loadpw */
+    var49.i = ex->params[25];
+    /* 14: loadpw */
+    var50.i = ex->params[26];
+    /* 17: loadpw */
+    var51.i = ex->params[27];
+    /* 20: loadpw */
+    var52.i = ex->params[28];
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var59;
+        _dest.x2[1] = var76;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var75;
+        _dest.x2[1] = var74;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 65, 66, 71, 82, 11, 4, 4, 12, 4, 4, 14, 1, 128,
+        0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20,
+        1, 20, 1, 20, 1, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20,
+        2, 20, 1, 20, 1, 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198,
+        38, 36, 45, 199, 33, 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37,
+        34, 151, 38, 35, 90, 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39,
+        90, 41, 37, 26, 71, 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40,
+        90, 36, 38, 28, 71, 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44,
+        41, 196, 41, 32, 44, 196, 39, 43, 42, 195, 45, 41, 39, 21, 2, 33,
+        0, 45, 16, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_ABGR);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_ABGR");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_ABGR);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 1, 0x00000080, "c1");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_parameter (p, 2, "p2");
+      orc_program_add_parameter (p, 2, "p3");
+      orc_program_add_parameter (p, 2, "p4");
+      orc_program_add_parameter (p, 2, "p5");
+      orc_program_add_temporary (p, 1, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 2, "t7");
+      orc_program_add_temporary (p, 2, "t8");
+      orc_program_add_temporary (p, 2, "t9");
+      orc_program_add_temporary (p, 2, "t10");
+      orc_program_add_temporary (p, 1, "t11");
+      orc_program_add_temporary (p, 1, "t12");
+      orc_program_add_temporary (p, 1, "t13");
+      orc_program_add_temporary (p, 4, "t14");
+
+      orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5,
+          ORC_VAR_T14, ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T1,
+          ORC_VAR_T13, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T12,
+          ORC_VAR_T11, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T10,
+          ORC_VAR_T8, ORC_VAR_D1);
+      orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+  ex->params[ORC_VAR_P2] = p2;
+  ex->params[ORC_VAR_P3] = p3;
+  ex->params[ORC_VAR_P4] = p4;
+  ex->params[ORC_VAR_P5] = p5;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_AYUV_RGBA */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = p1;
+    /* 11: loadpw */
+    var49.i = p2;
+    /* 14: loadpw */
+    var50.i = p3;
+    /* 17: loadpw */
+    var51.i = p4;
+    /* 20: loadpw */
+    var52.i = p5;
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var74;
+        _dest.x2[1] = var75;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var76;
+        _dest.x2[1] = var59;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_AYUV_RGBA (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var46;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var47;
+#else
+  orc_union32 var47;
+#endif
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+  orc_union16 var51;
+  orc_union16 var52;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var53;
+#else
+  orc_union32 var53;
+#endif
+  orc_union32 var54;
+  orc_union32 var55;
+  orc_union16 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_int8 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_union16 var71;
+  orc_union16 var72;
+  orc_union16 var73;
+  orc_int8 var74;
+  orc_int8 var75;
+  orc_int8 var76;
+  orc_union16 var77;
+  orc_union16 var78;
+  orc_union32 var79;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 1: loadpb */
+    var47.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var47.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    /* 9: loadpw */
+    var48.i = ex->params[24];
+    /* 11: loadpw */
+    var49.i = ex->params[25];
+    /* 14: loadpw */
+    var50.i = ex->params[26];
+    /* 17: loadpw */
+    var51.i = ex->params[27];
+    /* 20: loadpw */
+    var52.i = ex->params[28];
+    /* 29: loadpb */
+    var53.x4[0] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[1] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[2] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+    var53.x4[3] = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var46 = ptr4[i];
+      /* 2: subb */
+      var55.x4[0] = var46.x4[0] - var47.x4[0];
+      var55.x4[1] = var46.x4[1] - var47.x4[1];
+      var55.x4[2] = var46.x4[2] - var47.x4[2];
+      var55.x4[3] = var46.x4[3] - var47.x4[3];
+      /* 3: splitlw */
+      {
+        orc_union32 _src;
+        _src.i = var55.i;
+        var56.i = _src.x2[1];
+        var57.i = _src.x2[0];
+      }
+      /* 4: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var57.i;
+        var58 = _src.x2[1];
+        var59 = _src.x2[0];
+      }
+      /* 5: splitwb */
+      {
+        orc_union16 _src;
+        _src.i = var56.i;
+        var60 = _src.x2[1];
+        var61 = _src.x2[0];
+      }
+      /* 6: splatbw */
+      var62.i = ((var58 & 0xff) << 8) | (var58 & 0xff);
+      /* 7: splatbw */
+      var63.i = ((var61 & 0xff) << 8) | (var61 & 0xff);
+      /* 8: splatbw */
+      var64.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+      /* 10: mulhsw */
+      var65.i = (var62.i * var48.i) >> 16;
+      /* 12: mulhsw */
+      var66.i = (var64.i * var49.i) >> 16;
+      /* 13: addssw */
+      var67.i = ORC_CLAMP_SW (var65.i + var66.i);
+      /* 15: mulhsw */
+      var68.i = (var63.i * var50.i) >> 16;
+      /* 16: addssw */
+      var69.i = ORC_CLAMP_SW (var65.i + var68.i);
+      /* 18: mulhsw */
+      var70.i = (var63.i * var51.i) >> 16;
+      /* 19: addssw */
+      var71.i = ORC_CLAMP_SW (var65.i + var70.i);
+      /* 21: mulhsw */
+      var72.i = (var64.i * var52.i) >> 16;
+      /* 22: addssw */
+      var73.i = ORC_CLAMP_SW (var71.i + var72.i);
+      /* 23: convssswb */
+      var74 = ORC_CLAMP_SB (var67.i);
+      /* 24: convssswb */
+      var75 = ORC_CLAMP_SB (var73.i);
+      /* 25: convssswb */
+      var76 = ORC_CLAMP_SB (var69.i);
+      /* 26: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var74;
+        _dest.x2[1] = var75;
+        var77.i = _dest.i;
+      }
+      /* 27: mergebw */
+      {
+        orc_union16 _dest;
+        _dest.x2[0] = var76;
+        _dest.x2[1] = var59;
+        var78.i = _dest.i;
+      }
+      /* 28: mergewl */
+      {
+        orc_union32 _dest;
+        _dest.x2[0] = var77.i;
+        _dest.x2[1] = var78.i;
+        var79.i = _dest.i;
+      }
+      /* 30: addb */
+      var54.x4[0] = var79.x4[0] + var53.x4[0];
+      var54.x4[1] = var79.x4[1] + var53.x4[1];
+      var54.x4[2] = var79.x4[2] + var53.x4[2];
+      var54.x4[3] = var79.x4[3] + var53.x4[3];
+      /* 31: storel */
+      ptr0[i] = var54;
+    }
+  }
+
+}
+
+void
+video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3,
+    int p4, int p5, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114,
+        116, 95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 65, 89,
+        85, 86, 95, 82, 71, 66, 65, 11, 4, 4, 12, 4, 4, 14, 1, 128,
+        0, 0, 0, 16, 2, 16, 2, 16, 2, 16, 2, 16, 2, 20, 1, 20,
+        1, 20, 1, 20, 1, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20,
+        2, 20, 1, 20, 1, 20, 1, 20, 4, 21, 2, 65, 45, 4, 16, 198,
+        38, 36, 45, 199, 33, 32, 36, 199, 35, 34, 38, 151, 36, 33, 151, 37,
+        34, 151, 38, 35, 90, 36, 36, 24, 90, 39, 38, 25, 71, 39, 36, 39,
+        90, 41, 37, 26, 71, 41, 36, 41, 90, 40, 37, 27, 71, 40, 36, 40,
+        90, 36, 38, 28, 71, 40, 40, 36, 159, 42, 39, 159, 43, 40, 159, 44,
+        41, 196, 39, 42, 43, 196, 41, 44, 32, 195, 45, 39, 41, 21, 2, 33,
+        0, 45, 16, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_RGBA);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "video_convert_orc_convert_AYUV_RGBA");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_AYUV_RGBA);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 1, 0x00000080, "c1");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_parameter (p, 2, "p2");
+      orc_program_add_parameter (p, 2, "p3");
+      orc_program_add_parameter (p, 2, "p4");
+      orc_program_add_parameter (p, 2, "p5");
+      orc_program_add_temporary (p, 1, "t1");
+      orc_program_add_temporary (p, 1, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 2, "t7");
+      orc_program_add_temporary (p, 2, "t8");
+      orc_program_add_temporary (p, 2, "t9");
+      orc_program_add_temporary (p, 2, "t10");
+      orc_program_add_temporary (p, 1, "t11");
+      orc_program_add_temporary (p, 1, "t12");
+      orc_program_add_temporary (p, 1, "t13");
+      orc_program_add_temporary (p, 4, "t14");
+
+      orc_program_append_2 (p, "subb", 2, ORC_VAR_T14, ORC_VAR_S1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitlw", 0, ORC_VAR_T7, ORC_VAR_T5,
+          ORC_VAR_T14, ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splitwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T10, ORC_VAR_T6, ORC_VAR_P3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T10, ORC_VAR_T5,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_P4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T5, ORC_VAR_T9,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_P5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T11, ORC_VAR_T8,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T12, ORC_VAR_T9,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T13, ORC_VAR_T10,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T8, ORC_VAR_T11,
+          ORC_VAR_T12, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T10, ORC_VAR_T13,
+          ORC_VAR_T1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T14, ORC_VAR_T8,
+          ORC_VAR_T10, ORC_VAR_D1);
+      orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+  ex->params[ORC_VAR_P2] = p2;
+  ex->params[ORC_VAR_P3] = p3;
+  ex->params[ORC_VAR_P4] = p4;
+  ex->params[ORC_VAR_P5] = p5;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* video_convert_orc_convert_I420_BGRA */
+#ifdef DISABLE_ORC
+void
+video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1,
+    const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+    const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+    int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var42;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var43;
+#else
+  orc_int8 var43;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var44;
+#else
+  orc_int8 var44;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var45;
+#else
+  orc_int8 var45;
+#endif
+  orc_union16 var46;
+  orc_union16 var47;
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var51;
+#else
+  orc_int8 var51;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var52;
+#else
+  orc_union32 var52;
+#endif
+  orc_union32 var53;
+  orc_int8 var54;
+  orc_union16 var55;
+  orc_int8 var56;
+  orc_int8 var57;
+  orc_union16 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_union16 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_int8 var71;
+  orc_int8 var72;
+  orc_int8 var73;
+  orc_union16 var74;
+  orc_union16 var75;
+  orc_union32 var76;
+
+  ptr0 = (orc_union32 *) d1;
+  ptr4 = (orc_int8 *) s1;
+  ptr5 = (orc_int8 *) s2;
+  ptr6 = (orc_int8 *) s3;
+
+  /* 1: loadpb */
+  var43 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 5: loadpb */
+  var44 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 9: loadpb */
+  var45 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 12: loadpw */
+  var46.i = p1;
+  /* 14: loadpw */
+  var47.i = p2;
+  /* 17: loadpw */
+  var48.i = p3;
+  /* 20: loadpw */
+  var49.i = p4;
+  /* 23: loadpw */
+  var50.i = p5;
+  /* 30: loadpb */
+  var51 = (int) 0x0000007f;     /* 127 or 6.27463e-322f */
+  /* 33: loadpb */
+  var52.x4[0] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[1] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[2] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[3] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var42 = ptr4[i];
+    /* 2: subb */
+    var54 = var42 - var43;
+    /* 3: splatbw */
+    var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff);
+    /* 4: loadupdb */
+    var56 = ptr5[i >> 1];
+    /* 6: subb */
+    var57 = var56 - var44;
+    /* 7: splatbw */
+    var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
+    /* 8: loadupdb */
+    var59 = ptr6[i >> 1];
+    /* 10: subb */
+    var60 = var59 - var45;
+    /* 11: splatbw */
+    var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+    /* 13: mulhsw */
+    var62.i = (var55.i * var46.i) >> 16;
+    /* 15: mulhsw */
+    var63.i = (var61.i * var47.i) >> 16;
+    /* 16: addssw */
+    var64.i = ORC_CLAMP_SW (var62.i + var63.i);
+    /* 18: mulhsw */
+    var65.i = (var58.i * var48.i) >> 16;
+    /* 19: addssw */
+    var66.i = ORC_CLAMP_SW (var62.i + var65.i);
+    /* 21: mulhsw */
+    var67.i = (var58.i * var49.i) >> 16;
+    /* 22: addssw */
+    var68.i = ORC_CLAMP_SW (var62.i + var67.i);
+    /* 24: mulhsw */
+    var69.i = (var61.i * var50.i) >> 16;
+    /* 25: addssw */
+    var70.i = ORC_CLAMP_SW (var68.i + var69.i);
+    /* 26: convssswb */
+    var71 = ORC_CLAMP_SB (var64.i);
+    /* 27: convssswb */
+    var72 = ORC_CLAMP_SB (var70.i);
+    /* 28: convssswb */
+    var73 = ORC_CLAMP_SB (var66.i);
+    /* 29: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var73;
+      _dest.x2[1] = var72;
+      var74.i = _dest.i;
+    }
+    /* 31: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var71;
+      _dest.x2[1] = var51;
+      var75.i = _dest.i;
+    }
+    /* 32: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var74.i;
+      _dest.x2[1] = var75.i;
+      var76.i = _dest.i;
+    }
+    /* 34: addb */
+    var53.x4[0] = var76.x4[0] + var52.x4[0];
+    var53.x4[1] = var76.x4[1] + var52.x4[1];
+    var53.x4[2] = var76.x4[2] + var52.x4[2];
+    var53.x4[3] = var76.x4[3] + var52.x4[3];
+    /* 35: storel */
+    ptr0[i] = var53;
+  }
+
+}
+
+#else
+static void
+_backup_video_convert_orc_convert_I420_BGRA (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  const orc_int8 *ORC_RESTRICT ptr5;
+  const orc_int8 *ORC_RESTRICT ptr6;
+  orc_int8 var42;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var43;
+#else
+  orc_int8 var43;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var44;
+#else
+  orc_int8 var44;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var45;
+#else
+  orc_int8 var45;
+#endif
+  orc_union16 var46;
+  orc_union16 var47;
+  orc_union16 var48;
+  orc_union16 var49;
+  orc_union16 var50;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_int8 var51;
+#else
+  orc_int8 var51;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var52;
+#else
+  orc_union32 var52;
+#endif
+  orc_union32 var53;
+  orc_int8 var54;
+  orc_union16 var55;
+  orc_int8 var56;
+  orc_int8 var57;
+  orc_union16 var58;
+  orc_int8 var59;
+  orc_int8 var60;
+  orc_union16 var61;
+  orc_union16 var62;
+  orc_union16 var63;
+  orc_union16 var64;
+  orc_union16 var65;
+  orc_union16 var66;
+  orc_union16 var67;
+  orc_union16 var68;
+  orc_union16 var69;
+  orc_union16 var70;
+  orc_int8 var71;
+  orc_int8 var72;
+  orc_int8 var73;
+  orc_union16 var74;
+  orc_union16 var75;
+  orc_union32 var76;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+  ptr4 = (orc_int8 *) ex->arrays[4];
+  ptr5 = (orc_int8 *) ex->arrays[5];
+  ptr6 = (orc_int8 *) ex->arrays[6];
+
+  /* 1: loadpb */
+  var43 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 5: loadpb */
+  var44 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 9: loadpb */
+  var45 = (int) 0x00000080;     /* 128 or 6.32404e-322f */
+  /* 12: loadpw */
+  var46.i = ex->params[24];
+  /* 14: loadpw */
+  var47.i = ex->params[25];
+  /* 17: loadpw */
+  var48.i = ex->params[26];
+  /* 20: loadpw */
+  var49.i = ex->params[27];
+  /* 23: loadpw */
+  var50.i = ex->params[28];
+  /* 30: loadpb */
+  var51 = (int) 0x0000007f;     /* 127 or 6.27463e-322f */
+  /* 33: loadpb */
+  var52.x4[0] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[1] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[2] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+  var52.x4[3] = (int) 0x00000080;       /* 128 or 6.32404e-322f */
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadb */
+    var42 = ptr4[i];
+    /* 2: subb */
+    var54 = var42 - var43;
+    /* 3: splatbw */
+    var55.i = ((var54 & 0xff) << 8) | (var54 & 0xff);
+    /* 4: loadupdb */
+    var56 = ptr5[i >> 1];
+    /* 6: subb */
+    var57 = var56 - var44;
+    /* 7: splatbw */
+    var58.i = ((var57 & 0xff) << 8) | (var57 & 0xff);
+    /* 8: loadupdb */
+    var59 = ptr6[i >> 1];
+    /* 10: subb */
+    var60 = var59 - var45;
+    /* 11: splatbw */
+    var61.i = ((var60 & 0xff) << 8) | (var60 & 0xff);
+    /* 13: mulhsw */
+    var62.i = (var55.i * var46.i) >> 16;
+    /* 15: mulhsw */
+    var63.i = (var61.i * var47.i) >> 16;
+    /* 16: addssw */
+    var64.i = ORC_CLAMP_SW (var62.i + var63.i);
+    /* 18: mulhsw */
+    var65.i = (var58.i * var48.i) >> 16;
+    /* 19: addssw */
+    var66.i = ORC_CLAMP_SW (var62.i + var65.i);
+    /* 21: mulhsw */
+    var67.i = (var58.i * var49.i) >> 16;
+    /* 22: addssw */
+    var68.i = ORC_CLAMP_SW (var62.i + var67.i);
+    /* 24: mulhsw */
+    var69.i = (var61.i * var50.i) >> 16;
+    /* 25: addssw */
+    var70.i = ORC_CLAMP_SW (var68.i + var69.i);
+    /* 26: convssswb */
+    var71 = ORC_CLAMP_SB (var64.i);
+    /* 27: convssswb */
+    var72 = ORC_CLAMP_SB (var70.i);
+    /* 28: convssswb */
+    var73 = ORC_CLAMP_SB (var66.i);
+    /* 29: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var73;
+      _dest.x2[1] = var72;
+      var74.i = _dest.i;
+    }
+    /* 31: mergebw */
+    {
+      orc_union16 _dest;
+      _dest.x2[0] = var71;
+      _dest.x2[1] = var51;
+      var75.i = _dest.i;
+    }
+    /* 32: mergewl */
+    {
+      orc_union32 _dest;
+      _dest.x2[0] = var74.i;
+      _dest.x2[1] = var75.i;
+      var76.i = _dest.i;
+    }
+    /* 34: addb */
+    var53.x4[0] = var76.x4[0] + var52.x4[0];
+    var53.x4[1] = var76.x4[1] + var52.x4[1];
+    var53.x4[2] = var76.x4[2] + var52.x4[2];
+    var53.x4[3] = var76.x4[3] + var52.x4[3];
+    /* 35: storel */
+    ptr0[i] = var53;
+  }
+
+}
+
+void
+video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1,
+    const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+    const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+    int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 35, 118, 105, 100, 101, 111, 95, 99, 111, 110, 118, 101, 114, 116,
+        95, 111, 114, 99, 95, 99, 111, 110, 118, 101, 114, 116, 95, 73, 52, 50,
+        48, 95, 66, 71, 82, 65, 11, 4, 4, 12, 1, 1, 12, 1, 1, 12,
+        1, 1, 14, 1, 128, 0, 0, 0, 14, 4, 127, 0, 0, 0, 16, 2,
+        16, 2, 16, 2, 16, 2, 16, 2, 20, 2, 20, 2, 20, 2, 20, 2,
+        20, 2, 20, 2, 20, 1, 20, 1, 20, 1, 20, 4, 65, 38, 4, 16,
+        151, 32, 38, 45, 38, 5, 65, 38, 38, 16, 151, 33, 38, 45, 38, 6,
+        65, 38, 38, 16, 151, 34, 38, 90, 32, 32, 24, 90, 35, 34, 25, 71,
+        35, 32, 35, 90, 37, 33, 26, 71, 37, 32, 37, 90, 36, 33, 27, 71,
+        36, 32, 36, 90, 32, 34, 28, 71, 36, 36, 32, 159, 38, 35, 159, 39,
+        36, 159, 40, 37, 196, 37, 40, 39, 196, 35, 38, 17, 195, 41, 37, 35,
+        21, 2, 33, 0, 41, 16, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_BGRA);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "video_convert_orc_convert_I420_BGRA");
+      orc_program_set_backup_function (p,
+          _backup_video_convert_orc_convert_I420_BGRA);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_source (p, 1, "s2");
+      orc_program_add_source (p, 1, "s3");
+      orc_program_add_constant (p, 1, 0x00000080, "c1");
+      orc_program_add_constant (p, 4, 0x0000007f, "c2");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_parameter (p, 2, "p2");
+      orc_program_add_parameter (p, 2, "p3");
+      orc_program_add_parameter (p, 2, "p4");
+      orc_program_add_parameter (p, 2, "p5");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 2, "t4");
+      orc_program_add_temporary (p, 2, "t5");
+      orc_program_add_temporary (p, 2, "t6");
+      orc_program_add_temporary (p, 1, "t7");
+      orc_program_add_temporary (p, 1, "t8");
+      orc_program_add_temporary (p, 1, "t9");
+      orc_program_add_temporary (p, 4, "t10");
+
+      orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_S1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T1, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T7, ORC_VAR_S2,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T2, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T7, ORC_VAR_S3,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbw", 0, ORC_VAR_T3, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T6, ORC_VAR_T2, ORC_VAR_P3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_P4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mulhsw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_P5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addssw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T7, ORC_VAR_T4,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T8, ORC_VAR_T5,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "convssswb", 0, ORC_VAR_T9, ORC_VAR_T6,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T6, ORC_VAR_T9, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_T7, ORC_VAR_C2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mergewl", 0, ORC_VAR_T10, ORC_VAR_T6,
+          ORC_VAR_T4, ORC_VAR_D1);
+      orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T10, ORC_VAR_C1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->arrays[ORC_VAR_S2] = (void *) s2;
+  ex->arrays[ORC_VAR_S3] = (void *) s3;
+  ex->params[ORC_VAR_P1] = p1;
+  ex->params[ORC_VAR_P2] = p2;
+  ex->params[ORC_VAR_P3] = p3;
+  ex->params[ORC_VAR_P4] = p4;
+  ex->params[ORC_VAR_P5] = p5;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
diff --git a/gst-libs/gst/video/bad-video-orc-dist.h b/gst-libs/gst/video/bad-video-orc-dist.h
new file mode 100644
index 0000000..13ede8b
--- /dev/null
+++ b/gst-libs/gst/video/bad-video-orc-dist.h
@@ -0,0 +1,124 @@
+
+/* autogenerated from bad-video-orc.orc */
+
+#ifndef _BAD_VIDEO_ORC_H_
+#define _BAD_VIDEO_ORC_H_
+
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+typedef int8_t orc_int8;
+typedef int16_t orc_int16;
+typedef int32_t orc_int32;
+typedef int64_t orc_int64;
+typedef uint8_t orc_uint8;
+typedef uint16_t orc_uint16;
+typedef uint32_t orc_uint32;
+typedef uint64_t orc_uint64;
+#define ORC_UINT64_C(x) UINT64_C(x)
+#elif defined(_MSC_VER)
+typedef signed __int8 orc_int8;
+typedef signed __int16 orc_int16;
+typedef signed __int32 orc_int32;
+typedef signed __int64 orc_int64;
+typedef unsigned __int8 orc_uint8;
+typedef unsigned __int16 orc_uint16;
+typedef unsigned __int32 orc_uint32;
+typedef unsigned __int64 orc_uint64;
+#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
+#else
+#include <limits.h>
+typedef signed char orc_int8;
+typedef short orc_int16;
+typedef int orc_int32;
+typedef unsigned char orc_uint8;
+typedef unsigned short orc_uint16;
+typedef unsigned int orc_uint32;
+#if INT_MAX == LONG_MAX
+typedef long long orc_int64;
+typedef unsigned long long orc_uint64;
+#define ORC_UINT64_C(x) (x##ULL)
+#else
+typedef long orc_int64;
+typedef unsigned long orc_uint64;
+#define ORC_UINT64_C(x) (x##UL)
+#endif
+#endif
+typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
+typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
+typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
+#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+
+#ifndef ORC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define ORC_INTERNAL __hidden
+#elif defined (__GNUC__)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#else
+#define ORC_INTERNAL
+#endif
+#endif
+
+void video_convert_orc_memcpy_2d (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_I420_UYVY (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_I420_YUY2 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_I420_AYUV (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int n);
+void video_convert_orc_convert_YUY2_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n);
+void video_convert_orc_convert_UYVY_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_420_422 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_420_444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_422_444 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_444_422 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_planar_chroma_444_420 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_planar_chroma_422_420 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_convert_YUY2_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_YUY2_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_YUY2_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_UYVY_I420 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, guint8 * ORC_RESTRICT d3, guint8 * ORC_RESTRICT d4, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n);
+void video_convert_orc_convert_AYUV_I420 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, guint8 * ORC_RESTRICT d4, int d4_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void video_convert_orc_convert_AYUV_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_Y42B (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_AYUV_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void video_convert_orc_convert_Y42B_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y42B_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y42B_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_YUY2 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_UYVY (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_Y444_AYUV (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, const guint8 * ORC_RESTRICT s2, int s2_stride, const guint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void video_convert_orc_convert_AYUV_ARGB (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_BGRA (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_ABGR (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_AYUV_RGBA (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int p2, int p3, int p4, int p5, int n, int m);
+void video_convert_orc_convert_I420_BGRA (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, int n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/gst-libs/gst/video/bad-video-orc.orc b/gst-libs/gst/video/bad-video-orc.orc
new file mode 100644
index 0000000..d3428dc
--- /dev/null
+++ b/gst-libs/gst/video/bad-video-orc.orc
@@ -0,0 +1,729 @@
+.function video_convert_orc_memcpy_2d
+.flags 2d
+.dest 1 d1 guint8
+.source 1 s1 guint8
+
+copyb d1, s1
+
+.function video_convert_orc_convert_I420_UYVY
+.dest 4 d1 guint8
+.dest 4 d2 guint8
+.source 2 y1 guint8
+.source 2 y2 guint8
+.source 1 u guint8
+.source 1 v guint8
+.temp 2 uv
+
+mergebw uv, u, v
+x2 mergebw d1, uv, y1
+x2 mergebw d2, uv, y2
+
+
+.function video_convert_orc_convert_I420_YUY2
+.dest 4 d1 guint8
+.dest 4 d2 guint8
+.source 2 y1 guint8
+.source 2 y2 guint8
+.source 1 u guint8
+.source 1 v guint8
+.temp 2 uv
+
+mergebw uv, u, v
+x2 mergebw d1, y1, uv
+x2 mergebw d2, y2, uv
+
+
+
+.function video_convert_orc_convert_I420_AYUV
+.dest 4 d1 guint8
+.dest 4 d2 guint8
+.source 1 y1 guint8
+.source 1 y2 guint8
+.source 1 u guint8
+.source 1 v guint8
+.const 1 c255 255
+.temp 2 uv
+.temp 2 ay
+.temp 1 tu
+.temp 1 tv
+
+loadupdb tu, u
+loadupdb tv, v
+mergebw uv, tu, tv
+mergebw ay, c255, y1
+mergewl d1, ay, uv
+mergebw ay, c255, y2
+mergewl d2, ay, uv
+
+
+.function video_convert_orc_convert_YUY2_I420
+.dest 2 y1 guint8
+.dest 2 y2 guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 4 yuv1 guint8
+.source 4 yuv2 guint8
+.temp 2 t1
+.temp 2 t2
+.temp 2 ty
+
+x2 splitwb t1, ty, yuv1
+storew y1, ty
+x2 splitwb t2, ty, yuv2
+storew y2, ty
+x2 avgub t1, t1, t2
+splitwb v, u, t1
+
+
+.function video_convert_orc_convert_UYVY_YUY2
+.flags 2d
+.dest 4 yuy2 guint8
+.source 4 uyvy guint8
+
+x2 swapw yuy2, uyvy
+
+
+.function video_convert_orc_planar_chroma_420_422
+.flags 2d
+.dest 1 d1 guint8
+.dest 1 d2 guint8
+.source 1 s guint8
+
+copyb d1, s
+copyb d2, s
+
+
+.function video_convert_orc_planar_chroma_420_444
+.flags 2d
+.dest 2 d1 guint8
+.dest 2 d2 guint8
+.source 1 s guint8
+.temp 2 t
+
+splatbw t, s
+storew d1, t
+storew d2, t
+
+
+.function video_convert_orc_planar_chroma_422_444
+.flags 2d
+.dest 2 d1 guint8
+.source 1 s guint8
+.temp 2 t
+
+splatbw t, s
+storew d1, t
+
+
+.function video_convert_orc_planar_chroma_444_422
+.flags 2d
+.dest 1 d guint8
+.source 2 s guint8
+.temp 1 t1
+.temp 1 t2
+
+splitwb t1, t2, s
+avgub d, t1, t2
+
+
+.function video_convert_orc_planar_chroma_444_420
+.flags 2d
+.dest 1 d guint8
+.source 2 s1 guint8
+.source 2 s2 guint8
+.temp 2 t
+.temp 1 t1
+.temp 1 t2
+
+x2 avgub t, s1, s2
+splitwb t1, t2, t
+avgub d, t1, t2
+
+
+.function video_convert_orc_planar_chroma_422_420
+.flags 2d
+.dest 1 d guint8
+.source 1 s1 guint8
+.source 1 s2 guint8
+
+avgub d, s1, s2
+
+
+.function video_convert_orc_convert_YUY2_AYUV
+.flags 2d
+.dest 8 ayuv guint8
+.source 4 yuy2 guint8
+.const 2 c255 0xff
+.temp 2 yy
+.temp 2 uv
+.temp 4 ayay
+.temp 4 uvuv
+
+x2 splitwb uv, yy, yuy2
+x2 mergebw ayay, c255, yy
+mergewl uvuv, uv, uv
+x2 mergewl ayuv, ayay, uvuv
+
+
+.function video_convert_orc_convert_UYVY_AYUV
+.flags 2d
+.dest 8 ayuv guint8
+.source 4 uyvy guint8
+.const 2 c255 0xff
+.temp 2 yy
+.temp 2 uv
+.temp 4 ayay
+.temp 4 uvuv
+
+x2 splitwb yy, uv, uyvy
+x2 mergebw ayay, c255, yy
+mergewl uvuv, uv, uv
+x2 mergewl ayuv, ayay, uvuv
+
+
+.function video_convert_orc_convert_YUY2_Y42B
+.flags 2d
+.dest 2 y guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 4 yuy2 guint8
+.temp 2 uv
+
+x2 splitwb uv, y, yuy2
+splitwb v, u, uv
+
+
+.function video_convert_orc_convert_UYVY_Y42B
+.flags 2d
+.dest 2 y guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 4 uyvy guint8
+.temp 2 uv
+
+x2 splitwb y, uv, uyvy
+splitwb v, u, uv
+
+
+.function video_convert_orc_convert_YUY2_Y444
+.flags 2d
+.dest 2 y guint8
+.dest 2 uu guint8
+.dest 2 vv guint8
+.source 4 yuy2 guint8
+.temp 2 uv
+.temp 1 u
+.temp 1 v
+
+x2 splitwb uv, y, yuy2
+splitwb v, u, uv
+splatbw uu, u
+splatbw vv, v
+
+
+.function video_convert_orc_convert_UYVY_Y444
+.flags 2d
+.dest 2 y guint8
+.dest 2 uu guint8
+.dest 2 vv guint8
+.source 4 uyvy guint8
+.temp 2 uv
+.temp 1 u
+.temp 1 v
+
+x2 splitwb y, uv, uyvy
+splitwb v, u, uv
+splatbw uu, u
+splatbw vv, v
+
+
+.function video_convert_orc_convert_UYVY_I420
+.dest 2 y1 guint8
+.dest 2 y2 guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 4 yuv1 guint8
+.source 4 yuv2 guint8
+.temp 2 t1
+.temp 2 t2
+.temp 2 ty
+
+x2 splitwb ty, t1, yuv1
+storew y1, ty
+x2 splitwb ty, t2, yuv2
+storew y2, ty
+x2 avgub t1, t1, t2
+splitwb v, u, t1
+
+
+
+.function video_convert_orc_convert_AYUV_I420
+.flags 2d
+.dest 2 y1 guint8
+.dest 2 y2 guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 8 ayuv1 guint8
+.source 8 ayuv2 guint8
+.temp 4 ay
+.temp 4 uv1
+.temp 4 uv2
+.temp 4 uv
+.temp 2 uu
+.temp 2 vv
+.temp 1 t1
+.temp 1 t2
+
+x2 splitlw uv1, ay, ayuv1
+x2 select1wb y1, ay
+x2 splitlw uv2, ay, ayuv2
+x2 select1wb y2, ay
+x4 avgub uv, uv1, uv2
+x2 splitwb vv, uu, uv
+splitwb t1, t2, uu
+avgub u, t1, t2
+splitwb t1, t2, vv
+avgub v, t1, t2
+
+
+
+.function video_convert_orc_convert_AYUV_YUY2
+.flags 2d
+.dest 4 yuy2 guint8
+.source 8 ayuv guint8
+.temp 2 yy
+.temp 2 uv1
+.temp 2 uv2
+.temp 4 ayay
+.temp 4 uvuv
+
+x2 splitlw uvuv, ayay, ayuv
+splitlw uv1, uv2, uvuv
+x2 avgub uv1, uv1, uv2
+x2 select1wb yy, ayay
+x2 mergebw yuy2, yy, uv1
+
+
+.function video_convert_orc_convert_AYUV_UYVY
+.flags 2d
+.dest 4 yuy2 guint8
+.source 8 ayuv guint8
+.temp 2 yy
+.temp 2 uv1
+.temp 2 uv2
+.temp 4 ayay
+.temp 4 uvuv
+
+x2 splitlw uvuv, ayay, ayuv
+splitlw uv1, uv2, uvuv
+x2 avgub uv1, uv1, uv2
+x2 select1wb yy, ayay
+x2 mergebw yuy2, uv1, yy
+
+
+
+.function video_convert_orc_convert_AYUV_Y42B
+.flags 2d
+.dest 2 y guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 8 ayuv guint8
+.temp 4 ayay
+.temp 4 uvuv
+.temp 2 uv1
+.temp 2 uv2
+
+x2 splitlw uvuv, ayay, ayuv
+splitlw uv1, uv2, uvuv
+x2 avgub uv1, uv1, uv2
+splitwb v, u, uv1
+x2 select1wb y, ayay
+
+
+.function video_convert_orc_convert_AYUV_Y444
+.flags 2d
+.dest 1 y guint8
+.dest 1 u guint8
+.dest 1 v guint8
+.source 4 ayuv guint8
+.temp 2 ay
+.temp 2 uv
+
+splitlw uv, ay, ayuv
+splitwb v, u, uv
+select1wb y, ay
+
+
+.function video_convert_orc_convert_Y42B_YUY2
+.flags 2d
+.dest 4 yuy2 guint8
+.source 2 y guint8
+.source 1 u guint8
+.source 1 v guint8
+.temp 2 uv
+
+mergebw uv, u, v
+x2 mergebw yuy2, y, uv
+
+
+.function video_convert_orc_convert_Y42B_UYVY
+.flags 2d
+.dest 4 uyvy guint8
+.source 2 y guint8
+.source 1 u guint8
+.source 1 v guint8
+.temp 2 uv
+
+mergebw uv, u, v
+x2 mergebw uyvy, uv, y
+
+
+.function video_convert_orc_convert_Y42B_AYUV
+.flags 2d
+.dest 8 ayuv guint8
+.source 2 yy guint8
+.source 1 u guint8
+.source 1 v guint8
+.const 1 c255 255
+.temp 2 uv
+.temp 2 ay
+.temp 4 uvuv
+.temp 4 ayay
+
+mergebw uv, u, v
+x2 mergebw ayay, c255, yy
+mergewl uvuv, uv, uv
+x2 mergewl ayuv, ayay, uvuv
+
+
+.function video_convert_orc_convert_Y444_YUY2
+.flags 2d
+.dest 4 yuy2 guint8
+.source 2 y guint8
+.source 2 u guint8
+.source 2 v guint8
+.temp 2 uv
+.temp 4 uvuv
+.temp 2 uv1
+.temp 2 uv2
+
+x2 mergebw uvuv, u, v
+splitlw uv1, uv2, uvuv
+x2 avgub uv, uv1, uv2
+x2 mergebw yuy2, y, uv
+
+
+.function video_convert_orc_convert_Y444_UYVY
+.flags 2d
+.dest 4 uyvy guint8
+.source 2 y guint8
+.source 2 u guint8
+.source 2 v guint8
+.temp 2 uv
+.temp 4 uvuv
+.temp 2 uv1
+.temp 2 uv2
+
+x2 mergebw uvuv, u, v
+splitlw uv1, uv2, uvuv
+x2 avgub uv, uv1, uv2
+x2 mergebw uyvy, uv, y
+
+
+.function video_convert_orc_convert_Y444_AYUV
+.flags 2d
+.dest 4 ayuv guint8
+.source 1 yy guint8
+.source 1 u guint8
+.source 1 v guint8
+.const 1 c255 255
+.temp 2 uv
+.temp 2 ay
+
+mergebw uv, u, v
+mergebw ay, c255, yy
+mergewl ayuv, ay, uv
+
+
+
+.function video_convert_orc_convert_AYUV_ARGB
+.flags 2d
+.dest 4 argb guint8
+.source 4 ayuv guint8
+.param 2 p1
+.param 2 p2
+.param 2 p3
+.param 2 p4
+.param 2 p5
+.temp 1 a
+.temp 1 y
+.temp 1 u
+.temp 1 v
+.temp 2 wy
+.temp 2 wu
+.temp 2 wv
+.temp 2 wr
+.temp 2 wg
+.temp 2 wb
+.temp 1 r
+.temp 1 g
+.temp 1 b
+.temp 4 x
+.const 1 c128 128
+
+x4 subb x, ayuv, c128 
+splitlw wv, wy, x
+splitwb y, a, wy
+splitwb v, u, wv
+
+splatbw wy, y
+splatbw wu, u
+splatbw wv, v
+
+mulhsw wy, wy, p1
+
+mulhsw wr, wv, p2
+addssw wr, wy, wr
+
+mulhsw wb, wu, p3
+addssw wb, wy, wb
+
+mulhsw wg, wu, p4
+addssw wg, wy, wg
+mulhsw wy, wv, p5
+addssw wg, wg, wy
+
+convssswb r, wr
+convssswb g, wg
+convssswb b, wb
+
+mergebw wr, a, r
+mergebw wb, g, b
+mergewl x, wr, wb
+x4 addb argb, x, c128
+
+.function video_convert_orc_convert_AYUV_BGRA
+.flags 2d
+.dest 4 bgra guint8
+.source 4 ayuv guint8
+.param 2 p1
+.param 2 p2
+.param 2 p3
+.param 2 p4
+.param 2 p5
+.temp 1 a
+.temp 1 y
+.temp 1 u
+.temp 1 v
+.temp 2 wy
+.temp 2 wu
+.temp 2 wv
+.temp 2 wr
+.temp 2 wg
+.temp 2 wb
+.temp 1 r
+.temp 1 g
+.temp 1 b
+.temp 4 x
+.const 1 c128 128
+
+x4 subb x, ayuv, c128 
+splitlw wv, wy, x
+splitwb y, a, wy
+splitwb v, u, wv
+
+splatbw wy, y
+splatbw wu, u
+splatbw wv, v
+
+mulhsw wy, wy, p1
+
+mulhsw wr, wv, p2
+addssw wr, wy, wr
+
+mulhsw wb, wu, p3
+addssw wb, wy, wb
+
+mulhsw wg, wu, p4
+addssw wg, wy, wg
+mulhsw wy, wv, p5
+addssw wg, wg, wy
+
+convssswb r, wr
+convssswb g, wg
+convssswb b, wb
+
+mergebw wb, b, g
+mergebw wr, r, a
+mergewl x, wb, wr
+x4 addb bgra, x, c128
+
+
+.function video_convert_orc_convert_AYUV_ABGR
+.flags 2d
+.dest 4 argb guint8
+.source 4 ayuv guint8
+.param 2 p1
+.param 2 p2
+.param 2 p3
+.param 2 p4
+.param 2 p5
+.temp 1 a
+.temp 1 y
+.temp 1 u
+.temp 1 v
+.temp 2 wy
+.temp 2 wu
+.temp 2 wv
+.temp 2 wr
+.temp 2 wg
+.temp 2 wb
+.temp 1 r
+.temp 1 g
+.temp 1 b
+.temp 4 x
+.const 1 c128 128
+
+x4 subb x, ayuv, c128 
+splitlw wv, wy, x
+splitwb y, a, wy
+splitwb v, u, wv
+
+splatbw wy, y
+splatbw wu, u
+splatbw wv, v
+
+mulhsw wy, wy, p1
+
+mulhsw wr, wv, p2
+addssw wr, wy, wr
+
+mulhsw wb, wu, p3
+addssw wb, wy, wb
+
+mulhsw wg, wu, p4
+addssw wg, wy, wg
+mulhsw wy, wv, p5
+addssw wg, wg, wy
+
+convssswb r, wr
+convssswb g, wg
+convssswb b, wb
+
+mergebw wb, a, b
+mergebw wr, g, r
+mergewl x, wb, wr
+x4 addb argb, x, c128
+
+.function video_convert_orc_convert_AYUV_RGBA
+.flags 2d
+.dest 4 argb guint8
+.source 4 ayuv guint8
+.param 2 p1
+.param 2 p2
+.param 2 p3
+.param 2 p4
+.param 2 p5
+.temp 1 a
+.temp 1 y
+.temp 1 u
+.temp 1 v
+.temp 2 wy
+.temp 2 wu
+.temp 2 wv
+.temp 2 wr
+.temp 2 wg
+.temp 2 wb
+.temp 1 r
+.temp 1 g
+.temp 1 b
+.temp 4 x
+.const 1 c128 128
+
+x4 subb x, ayuv, c128 
+splitlw wv, wy, x
+splitwb y, a, wy
+splitwb v, u, wv
+
+splatbw wy, y
+splatbw wu, u
+splatbw wv, v
+
+mulhsw wy, wy, p1
+
+mulhsw wr, wv, p2
+addssw wr, wy, wr
+
+mulhsw wb, wu, p3
+addssw wb, wy, wb
+
+mulhsw wg, wu, p4
+addssw wg, wy, wg
+mulhsw wy, wv, p5
+addssw wg, wg, wy
+
+convssswb r, wr
+convssswb g, wg
+convssswb b, wb
+
+mergebw wr, r, g
+mergebw wb, b, a
+mergewl x, wr, wb
+x4 addb argb, x, c128
+
+
+
+.function video_convert_orc_convert_I420_BGRA
+.dest 4 argb guint8
+.source 1 y guint8
+.source 1 u guint8
+.source 1 v guint8
+.param 2 p1
+.param 2 p2
+.param 2 p3
+.param 2 p4
+.param 2 p5
+.temp 2 wy
+.temp 2 wu
+.temp 2 wv
+.temp 2 wr
+.temp 2 wg
+.temp 2 wb
+.temp 1 r
+.temp 1 g
+.temp 1 b
+.temp 4 x
+.const 1 c128 128
+
+subb r, y, c128
+splatbw wy, r
+loadupdb r, u
+subb r, r, c128
+splatbw wu, r
+loadupdb r, v
+subb r, r, c128
+splatbw wv, r
+
+mulhsw wy, wy, p1
+
+mulhsw wr, wv, p2
+addssw wr, wy, wr
+
+mulhsw wb, wu, p3
+addssw wb, wy, wb
+
+mulhsw wg, wu, p4
+addssw wg, wy, wg
+mulhsw wy, wv, p5
+addssw wg, wg, wy
+
+convssswb r, wr
+convssswb g, wg
+convssswb b, wb
+
+mergebw wb, b, g
+mergebw wr, r, 127
+mergewl x, wb, wr
+x4 addb argb, x, c128
+
+
diff --git a/gst-libs/gst/video/gstcms.c b/gst-libs/gst/video/gstcms.c
new file mode 100644
index 0000000..96a9f70
--- /dev/null
+++ b/gst-libs/gst/video/gstcms.c
@@ -0,0 +1,573 @@
+/* GStreamer
+ * Copyright (C) 2008 David Schleef <ds@entropywave.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
+
+#include <gst/gst.h>
+#include <gst/math-compat.h>
+#include "gstcms.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+
+/* our simple CMS */
+
+void
+color_xyY_to_XYZ (Color * c)
+{
+  if (c->v[1] == 0) {
+    c->v[0] = 0;
+    c->v[1] = 0;
+    c->v[2] = 0;
+  } else {
+    double X, Y, Z;
+    X = c->v[0] * c->v[2] / c->v[1];
+    Y = c->v[2];
+    Z = (1.0 - c->v[0] - c->v[1]) * c->v[2] / c->v[1];
+    c->v[0] = X;
+    c->v[1] = Y;
+    c->v[2] = Z;
+  }
+}
+
+void
+color_XYZ_to_xyY (Color * c)
+{
+  double d;
+  d = c->v[0] + c->v[1] + c->v[2];
+  if (d == 0) {
+    c->v[0] = 0.3128;
+    c->v[1] = 0.3290;
+    c->v[2] = 0;
+  } else {
+    double x, y, Y;
+    x = c->v[0] / d;
+    y = c->v[1] / d;
+    Y = c->v[1];
+    c->v[0] = x;
+    c->v[1] = y;
+    c->v[2] = Y;
+  }
+}
+
+void
+color_set (Color * c, double x, double y, double z)
+{
+  c->v[0] = x;
+  c->v[1] = y;
+  c->v[2] = z;
+}
+
+void
+color_matrix_set_identity (ColorMatrix * m)
+{
+  int i, j;
+
+  for (i = 0; i < 4; i++) {
+    for (j = 0; j < 4; j++) {
+      m->m[i][j] = (i == j);
+    }
+  }
+}
+
+/* Prettyprint a 4x4 matrix @m@ */
+void
+color_matrix_dump (ColorMatrix * m)
+{
+  int i, j;
+
+  printf ("[\n");
+  for (i = 0; i < 4; i++) {
+    printf ("  ");
+    for (j = 0; j < 4; j++) {
+      printf (" %8.5g", m->m[i][j]);
+    }
+    printf ("\n");
+  }
+  printf ("]\n");
+}
+
+/* Perform 4x4 matrix multiplication:
+ *  - @dst@ = @a@ * @b@
+ *  - @dst@ may be a pointer to @a@ andor @b@
+ */
+void
+color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b)
+{
+  ColorMatrix tmp;
+  int i, j, k;
+
+  for (i = 0; i < 4; i++) {
+    for (j = 0; j < 4; j++) {
+      double x = 0;
+      for (k = 0; k < 4; k++) {
+        x += a->m[i][k] * b->m[k][j];
+      }
+      tmp.m[i][j] = x;
+    }
+  }
+
+  memcpy (dst, &tmp, sizeof (ColorMatrix));
+}
+
+void
+color_matrix_apply (ColorMatrix * m, Color * dest, Color * src)
+{
+  int i;
+  Color tmp;
+
+  for (i = 0; i < 3; i++) {
+    double x = 0;
+    x += m->m[i][0] * src->v[0];
+    x += m->m[i][1] * src->v[1];
+    x += m->m[i][2] * src->v[2];
+    x += m->m[i][3];
+    tmp.v[i] = x;
+  }
+  memcpy (dest, &tmp, sizeof (tmp));
+}
+
+void
+color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
+    double a3)
+{
+  ColorMatrix a;
+
+  color_matrix_set_identity (&a);
+  a.m[0][3] = a1;
+  a.m[1][3] = a2;
+  a.m[2][3] = a3;
+  color_matrix_multiply (m, &a, m);
+}
+
+void
+color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3)
+{
+  ColorMatrix a;
+
+  color_matrix_set_identity (&a);
+  a.m[0][0] = a1;
+  a.m[1][1] = a2;
+  a.m[2][2] = a3;
+  color_matrix_multiply (m, &a, m);
+}
+
+void
+color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb)
+{
+  double Kg = 1.0 - Kr - Kb;
+  ColorMatrix k = {
+    {
+          {1., 0., 2 * (1 - Kr), 0.},
+          {1., -2 * Kb * (1 - Kb) / Kg, -2 * Kr * (1 - Kr) / Kg, 0.},
+          {1., 2 * (1 - Kb), 0., 0.},
+          {0., 0., 0., 1.},
+        }
+  };
+
+  color_matrix_multiply (m, &k, m);
+}
+
+void
+color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb)
+{
+  double Kg = 1.0 - Kr - Kb;
+  ColorMatrix k;
+  double x;
+
+  k.m[0][0] = Kr;
+  k.m[0][1] = Kg;
+  k.m[0][2] = Kb;
+  k.m[0][3] = 0;
+
+  x = 1 / (2 * (1 - Kb));
+  k.m[1][0] = -x * Kr;
+  k.m[1][1] = -x * Kg;
+  k.m[1][2] = x * (1 - Kb);
+  k.m[1][3] = 0;
+
+  x = 1 / (2 * (1 - Kr));
+  k.m[2][0] = x * (1 - Kr);
+  k.m[2][1] = -x * Kg;
+  k.m[2][2] = -x * Kb;
+  k.m[2][3] = 0;
+
+  k.m[3][0] = 0;
+  k.m[3][1] = 0;
+  k.m[3][2] = 0;
+  k.m[3][3] = 1;
+
+  color_matrix_multiply (m, &k, m);
+}
+
+void
+color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst)
+{
+  /*
+   * At this point, everything is in YCbCr
+   * All components are in the range [0,255]
+   */
+  color_matrix_set_identity (dst);
+
+  /* offset required to get input video black to (0.,0.,0.) */
+  color_matrix_offset_components (dst, -16, -128, -128);
+
+  /* scale required to get input video black to (0.,0.,0.) */
+  color_matrix_scale_components (dst, (1 / 219.0), (1 / 224.0), (1 / 224.0));
+
+  /* colour matrix, YCbCr -> RGB */
+  /* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */
+  color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140);      /* SD */
+
+  /*
+   * We are now in RGB space
+   */
+
+#if 0
+  /* scale to output range. */
+  color_matrix_scale_components (dst, 255.0, 255.0, 255.0);
+#endif
+}
+
+void
+color_matrix_build_bt709_to_bt601 (ColorMatrix * dst)
+{
+  color_matrix_set_identity (dst);
+
+  /* offset required to get input video black to (0.,0.,0.) */
+  color_matrix_offset_components (dst, -16, -128, -128);
+
+  /* scale required to get input video black to (0.,0.,0.) */
+  color_matrix_scale_components (dst, (1 / 219.0), (1 / 224.0), (1 / 224.0));
+
+  /* colour matrix, YCbCr -> RGB */
+  /* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */
+  color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722);      /* HD */
+
+  color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140);      /* SD */
+
+  color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
+
+  color_matrix_offset_components (dst, 16, 128, 128);
+}
+
+void
+color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst)
+{
+  color_matrix_set_identity (dst);
+
+  color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140);      /* SD */
+
+  color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
+
+  color_matrix_offset_components (dst, 16, 128, 128);
+
+  {
+    Color c;
+    int i;
+    for (i = 7; i >= 0; i--) {
+      color_set (&c, (i & 2) ? 0.75 : 0.0, (i & 4) ? 0.75 : 0.0,
+          (i & 1) ? 0.75 : 0.0);
+      color_matrix_apply (dst, &c, &c);
+      g_print ("  { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]),
+          rint (c.v[2]));
+    }
+    color_set (&c, -0.075, -0.075, -0.075);
+    color_matrix_apply (dst, &c, &c);
+    g_print ("  { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]),
+        rint (c.v[2]));
+    color_set (&c, 0.075, 0.075, 0.075);
+    color_matrix_apply (dst, &c, &c);
+    g_print ("  { %g, %g, %g },\n", rint (c.v[0]), rint (c.v[1]),
+        rint (c.v[2]));
+  }
+}
+
+void
+color_matrix_invert (ColorMatrix * m)
+{
+  ColorMatrix tmp;
+  int i, j;
+  double det;
+
+  color_matrix_set_identity (&tmp);
+  for (j = 0; j < 3; j++) {
+    for (i = 0; i < 3; i++) {
+      tmp.m[j][i] =
+          m->m[(i + 1) % 3][(j + 1) % 3] * m->m[(i + 2) % 3][(j + 2) % 3] -
+          m->m[(i + 1) % 3][(j + 2) % 3] * m->m[(i + 2) % 3][(j + 1) % 3];
+    }
+  }
+  det =
+      tmp.m[0][0] * m->m[0][0] + tmp.m[0][1] * m->m[1][0] +
+      tmp.m[0][2] * m->m[2][0];
+  for (j = 0; j < 3; j++) {
+    for (i = 0; i < 3; i++) {
+      tmp.m[i][j] /= det;
+    }
+  }
+  memcpy (m, &tmp, sizeof (tmp));
+}
+
+void
+color_matrix_copy (ColorMatrix * dest, ColorMatrix * src)
+{
+  memcpy (dest, src, sizeof (ColorMatrix));
+}
+
+void
+color_matrix_transpose (ColorMatrix * m)
+{
+  int i, j;
+  ColorMatrix tmp;
+
+  color_matrix_set_identity (&tmp);
+  for (i = 0; i < 3; i++) {
+    for (j = 0; j < 3; j++) {
+      tmp.m[i][j] = m->m[j][i];
+    }
+  }
+  memcpy (m, &tmp, sizeof (ColorMatrix));
+}
+
+void
+color_matrix_build_XYZ (ColorMatrix * dst,
+    double rx, double ry,
+    double gx, double gy, double bx, double by, double wx, double wy)
+{
+  Color r, g, b, w, scale;
+  ColorMatrix m;
+
+  color_set (&r, rx, ry, 1.0);
+  color_xyY_to_XYZ (&r);
+  color_set (&g, gx, gy, 1.0);
+  color_xyY_to_XYZ (&g);
+  color_set (&b, bx, by, 1.0);
+  color_xyY_to_XYZ (&b);
+  color_set (&w, wx, wy, 1.0);
+  color_xyY_to_XYZ (&w);
+
+  color_matrix_set_identity (dst);
+
+  dst->m[0][0] = r.v[0];
+  dst->m[0][1] = r.v[1];
+  dst->m[0][2] = r.v[2];
+  dst->m[1][0] = g.v[0];
+  dst->m[1][1] = g.v[1];
+  dst->m[1][2] = g.v[2];
+  dst->m[2][0] = b.v[0];
+  dst->m[2][1] = b.v[1];
+  dst->m[2][2] = b.v[2];
+
+  color_matrix_dump (dst);
+  color_matrix_copy (&m, dst);
+  color_matrix_invert (&m);
+  color_matrix_dump (&m);
+
+  color_matrix_transpose (&m);
+  color_matrix_apply (&m, &scale, &w);
+  g_print ("%g %g %g\n", scale.v[0], scale.v[1], scale.v[2]);
+
+  dst->m[0][0] = r.v[0] * scale.v[0];
+  dst->m[0][1] = r.v[1] * scale.v[0];
+  dst->m[0][2] = r.v[2] * scale.v[0];
+  dst->m[1][0] = g.v[0] * scale.v[1];
+  dst->m[1][1] = g.v[1] * scale.v[1];
+  dst->m[1][2] = g.v[2] * scale.v[1];
+  dst->m[2][0] = b.v[0] * scale.v[2];
+  dst->m[2][1] = b.v[1] * scale.v[2];
+  dst->m[2][2] = b.v[2] * scale.v[2];
+
+  color_matrix_transpose (dst);
+  color_matrix_dump (dst);
+
+  color_set (&scale, 1, 1, 1);
+  color_matrix_apply (dst, &scale, &scale);
+  color_XYZ_to_xyY (&scale);
+  g_print ("white %g %g %g\n", scale.v[0], scale.v[1], scale.v[2]);
+
+}
+
+void
+color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst)
+{
+  /* SMPTE C primaries, SMPTE 170M-2004 */
+  color_matrix_build_XYZ (dst,
+      0.630, 0.340, 0.310, 0.595, 0.155, 0.070, 0.3127, 0.3290);
+#if 0
+  /* NTSC 1953 primaries, SMPTE 170M-2004 */
+  color_matrix_build_XYZ (dst,
+      0.67, 0.33, 0.21, 0.71, 0.14, 0.08, 0.3127, 0.3290);
+#endif
+}
+
+void
+color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst)
+{
+  /* Rec. ITU-R BT.709-5 */
+  color_matrix_build_XYZ (dst,
+      0.640, 0.330, 0.300, 0.600, 0.150, 0.060, 0.3127, 0.3290);
+}
+
+void
+color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst)
+{
+  /* Dell monitor */
+#if 1
+  color_matrix_build_XYZ (dst,
+      0.662, 0.329, 0.205, 0.683, 0.146, 0.077, 0.3135, 0.3290);
+#endif
+#if 0
+  color_matrix_build_XYZ (dst,
+      0.630, 0.340, 0.310, 0.595, 0.155, 0.070, 0.3127, 0.3290);
+#endif
+  color_matrix_invert (dst);
+}
+
+void
+color_transfer_function_apply (Color * dest, Color * src)
+{
+  int i;
+
+  for (i = 0; i < 3; i++) {
+    if (src->v[i] < 0.0812) {
+      dest->v[i] = src->v[i] / 4.500;
+    } else {
+      dest->v[i] = pow (src->v[i] + 0.099, 1 / 0.4500);
+    }
+  }
+}
+
+void
+color_transfer_function_unapply (Color * dest, Color * src)
+{
+  int i;
+
+  for (i = 0; i < 3; i++) {
+    if (src->v[i] < 0.0812 / 4.500) {
+      dest->v[i] = src->v[i] * 4.500;
+    } else {
+      dest->v[i] = pow (src->v[i], 0.4500) - 0.099;
+    }
+  }
+}
+
+void
+color_gamut_clamp (Color * dest, Color * src)
+{
+  dest->v[0] = CLAMP (src->v[0], 0.0, 1.0);
+  dest->v[1] = CLAMP (src->v[1], 0.0, 1.0);
+  dest->v[2] = CLAMP (src->v[2], 0.0, 1.0);
+}
+
+#if 0
+static guint8 *
+get_color_transform_table (void)
+{
+  static guint8 *color_transform_table = NULL;
+
+#if 1
+  if (!color_transform_table) {
+    ColorMatrix bt601_to_rgb;
+    ColorMatrix bt601_to_yuv;
+    ColorMatrix bt601_rgb_to_XYZ;
+    ColorMatrix dell_XYZ_to_rgb;
+    guint8 *table_y;
+    guint8 *table_u;
+    guint8 *table_v;
+    int y, u, v;
+
+    color_matrix_build_yuv_to_rgb_601 (&bt601_to_rgb);
+    color_matrix_build_rgb_to_yuv_601 (&bt601_to_yuv);
+    color_matrix_build_rgb_to_XYZ_601 (&bt601_rgb_to_XYZ);
+    color_matrix_build_XYZ_to_rgb_dell (&dell_XYZ_to_rgb);
+
+    color_transform_table = g_malloc (0x1000000 * 3);
+
+    table_y = COG_OFFSET (color_transform_table, 0 * 0x1000000);
+    table_u = COG_OFFSET (color_transform_table, 1 * 0x1000000);
+    table_v = COG_OFFSET (color_transform_table, 2 * 0x1000000);
+
+    for (y = 0; y < 256; y++) {
+      for (u = 0; u < 256; u++) {
+        for (v = 0; v < 256; v++) {
+          Color c;
+
+          c.v[0] = y;
+          c.v[1] = u;
+          c.v[2] = v;
+          color_matrix_apply (&bt601_to_rgb, &c, &c);
+          color_gamut_clamp (&c, &c);
+          color_transfer_function_apply (&c, &c);
+          color_matrix_apply (&bt601_rgb_to_XYZ, &c, &c);
+          color_matrix_apply (&dell_XYZ_to_rgb, &c, &c);
+          color_transfer_function_unapply (&c, &c);
+          color_gamut_clamp (&c, &c);
+          color_matrix_apply (&bt601_to_yuv, &c, &c);
+
+          table_y[(y << 16) | (u << 8) | (v)] = rint (c.v[0]);
+          table_u[(y << 16) | (u << 8) | (v)] = rint (c.v[1]);
+          table_v[(y << 16) | (u << 8) | (v)] = rint (c.v[2]);
+        }
+      }
+    }
+  }
+#endif
+#if 0
+  if (!color_transform_table) {
+    ColorMatrix bt709_to_bt601;
+    guint8 *table_y;
+    guint8 *table_u;
+    guint8 *table_v;
+    int y, u, v;
+
+    color_matrix_build_bt709_to_bt601 (&bt709_to_bt601);
+
+    color_transform_table = g_malloc (0x1000000 * 3);
+
+    table_y = COG_OFFSET (color_transform_table, 0 * 0x1000000);
+    table_u = COG_OFFSET (color_transform_table, 1 * 0x1000000);
+    table_v = COG_OFFSET (color_transform_table, 2 * 0x1000000);
+
+    for (y = 0; y < 256; y++) {
+      for (u = 0; u < 256; u++) {
+        for (v = 0; v < 256; v++) {
+          Color c;
+
+          c.v[0] = y;
+          c.v[1] = u;
+          c.v[2] = v;
+          color_matrix_apply (&bt709_to_bt601, &c, &c);
+
+          table_y[(y << 16) | (u << 8) | (v)] = rint (c.v[0]);
+          table_u[(y << 16) | (u << 8) | (v)] = rint (c.v[1]);
+          table_v[(y << 16) | (u << 8) | (v)] = rint (c.v[2]);
+        }
+      }
+    }
+  }
+#endif
+
+  return color_transform_table;
+}
+#endif
diff --git a/gst-libs/gst/video/gstcms.h b/gst-libs/gst/video/gstcms.h
new file mode 100644
index 0000000..f926a44
--- /dev/null
+++ b/gst-libs/gst/video/gstcms.h
@@ -0,0 +1,71 @@
+/* GStreamer
+ * Copyright (C) 2008 David Schleef <ds@entropywave.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.
+ */
+
+#ifndef _GST_CMS_H_
+#define _GST_CMS_H_
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+typedef struct _Color Color;
+typedef struct _ColorMatrix ColorMatrix;
+
+struct _Color
+{
+  double v[3];
+};
+
+struct _ColorMatrix
+{
+  double m[4][4];
+};
+
+void color_xyY_to_XYZ (Color * c);
+void color_XYZ_to_xyY (Color * c);
+void color_set (Color * c, double x, double y, double z);
+void color_matrix_set_identity (ColorMatrix * m);
+void color_matrix_dump (ColorMatrix * m);
+void color_matrix_multiply (ColorMatrix * dst, ColorMatrix * a, ColorMatrix * b);
+void color_matrix_apply (ColorMatrix * m, Color * dest, Color * src);
+void color_matrix_offset_components (ColorMatrix * m, double a1, double a2,
+    double a3);
+void color_matrix_scale_components (ColorMatrix * m, double a1, double a2, double a3);
+void color_matrix_YCbCr_to_RGB (ColorMatrix * m, double Kr, double Kb);
+void color_matrix_RGB_to_YCbCr (ColorMatrix * m, double Kr, double Kb);
+void color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst);
+void color_matrix_build_bt709_to_bt601 (ColorMatrix * dst);
+void color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst);
+void color_matrix_invert (ColorMatrix * m);
+void color_matrix_copy (ColorMatrix * dest, ColorMatrix * src);
+void color_matrix_transpose (ColorMatrix * m);
+void color_matrix_build_XYZ (ColorMatrix * dst,
+    double rx, double ry,
+    double gx, double gy, double bx, double by, double wx, double wy);
+void color_matrix_build_rgb_to_XYZ_601 (ColorMatrix * dst);
+void color_matrix_build_XYZ_to_rgb_709 (ColorMatrix * dst);
+void color_matrix_build_XYZ_to_rgb_dell (ColorMatrix * dst);
+void color_transfer_function_apply (Color * dest, Color * src);
+void color_transfer_function_unapply (Color * dest, Color * src);
+void color_gamut_clamp (Color * dest, Color * src);
+
+G_END_DECLS
+
+#endif
+
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
new file mode 100644
index 0000000..b0ea776
--- /dev/null
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -0,0 +1,1943 @@
+/* Generic video aggregator plugin
+ * Copyright (C) 2004, 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:gstvideoaggregator
+ * @short_description: Base class for video aggregators
+ *
+ * VideoAggregator can accept AYUV, ARGB and BGRA video streams. For each of the requested
+ * sink pads it will compare the incoming geometry and framerate to define the
+ * output parameters. Indeed output video frames will have the geometry of the
+ * biggest incoming video stream and the framerate of the fastest incoming one.
+ *
+ * VideoAggregator will do colorspace conversion.
+ * 
+ * Zorder for each input stream can be configured on the
+ * #GstVideoAggregatorPad.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+
+#include "videoconvert.h"
+
+#include "gstvideoaggregator.h"
+#include "gstvideoaggregatorpad.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_videoaggregator_debug);
+#define GST_CAT_DEFAULT gst_videoaggregator_debug
+
+/* Needed prototypes */
+static void gst_videoaggregator_reset_qos (GstVideoAggregator * vagg);
+
+/****************************************
+ * GstVideoAggregatorPad implementation *
+ ****************************************/
+
+#define DEFAULT_PAD_ZORDER 0
+enum
+{
+  PROP_PAD_0,
+  PROP_PAD_ZORDER,
+};
+
+
+struct _GstVideoAggregatorPadPrivate
+{
+  /* Converter, if NULL no conversion is done */
+  VideoConvert *convert;
+};
+
+G_DEFINE_TYPE (GstVideoAggregatorPad, gst_videoaggregator_pad,
+    GST_TYPE_AGGREGATOR_PAD);
+
+static void
+gst_videoaggregator_pad_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (object);
+
+  switch (prop_id) {
+    case PROP_PAD_ZORDER:
+      g_value_set_uint (value, pad->zorder);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static int
+pad_zorder_compare (const GstVideoAggregatorPad * pad1,
+    const GstVideoAggregatorPad * pad2)
+{
+  return pad1->zorder - pad2->zorder;
+}
+
+static void
+gst_videoaggregator_pad_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (object);
+  GstVideoAggregator *vagg =
+      GST_VIDEO_AGGREGATOR (gst_pad_get_parent (GST_PAD (pad)));
+
+  switch (prop_id) {
+    case PROP_PAD_ZORDER:
+      GST_OBJECT_LOCK (vagg);
+      pad->zorder = g_value_get_uint (value);
+      GST_ELEMENT (vagg)->sinkpads = g_list_sort (GST_ELEMENT (vagg)->sinkpads,
+          (GCompareFunc) pad_zorder_compare);
+      GST_OBJECT_UNLOCK (vagg);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+
+  gst_object_unref (vagg);
+}
+
+static gboolean
+_flush_pad (GstAggregatorPad * aggpad, GstAggregator * aggregator)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (aggregator);
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (aggpad);
+
+  gst_videoaggregator_reset_qos (vagg);
+  gst_buffer_replace (&pad->buffer, NULL);
+  pad->start_time = -1;
+  pad->end_time = -1;
+
+  return TRUE;
+}
+
+static void
+gst_videoaggregator_pad_finalize (GObject * o)
+{
+  GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (o);
+
+  if (vaggpad->priv->convert)
+    videoconvert_convert_free (vaggpad->priv->convert);
+  vaggpad->priv->convert = NULL;
+
+  G_OBJECT_CLASS (gst_videoaggregator_pad_parent_class)->dispose (o);
+}
+
+static void
+gst_videoaggregator_pad_class_init (GstVideoAggregatorPadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstAggregatorPadClass *aggpadclass = (GstAggregatorPadClass *) klass;
+
+  gobject_class->set_property = gst_videoaggregator_pad_set_property;
+  gobject_class->get_property = gst_videoaggregator_pad_get_property;
+  gobject_class->finalize = gst_videoaggregator_pad_finalize;
+
+  g_object_class_install_property (gobject_class, PROP_PAD_ZORDER,
+      g_param_spec_uint ("zorder", "Z-Order", "Z Order of the picture",
+          0, 10000, DEFAULT_PAD_ZORDER,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+
+  g_type_class_add_private (klass, sizeof (GstVideoAggregatorPadPrivate));
+
+  aggpadclass->flush = GST_DEBUG_FUNCPTR (_flush_pad);
+}
+
+static void
+gst_videoaggregator_pad_init (GstVideoAggregatorPad * vaggpad)
+{
+  vaggpad->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (vaggpad, GST_TYPE_VIDEO_AGGREGATOR_PAD,
+      GstVideoAggregatorPadPrivate);
+
+  vaggpad->zorder = DEFAULT_PAD_ZORDER;
+  vaggpad->need_conversion_update = FALSE;
+  vaggpad->aggregated_frame = NULL;
+  vaggpad->converted_buffer = NULL;
+
+  vaggpad->priv->convert = NULL;
+}
+
+/*********************************
+ * GstChildProxy implementation  *
+ *********************************/
+static GObject *
+gst_videoaggregator_child_proxy_get_child_by_index (GstChildProxy * child_proxy,
+    guint index)
+{
+  GObject *obj;
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (child_proxy);
+
+  GST_OBJECT_LOCK (vagg);
+  if ((obj = g_list_nth_data (GST_ELEMENT (vagg)->sinkpads, index)))
+    g_object_ref (obj);
+  GST_OBJECT_UNLOCK (vagg);
+
+  return obj;
+}
+
+static guint
+gst_videoaggregator_child_proxy_get_children_count (GstChildProxy * child_proxy)
+{
+  guint count = 0;
+
+  GST_OBJECT_LOCK (child_proxy);
+  count = GST_ELEMENT (child_proxy)->numsinkpads;
+  GST_OBJECT_UNLOCK (child_proxy);
+
+  GST_INFO_OBJECT (child_proxy, "Children Count: %d", count);
+
+  return count;
+}
+
+static void
+gst_videoaggregator_child_proxy_init (gpointer g_iface, gpointer iface_data)
+{
+  GstChildProxyInterface *iface = g_iface;
+
+  GST_INFO ("intializing child proxy interface");
+  iface->get_child_by_index =
+      gst_videoaggregator_child_proxy_get_child_by_index;
+  iface->get_children_count =
+      gst_videoaggregator_child_proxy_get_children_count;
+}
+
+/**************************************
+ * GstVideoAggregator implementation  *
+ **************************************/
+
+#define GST_VIDEO_AGGREGATOR_GET_LOCK(vagg) (&GST_VIDEO_AGGREGATOR(vagg)->priv->lock)
+
+#define GST_VIDEO_AGGREGATOR_LOCK(vagg)   G_STMT_START {       \
+  GST_LOG_OBJECT (vagg, "Taking EVENT lock from thread %p",    \
+        g_thread_self());                                      \
+  g_mutex_lock(GST_VIDEO_AGGREGATOR_GET_LOCK(vagg));           \
+  GST_LOG_OBJECT (vagg, "Took EVENT lock from thread %p",      \
+        g_thread_self());                                      \
+  } G_STMT_END
+
+#define GST_VIDEO_AGGREGATOR_UNLOCK(vagg)   G_STMT_START {     \
+  GST_LOG_OBJECT (vagg, "Releasing EVENT lock from thread %p", \
+        g_thread_self());                                      \
+  g_mutex_unlock(GST_VIDEO_AGGREGATOR_GET_LOCK(vagg));         \
+  GST_LOG_OBJECT (vagg, "Took EVENT lock from thread %p",      \
+        g_thread_self());                                      \
+  } G_STMT_END
+
+
+#define GST_VIDEO_AGGREGATOR_GET_SETCAPS_LOCK(vagg) (&GST_VIDEO_AGGREGATOR(vagg)->priv->setcaps_lock)
+#define GST_VIDEO_AGGREGATOR_SETCAPS_LOCK(vagg)   G_STMT_START {  \
+  GST_LOG_OBJECT (vagg, "Taking SETCAPS lock from thread %p",     \
+        g_thread_self());                                         \
+  g_mutex_lock(GST_VIDEO_AGGREGATOR_GET_SETCAPS_LOCK(vagg));      \
+  GST_LOG_OBJECT (vagg, "Took SETCAPS lock from thread %p",       \
+        g_thread_self());                                         \
+  } G_STMT_END
+
+#define GST_VIDEO_AGGREGATOR_SETCAPS_UNLOCK(vagg)   G_STMT_START {  \
+  GST_LOG_OBJECT (vagg, "Releasing SETCAPS lock from thread %p",    \
+        g_thread_self());                                           \
+  g_mutex_unlock(GST_VIDEO_AGGREGATOR_GET_SETCAPS_LOCK(vagg));      \
+  GST_LOG_OBJECT (vagg, "Took SETCAPS lock from thread %p",         \
+        g_thread_self());                                           \
+  } G_STMT_END
+
+struct _GstVideoAggregatorPrivate
+{
+  /* Lock to prevent the state to change while aggregating */
+  GMutex lock;
+
+  /* Lock to prevent two src setcaps from happening at the same time  */
+  GMutex setcaps_lock;
+
+  /* Current downstream segment */
+  GstClockTime ts_offset;
+  guint64 nframes;
+
+  /* QoS stuff */
+  gdouble proportion;
+  GstClockTime earliest_time;
+  guint64 qos_processed, qos_dropped;
+
+  /* current caps */
+  GstCaps *current_caps;
+  gboolean send_caps;
+};
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVideoAggregator, gst_videoaggregator,
+    GST_TYPE_AGGREGATOR, G_IMPLEMENT_INTERFACE (GST_TYPE_CHILD_PROXY,
+        gst_videoaggregator_child_proxy_init));
+
+static void
+_find_best_video_format (GstVideoAggregator * vagg, GstCaps * downstream_caps,
+    GstVideoInfo * best_info, GstVideoFormat * best_format,
+    gboolean * at_least_one_alpha)
+{
+  GList *tmp;
+  GstCaps *possible_caps;
+  GstVideoAggregatorPad *pad;
+  gboolean need_alpha = FALSE;
+  gint best_format_number = 0;
+  GHashTable *formats_table = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+  GST_OBJECT_LOCK (vagg);
+  for (tmp = GST_ELEMENT (vagg)->sinkpads; tmp; tmp = tmp->next) {
+    GstStructure *s;
+    gint format_number;
+
+    pad = tmp->data;
+
+    if (!pad->info.finfo)
+      continue;
+
+    if (pad->info.finfo->flags & GST_VIDEO_FORMAT_FLAG_ALPHA)
+      *at_least_one_alpha = TRUE;
+
+    /* If we want alpha, disregard all the other formats */
+    if (need_alpha && !(pad->info.finfo->flags & GST_VIDEO_FORMAT_FLAG_ALPHA))
+      continue;
+
+    /* This can happen if we release a pad and another pad hasn't been negotiated_caps yet */
+    if (GST_VIDEO_INFO_FORMAT (&pad->info) == GST_VIDEO_FORMAT_UNKNOWN)
+      continue;
+
+    possible_caps = gst_video_info_to_caps (&pad->info);
+
+    s = gst_caps_get_structure (possible_caps, 0);
+    gst_structure_remove_fields (s, "width", "height", "framerate",
+        "pixel-aspect-ratio", "interlace-mode", NULL);
+
+    /* Can downstream accept this format ? */
+    if (!gst_caps_can_intersect (downstream_caps, possible_caps)) {
+      gst_caps_unref (possible_caps);
+      continue;
+    }
+
+    gst_caps_unref (possible_caps);
+
+    format_number =
+        GPOINTER_TO_INT (g_hash_table_lookup (formats_table,
+            GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info))));
+    format_number += 1;
+
+    g_hash_table_replace (formats_table,
+        GINT_TO_POINTER (GST_VIDEO_INFO_FORMAT (&pad->info)),
+        GINT_TO_POINTER (format_number));
+
+    /* If that pad is the first with alpha, set it as the new best format */
+    if (!need_alpha && (pad->info.finfo->flags & GST_VIDEO_FORMAT_FLAG_ALPHA)) {
+      need_alpha = TRUE;
+      *best_format = GST_VIDEO_INFO_FORMAT (&pad->info);
+      *best_info = pad->info;
+      best_format_number = format_number;
+    } else if (format_number > best_format_number) {
+      *best_format = GST_VIDEO_INFO_FORMAT (&pad->info);
+      *best_info = pad->info;
+      best_format_number = format_number;
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  g_hash_table_unref (formats_table);
+}
+
+static gboolean
+gst_videoaggregator_update_converters (GstVideoAggregator * vagg)
+{
+  GList *tmp;
+  GstVideoAggregatorPad *pad;
+  GstVideoFormat best_format;
+  GstVideoInfo best_info;
+  gboolean at_least_one_alpha = FALSE;
+  GstCaps *downstream_caps;
+  gchar *best_colorimetry;
+  const gchar *best_chroma;
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (vagg);
+  GstVideoAggregatorClass *vagg_klass = (GstVideoAggregatorClass *) klass;
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+
+  best_format = GST_VIDEO_FORMAT_UNKNOWN;
+  gst_video_info_init (&best_info);
+
+  downstream_caps = gst_pad_get_allowed_caps (agg->srcpad);
+
+  if (!downstream_caps || gst_caps_is_empty (downstream_caps)) {
+    GST_INFO_OBJECT (vagg, "No downstream caps found %"
+        GST_PTR_FORMAT, downstream_caps);
+    return FALSE;
+  }
+
+
+  if (vagg_klass->disable_frame_conversion == FALSE)
+    _find_best_video_format (vagg, downstream_caps, &best_info, &best_format,
+        &at_least_one_alpha);
+
+  if (best_format == GST_VIDEO_FORMAT_UNKNOWN) {
+    downstream_caps = gst_caps_fixate (downstream_caps);
+    gst_video_info_from_caps (&best_info, downstream_caps);
+    best_format = GST_VIDEO_INFO_FORMAT (&best_info);
+  }
+
+  gst_caps_unref (downstream_caps);
+
+  if (at_least_one_alpha
+      && !(best_info.finfo->flags & GST_VIDEO_FORMAT_FLAG_ALPHA)) {
+    GST_ELEMENT_ERROR (vagg, CORE, NEGOTIATION,
+        ("At least one of the input pads contains alpha, but downstream can't support alpha."),
+        ("Either convert your inputs to not contain alpha or add a videoconvert after the aggregator"));
+    return FALSE;
+  }
+
+  best_colorimetry = gst_video_colorimetry_to_string (&(best_info.colorimetry));
+  best_chroma = gst_video_chroma_to_string (best_info.chroma_site);
+  vagg->info = best_info;
+
+  GST_DEBUG_OBJECT (vagg,
+      "The output format will now be : %d with colorimetry : %s and chroma : %s",
+      best_format, best_colorimetry, best_chroma);
+
+  /* Then browse the sinks once more, setting or unsetting conversion if needed */
+  GST_OBJECT_LOCK (vagg);
+  for (tmp = GST_ELEMENT (vagg)->sinkpads; tmp; tmp = tmp->next) {
+    gchar *colorimetry;
+    const gchar *chroma;
+
+    pad = tmp->data;
+
+    if (!pad->info.finfo)
+      continue;
+
+    if (GST_VIDEO_INFO_FORMAT (&pad->info) == GST_VIDEO_FORMAT_UNKNOWN)
+      continue;
+
+    if (pad->priv->convert)
+      videoconvert_convert_free (pad->priv->convert);
+
+    pad->priv->convert = NULL;
+
+    colorimetry = gst_video_colorimetry_to_string (&(pad->info.colorimetry));
+    chroma = gst_video_chroma_to_string (pad->info.chroma_site);
+
+    if (best_format != GST_VIDEO_INFO_FORMAT (&pad->info) ||
+        g_strcmp0 (colorimetry, best_colorimetry) ||
+        g_strcmp0 (chroma, best_chroma)) {
+      GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
+          GST_VIDEO_INFO_FORMAT (&pad->info),
+          GST_VIDEO_INFO_FORMAT (&best_info));
+      pad->priv->convert = videoconvert_convert_new (&pad->info, &best_info);
+      pad->need_conversion_update = TRUE;
+      if (!pad->priv->convert) {
+        g_free (colorimetry);
+        g_free (best_colorimetry);
+        GST_WARNING ("No path found for conversion");
+        GST_OBJECT_UNLOCK (vagg);
+        return FALSE;
+      }
+    } else {
+      GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
+    }
+    g_free (colorimetry);
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  g_free (best_colorimetry);
+  return TRUE;
+}
+
+static gboolean
+gst_videoaggregator_src_setcaps (GstVideoAggregator * vagg, GstCaps * caps)
+{
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+  gboolean ret = FALSE;
+  GstVideoInfo info;
+
+  GstPad *pad = GST_AGGREGATOR (vagg)->srcpad;
+
+  GST_INFO_OBJECT (pad, "set src caps: %" GST_PTR_FORMAT, caps);
+
+  if (!gst_video_info_from_caps (&info, caps))
+    goto done;
+
+  ret = TRUE;
+
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+
+  if (GST_VIDEO_INFO_FPS_N (&vagg->info) != GST_VIDEO_INFO_FPS_N (&info) ||
+      GST_VIDEO_INFO_FPS_D (&vagg->info) != GST_VIDEO_INFO_FPS_D (&info)) {
+    if (agg->segment.position != -1) {
+      vagg->priv->ts_offset = agg->segment.position - agg->segment.start;
+      vagg->priv->nframes = 0;
+    }
+    gst_videoaggregator_reset_qos (vagg);
+  }
+
+  vagg->info = info;
+
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+
+  if (vagg->priv->current_caps == NULL ||
+      gst_caps_is_equal (caps, vagg->priv->current_caps) == FALSE) {
+    gst_caps_replace (&vagg->priv->current_caps, caps);
+    vagg->priv->send_caps = TRUE;
+  }
+
+done:
+  return ret;
+}
+
+static gboolean
+gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
+{
+  GList *l;
+  gint best_width = -1, best_height = -1;
+  gdouble best_fps = -1, cur_fps;
+  gint best_fps_n = -1, best_fps_d = -1;
+  gboolean ret = TRUE;
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (vagg);
+  GstVideoAggregatorClass *vagg_klass = (GstVideoAggregatorClass *) klass;
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+
+  GST_VIDEO_AGGREGATOR_SETCAPS_LOCK (vagg);
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *mpad = l->data;
+    gint this_width, this_height;
+    gint fps_n, fps_d;
+    gint width, height;
+
+    fps_n = GST_VIDEO_INFO_FPS_N (&mpad->info);
+    fps_d = GST_VIDEO_INFO_FPS_D (&mpad->info);
+    width = GST_VIDEO_INFO_WIDTH (&mpad->info);
+    height = GST_VIDEO_INFO_HEIGHT (&mpad->info);
+
+    if (width == 0 || height == 0)
+      continue;
+
+    this_width = width;
+    this_height = height;
+
+    if (best_width < this_width)
+      best_width = this_width;
+    if (best_height < this_height)
+      best_height = this_height;
+
+    if (fps_d == 0)
+      cur_fps = 0.0;
+    else
+      gst_util_fraction_to_double (fps_n, fps_d, &cur_fps);
+
+    if (best_fps < cur_fps) {
+      best_fps = cur_fps;
+      best_fps_n = fps_n;
+      best_fps_d = fps_d;
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  if (best_fps_n <= 0 || best_fps_d <= 0 || best_fps == 0.0) {
+    best_fps_n = 25;
+    best_fps_d = 1;
+    best_fps = 25.0;
+  }
+
+  if (best_width > 0 && best_height > 0 && best_fps > 0) {
+    GstCaps *caps, *peercaps;
+    GstStructure *s;
+    GstVideoInfo info;
+
+    if (GST_VIDEO_INFO_FPS_N (&vagg->info) != best_fps_n ||
+        GST_VIDEO_INFO_FPS_D (&vagg->info) != best_fps_d) {
+      if (agg->segment.position != -1) {
+        vagg->priv->ts_offset = agg->segment.position - agg->segment.start;
+        vagg->priv->nframes = 0;
+      }
+    }
+    gst_video_info_init (&info);
+    gst_video_info_set_format (&info, GST_VIDEO_INFO_FORMAT (&vagg->info),
+        best_width, best_height);
+    info.fps_n = best_fps_n;
+    info.fps_d = best_fps_d;
+    info.par_n = GST_VIDEO_INFO_PAR_N (&vagg->info);
+    info.par_d = GST_VIDEO_INFO_PAR_D (&vagg->info);
+
+    if (vagg_klass->update_info) {
+      if (!vagg_klass->update_info (vagg, &info)) {
+        ret = FALSE;
+        GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+        goto done;
+      }
+    }
+
+    caps = gst_video_info_to_caps (&info);
+
+    peercaps = gst_pad_peer_query_caps (agg->srcpad, NULL);
+    if (peercaps) {
+      GstCaps *tmp;
+
+      s = gst_caps_get_structure (caps, 0);
+      gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, "height",
+          GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate", GST_TYPE_FRACTION_RANGE,
+          0, 1, G_MAXINT, 1, NULL);
+
+      tmp = gst_caps_intersect (caps, peercaps);
+      gst_caps_unref (caps);
+      gst_caps_unref (peercaps);
+      caps = tmp;
+      if (gst_caps_is_empty (caps)) {
+        GST_DEBUG_OBJECT (vagg, "empty caps");
+        ret = FALSE;
+        GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+        GST_OBJECT_UNLOCK (vagg);
+        goto done;
+      }
+
+      caps = gst_caps_truncate (caps);
+      s = gst_caps_get_structure (caps, 0);
+      gst_structure_fixate_field_nearest_int (s, "width", info.width);
+      gst_structure_fixate_field_nearest_int (s, "height", info.height);
+      gst_structure_fixate_field_nearest_fraction (s, "framerate", best_fps_n,
+          best_fps_d);
+
+      gst_structure_get_int (s, "width", &info.width);
+      gst_structure_get_int (s, "height", &info.height);
+      gst_structure_get_fraction (s, "framerate", &info.fps_n, &info.fps_d);
+    }
+
+    gst_caps_unref (caps);
+    caps = gst_video_info_to_caps (&info);
+
+    GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+    GST_OBJECT_UNLOCK (vagg);
+
+    if (gst_videoaggregator_src_setcaps (vagg, caps)) {
+      if (vagg_klass->negotiated_caps)
+        ret =
+            GST_VIDEO_AGGREGATOR_GET_CLASS (vagg)->negotiated_caps (vagg, caps);
+    }
+    gst_caps_unref (caps);
+  } else {
+    GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+  }
+
+done:
+  GST_VIDEO_AGGREGATOR_SETCAPS_UNLOCK (vagg);
+
+  return ret;
+}
+
+static gboolean
+gst_videoaggregator_pad_sink_setcaps (GstPad * pad, GstObject * parent,
+    GstCaps * caps)
+{
+  GstVideoAggregator *vagg;
+  GstVideoAggregatorPad *vaggpad;
+  GstVideoInfo info;
+  gboolean ret = FALSE;
+
+  GST_INFO_OBJECT (pad, "Setting caps %" GST_PTR_FORMAT, caps);
+
+  vagg = GST_VIDEO_AGGREGATOR (parent);
+  vaggpad = GST_VIDEO_AGGREGATOR_PAD (pad);
+
+  if (!gst_video_info_from_caps (&info, caps)) {
+    GST_DEBUG_OBJECT (pad, "Failed to parse caps");
+    goto beach;
+  }
+
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+  if (GST_VIDEO_INFO_FORMAT (&vagg->info) != GST_VIDEO_FORMAT_UNKNOWN) {
+    if (GST_VIDEO_INFO_PAR_N (&vagg->info) != GST_VIDEO_INFO_PAR_N (&info)
+        || GST_VIDEO_INFO_PAR_D (&vagg->info) != GST_VIDEO_INFO_PAR_D (&info) ||
+        GST_VIDEO_INFO_INTERLACE_MODE (&vagg->info) !=
+        GST_VIDEO_INFO_INTERLACE_MODE (&info)) {
+      GST_ERROR_OBJECT (pad,
+          "got input caps %" GST_PTR_FORMAT ", but " "current caps are %"
+          GST_PTR_FORMAT, caps, vagg->priv->current_caps);
+      GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+      return FALSE;
+    }
+  }
+
+  vaggpad->info = info;
+
+  ret = gst_videoaggregator_update_converters (vagg);
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+
+  if (ret)
+    ret = gst_videoaggregator_update_src_caps (vagg);
+
+beach:
+  return ret;
+}
+
+static GstCaps *
+gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
+    GstCaps * filter)
+{
+  GstCaps *srccaps;
+  GstCaps *template_caps;
+  GstCaps *filtered_caps;
+  GstCaps *returned_caps;
+  GstStructure *s;
+  gboolean had_current_caps = TRUE;
+  gint i, n;
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+
+  template_caps = gst_pad_get_pad_template_caps (GST_PAD (agg->srcpad));
+
+  srccaps = gst_pad_get_current_caps (GST_PAD (agg->srcpad));
+  if (srccaps == NULL) {
+    had_current_caps = FALSE;
+    srccaps = template_caps;
+  }
+
+  srccaps = gst_caps_make_writable (srccaps);
+
+  n = gst_caps_get_size (srccaps);
+  for (i = 0; i < n; i++) {
+    s = gst_caps_get_structure (srccaps, i);
+    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
+    if (!gst_structure_has_field (s, "pixel-aspect-ratio"))
+      gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+          NULL);
+
+    gst_structure_remove_fields (s, "colorimetry", "chroma-site", "format",
+        NULL);
+  }
+
+  filtered_caps = srccaps;
+  if (filter)
+    filtered_caps = gst_caps_intersect (srccaps, filter);
+  returned_caps = gst_caps_intersect (filtered_caps, template_caps);
+
+  gst_caps_unref (srccaps);
+  if (filter)
+    gst_caps_unref (filtered_caps);
+  if (had_current_caps)
+    gst_caps_unref (template_caps);
+
+  return returned_caps;
+}
+
+static void
+gst_videoaggregator_update_qos (GstVideoAggregator * vagg, gdouble proportion,
+    GstClockTimeDiff diff, GstClockTime timestamp)
+{
+  GST_DEBUG_OBJECT (vagg,
+      "Updating QoS: proportion %lf, diff %s%" GST_TIME_FORMAT ", timestamp %"
+      GST_TIME_FORMAT, proportion, (diff < 0) ? "-" : "",
+      GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp));
+
+  GST_OBJECT_LOCK (vagg);
+  vagg->priv->proportion = proportion;
+  if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
+    if (G_UNLIKELY (diff > 0))
+      vagg->priv->earliest_time =
+          timestamp + 2 * diff + gst_util_uint64_scale_int_round (GST_SECOND,
+          GST_VIDEO_INFO_FPS_D (&vagg->info),
+          GST_VIDEO_INFO_FPS_N (&vagg->info));
+    else
+      vagg->priv->earliest_time = timestamp + diff;
+  } else {
+    vagg->priv->earliest_time = GST_CLOCK_TIME_NONE;
+  }
+  GST_OBJECT_UNLOCK (vagg);
+}
+
+static void
+gst_videoaggregator_reset_qos (GstVideoAggregator * vagg)
+{
+  gst_videoaggregator_update_qos (vagg, 0.5, 0, GST_CLOCK_TIME_NONE);
+  vagg->priv->qos_processed = vagg->priv->qos_dropped = 0;
+}
+
+static void
+gst_videoaggregator_read_qos (GstVideoAggregator * vagg, gdouble * proportion,
+    GstClockTime * time)
+{
+  GST_OBJECT_LOCK (vagg);
+  *proportion = vagg->priv->proportion;
+  *time = vagg->priv->earliest_time;
+  GST_OBJECT_UNLOCK (vagg);
+}
+
+static void
+gst_videoaggregator_reset (GstVideoAggregator * vagg)
+{
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+  GList *l;
+
+  gst_video_info_init (&vagg->info);
+  vagg->priv->ts_offset = 0;
+  vagg->priv->nframes = 0;
+
+  gst_segment_init (&agg->segment, GST_FORMAT_TIME);
+  agg->segment.position = -1;
+
+  gst_videoaggregator_reset_qos (vagg);
+
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *p = l->data;
+
+    gst_buffer_replace (&p->buffer, NULL);
+    p->start_time = -1;
+    p->end_time = -1;
+
+    gst_video_info_init (&p->info);
+  }
+  GST_OBJECT_UNLOCK (vagg);
+}
+
+#define GST_FLOW_NEEDS_DATA GST_FLOW_CUSTOM_ERROR
+static gint
+gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
+    GstClockTime output_start_time, GstClockTime output_end_time)
+{
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+  GList *l;
+  gboolean eos = TRUE;
+  gboolean need_more_data = FALSE;
+
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *pad = l->data;
+    GstSegment *segment;
+    GstAggregatorPad *bpad;
+    GstBuffer *buf;
+    GstVideoInfo *vinfo;
+    gboolean is_eos;
+
+    bpad = GST_AGGREGATOR_PAD (pad);
+    segment = &bpad->segment;
+    is_eos = bpad->eos;
+    buf = gst_aggregator_pad_get_buffer (bpad);
+    if (buf) {
+      GstClockTime start_time, end_time;
+
+      start_time = GST_BUFFER_TIMESTAMP (buf);
+      if (start_time == -1) {
+        gst_buffer_unref (buf);
+        GST_DEBUG_OBJECT (pad, "Need timestamped buffers!");
+        GST_OBJECT_UNLOCK (vagg);
+        return GST_FLOW_ERROR;
+      }
+
+      vinfo = &pad->info;
+
+      /* FIXME: Make all this work with negative rates */
+
+      if ((pad->buffer && start_time < GST_BUFFER_TIMESTAMP (pad->buffer))
+          || (pad->queued && start_time < GST_BUFFER_TIMESTAMP (pad->queued))) {
+        GST_DEBUG_OBJECT (pad, "Buffer from the past, dropping");
+        gst_buffer_unref (buf);
+        buf = gst_aggregator_pad_steal_buffer (bpad);
+        gst_buffer_unref (buf);
+        need_more_data = TRUE;
+        continue;
+      }
+
+      if (pad->queued) {
+        end_time = start_time - GST_BUFFER_TIMESTAMP (pad->queued);
+        start_time = GST_BUFFER_TIMESTAMP (pad->queued);
+        gst_buffer_unref (buf);
+        buf = gst_buffer_ref (pad->queued);
+        vinfo = &pad->queued_vinfo;
+      } else {
+        end_time = GST_BUFFER_DURATION (buf);
+
+        if (end_time == -1) {
+          pad->queued = buf;
+          buf = gst_aggregator_pad_steal_buffer (bpad);
+          gst_buffer_unref (buf);
+          pad->queued_vinfo = pad->info;
+          GST_DEBUG ("end time is -1 and nothing queued");
+          need_more_data = TRUE;
+          continue;
+        }
+      }
+
+      g_assert (start_time != -1 && end_time != -1);
+      end_time += start_time;   /* convert from duration to position */
+
+      /* Check if it's inside the segment */
+      if (start_time >= segment->stop || end_time < segment->start) {
+        GST_DEBUG_OBJECT (pad,
+            "Buffer outside the segment : segment: [%" GST_TIME_FORMAT " -- %"
+            GST_TIME_FORMAT "]" " Buffer [%" GST_TIME_FORMAT " -- %"
+            GST_TIME_FORMAT "]", GST_TIME_ARGS (segment->stop),
+            GST_TIME_ARGS (segment->start), GST_TIME_ARGS (start_time),
+            GST_TIME_ARGS (end_time));
+
+        if (buf == pad->queued) {
+          gst_buffer_unref (buf);
+          gst_buffer_replace (&pad->queued, NULL);
+        } else {
+          gst_buffer_unref (buf);
+          buf = gst_aggregator_pad_steal_buffer (bpad);
+          gst_buffer_unref (buf);
+        }
+
+        need_more_data = TRUE;
+        continue;
+      }
+
+      /* Clip to segment and convert to running time */
+      start_time = MAX (start_time, segment->start);
+      if (segment->stop != -1)
+        end_time = MIN (end_time, segment->stop);
+      start_time =
+          gst_segment_to_running_time (segment, GST_FORMAT_TIME, start_time);
+      end_time =
+          gst_segment_to_running_time (segment, GST_FORMAT_TIME, end_time);
+      g_assert (start_time != -1 && end_time != -1);
+
+      /* Convert to the output segment rate */
+      if (ABS (agg->segment.rate) != 1.0) {
+        start_time *= ABS (agg->segment.rate);
+        end_time *= ABS (agg->segment.rate);
+      }
+
+      if (pad->end_time != -1 && pad->end_time > end_time) {
+        GST_DEBUG_OBJECT (pad, "Buffer from the past, dropping");
+        if (buf == pad->queued) {
+          gst_buffer_unref (buf);
+          gst_buffer_replace (&pad->queued, NULL);
+        } else {
+          gst_buffer_unref (buf);
+          buf = gst_aggregator_pad_steal_buffer (bpad);
+          gst_buffer_unref (buf);
+        }
+
+        need_more_data = TRUE;
+        continue;
+      }
+
+      if (end_time >= output_start_time && start_time < output_end_time) {
+        GST_DEBUG_OBJECT (pad,
+            "Taking new buffer with start time %" GST_TIME_FORMAT,
+            GST_TIME_ARGS (start_time));
+        gst_buffer_replace (&pad->buffer, buf);
+        pad->buffer_vinfo = *vinfo;
+        pad->start_time = start_time;
+        pad->end_time = end_time;
+
+        if (buf == pad->queued) {
+          gst_buffer_unref (buf);
+          gst_buffer_replace (&pad->queued, NULL);
+        } else {
+          gst_buffer_unref (buf);
+          buf = gst_aggregator_pad_steal_buffer (bpad);
+          gst_buffer_unref (buf);
+        }
+        eos = FALSE;
+      } else if (start_time >= output_end_time) {
+        GST_DEBUG_OBJECT (pad, "Keeping buffer until %" GST_TIME_FORMAT,
+            GST_TIME_ARGS (start_time));
+        eos = FALSE;
+      } else {
+        GST_DEBUG_OBJECT (pad, "Too old buffer -- dropping");
+        if (buf == pad->queued) {
+          gst_buffer_unref (buf);
+          gst_buffer_replace (&pad->queued, NULL);
+        } else {
+          gst_buffer_unref (buf);
+          buf = gst_aggregator_pad_steal_buffer (bpad);
+          gst_buffer_unref (buf);
+        }
+
+        need_more_data = TRUE;
+        continue;
+      }
+    } else {
+      if (pad->end_time != -1) {
+        if (pad->end_time <= output_start_time) {
+          gst_buffer_replace (&pad->buffer, NULL);
+          pad->start_time = pad->end_time = -1;
+          if (is_eos) {
+            GST_DEBUG ("I just need more data");
+            need_more_data = TRUE;
+          }
+        } else if (is_eos) {
+          eos = FALSE;
+        }
+      }
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  if (need_more_data)
+    return GST_FLOW_NEEDS_DATA;
+  if (eos)
+    return GST_FLOW_EOS;
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+prepare_frames (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
+{
+  GstAggregatorPad *bpad = GST_AGGREGATOR_PAD (pad);
+
+  static GstAllocationParams params = { 0, 15, 0, 0, };
+
+  if (pad->buffer != NULL) {
+    guint outsize;
+    GstClockTime timestamp;
+    gint64 stream_time;
+    GstSegment *seg;
+    GstVideoFrame *converted_frame = g_slice_new0 (GstVideoFrame);
+    GstBuffer *converted_buf = NULL;
+    GstVideoFrame *frame = g_slice_new0 (GstVideoFrame);
+
+    seg = &bpad->segment;
+
+    timestamp = GST_BUFFER_TIMESTAMP (pad->buffer);
+
+    stream_time = gst_segment_to_stream_time (seg, GST_FORMAT_TIME, timestamp);
+
+    /* sync object properties on stream time */
+    if (GST_CLOCK_TIME_IS_VALID (stream_time))
+      gst_object_sync_values (GST_OBJECT (pad), stream_time);
+
+
+    if (!gst_video_frame_map (frame, &pad->buffer_vinfo, pad->buffer,
+            GST_MAP_READ)) {
+      GST_WARNING_OBJECT (vagg, "Could not map input buffer");
+    }
+
+    if (pad->priv->convert) {
+      gint converted_size;
+
+      /* We wait until here to set the conversion infos, in case vagg->info changed */
+      if (pad->need_conversion_update) {
+        pad->conversion_info = vagg->info;
+        gst_video_info_set_format (&(pad->conversion_info),
+            GST_VIDEO_INFO_FORMAT (&vagg->info), pad->info.width,
+            pad->info.height);
+        pad->need_conversion_update = FALSE;
+      }
+
+      converted_size = pad->conversion_info.size;
+      outsize = GST_VIDEO_INFO_SIZE (&vagg->info);
+      converted_size = converted_size > outsize ? converted_size : outsize;
+      converted_buf = gst_buffer_new_allocate (NULL, converted_size, &params);
+
+      if (!gst_video_frame_map (converted_frame, &(pad->conversion_info),
+              converted_buf, GST_MAP_READWRITE)) {
+        GST_WARNING_OBJECT (vagg, "Could not map converted frame");
+
+        return FALSE;
+      }
+
+      videoconvert_convert_convert (pad->priv->convert, converted_frame, frame);
+      pad->converted_buffer = converted_buf;
+      gst_video_frame_unmap (frame);
+    } else {
+      converted_frame = frame;
+      converted_buf = pad->buffer;
+    }
+
+    pad->aggregated_frame = converted_frame;
+  }
+
+  return TRUE;
+}
+
+static gboolean
+clean_pad (GstVideoAggregator * vagg, GstVideoAggregatorPad * pad)
+{
+  if (pad->aggregated_frame) {
+    gst_video_frame_unmap (pad->aggregated_frame);
+    g_slice_free (GstVideoFrame, pad->aggregated_frame);
+    pad->aggregated_frame = NULL;
+  }
+
+  if (pad->converted_buffer) {
+    gst_buffer_unref (pad->converted_buffer);
+    pad->converted_buffer = NULL;
+  }
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_videoaggregator_do_aggregate (GstVideoAggregator * vagg,
+    GstClockTime output_start_time, GstClockTime output_end_time,
+    GstBuffer ** outbuf)
+{
+  GstFlowReturn ret = GST_FLOW_OK;
+  GstElementClass *klass = GST_ELEMENT_GET_CLASS (vagg);
+  GstVideoAggregatorClass *vagg_klass = (GstVideoAggregatorClass *) klass;
+
+  g_assert (vagg_klass->aggregate_frames != NULL);
+  g_assert (vagg_klass->get_output_buffer != NULL);
+
+  if ((ret = vagg_klass->get_output_buffer (vagg, outbuf)) != GST_FLOW_OK) {
+    GST_WARNING_OBJECT (vagg, "Could not get an output buffer, reason: %s",
+        gst_flow_get_name (ret));
+    return ret;
+  }
+
+  GST_BUFFER_TIMESTAMP (*outbuf) = output_start_time;
+  GST_BUFFER_DURATION (*outbuf) = output_end_time - output_start_time;
+
+  if (vagg_klass->disable_frame_conversion == FALSE) {
+    /* Here we convert all the frames the subclass will have to aggregate */
+    gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (vagg),
+        (GstAggregatorPadForeachFunc) prepare_frames, NULL);
+  }
+
+  ret = vagg_klass->aggregate_frames (vagg, *outbuf);
+
+  gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (vagg),
+      (GstAggregatorPadForeachFunc) clean_pad, NULL);
+
+  return ret;
+}
+
+/* Perform qos calculations before processing the next frame. Returns TRUE if
+ * the frame should be processed, FALSE if the frame can be dropped entirely */
+static gint64
+gst_videoaggregator_do_qos (GstVideoAggregator * vagg, GstClockTime timestamp)
+{
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+  GstClockTime qostime, earliest_time;
+  gdouble proportion;
+  gint64 jitter;
+
+  /* no timestamp, can't do QoS => process frame */
+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (timestamp))) {
+    GST_LOG_OBJECT (vagg, "invalid timestamp, can't do QoS, process frame");
+    return -1;
+  }
+
+  /* get latest QoS observation values */
+  gst_videoaggregator_read_qos (vagg, &proportion, &earliest_time);
+
+  /* skip qos if we have no observation (yet) => process frame */
+  if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (earliest_time))) {
+    GST_LOG_OBJECT (vagg, "no observation yet, process frame");
+    return -1;
+  }
+
+  /* qos is done on running time */
+  qostime =
+      gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME, timestamp);
+
+  /* see how our next timestamp relates to the latest qos timestamp */
+  GST_LOG_OBJECT (vagg, "qostime %" GST_TIME_FORMAT ", earliest %"
+      GST_TIME_FORMAT, GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time));
+
+  jitter = GST_CLOCK_DIFF (qostime, earliest_time);
+  if (qostime != GST_CLOCK_TIME_NONE && jitter > 0) {
+    GST_DEBUG_OBJECT (vagg, "we are late, drop frame");
+    return jitter;
+  }
+
+  GST_LOG_OBJECT (vagg, "process frame");
+  return jitter;
+}
+
+static GstFlowReturn
+gst_videoaggregator_aggregate (GstAggregator * agg)
+{
+  GstFlowReturn ret;
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+  GstClockTime output_start_time, output_end_time;
+  GstBuffer *outbuf = NULL;
+  gint res;
+  gint64 jitter;
+
+  /* If we're not negotiated_caps yet... */
+  if (GST_VIDEO_INFO_FORMAT (&vagg->info) == GST_VIDEO_FORMAT_UNKNOWN) {
+    GST_INFO_OBJECT (agg, "Not negotiated yet!");
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+
+  if (gst_pad_check_reconfigure (agg->srcpad))
+    gst_videoaggregator_update_src_caps (vagg);
+
+  if (vagg->priv->send_caps) {
+    gst_aggregator_set_src_caps (agg, vagg->priv->current_caps);
+    vagg->priv->send_caps = FALSE;
+  }
+
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+
+  if (agg->segment.position == -1)
+    output_start_time = agg->segment.start;
+  else
+    output_start_time = agg->segment.position;
+
+  output_end_time =
+      vagg->priv->ts_offset + gst_util_uint64_scale_round (vagg->priv->nframes +
+      1, GST_SECOND * GST_VIDEO_INFO_FPS_D (&vagg->info),
+      GST_VIDEO_INFO_FPS_N (&vagg->info)) + agg->segment.start;
+
+  if (agg->segment.stop != -1)
+    output_end_time = MIN (output_end_time, agg->segment.stop);
+
+  res =
+      gst_videoaggregator_fill_queues (vagg, output_start_time,
+      output_end_time);
+
+  if (res == GST_FLOW_NEEDS_DATA) {
+    GST_DEBUG_OBJECT (vagg, "Need more data for decisions");
+    ret = GST_FLOW_OK;
+    goto done;
+  } else if (res == GST_FLOW_EOS) {
+    GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+    GST_DEBUG_OBJECT (vagg, "All sinkpads are EOS -- forwarding");
+    ret = GST_FLOW_EOS;
+    goto done_unlocked;
+  } else if (res == GST_FLOW_ERROR) {
+    GST_WARNING_OBJECT (vagg, "Error collecting buffers");
+    ret = GST_FLOW_ERROR;
+    goto done;
+  }
+
+  jitter = gst_videoaggregator_do_qos (vagg, output_start_time);
+  if (jitter <= 0) {
+    ret = gst_videoaggregator_do_aggregate (vagg, output_start_time,
+        output_end_time, &outbuf);
+    vagg->priv->qos_processed++;
+  } else {
+    GstMessage *msg;
+
+    vagg->priv->qos_dropped++;
+
+    /* TODO: live */
+    msg =
+        gst_message_new_qos (GST_OBJECT_CAST (vagg), FALSE,
+        gst_segment_to_running_time (&agg->segment, GST_FORMAT_TIME,
+            output_start_time), gst_segment_to_stream_time (&agg->segment,
+            GST_FORMAT_TIME, output_start_time), output_start_time,
+        output_end_time - output_start_time);
+    gst_message_set_qos_values (msg, jitter, vagg->priv->proportion, 1000000);
+    gst_message_set_qos_stats (msg, GST_FORMAT_BUFFERS,
+        vagg->priv->qos_processed, vagg->priv->qos_dropped);
+    gst_element_post_message (GST_ELEMENT_CAST (vagg), msg);
+
+    ret = GST_FLOW_OK;
+  }
+
+  agg->segment.position = output_end_time;
+  vagg->priv->nframes++;
+
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+  if (outbuf) {
+    GST_DEBUG_OBJECT (vagg,
+        "Pushing buffer with ts %" GST_TIME_FORMAT " and duration %"
+        GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+        GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
+
+    ret = gst_aggregator_finish_buffer (agg, outbuf);
+  }
+  goto done_unlocked;
+
+done:
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+
+done_unlocked:
+  return ret;
+}
+
+/* FIXME, the duration query should reflect how long you will produce
+ * data, that is the amount of stream time until you will emit EOS.
+ *
+ * For synchronized aggregating this is always the max of all the durations
+ * of upstream since we emit EOS when all of them finished.
+ *
+ * We don't do synchronized aggregating so this really depends on where the
+ * streams where punched in and what their relative offsets are against
+ * each other which we can get from the first timestamps we see.
+ *
+ * When we add a new stream (or remove a stream) the duration might
+ * also become invalid again and we need to post a new DURATION
+ * message to notify this fact to the parent.
+ * For now we take the max of all the upstream elements so the simple
+ * cases work at least somewhat.
+ */
+static gboolean
+gst_videoaggregator_query_duration (GstVideoAggregator * vagg, GstQuery * query)
+{
+  GValue item = { 0 };
+  gint64 max;
+  gboolean res;
+  GstFormat format;
+  GstIterator *it;
+  gboolean done;
+
+  /* parse format */
+  gst_query_parse_duration (query, &format, NULL);
+
+  max = -1;
+  res = TRUE;
+  done = FALSE;
+
+  /* Take maximum of all durations */
+  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (vagg));
+  while (!done) {
+    switch (gst_iterator_next (it, &item)) {
+      case GST_ITERATOR_DONE:
+        done = TRUE;
+        break;
+      case GST_ITERATOR_OK:
+      {
+        GstPad *pad;
+        gint64 duration;
+
+        pad = g_value_get_object (&item);
+
+        /* ask sink peer for duration */
+        res &= gst_pad_peer_query_duration (pad, format, &duration);
+        /* take max from all valid return values */
+        if (res) {
+          /* valid unknown length, stop searching */
+          if (duration == -1) {
+            max = duration;
+            done = TRUE;
+          }
+          /* else see if bigger than current max */
+          else if (duration > max)
+            max = duration;
+        }
+        g_value_reset (&item);
+        break;
+      }
+      case GST_ITERATOR_RESYNC:
+        max = -1;
+        res = TRUE;
+        gst_iterator_resync (it);
+        break;
+      default:
+        res = FALSE;
+        done = TRUE;
+        break;
+    }
+  }
+  g_value_unset (&item);
+  gst_iterator_free (it);
+
+  if (res) {
+    /* and store the max */
+    GST_DEBUG_OBJECT (vagg, "Total duration in format %s: %"
+        GST_TIME_FORMAT, gst_format_get_name (format), GST_TIME_ARGS (max));
+    gst_query_set_duration (query, format, max);
+  }
+
+  return res;
+}
+
+static gboolean
+gst_videoaggregator_query_latency (GstVideoAggregator * vagg, GstQuery * query)
+{
+  GstClockTime min, max;
+  gboolean live;
+  gboolean res;
+  GstIterator *it;
+  gboolean done;
+  GValue item = { 0 };
+
+  res = TRUE;
+  done = FALSE;
+  live = FALSE;
+  min = 0;
+  max = GST_CLOCK_TIME_NONE;
+
+  /* Take maximum of all latency values */
+  it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (vagg));
+  while (!done) {
+    switch (gst_iterator_next (it, &item)) {
+      case GST_ITERATOR_DONE:
+        done = TRUE;
+        break;
+      case GST_ITERATOR_OK:
+      {
+        GstPad *pad = g_value_get_object (&item);
+        GstQuery *peerquery;
+        GstClockTime min_cur, max_cur;
+        gboolean live_cur;
+
+        peerquery = gst_query_new_latency ();
+
+        /* Ask peer for latency */
+        res &= gst_pad_peer_query (pad, peerquery);
+
+        /* take max from all valid return values */
+        if (res) {
+          gst_query_parse_latency (peerquery, &live_cur, &min_cur, &max_cur);
+
+          if (min_cur > min)
+            min = min_cur;
+
+          if (max_cur != GST_CLOCK_TIME_NONE &&
+              ((max != GST_CLOCK_TIME_NONE && max_cur > max) ||
+                  (max == GST_CLOCK_TIME_NONE)))
+            max = max_cur;
+
+          live = live || live_cur;
+        }
+
+        gst_query_unref (peerquery);
+        g_value_reset (&item);
+        break;
+      }
+      case GST_ITERATOR_RESYNC:
+        live = FALSE;
+        min = 0;
+        max = GST_CLOCK_TIME_NONE;
+        res = TRUE;
+        gst_iterator_resync (it);
+        break;
+      default:
+        res = FALSE;
+        done = TRUE;
+        break;
+    }
+  }
+  g_value_unset (&item);
+  gst_iterator_free (it);
+
+  if (res) {
+    /* store the results */
+    GST_DEBUG_OBJECT (vagg, "Calculated total latency: live %s, min %"
+        GST_TIME_FORMAT ", max %" GST_TIME_FORMAT,
+        (live ? "yes" : "no"), GST_TIME_ARGS (min), GST_TIME_ARGS (max));
+    gst_query_set_latency (query, live, min, max);
+  }
+
+  return res;
+}
+
+static gboolean
+gst_videoaggregator_src_query (GstAggregator * agg, GstQuery * query)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+  gboolean res = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_POSITION:
+    {
+      GstFormat format;
+
+      gst_query_parse_position (query, &format, NULL);
+
+      switch (format) {
+        case GST_FORMAT_TIME:
+          gst_query_set_position (query, format,
+              gst_segment_to_stream_time (&agg->segment, GST_FORMAT_TIME,
+                  agg->segment.position));
+          res = TRUE;
+          break;
+        default:
+          break;
+      }
+      break;
+    }
+    case GST_QUERY_DURATION:
+      res = gst_videoaggregator_query_duration (vagg, query);
+      break;
+    case GST_QUERY_LATENCY:
+      res = gst_videoaggregator_query_latency (vagg, query);
+      break;
+    case GST_QUERY_CAPS:
+      res =
+          GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->src_query
+          (agg, query);
+      break;
+    default:
+      /* FIXME, needs a custom query handler because we have multiple
+       * sinkpads */
+      res = FALSE;
+      break;
+  }
+  return res;
+}
+
+static gboolean
+gst_videoaggregator_src_event (GstAggregator * agg, GstEvent * event)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_QOS:
+    {
+      GstQOSType type;
+      GstClockTimeDiff diff;
+      GstClockTime timestamp;
+      gdouble proportion;
+
+      gst_event_parse_qos (event, &type, &proportion, &diff, &timestamp);
+      gst_videoaggregator_update_qos (vagg, proportion, diff, timestamp);
+      break;
+    }
+    case GST_EVENT_SEEK:
+    {
+      GST_DEBUG_OBJECT (vagg, "Handling SEEK event");
+    }
+    default:
+      break;
+  }
+
+  return
+      GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->src_event (agg,
+      event);
+}
+
+static GstFlowReturn
+gst_videoaggregator_sink_clip (GstAggregator * agg,
+    GstAggregatorPad * bpad, GstBuffer * buf, GstBuffer ** outbuf)
+{
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (bpad);
+  GstClockTime start_time, end_time;
+
+  start_time = GST_BUFFER_TIMESTAMP (buf);
+  if (start_time == -1) {
+    GST_DEBUG_OBJECT (pad, "Timestamped buffers required!");
+    gst_buffer_unref (buf);
+    return GST_FLOW_ERROR;
+  }
+
+  end_time = GST_BUFFER_DURATION (buf);
+  if (end_time == -1 && GST_VIDEO_INFO_FPS_N (&pad->info) != 0)
+    end_time =
+        gst_util_uint64_scale_int_round (GST_SECOND,
+        GST_VIDEO_INFO_FPS_D (&pad->info), GST_VIDEO_INFO_FPS_N (&pad->info));
+  if (end_time == -1) {
+    *outbuf = buf;
+    return GST_FLOW_OK;
+  }
+
+  start_time = MAX (start_time, bpad->segment.start);
+  start_time =
+      gst_segment_to_running_time (&bpad->segment, GST_FORMAT_TIME, start_time);
+
+  end_time += GST_BUFFER_TIMESTAMP (buf);
+  if (bpad->segment.stop != -1)
+    end_time = MIN (end_time, bpad->segment.stop);
+  end_time =
+      gst_segment_to_running_time (&bpad->segment, GST_FORMAT_TIME, end_time);
+
+  /* Convert to the output segment rate */
+  if (ABS (agg->segment.rate) != 1.0) {
+    start_time *= ABS (agg->segment.rate);
+    end_time *= ABS (agg->segment.rate);
+  }
+
+  if (bpad->buffer != NULL && end_time < pad->end_time) {
+    gst_buffer_unref (buf);
+    *outbuf = NULL;
+    return GST_FLOW_OK;
+  }
+
+  *outbuf = buf;
+  return GST_FLOW_OK;
+}
+
+static GstFlowReturn
+gst_videoaggregator_flush (GstAggregator * agg)
+{
+  GList *l;
+  gdouble abs_rate;
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+
+  GST_INFO_OBJECT (agg, "Flushing");
+  abs_rate = ABS (agg->segment.rate);
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *p = l->data;
+
+    /* Convert to the output segment rate */
+    if (ABS (agg->segment.rate) != abs_rate) {
+      if (ABS (agg->segment.rate) != 1.0 && p->buffer) {
+        p->start_time /= ABS (agg->segment.rate);
+        p->end_time /= ABS (agg->segment.rate);
+      }
+      if (abs_rate != 1.0 && p->buffer) {
+        p->start_time *= abs_rate;
+        p->end_time *= abs_rate;
+      }
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  agg->segment.position = -1;
+  vagg->priv->ts_offset = 0;
+  vagg->priv->nframes = 0;
+
+  gst_videoaggregator_reset_qos (vagg);
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_videoaggregator_sink_event (GstAggregator * agg, GstAggregatorPad * bpad,
+    GstEvent * event)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (bpad);
+  gboolean ret = TRUE;
+
+  GST_DEBUG_OBJECT (pad, "Got %s event on pad %s:%s",
+      GST_EVENT_TYPE_NAME (event), GST_DEBUG_PAD_NAME (pad));
+
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_CAPS:
+    {
+      GstCaps *caps;
+
+      gst_event_parse_caps (event, &caps);
+      ret =
+          gst_videoaggregator_pad_sink_setcaps (GST_PAD (pad),
+          GST_OBJECT (vagg), caps);
+      gst_event_unref (event);
+      event = NULL;
+      break;
+    }
+    case GST_EVENT_SEGMENT:{
+      GstSegment seg;
+      gst_event_copy_segment (event, &seg);
+
+      g_assert (seg.format == GST_FORMAT_TIME);
+      break;
+    }
+    default:
+      break;
+  }
+
+  if (event != NULL)
+    return GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->sink_event
+        (agg, bpad, event);
+
+  return ret;
+}
+
+static gboolean
+gst_videoaggregator_start (GstAggregator * agg)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+
+  if (!GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->start (agg))
+    return FALSE;
+
+  vagg->priv->send_caps = TRUE;
+  gst_segment_init (&agg->segment, GST_FORMAT_TIME);
+  gst_caps_replace (&vagg->priv->current_caps, NULL);
+
+  return TRUE;
+}
+
+static gboolean
+gst_videoaggregator_stop (GstAggregator * agg)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+
+  if (!GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->stop (agg))
+    return FALSE;
+
+  gst_videoaggregator_reset (vagg);
+
+  return TRUE;
+}
+
+/* GstElement vmethods */
+static GstPad *
+gst_videoaggregator_request_new_pad (GstElement * element,
+    GstPadTemplate * templ, const gchar * req_name, const GstCaps * caps)
+{
+  GstVideoAggregator *vagg;
+  GstVideoAggregatorPad *vaggpad;
+
+  vagg = GST_VIDEO_AGGREGATOR (element);
+
+  vaggpad = (GstVideoAggregatorPad *)
+      GST_ELEMENT_CLASS (gst_videoaggregator_parent_class)->request_new_pad
+      (element, templ, req_name, caps);
+
+  if (vaggpad == NULL)
+    return NULL;
+
+  GST_OBJECT_LOCK (vagg);
+  vaggpad->zorder = GST_ELEMENT (vagg)->numsinkpads;
+  vaggpad->start_time = -1;
+  vaggpad->end_time = -1;
+  element->sinkpads = g_list_sort (element->sinkpads,
+      (GCompareFunc) pad_zorder_compare);
+  GST_OBJECT_UNLOCK (vagg);
+
+  gst_child_proxy_child_added (GST_CHILD_PROXY (vagg), G_OBJECT (vaggpad),
+      GST_OBJECT_NAME (vaggpad));
+
+  return GST_PAD (vaggpad);
+}
+
+static void
+gst_videoaggregator_release_pad (GstElement * element, GstPad * pad)
+{
+  GstVideoAggregator *vagg = NULL;
+  GstVideoAggregatorPad *vaggpad;
+  gboolean update_caps;
+
+  vagg = GST_VIDEO_AGGREGATOR (element);
+  vaggpad = GST_VIDEO_AGGREGATOR_PAD (pad);
+
+  GST_VIDEO_AGGREGATOR_LOCK (vagg);
+  gst_videoaggregator_update_converters (vagg);
+  gst_buffer_replace (&vaggpad->buffer, NULL);
+  update_caps = GST_VIDEO_INFO_FORMAT (&vagg->info) != GST_VIDEO_FORMAT_UNKNOWN;
+  GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
+
+  gst_child_proxy_child_removed (GST_CHILD_PROXY (vagg), G_OBJECT (vaggpad),
+      GST_OBJECT_NAME (vaggpad));
+
+  GST_ELEMENT_CLASS (gst_videoaggregator_parent_class)->release_pad (GST_ELEMENT
+      (vagg), pad);
+
+  if (update_caps)
+    gst_videoaggregator_update_src_caps (vagg);
+
+  return;
+}
+
+static GstFlowReturn
+gst_videoaggregator_get_output_buffer (GstVideoAggregator * videoaggregator,
+    GstBuffer ** outbuf)
+{
+  guint outsize;
+  static GstAllocationParams params = { 0, 15, 0, 0, };
+
+  outsize = GST_VIDEO_INFO_SIZE (&videoaggregator->info);
+  *outbuf = gst_buffer_new_allocate (NULL, outsize, &params);
+
+  if (*outbuf == NULL) {
+    GST_ERROR_OBJECT (videoaggregator,
+        "Could not instantiate buffer of size: %d", outsize);
+  }
+
+  return GST_FLOW_OK;
+}
+
+static gboolean
+gst_videoaggregator_pad_sink_acceptcaps (GstPad * pad,
+    GstVideoAggregator * vagg, GstCaps * caps)
+{
+  gboolean ret;
+  GstCaps *modified_caps;
+  GstCaps *accepted_caps;
+  GstCaps *template_caps;
+  gboolean had_current_caps = TRUE;
+  gint i, n;
+  GstStructure *s;
+  GstAggregator *agg = GST_AGGREGATOR (vagg);
+
+  GST_DEBUG_OBJECT (pad, "%" GST_PTR_FORMAT, caps);
+
+  accepted_caps = gst_pad_get_current_caps (GST_PAD (agg->srcpad));
+
+  template_caps = gst_pad_get_pad_template_caps (GST_PAD (agg->srcpad));
+
+  if (accepted_caps == NULL) {
+    accepted_caps = template_caps;
+    had_current_caps = FALSE;
+  }
+
+  accepted_caps = gst_caps_make_writable (accepted_caps);
+
+  GST_LOG_OBJECT (pad, "src caps %" GST_PTR_FORMAT, accepted_caps);
+
+  n = gst_caps_get_size (accepted_caps);
+  for (i = 0; i < n; i++) {
+    s = gst_caps_get_structure (accepted_caps, i);
+    gst_structure_set (s, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
+    if (!gst_structure_has_field (s, "pixel-aspect-ratio"))
+      gst_structure_set (s, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+          NULL);
+
+    gst_structure_remove_fields (s, "colorimetry", "chroma-site", "format",
+        NULL);
+  }
+
+  modified_caps = gst_caps_intersect (accepted_caps, template_caps);
+
+  ret = gst_caps_can_intersect (caps, accepted_caps);
+  GST_DEBUG_OBJECT (pad, "%saccepted caps %" GST_PTR_FORMAT,
+      (ret ? "" : "not "), caps);
+  gst_caps_unref (accepted_caps);
+  gst_caps_unref (modified_caps);
+  if (had_current_caps)
+    gst_caps_unref (template_caps);
+  return ret;
+}
+
+static gboolean
+gst_videoaggregator_sink_query (GstAggregator * agg, GstAggregatorPad * bpad,
+    GstQuery * query)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (agg);
+  GstVideoAggregatorPad *pad = GST_VIDEO_AGGREGATOR_PAD (bpad);
+  gboolean ret = FALSE;
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_CAPS:
+    {
+      GstCaps *filter, *caps;
+
+      gst_query_parse_caps (query, &filter);
+      caps = gst_videoaggregator_pad_sink_getcaps (GST_PAD (pad), vagg, filter);
+      gst_query_set_caps_result (query, caps);
+      gst_caps_unref (caps);
+      ret = TRUE;
+      break;
+    }
+    case GST_QUERY_ACCEPT_CAPS:
+    {
+      GstCaps *caps;
+
+      gst_query_parse_accept_caps (query, &caps);
+      ret = gst_videoaggregator_pad_sink_acceptcaps (GST_PAD (pad), vagg, caps);
+      gst_query_set_accept_caps_result (query, ret);
+      ret = TRUE;
+      break;
+    }
+    default:
+      ret =
+          GST_AGGREGATOR_CLASS (gst_videoaggregator_parent_class)->sink_query
+          (agg, bpad, query);
+      break;
+  }
+  return ret;
+}
+
+/* GObject vmethods */
+static void
+gst_videoaggregator_finalize (GObject * o)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (o);
+
+  g_mutex_clear (&vagg->priv->lock);
+  g_mutex_clear (&vagg->priv->setcaps_lock);
+
+  G_OBJECT_CLASS (gst_videoaggregator_parent_class)->finalize (o);
+}
+
+static void
+gst_videoaggregator_dispose (GObject * o)
+{
+  GstVideoAggregator *vagg = GST_VIDEO_AGGREGATOR (o);
+
+  gst_caps_replace (&vagg->priv->current_caps, NULL);
+}
+
+static void
+gst_videoaggregator_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  switch (prop_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_videoaggregator_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  switch (prop_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+/* GObject boilerplate */
+static void
+gst_videoaggregator_class_init (GstVideoAggregatorClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *gstelement_class = (GstElementClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+
+  GST_DEBUG_CATEGORY_INIT (gst_videoaggregator_debug, "videoaggregator", 0,
+      "base video aggregator");
+
+  g_type_class_add_private (klass, sizeof (GstVideoAggregatorPrivate));
+
+  gobject_class->finalize = gst_videoaggregator_finalize;
+  gobject_class->dispose = gst_videoaggregator_dispose;
+
+  gobject_class->get_property = gst_videoaggregator_get_property;
+  gobject_class->set_property = gst_videoaggregator_set_property;
+
+  gstelement_class->request_new_pad =
+      GST_DEBUG_FUNCPTR (gst_videoaggregator_request_new_pad);
+  gstelement_class->release_pad =
+      GST_DEBUG_FUNCPTR (gst_videoaggregator_release_pad);
+
+  gst_element_class_set_static_metadata (gstelement_class,
+      "Video aggregator base class", "Filter/Editor/Video",
+      "Aggregate multiple video streams",
+      "Wim Taymans <wim@fluendo.com>, "
+      "Sebastian Dröge <sebastian.droege@collabora.co.uk>, "
+      "Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>, "
+      "Thibault Saunier <tsaunier@gnome.org>");
+
+  agg_class->sinkpads_type = GST_TYPE_VIDEO_AGGREGATOR_PAD;
+  agg_class->start = gst_videoaggregator_start;
+  agg_class->stop = gst_videoaggregator_stop;
+  agg_class->sink_query = gst_videoaggregator_sink_query;
+  agg_class->sink_event = gst_videoaggregator_sink_event;
+  agg_class->flush = gst_videoaggregator_flush;
+  agg_class->clip = gst_videoaggregator_sink_clip;
+  agg_class->aggregate = gst_videoaggregator_aggregate;
+  agg_class->src_event = gst_videoaggregator_src_event;
+  agg_class->src_query = gst_videoaggregator_src_query;
+
+  klass->get_output_buffer = gst_videoaggregator_get_output_buffer;
+
+  /* Register the pad class */
+  g_type_class_ref (GST_TYPE_VIDEO_AGGREGATOR_PAD);
+}
+
+static void
+gst_videoaggregator_init (GstVideoAggregator * vagg)
+{
+  vagg->priv =
+      G_TYPE_INSTANCE_GET_PRIVATE (vagg, GST_TYPE_VIDEO_AGGREGATOR,
+      GstVideoAggregatorPrivate);
+
+  vagg->priv->current_caps = NULL;
+
+  g_mutex_init (&vagg->priv->lock);
+  g_mutex_init (&vagg->priv->setcaps_lock);
+  /* initialize variables */
+  gst_videoaggregator_reset (vagg);
+}
diff --git a/gst-libs/gst/video/gstvideoaggregator.h b/gst-libs/gst/video/gstvideoaggregator.h
new file mode 100644
index 0000000..b9fd531
--- /dev/null
+++ b/gst-libs/gst/video/gstvideoaggregator.h
@@ -0,0 +1,114 @@
+/* Generic video aggregator plugin
+ * Copyright (C) 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+ 
+#ifndef __GST_VIDEO_AGGREGATOR_H__
+#define __GST_VIDEO_AGGREGATOR_H__
+
+#ifndef GST_USE_UNSTABLE_API
+#warning "The Video library from gst-plugins-bad is unstable API and may change in future."
+#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/base/gstaggregator.h>
+
+#include "gstvideoaggregatorpad.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_VIDEO_AGGREGATOR (gst_videoaggregator_get_type())
+#define GST_VIDEO_AGGREGATOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_AGGREGATOR, GstVideoAggregator))
+#define GST_VIDEO_AGGREGATOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_AGGREGATOR, GstVideoAggregatorClass))
+#define GST_IS_VIDEO_AGGREGATOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_AGGREGATOR))
+#define GST_IS_VIDEO_AGGREGATOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_AGGREGATOR))
+#define GST_VIDEO_AGGREGATOR_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_VIDEO_AGGREGATOR,GstVideoAggregatorClass))
+
+typedef struct _GstVideoAggregator GstVideoAggregator;
+typedef struct _GstVideoAggregatorClass GstVideoAggregatorClass;
+typedef struct _GstVideoAggregatorPrivate GstVideoAggregatorPrivate;
+
+/**
+ * GstVideoAggregator:
+ * @info: The #GstVideoInfo representing the currently set
+ * srcpad caps.
+ */
+struct _GstVideoAggregator
+{
+  GstAggregator aggregator;
+
+  /*< public >*/
+  /* Output caps */
+  GstVideoInfo info;
+
+  /* < private > */
+  GstVideoAggregatorPrivate *priv;
+  gpointer          _gst_reserved[GST_PADDING];
+};
+
+/**
+ * GstVideoAggregatorClass:
+ * @disable_frame_conversion: Optional.
+ *                            Allows subclasses to disable the frame colorspace
+ *                            conversion feature
+ * @update_info:              Optional.
+ *                            Lets subclasses update the src #GstVideoInfo representing
+ *                            the src pad caps before usage.
+ * @aggregate_frames:         Lets subclasses aggregate frames that are ready. Subclasses
+ *                            should iterate the GstElement.sinkpads and use the already
+ *                            mapped #GstVideoFrame from GstVideoAggregatorPad.aggregated_frame
+ *                            or directly use the #GstBuffer from GstVideoAggregatorPad.buffer
+ *                            if it needs to map the buffer in a special way. The result of the
+ *                            aggregation should land in @outbuffer.
+ * @get_output_buffer:        Optional.
+ *                            Lets subclasses provide a #GstBuffer to be used as @outbuffer of
+ *                            the #aggregate_frames vmethod.
+ * @negotiated_caps:          Optional.
+ *                            Notifies subclasses what caps format has been negotiated
+ **/
+struct _GstVideoAggregatorClass
+{
+  /*< private >*/
+  GstAggregatorClass parent_class;
+
+  /*< public >*/
+  gboolean           disable_frame_conversion;
+
+  gboolean           (*update_info)               (GstVideoAggregator *  videoaggregator,
+                                                   GstVideoInfo       *  info);
+  GstFlowReturn      (*aggregate_frames)          (GstVideoAggregator *  videoaggregator,
+                                                   GstBuffer          *  outbuffer);
+  GstFlowReturn      (*get_output_buffer)         (GstVideoAggregator *  videoaggregator,
+                                                   GstBuffer          ** outbuffer);
+  gboolean           (*negotiated_caps)           (GstVideoAggregator *  videoaggregator,
+                                                   GstCaps            *  caps);
+  /* < private > */
+  gpointer            _gst_reserved[GST_PADDING];
+};
+
+GType gst_videoaggregator_get_type       (void);
+
+G_END_DECLS
+#endif /* __GST_VIDEO_AGGREGATOR_H__ */
diff --git a/gst-libs/gst/video/gstvideoaggregatorpad.h b/gst-libs/gst/video/gstvideoaggregatorpad.h
new file mode 100644
index 0000000..8f7f8ad
--- /dev/null
+++ b/gst-libs/gst/video/gstvideoaggregatorpad.h
@@ -0,0 +1,92 @@
+/* Generic video aggregator plugin
+ * Copyright (C) 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+ 
+#ifndef __GST_VIDEO_AGGREGATOR_PAD_H__
+#define __GST_VIDEO_AGGREGATOR_PAD_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+#include <gst/base/gstaggregator.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_VIDEO_AGGREGATOR_PAD (gst_videoaggregator_pad_get_type())
+#define GST_VIDEO_AGGREGATOR_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_AGGREGATOR_PAD, GstVideoAggregatorPad))
+#define GST_VIDEO_AGGREGATOR_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR_PAD, GstVideoAggregatorPadClass))
+#define GST_IS_VIDEO_AGGREGATOR_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_AGGREGATOR_PAD))
+#define GST_IS_VIDEO_AGGREGATOR_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_AGGREGATOR_PAD))
+
+typedef struct _GstVideoAggregatorPad GstVideoAggregatorPad;
+typedef struct _GstVideoAggregatorPadClass GstVideoAggregatorPadClass;
+typedef struct _GstVideoAggregatorPadPrivate GstVideoAggregatorPadPrivate;
+
+/**
+ * GstVideoAggregatorPad:
+ *
+ * The opaque #GstVideoAggregatorPad structure.
+ */
+struct _GstVideoAggregatorPad
+{
+  GstAggregatorPad parent;
+
+  /* < private > */
+
+  /* caps */
+  GstVideoInfo info;
+
+  /* properties */
+  guint zorder;
+
+  /* caps used for conversion if needed */
+  GstVideoInfo conversion_info;
+
+  gboolean need_conversion_update;
+  GstBuffer *converted_buffer;
+
+  GstBuffer *buffer;
+  GstVideoInfo queued_vinfo;
+  GstBuffer *queued;
+  GstVideoInfo buffer_vinfo;
+
+  GstClockTime start_time;
+  GstClockTime end_time;
+  GstVideoFrame *aggregated_frame;
+
+  /* < private > */
+  GstVideoAggregatorPadPrivate *priv;
+  gpointer          _gst_reserved[GST_PADDING];
+};
+
+struct _GstVideoAggregatorPadClass
+{
+  GstAggregatorPadClass parent_class;
+
+  gpointer          _gst_reserved[GST_PADDING];
+};
+
+GType gst_videoaggregator_pad_get_type (void);
+
+G_END_DECLS
+#endif /* __GST_VIDEO_AGGREGATOR_PAD_H__ */
diff --git a/gst-libs/gst/video/videoconvert.c b/gst-libs/gst/video/videoconvert.c
new file mode 100644
index 0000000..01dca36
--- /dev/null
+++ b/gst-libs/gst/video/videoconvert.c
@@ -0,0 +1,1502 @@
+/* GStreamer
+ * Copyright (C) 2010 David Schleef <ds@schleef.org>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "videoconvert.h"
+
+#include <glib.h>
+#include <string.h>
+#include <math.h>
+
+#include "bad-video-orc.h"
+
+
+static void videoconvert_convert_generic (VideoConvert * convert,
+    GstVideoFrame * dest, const GstVideoFrame * src);
+static void videoconvert_convert_matrix8 (VideoConvert * convert,
+    gpointer pixels);
+static void videoconvert_convert_matrix16 (VideoConvert * convert,
+    gpointer pixels);
+static gboolean videoconvert_convert_lookup_fastpath (VideoConvert * convert);
+static gboolean videoconvert_convert_compute_matrix (VideoConvert * convert);
+static gboolean videoconvert_convert_compute_resample (VideoConvert * convert);
+static void videoconvert_dither_verterr (VideoConvert * convert,
+    guint16 * pixels, int j);
+static void videoconvert_dither_halftone (VideoConvert * convert,
+    guint16 * pixels, int j);
+
+
+VideoConvert *
+videoconvert_convert_new (GstVideoInfo * in_info, GstVideoInfo * out_info)
+{
+  VideoConvert *convert;
+  gint width;
+
+  convert = g_malloc0 (sizeof (VideoConvert));
+
+  convert->in_info = *in_info;
+  convert->out_info = *out_info;
+  convert->dither16 = NULL;
+
+  convert->width = GST_VIDEO_INFO_WIDTH (in_info);
+  convert->height = GST_VIDEO_INFO_HEIGHT (in_info);
+
+  if (!videoconvert_convert_lookup_fastpath (convert)) {
+    convert->convert = videoconvert_convert_generic;
+    if (!videoconvert_convert_compute_matrix (convert))
+      goto no_convert;
+
+    if (!videoconvert_convert_compute_resample (convert))
+      goto no_convert;
+  }
+
+  width = convert->width;
+
+  convert->lines = out_info->finfo->pack_lines;
+  convert->errline = g_malloc0 (sizeof (guint16) * width * 4);
+
+  return convert;
+
+  /* ERRORS */
+no_convert:
+  {
+    videoconvert_convert_free (convert);
+    return NULL;
+  }
+}
+
+void
+videoconvert_convert_free (VideoConvert * convert)
+{
+  gint i;
+
+  if (convert->upsample)
+    gst_video_chroma_resample_free (convert->upsample);
+  if (convert->downsample)
+    gst_video_chroma_resample_free (convert->downsample);
+
+  for (i = 0; i < convert->n_tmplines; i++)
+    g_free (convert->tmplines[i]);
+  g_free (convert->tmplines);
+  g_free (convert->errline);
+
+  g_free (convert);
+}
+
+void
+videoconvert_convert_set_dither (VideoConvert * convert, int type)
+{
+  switch (type) {
+    case 0:
+    default:
+      convert->dither16 = NULL;
+      break;
+    case 1:
+      convert->dither16 = videoconvert_dither_verterr;
+      break;
+    case 2:
+      convert->dither16 = videoconvert_dither_halftone;
+      break;
+  }
+}
+
+void
+videoconvert_convert_convert (VideoConvert * convert,
+    GstVideoFrame * dest, const GstVideoFrame * src)
+{
+  convert->convert (convert, dest, src);
+}
+
+#define SCALE    (8)
+#define SCALE_F  ((float) (1 << SCALE))
+
+static void
+videoconvert_convert_matrix8 (VideoConvert * convert, gpointer pixels)
+{
+  int i;
+  int r, g, b;
+  int y, u, v;
+  guint8 *p = pixels;
+
+  for (i = 0; i < convert->width; i++) {
+    r = p[i * 4 + 1];
+    g = p[i * 4 + 2];
+    b = p[i * 4 + 3];
+
+    y = (convert->cmatrix[0][0] * r + convert->cmatrix[0][1] * g +
+        convert->cmatrix[0][2] * b + convert->cmatrix[0][3]) >> SCALE;
+    u = (convert->cmatrix[1][0] * r + convert->cmatrix[1][1] * g +
+        convert->cmatrix[1][2] * b + convert->cmatrix[1][3]) >> SCALE;
+    v = (convert->cmatrix[2][0] * r + convert->cmatrix[2][1] * g +
+        convert->cmatrix[2][2] * b + convert->cmatrix[2][3]) >> SCALE;
+
+    p[i * 4 + 1] = CLAMP (y, 0, 255);
+    p[i * 4 + 2] = CLAMP (u, 0, 255);
+    p[i * 4 + 3] = CLAMP (v, 0, 255);
+  }
+}
+
+static void
+videoconvert_convert_matrix16 (VideoConvert * convert, gpointer pixels)
+{
+  int i;
+  int r, g, b;
+  int y, u, v;
+  guint16 *p = pixels;
+
+  for (i = 0; i < convert->width; i++) {
+    r = p[i * 4 + 1];
+    g = p[i * 4 + 2];
+    b = p[i * 4 + 3];
+
+    y = (convert->cmatrix[0][0] * r + convert->cmatrix[0][1] * g +
+        convert->cmatrix[0][2] * b + convert->cmatrix[0][3]) >> SCALE;
+    u = (convert->cmatrix[1][0] * r + convert->cmatrix[1][1] * g +
+        convert->cmatrix[1][2] * b + convert->cmatrix[1][3]) >> SCALE;
+    v = (convert->cmatrix[2][0] * r + convert->cmatrix[2][1] * g +
+        convert->cmatrix[2][2] * b + convert->cmatrix[2][3]) >> SCALE;
+
+    p[i * 4 + 1] = CLAMP (y, 0, 65535);
+    p[i * 4 + 2] = CLAMP (u, 0, 65535);
+    p[i * 4 + 3] = CLAMP (v, 0, 65535);
+  }
+}
+
+static gboolean
+get_Kr_Kb (GstVideoColorMatrix matrix, gdouble * Kr, gdouble * Kb)
+{
+  gboolean res = TRUE;
+
+  switch (matrix) {
+      /* RGB */
+    default:
+    case GST_VIDEO_COLOR_MATRIX_RGB:
+      res = FALSE;
+      break;
+      /* YUV */
+    case GST_VIDEO_COLOR_MATRIX_FCC:
+      *Kr = 0.30;
+      *Kb = 0.11;
+      break;
+    case GST_VIDEO_COLOR_MATRIX_BT709:
+      *Kr = 0.2126;
+      *Kb = 0.0722;
+      break;
+    case GST_VIDEO_COLOR_MATRIX_BT601:
+      *Kr = 0.2990;
+      *Kb = 0.1140;
+      break;
+    case GST_VIDEO_COLOR_MATRIX_SMPTE240M:
+      *Kr = 0.212;
+      *Kb = 0.087;
+      break;
+  }
+  GST_DEBUG ("matrix: %d, Kr %f, Kb %f", matrix, *Kr, *Kb);
+  return res;
+}
+
+static gboolean
+videoconvert_convert_compute_matrix (VideoConvert * convert)
+{
+  GstVideoInfo *in_info, *out_info;
+  ColorMatrix dst;
+  gint i, j;
+  const GstVideoFormatInfo *sfinfo, *dfinfo;
+  const GstVideoFormatInfo *suinfo, *duinfo;
+  gint offset[4], scale[4];
+  gdouble Kr = 0, Kb = 0;
+
+  in_info = &convert->in_info;
+  out_info = &convert->out_info;
+
+  sfinfo = in_info->finfo;
+  dfinfo = out_info->finfo;
+
+  if (sfinfo->unpack_func == NULL)
+    goto no_unpack_func;
+
+  if (dfinfo->pack_func == NULL)
+    goto no_pack_func;
+
+  suinfo = gst_video_format_get_info (sfinfo->unpack_format);
+  duinfo = gst_video_format_get_info (dfinfo->unpack_format);
+
+  convert->in_bits = GST_VIDEO_FORMAT_INFO_DEPTH (suinfo, 0);
+  convert->out_bits = GST_VIDEO_FORMAT_INFO_DEPTH (duinfo, 0);
+
+  GST_DEBUG ("in bits %d, out bits %d", convert->in_bits, convert->out_bits);
+
+  if (in_info->colorimetry.range == out_info->colorimetry.range &&
+      in_info->colorimetry.matrix == out_info->colorimetry.matrix) {
+    GST_DEBUG ("using identity color transform");
+    convert->matrix = NULL;
+    return TRUE;
+  }
+
+  /* calculate intermediate format for the matrix. When unpacking, we expand
+   * input to 16 when one of the inputs is 16 bits */
+  if (convert->in_bits == 16 || convert->out_bits == 16) {
+    convert->matrix = videoconvert_convert_matrix16;
+
+    if (GST_VIDEO_FORMAT_INFO_IS_RGB (suinfo))
+      suinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_ARGB64);
+    else
+      suinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_AYUV64);
+
+    if (GST_VIDEO_FORMAT_INFO_IS_RGB (duinfo))
+      duinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_ARGB64);
+    else
+      duinfo = gst_video_format_get_info (GST_VIDEO_FORMAT_AYUV64);
+  } else {
+    convert->matrix = videoconvert_convert_matrix8;
+  }
+
+  color_matrix_set_identity (&dst);
+
+  /* 1, bring color components to [0..1.0] range */
+  gst_video_color_range_offsets (in_info->colorimetry.range, suinfo, offset,
+      scale);
+
+  color_matrix_offset_components (&dst, -offset[0], -offset[1], -offset[2]);
+
+  color_matrix_scale_components (&dst, 1 / ((float) scale[0]),
+      1 / ((float) scale[1]), 1 / ((float) scale[2]));
+
+  /* 2. bring components to R'G'B' space */
+  if (get_Kr_Kb (in_info->colorimetry.matrix, &Kr, &Kb))
+    color_matrix_YCbCr_to_RGB (&dst, Kr, Kb);
+
+  /* 3. inverse transfer function. R'G'B' to linear RGB */
+
+  /* 4. from RGB to XYZ using the primaries */
+
+  /* 5. from XYZ to RGB using the primaries */
+
+  /* 6. transfer function. linear RGB to R'G'B' */
+
+  /* 7. bring components to YCbCr space */
+  if (get_Kr_Kb (out_info->colorimetry.matrix, &Kr, &Kb))
+    color_matrix_RGB_to_YCbCr (&dst, Kr, Kb);
+
+  /* 8, bring color components to nominal range */
+  gst_video_color_range_offsets (out_info->colorimetry.range, duinfo, offset,
+      scale);
+
+  color_matrix_scale_components (&dst, (float) scale[0], (float) scale[1],
+      (float) scale[2]);
+
+  color_matrix_offset_components (&dst, offset[0], offset[1], offset[2]);
+
+  /* because we're doing fixed point matrix coefficients */
+  color_matrix_scale_components (&dst, SCALE_F, SCALE_F, SCALE_F);
+
+  for (i = 0; i < 4; i++)
+    for (j = 0; j < 4; j++)
+      convert->cmatrix[i][j] = rint (dst.m[i][j]);
+
+  GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[0][0],
+      convert->cmatrix[0][1], convert->cmatrix[0][2], convert->cmatrix[0][3]);
+  GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[1][0],
+      convert->cmatrix[1][1], convert->cmatrix[1][2], convert->cmatrix[1][3]);
+  GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[2][0],
+      convert->cmatrix[2][1], convert->cmatrix[2][2], convert->cmatrix[2][3]);
+  GST_DEBUG ("[%6d %6d %6d %6d]", convert->cmatrix[3][0],
+      convert->cmatrix[3][1], convert->cmatrix[3][2], convert->cmatrix[3][3]);
+
+  return TRUE;
+
+  /* ERRORS */
+no_unpack_func:
+  {
+    GST_ERROR ("no unpack_func for format %s",
+        gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (in_info)));
+    return FALSE;
+  }
+no_pack_func:
+  {
+    GST_ERROR ("no pack_func for format %s",
+        gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (out_info)));
+    return FALSE;
+  }
+}
+
+static void
+videoconvert_dither_verterr (VideoConvert * convert, guint16 * pixels, int j)
+{
+  int i;
+  guint16 *errline = convert->errline;
+  unsigned int mask = 0xff;
+
+  for (i = 0; i < 4 * convert->width; i++) {
+    int x = pixels[i] + errline[i];
+    if (x > 65535)
+      x = 65535;
+    pixels[i] = x;
+    errline[i] = x & mask;
+  }
+}
+
+static void
+videoconvert_dither_halftone (VideoConvert * convert, guint16 * pixels, int j)
+{
+  int i;
+  static guint16 halftone[8][8] = {
+    {0, 128, 32, 160, 8, 136, 40, 168},
+    {192, 64, 224, 96, 200, 72, 232, 104},
+    {48, 176, 16, 144, 56, 184, 24, 152},
+    {240, 112, 208, 80, 248, 120, 216, 88},
+    {12, 240, 44, 172, 4, 132, 36, 164},
+    {204, 76, 236, 108, 196, 68, 228, 100},
+    {60, 188, 28, 156, 52, 180, 20, 148},
+    {252, 142, 220, 92, 244, 116, 212, 84}
+  };
+
+  for (i = 0; i < convert->width * 4; i++) {
+    int x;
+    x = pixels[i] + halftone[(i >> 2) & 7][j & 7];
+    if (x > 65535)
+      x = 65535;
+    pixels[i] = x;
+  }
+}
+
+static void
+alloc_tmplines (VideoConvert * convert, guint lines, gint width)
+{
+  gint i;
+
+  convert->n_tmplines = lines;
+  convert->tmplines = g_malloc (lines * sizeof (gpointer));
+  for (i = 0; i < lines; i++)
+    convert->tmplines[i] = g_malloc (sizeof (guint16) * (width + 8) * 4);
+}
+
+static gboolean
+videoconvert_convert_compute_resample (VideoConvert * convert)
+{
+  GstVideoInfo *in_info, *out_info;
+  const GstVideoFormatInfo *sfinfo, *dfinfo;
+  gint width;
+
+  in_info = &convert->in_info;
+  out_info = &convert->out_info;
+
+  sfinfo = in_info->finfo;
+  dfinfo = out_info->finfo;
+
+  width = convert->width;
+
+  if (sfinfo->w_sub[2] != dfinfo->w_sub[2] ||
+      sfinfo->h_sub[2] != dfinfo->h_sub[2] ||
+      in_info->chroma_site != out_info->chroma_site) {
+    convert->upsample = gst_video_chroma_resample_new (0,
+        in_info->chroma_site, 0, sfinfo->unpack_format, sfinfo->w_sub[2],
+        sfinfo->h_sub[2]);
+
+
+    convert->downsample = gst_video_chroma_resample_new (0,
+        out_info->chroma_site, 0, dfinfo->unpack_format, -dfinfo->w_sub[2],
+        -dfinfo->h_sub[2]);
+
+  } else {
+    convert->upsample = NULL;
+    convert->downsample = NULL;
+  }
+
+  if (convert->upsample) {
+    gst_video_chroma_resample_get_info (convert->upsample,
+        &convert->up_n_lines, &convert->up_offset);
+  } else {
+    convert->up_n_lines = 1;
+    convert->up_offset = 0;
+  }
+  if (convert->downsample) {
+    gst_video_chroma_resample_get_info (convert->downsample,
+        &convert->down_n_lines, &convert->down_offset);
+  } else {
+    convert->down_n_lines = 1;
+    convert->down_offset = 0;
+  }
+  GST_DEBUG ("upsample: %p, site: %d, offset %d, n_lines %d", convert->upsample,
+      in_info->chroma_site, convert->up_offset, convert->up_n_lines);
+  GST_DEBUG ("downsample: %p, site: %d, offset %d, n_lines %d",
+      convert->downsample, out_info->chroma_site, convert->down_offset,
+      convert->down_n_lines);
+
+  alloc_tmplines (convert, convert->down_n_lines + convert->up_n_lines, width);
+
+  return TRUE;
+}
+
+#define TO_16(x) (((x)<<8) | (x))
+
+static void
+convert_to16 (gpointer line, gint width)
+{
+  guint8 *line8 = line;
+  guint16 *line16 = line;
+  gint i;
+
+  for (i = (width - 1) * 4; i >= 0; i--)
+    line16[i] = TO_16 (line8[i]);
+}
+
+static void
+convert_to8 (gpointer line, gint width)
+{
+  guint8 *line8 = line;
+  guint16 *line16 = line;
+  gint i;
+
+  for (i = 0; i < width * 4; i++)
+    line8[i] = line16[i] >> 8;
+}
+
+#define UNPACK_FRAME(frame,dest,line,width)          \
+  frame->info.finfo->unpack_func (frame->info.finfo, \
+      (GST_VIDEO_FRAME_IS_INTERLACED (frame) ?       \
+        GST_VIDEO_PACK_FLAG_INTERLACED :             \
+        GST_VIDEO_PACK_FLAG_NONE),                   \
+      dest, frame->data, frame->info.stride, 0,      \
+      line, width)
+#define PACK_FRAME(frame,dest,line,width)            \
+  frame->info.finfo->pack_func (frame->info.finfo,   \
+      (GST_VIDEO_FRAME_IS_INTERLACED (frame) ?       \
+        GST_VIDEO_PACK_FLAG_INTERLACED :             \
+        GST_VIDEO_PACK_FLAG_NONE),                   \
+      dest, 0, frame->data, frame->info.stride,      \
+      frame->info.chroma_site, line, width);
+
+static void
+videoconvert_convert_generic (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int j, k;
+  gint width, height, lines, max_lines;
+  guint in_bits, out_bits;
+  gconstpointer pal;
+  gsize palsize;
+  guint up_n_lines, down_n_lines;
+  gint up_offset, down_offset;
+  gint in_lines, out_lines;
+  gint up_line, down_line;
+  gint start_offset, stop_offset;
+  gpointer in_tmplines[8];
+  gpointer out_tmplines[8];
+
+  height = convert->height;
+  width = convert->width;
+
+  in_bits = convert->in_bits;
+  out_bits = convert->out_bits;
+
+  lines = convert->lines;
+  up_n_lines = convert->up_n_lines;
+  up_offset = convert->up_offset;
+  down_n_lines = convert->down_n_lines;
+  down_offset = convert->down_offset;
+  max_lines = convert->n_tmplines;
+
+  in_lines = 0;
+  out_lines = 0;
+
+  GST_DEBUG ("up_offset %d, up_n_lines %u", up_offset, up_n_lines);
+
+  start_offset = MIN (up_offset, down_offset);
+  stop_offset = height + start_offset + MAX (up_n_lines, down_n_lines);
+
+  for (; start_offset < stop_offset; start_offset++) {
+    guint idx, start;
+
+    idx = CLAMP (start_offset, 0, height);
+    in_tmplines[in_lines] = convert->tmplines[idx % max_lines];
+    out_tmplines[out_lines] = in_tmplines[in_lines];
+    GST_DEBUG ("start_offset %d/%d, %d, idx %u, in %d, out %d", start_offset,
+        stop_offset, up_offset, idx, in_lines, out_lines);
+
+    up_line = up_offset + in_lines;
+
+    /* extract the next line */
+    if (up_line >= 0 && up_line < height) {
+      GST_DEBUG ("unpack line %d into %d", up_line, in_lines);
+      UNPACK_FRAME (src, in_tmplines[in_lines], up_line, width);
+    }
+
+    if (start_offset >= up_offset)
+      in_lines++;
+
+    if (start_offset >= down_offset)
+      out_lines++;
+
+    if (in_lines < up_n_lines)
+      continue;
+
+    in_lines = 0;
+
+    /* we have enough lines to upsample */
+    if (convert->upsample) {
+      GST_DEBUG ("doing upsample");
+      gst_video_chroma_resample (convert->upsample, in_tmplines, width);
+    }
+
+    /* convert upsampled lines */
+    for (k = 0; k < up_n_lines; k++) {
+      down_line = up_offset + k;
+
+      /* only takes lines with valid output */
+      if (down_line < 0 || down_line >= height)
+        continue;
+
+      GST_DEBUG ("handle line %d, %d/%d, down_line %d", k, out_lines,
+          down_n_lines, down_line);
+
+      if (out_bits == 16 || in_bits == 16) {
+        /* FIXME, we can scale in the conversion matrix */
+        if (in_bits == 8)
+          convert_to16 (in_tmplines[k], width);
+
+        if (convert->matrix)
+          convert->matrix (convert, in_tmplines[k]);
+        if (convert->dither16)
+          convert->dither16 (convert, in_tmplines[k], down_line);
+
+        if (out_bits == 8)
+          convert_to8 (in_tmplines[k], width);
+      } else {
+        if (convert->matrix)
+          convert->matrix (convert, in_tmplines[k]);
+      }
+    }
+
+    start = 0;
+    while (out_lines >= down_n_lines) {
+      if (convert->downsample) {
+        GST_DEBUG ("doing downsample %u", start);
+        gst_video_chroma_resample (convert->downsample,
+            &out_tmplines[start], width);
+      }
+
+      for (j = 0; j < down_n_lines; j += lines) {
+        idx = down_offset + j;
+
+        if (idx < height) {
+          GST_DEBUG ("packing line %d %d %d", j + start, down_offset, idx);
+          /* FIXME, not correct if lines > 1 */
+          PACK_FRAME (dest, out_tmplines[j + start], idx, width);
+        }
+      }
+      down_offset += down_n_lines;
+      start += down_n_lines;
+      out_lines -= down_n_lines;
+    }
+    /* we didn't process these lines, move them up for the next round */
+    for (j = 0; j < out_lines; j++) {
+      GST_DEBUG ("move line %d->%d", j + start, j);
+      out_tmplines[j] = out_tmplines[j + start];
+    }
+
+    up_offset += up_n_lines;
+  }
+  if ((pal =
+          gst_video_format_get_palette (GST_VIDEO_FRAME_FORMAT (dest),
+              &palsize))) {
+    memcpy (GST_VIDEO_FRAME_PLANE_DATA (dest, 1), pal, palsize);
+  }
+}
+
+#define FRAME_GET_PLANE_STRIDE(frame, plane) \
+  GST_VIDEO_FRAME_PLANE_STRIDE (frame, plane)
+#define FRAME_GET_PLANE_LINE(frame, plane, line) \
+  (gpointer)(((guint8*)(GST_VIDEO_FRAME_PLANE_DATA (frame, plane))) + \
+      FRAME_GET_PLANE_STRIDE (frame, plane) * (line))
+
+#define FRAME_GET_COMP_STRIDE(frame, comp) \
+  GST_VIDEO_FRAME_COMP_STRIDE (frame, comp)
+#define FRAME_GET_COMP_LINE(frame, comp, line) \
+  (gpointer)(((guint8*)(GST_VIDEO_FRAME_COMP_DATA (frame, comp))) + \
+      FRAME_GET_COMP_STRIDE (frame, comp) * (line))
+
+#define FRAME_GET_STRIDE(frame)      FRAME_GET_PLANE_STRIDE (frame, 0)
+#define FRAME_GET_LINE(frame,line)   FRAME_GET_PLANE_LINE (frame, 0, line)
+
+#define FRAME_GET_Y_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_Y, line)
+#define FRAME_GET_U_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_U, line)
+#define FRAME_GET_V_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_V, line)
+#define FRAME_GET_A_LINE(frame,line) FRAME_GET_COMP_LINE(frame, GST_VIDEO_COMP_A, line)
+
+#define FRAME_GET_Y_STRIDE(frame)    FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_Y)
+#define FRAME_GET_U_STRIDE(frame)    FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_U)
+#define FRAME_GET_V_STRIDE(frame)    FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_V)
+#define FRAME_GET_A_STRIDE(frame)    FRAME_GET_COMP_STRIDE(frame, GST_VIDEO_COMP_A)
+
+/* Fast paths */
+
+#define GET_LINE_OFFSETS(interlaced,line,l1,l2) \
+    if (interlaced) {                           \
+      l1 = (line & 2 ? line - 1 : line);        \
+      l2 = l1 + 2;                              \
+    } else {                                    \
+      l1 = line;                                \
+      l2 = l1 + 1;                              \
+    }
+
+
+static void
+convert_I420_YUY2 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+  gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+  gint l1, l2;
+
+  for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+    GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+    video_convert_orc_convert_I420_YUY2 (FRAME_GET_LINE (dest, l1),
+        FRAME_GET_LINE (dest, l2),
+        FRAME_GET_Y_LINE (src, l1),
+        FRAME_GET_Y_LINE (src, l2),
+        FRAME_GET_U_LINE (src, i >> 1),
+        FRAME_GET_V_LINE (src, i >> 1), (width + 1) / 2);
+  }
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_I420_UYVY (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+  gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+  gint l1, l2;
+
+  for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+    GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+    video_convert_orc_convert_I420_UYVY (FRAME_GET_LINE (dest, l1),
+        FRAME_GET_LINE (dest, l2),
+        FRAME_GET_Y_LINE (src, l1),
+        FRAME_GET_Y_LINE (src, l2),
+        FRAME_GET_U_LINE (src, i >> 1),
+        FRAME_GET_V_LINE (src, i >> 1), (width + 1) / 2);
+  }
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_I420_AYUV (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+  gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+  gint l1, l2;
+
+  for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+    GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+    video_convert_orc_convert_I420_AYUV (FRAME_GET_LINE (dest, l1),
+        FRAME_GET_LINE (dest, l2),
+        FRAME_GET_Y_LINE (src, l1),
+        FRAME_GET_Y_LINE (src, l2),
+        FRAME_GET_U_LINE (src, i >> 1), FRAME_GET_V_LINE (src, i >> 1), width);
+  }
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_I420_Y42B (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_420_422 (FRAME_GET_U_LINE (dest, 0),
+      2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (dest, 1),
+      2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2);
+
+  video_convert_orc_planar_chroma_420_422 (FRAME_GET_V_LINE (dest, 0),
+      2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (dest, 1),
+      2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2);
+}
+
+static void
+convert_I420_Y444 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_420_444 (FRAME_GET_U_LINE (dest, 0),
+      2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (dest, 1),
+      2 * FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2);
+
+  video_convert_orc_planar_chroma_420_444 (FRAME_GET_V_LINE (dest, 0),
+      2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (dest, 1),
+      2 * FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2);
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_YUY2_I420 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+  gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+  gint l1, l2;
+
+  for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+    GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+    video_convert_orc_convert_YUY2_I420 (FRAME_GET_Y_LINE (dest, l1),
+        FRAME_GET_Y_LINE (dest, l2),
+        FRAME_GET_U_LINE (dest, i >> 1),
+        FRAME_GET_V_LINE (dest, i >> 1),
+        FRAME_GET_LINE (src, l1), FRAME_GET_LINE (src, l2), (width + 1) / 2);
+  }
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_YUY2_AYUV (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_YUY2_AYUV (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_YUY2_Y42B (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_YUY2_Y42B (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_YUY2_Y444 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_YUY2_Y444 (FRAME_GET_COMP_LINE (dest, 0, 0),
+      FRAME_GET_COMP_STRIDE (dest, 0), FRAME_GET_COMP_LINE (dest, 1, 0),
+      FRAME_GET_COMP_STRIDE (dest, 1), FRAME_GET_COMP_LINE (dest, 2, 0),
+      FRAME_GET_COMP_STRIDE (dest, 2), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+
+static void
+convert_UYVY_I420 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+  gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
+  gint l1, l2;
+
+  for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
+    GET_LINE_OFFSETS (interlaced, i, l1, l2);
+
+    video_convert_orc_convert_UYVY_I420 (FRAME_GET_COMP_LINE (dest, 0, l1),
+        FRAME_GET_COMP_LINE (dest, 0, l2),
+        FRAME_GET_COMP_LINE (dest, 1, i >> 1),
+        FRAME_GET_COMP_LINE (dest, 2, i >> 1),
+        FRAME_GET_LINE (src, l1), FRAME_GET_LINE (src, l2), (width + 1) / 2);
+  }
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_UYVY_AYUV (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_UYVY_AYUV (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_UYVY_YUY2 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_UYVY_YUY2 (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_UYVY_Y42B (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_UYVY_Y42B (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_UYVY_Y444 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_UYVY_Y444 (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_AYUV_I420 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  /* only for even width/height */
+  video_convert_orc_convert_AYUV_I420 (FRAME_GET_Y_LINE (dest, 0),
+      2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (dest, 1),
+      2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      2 * FRAME_GET_STRIDE (src), FRAME_GET_LINE (src, 1),
+      2 * FRAME_GET_STRIDE (src), width / 2, height / 2);
+}
+
+static void
+convert_AYUV_YUY2 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  /* only for even width */
+  video_convert_orc_convert_AYUV_YUY2 (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_AYUV_UYVY (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  /* only for even width */
+  video_convert_orc_convert_AYUV_UYVY (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_AYUV_Y42B (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  /* only works for even width */
+  video_convert_orc_convert_AYUV_Y42B (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_AYUV_Y444 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_AYUV_Y444 (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), width, height);
+}
+
+static void
+convert_Y42B_I420 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_422_420 (FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      2 * FRAME_GET_U_STRIDE (src), FRAME_GET_U_LINE (src, 1),
+      2 * FRAME_GET_U_STRIDE (src), (width + 1) / 2, height / 2);
+
+  video_convert_orc_planar_chroma_422_420 (FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      2 * FRAME_GET_V_STRIDE (src), FRAME_GET_V_LINE (src, 1),
+      2 * FRAME_GET_V_STRIDE (src), (width + 1) / 2, height / 2);
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_Y42B_Y444 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_422_444 (FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), (width + 1) / 2, height);
+
+  video_convert_orc_planar_chroma_422_444 (FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_Y42B_YUY2 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_Y42B_YUY2 (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_Y42B_UYVY (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_Y42B_UYVY (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), (width + 1) / 2, height);
+}
+
+static void
+convert_Y42B_AYUV (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  /* only for even width */
+  video_convert_orc_convert_Y42B_AYUV (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_Y444_I420 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_444_420 (FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      2 * FRAME_GET_U_STRIDE (src), FRAME_GET_U_LINE (src, 1),
+      2 * FRAME_GET_U_STRIDE (src), width / 2, height / 2);
+
+  video_convert_orc_planar_chroma_444_420 (FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      2 * FRAME_GET_V_STRIDE (src), FRAME_GET_V_LINE (src, 1),
+      2 * FRAME_GET_V_STRIDE (src), width / 2, height / 2);
+
+  /* now handle last line */
+  if (height & 1) {
+    UNPACK_FRAME (src, convert->tmplines[0], height - 1, width);
+    PACK_FRAME (dest, convert->tmplines[0], height - 1, width);
+  }
+}
+
+static void
+convert_Y444_Y42B (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_memcpy_2d (FRAME_GET_Y_LINE (dest, 0),
+      FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), width, height);
+
+  video_convert_orc_planar_chroma_444_422 (FRAME_GET_U_LINE (dest, 0),
+      FRAME_GET_U_STRIDE (dest), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), width / 2, height);
+
+  video_convert_orc_planar_chroma_444_422 (FRAME_GET_V_LINE (dest, 0),
+      FRAME_GET_V_STRIDE (dest), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_Y444_YUY2 (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_Y444_YUY2 (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_Y444_UYVY (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_Y444_UYVY (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), width / 2, height);
+}
+
+static void
+convert_Y444_AYUV (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_Y444_AYUV (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
+      FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
+      FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
+      FRAME_GET_V_STRIDE (src), width, height);
+}
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+static void
+convert_AYUV_ARGB (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_AYUV_ARGB (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2],
+      convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2],
+      width, height);
+}
+
+static void
+convert_AYUV_BGRA (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_AYUV_BGRA (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2],
+      convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2],
+      width, height);
+}
+
+static void
+convert_AYUV_ABGR (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_AYUV_ABGR (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2],
+      convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2],
+      width, height);
+}
+
+static void
+convert_AYUV_RGBA (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  gint width = convert->width;
+  gint height = convert->height;
+
+  video_convert_orc_convert_AYUV_RGBA (FRAME_GET_LINE (dest, 0),
+      FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0),
+      FRAME_GET_STRIDE (src), convert->cmatrix[0][0], convert->cmatrix[0][2],
+      convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2],
+      width, height);
+}
+
+static void
+convert_I420_BGRA (VideoConvert * convert, GstVideoFrame * dest,
+    const GstVideoFrame * src)
+{
+  int i;
+  gint width = convert->width;
+  gint height = convert->height;
+
+  for (i = 0; i < height; i++) {
+    video_convert_orc_convert_I420_BGRA (FRAME_GET_LINE (dest, i),
+        FRAME_GET_Y_LINE (src, i),
+        FRAME_GET_U_LINE (src, i >> 1), FRAME_GET_V_LINE (src, i >> 1),
+        convert->cmatrix[0][0], convert->cmatrix[0][2],
+        convert->cmatrix[2][1], convert->cmatrix[1][1], convert->cmatrix[1][2],
+        width);
+  }
+}
+#endif
+
+
+
+/* Fast paths */
+
+typedef struct
+{
+  GstVideoFormat in_format;
+  GstVideoColorMatrix in_matrix;
+  GstVideoFormat out_format;
+  GstVideoColorMatrix out_matrix;
+  gboolean keeps_color_matrix;
+  gboolean keeps_interlaced;
+  gboolean needs_color_matrix;
+  gint width_align, height_align;
+  void (*convert) (VideoConvert * convert, GstVideoFrame * dest,
+      const GstVideoFrame * src);
+} VideoTransform;
+
+static const VideoTransform transforms[] = {
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_YUY2},
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_UYVY},
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_AYUV},
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_I420_Y42B},
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_I420_Y444},
+
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_YUY2},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_UYVY},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_I420_AYUV},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_I420_Y42B},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_I420_Y444},
+
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_YUY2_I420},
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_YUY2_I420},
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+      GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0, convert_UYVY_YUY2},      /* alias */
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_YUY2_AYUV},
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_YUY2_Y42B},
+  {GST_VIDEO_FORMAT_YUY2, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_YUY2_Y444},
+
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_I420},
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_I420},
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_YUY2},
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_AYUV},
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_Y42B},
+  {GST_VIDEO_FORMAT_UYVY, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_UYVY_Y444},
+
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 1,
+      convert_AYUV_I420},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 1,
+      convert_AYUV_I420},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_AYUV_YUY2},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_AYUV_UYVY},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_AYUV_Y42B},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_AYUV_Y444},
+
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_Y42B_I420},
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 0, 0,
+      convert_Y42B_I420},
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_Y42B_YUY2},
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_Y42B_UYVY},
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_Y42B_AYUV},
+  {GST_VIDEO_FORMAT_Y42B, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y444,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_Y42B_Y444},
+
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_I420,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 0,
+      convert_Y444_I420},
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YV12,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, FALSE, 1, 0,
+      convert_Y444_I420},
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_YUY2,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_Y444_YUY2},
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_UYVY,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_Y444_UYVY},
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_AYUV,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 0, 0,
+      convert_Y444_AYUV},
+  {GST_VIDEO_FORMAT_Y444, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_Y42B,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, FALSE, 1, 0,
+      convert_Y444_Y42B},
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_ARGB,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0,
+      convert_AYUV_ARGB},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0,
+      convert_AYUV_BGRA},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_xRGB,
+      GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_ARGB},       /* alias */
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx,
+      GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_BGRA},       /* alias */
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_ABGR,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0,
+      convert_AYUV_ABGR},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_RGBA,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0,
+      convert_AYUV_RGBA},
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_xBGR,
+      GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_ABGR},       /* alias */
+  {GST_VIDEO_FORMAT_AYUV, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_RGBx,
+      GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, TRUE, TRUE, 0, 0, convert_AYUV_RGBA},       /* alias */
+
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0,
+      convert_I420_BGRA},
+  {GST_VIDEO_FORMAT_I420, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0,
+      convert_I420_BGRA},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRA,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0,
+      convert_I420_BGRA},
+  {GST_VIDEO_FORMAT_YV12, GST_VIDEO_COLOR_MATRIX_UNKNOWN, GST_VIDEO_FORMAT_BGRx,
+        GST_VIDEO_COLOR_MATRIX_UNKNOWN, TRUE, FALSE, TRUE, 0, 0,
+      convert_I420_BGRA},
+#endif
+};
+
+static gboolean
+videoconvert_convert_lookup_fastpath (VideoConvert * convert)
+{
+  int i;
+  GstVideoFormat in_format, out_format;
+  GstVideoColorMatrix in_matrix, out_matrix;
+  gboolean interlaced;
+  gint width, height;
+
+  in_format = GST_VIDEO_INFO_FORMAT (&convert->in_info);
+  out_format = GST_VIDEO_INFO_FORMAT (&convert->out_info);
+
+  width = GST_VIDEO_INFO_WIDTH (&convert->in_info);
+  height = GST_VIDEO_INFO_HEIGHT (&convert->in_info);
+
+  in_matrix = convert->in_info.colorimetry.matrix;
+  out_matrix = convert->out_info.colorimetry.matrix;
+
+  interlaced = GST_VIDEO_INFO_IS_INTERLACED (&convert->in_info);
+  interlaced |= GST_VIDEO_INFO_IS_INTERLACED (&convert->out_info);
+
+  for (i = 0; i < sizeof (transforms) / sizeof (transforms[0]); i++) {
+    if (transforms[i].in_format == in_format &&
+        transforms[i].out_format == out_format &&
+        (transforms[i].keeps_color_matrix ||
+            (transforms[i].in_matrix == in_matrix &&
+                transforms[i].out_matrix == out_matrix)) &&
+        (transforms[i].keeps_interlaced || !interlaced) &&
+        (transforms[i].width_align & width) == 0 &&
+        (transforms[i].height_align & height) == 0) {
+      GST_DEBUG ("using fastpath");
+      if (transforms[i].needs_color_matrix)
+        if (!videoconvert_convert_compute_matrix (convert))
+          goto no_convert;
+      convert->convert = transforms[i].convert;
+      alloc_tmplines (convert, 1, GST_VIDEO_INFO_WIDTH (&convert->in_info));
+      return TRUE;
+    }
+  }
+  GST_DEBUG ("no fastpath found");
+  return FALSE;
+
+no_convert:
+  {
+    GST_DEBUG ("can't create matrix");
+    return FALSE;
+  }
+}
diff --git a/gst-libs/gst/video/videoconvert.h b/gst-libs/gst/video/videoconvert.h
new file mode 100644
index 0000000..dc809ef
--- /dev/null
+++ b/gst-libs/gst/video/videoconvert.h
@@ -0,0 +1,80 @@
+/* Video conversion functions
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef __COLORSPACE_H__
+#define __COLORSPACE_H__
+
+typedef struct _VideoConvert VideoConvert;
+
+#include <gst/video/video.h>
+#include "gstcms.h"
+
+G_BEGIN_DECLS
+
+typedef enum {
+  DITHER_NONE,
+  DITHER_VERTERR,
+  DITHER_HALFTONE
+} ColorSpaceDitherMethod;
+
+struct _VideoConvert {
+  GstVideoInfo in_info;
+  GstVideoInfo out_info;
+
+  gint width;
+  gint height;
+
+  gint in_bits;
+  gint out_bits;
+  gint cmatrix[4][4];
+
+  ColorSpaceDitherMethod dither;
+
+  guint lines;
+
+  guint n_tmplines;
+  gpointer *tmplines;
+  guint16 *errline;
+
+  GstVideoChromaResample *upsample;
+  guint up_n_lines;
+  gint up_offset;
+  GstVideoChromaResample *downsample;
+  guint down_n_lines;
+  gint down_offset;
+
+  void (*convert)      (VideoConvert *convert, GstVideoFrame *dest, const GstVideoFrame *src);
+  void (*matrix)       (VideoConvert *convert, gpointer pixels);
+  void (*dither16)     (VideoConvert *convert, guint16 * pixels, int j);
+
+};
+
+VideoConvert *   videoconvert_convert_new            (GstVideoInfo *in_info,
+                                                      GstVideoInfo *out_info);
+void             videoconvert_convert_free           (VideoConvert * convert);
+
+void             videoconvert_convert_set_dither     (VideoConvert * convert, int type);
+
+void             videoconvert_convert_convert        (VideoConvert * convert,
+                                                      GstVideoFrame *dest, const GstVideoFrame *src);
+
+
+G_END_DECLS
+
+#endif /* __GST_COLORSPACE_H__ */
diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am
new file mode 100644
index 0000000..e3e7571
--- /dev/null
+++ b/gst-libs/gst/wayland/Makefile.am
@@ -0,0 +1,91 @@
+lib_LTLIBRARIES = libgstwayland-@GST_API_VERSION@.la
+
+libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c
+
+libgstwayland_@GST_API_VERSION@includedir = \
+	$(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland
+
+libgstwayland_@GST_API_VERSION@include_HEADERS = wayland.h
+
+libgstwayland_@GST_API_VERSION@_la_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(WAYLAND_CFLAGS)
+
+libgstwayland_@GST_API_VERSION@_la_LIBADD = \
+	$(GST_LIBS) \
+	$(WAYLAND_LIBS) \
+	-lgstvideo-$(GST_API_VERSION)
+
+libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \
+	$(GST_LIB_LDFLAGS) \
+	$(GST_ALL_LDFLAGS) \
+	$(GST_LT_LDFLAGS)
+
+
+if HAVE_INTROSPECTION
+BUILT_GIRSOURCES = GstWayland-@GST_API_VERSION@.gir
+
+gir_headers=$(patsubst %,$(srcdir)/%, $(libgstwayland_@GST_API_VERSION@include_HEADERS))
+gir_headers+=$(patsubst %,$(builddir)/%, $(built_headers))
+gir_sources=$(patsubst %,$(srcdir)/%, $(libgstwayland_@GST_API_VERSION@_la_SOURCES))
+gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
+
+GstWayland-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstwayland-@GST_API_VERSION@.la
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
+		$(INTROSPECTION_SCANNER) -v --namespace GstWayland \
+		--nsversion=@GST_API_VERSION@ \
+		--strip-prefix=Gst \
+		--warn-all \
+		--c-include "gst/wayland/wayland.h" \
+		-I$(top_srcdir)/gst-libs \
+		-I$(top_builddir)/gst-libs \
+		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+		--library=libgstwayland-@GST_API_VERSION@.la \
+		--include=Gst-@GST_API_VERSION@ \
+		--libtool="$(top_builddir)/libtool" \
+		--pkg gstreamer-@GST_API_VERSION@ \
+		--pkg-export gstreamer-wayland-@GST_API_VERSION@ \
+		--add-init-section="gst_init(NULL,NULL);" \
+		-DGST_USE_UNSTABLE_API \
+		--output $@ \
+		$(gir_headers) \
+		$(gir_sources)
+
+# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
+# install anything - we need to install inside our prefix.
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(BUILT_GIRSOURCES)
+
+typelibsdir = $(libdir)/girepository-1.0/
+
+typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+
+%.typelib: %.gir $(INTROSPECTION_COMPILER)
+	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+		$(INTROSPECTION_COMPILER) \
+		--includedir=$(srcdir) \
+		--includedir=$(builddir) \
+		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+endif
+
+Android.mk:  $(BUILT_SOURCES) Makefile.am
+	androgenizer -:PROJECT libgstwayland -:STATIC libgstwayland-@GST_API_VERSION@ \
+	 -:TAGS eng debug \
+         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+	 -:SOURCES $(libgstwayland_@GST_API_VERSION@_la_SOURCES) \
+         $(built_sources) \
+	 -:CFLAGS $(DEFS) $(libgstwayland_@GST_API_VERSION@_la_CFLAGS) \
+	 -:LDFLAGS $(libgstwayland_@GST_API_VERSION@_la_LDFLAGS) \
+	           $(libgstwayland@GST_API_VERSION@_la_LIBADD) \
+	           -ldl \
+	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/wayland \
+	 -:HEADERS $(libgstwaylandinclude_HEADERS) \
+         $(built_headers) \
+	 -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+	> $@
diff --git a/gst-libs/gst/wayland/Makefile.in b/gst-libs/gst/wayland/Makefile.in
new file mode 100644
index 0000000..e5a4e44
--- /dev/null
+++ b/gst-libs/gst/wayland/Makefile.in
@@ -0,0 +1,1155 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = gst-libs/gst/wayland
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/depcomp \
+	$(libgstwayland_@GST_API_VERSION@include_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+	$(top_srcdir)/common/m4/as-auto-alt.m4 \
+	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
+	$(top_srcdir)/common/m4/as-libtool.m4 \
+	$(top_srcdir)/common/m4/as-version.m4 \
+	$(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+	$(top_srcdir)/common/m4/gst-arch.m4 \
+	$(top_srcdir)/common/m4/gst-args.m4 \
+	$(top_srcdir)/common/m4/gst-check.m4 \
+	$(top_srcdir)/common/m4/gst-default.m4 \
+	$(top_srcdir)/common/m4/gst-dowhile.m4 \
+	$(top_srcdir)/common/m4/gst-error.m4 \
+	$(top_srcdir)/common/m4/gst-feature.m4 \
+	$(top_srcdir)/common/m4/gst-gettext.m4 \
+	$(top_srcdir)/common/m4/gst-glib2.m4 \
+	$(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+	$(top_srcdir)/common/m4/gst-platform.m4 \
+	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+	$(top_srcdir)/common/m4/gst-plugindir.m4 \
+	$(top_srcdir)/common/m4/gst-x11.m4 \
+	$(top_srcdir)/common/m4/gst.m4 \
+	$(top_srcdir)/common/m4/gtk-doc.m4 \
+	$(top_srcdir)/common/m4/introspection.m4 \
+	$(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \
+	$(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libgcrypt.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
+	"$(DESTDIR)$(typelibsdir)" \
+	"$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libgstwayland_@GST_API_VERSION@_la_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstwayland_@GST_API_VERSION@_la_OBJECTS =  \
+	libgstwayland_@GST_API_VERSION@_la-wayland.lo
+libgstwayland_@GST_API_VERSION@_la_OBJECTS =  \
+	$(am_libgstwayland_@GST_API_VERSION@_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libgstwayland_@GST_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
+	--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CCLD) $(libgstwayland_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) \
+	$(libgstwayland_@GST_API_VERSION@_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libgstwayland_@GST_API_VERSION@_la_SOURCES)
+DIST_SOURCES = $(libgstwayland_@GST_API_VERSION@_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+DATA = $(gir_DATA) $(typelibs_DATA)
+HEADERS = $(libgstwayland_@GST_API_VERSION@include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ACMENC_CFLAGS = @ACMENC_CFLAGS@
+ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APEXSINK_CFLAGS = @APEXSINK_CFLAGS@
+APEXSINK_LIBS = @APEXSINK_LIBS@
+AR = @AR@
+AS = @AS@
+ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@
+ASSRENDER_LIBS = @ASSRENDER_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
+BZ2_LIBS = @BZ2_LIBS@
+CC = @CC@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@
+CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@
+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@
+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@
+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@
+CLUTTER_LIBS = @CLUTTER_LIBS@
+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@
+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DAALA_CFLAGS = @DAALA_CFLAGS@
+DAALA_LIBS = @DAALA_LIBS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DCCP_LIBS = @DCCP_LIBS@
+DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@
+DECKLINK_LIBS = @DECKLINK_LIBS@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECT3D_LIBS = @DIRECT3D_LIBS@
+DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@
+DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
+DIRECTFB_LIBS = @DIRECTFB_LIBS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DIRECTX_CFLAGS = @DIRECTX_CFLAGS@
+DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DTS_LIBS = @DTS_LIBS@
+DUMPBIN = @DUMPBIN@
+DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
+DVDNAV_LIBS = @DVDNAV_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@
+EXEEXT = @EXEEXT@
+EXIF_CFLAGS = @EXIF_CFLAGS@
+EXIF_LIBS = @EXIF_LIBS@
+FAAC_LIBS = @FAAC_LIBS@
+FAAD_IS_NEAAC = @FAAD_IS_NEAAC@
+FAAD_LIBS = @FAAD_LIBS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLITE_CFLAGS = @FLITE_CFLAGS@
+FLITE_LIBS = @FLITE_LIBS@
+FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@
+FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LDFLAGS = @GIO_LDFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GL_OBJCFLAGS = @GL_OBJCFLAGS@
+GME_LIBS = @GME_LIBS@
+GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@
+GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@
+GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
+GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GMYTH_CFLAGS = @GMYTH_CFLAGS@
+GMYTH_LIBS = @GMYTH_LIBS@
+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
+GREP = @GREP@
+GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
+GSETTINGS_LIBS = @GSETTINGS_LIBS@
+GSM_LIBS = @GSM_LIBS@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_AGE = @GST_AGE@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_API_VERSION = @GST_API_VERSION@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CURRENT = @GST_CURRENT@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LIBVERSION = @GST_LIBVERSION@
+GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_OBJCFLAGS = @GST_OBJCFLAGS@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@
+GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@
+GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@
+GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@
+GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@
+GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@
+GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@
+GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@
+GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@
+GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@
+GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_REVISION = @GST_REVISION@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@
+GST_VIDEO_LIBS = @GST_VIDEO_LIBS@
+GTK3_CFLAGS = @GTK3_CFLAGS@
+GTK3_LIBS = @GTK3_LIBS@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_BASE_DIR = @GTK_BASE_DIR@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+G_UDEV_CFLAGS = @G_UDEV_CFLAGS@
+G_UDEV_LIBS = @G_UDEV_LIBS@
+HAVE_CLUTTER = @HAVE_CLUTTER@
+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@
+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECT3D = @HAVE_DIRECT3D@
+HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_DTS = @HAVE_DTS@
+HAVE_EGL = @HAVE_EGL@
+HAVE_FAAC = @HAVE_FAAC@
+HAVE_FAAD = @HAVE_FAAD@
+HAVE_FLITE = @HAVE_FLITE@
+HAVE_GL = @HAVE_GL@
+HAVE_GLES2 = @HAVE_GLES2@
+HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
+HAVE_GSM = @HAVE_GSM@
+HAVE_GTK3 = @HAVE_GTK3@
+HAVE_JPEG = @HAVE_JPEG@
+HAVE_NAS = @HAVE_NAS@
+HAVE_OPENJPEG = @HAVE_OPENJPEG@
+HAVE_PNG = @HAVE_PNG@
+HAVE_SRTP = @HAVE_SRTP@
+HAVE_WASAPI = @HAVE_WASAPI@
+HAVE_WILDMIDI = @HAVE_WILDMIDI@
+HAVE_WINKS = @HAVE_WINKS@
+HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@
+HAVE_X = @HAVE_X@
+HAVE_X11 = @HAVE_X11@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+JPEG_LIBS = @JPEG_LIBS@
+KATE_CFLAGS = @KATE_CFLAGS@
+KATE_LIBS = @KATE_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
+LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDIR = @LIBDIR@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBMMS_CFLAGS = @LIBMMS_CFLAGS@
+LIBMMS_LIBS = @LIBMMS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
+LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
+LIBUSB_LIBS = @LIBUSB_LIBS@
+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@
+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LRDF_CFLAGS = @LRDF_CFLAGS@
+LRDF_LIBS = @LRDF_LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIMIC_CFLAGS = @MIMIC_CFLAGS@
+MIMIC_LIBS = @MIMIC_LIBS@
+MJPEG_CFLAGS = @MJPEG_CFLAGS@
+MJPEG_LIBS = @MJPEG_LIBS@
+MKDIR_P = @MKDIR_P@
+MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
+MODPLUG_LIBS = @MODPLUG_LIBS@
+MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
+MPEG2ENC_LIBS = @MPEG2ENC_LIBS@
+MPG123_CFLAGS = @MPG123_CFLAGS@
+MPG123_LIBS = @MPG123_LIBS@
+MPLEX_CFLAGS = @MPLEX_CFLAGS@
+MPLEX_LDFLAGS = @MPLEX_LDFLAGS@
+MPLEX_LIBS = @MPLEX_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+MUSEPACK_LIBS = @MUSEPACK_LIBS@
+NAS_CFLAGS = @NAS_CFLAGS@
+NAS_LIBS = @NAS_LIBS@
+NEON_CFLAGS = @NEON_CFLAGS@
+NEON_LIBS = @NEON_LIBS@
+NETTLE_CFLAGS = @NETTLE_CFLAGS@
+NETTLE_LIBS = @NETTLE_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OFA_CFLAGS = @OFA_CFLAGS@
+OFA_LIBS = @OFA_LIBS@
+OPENAL_CFLAGS = @OPENAL_CFLAGS@
+OPENAL_LIBS = @OPENAL_LIBS@
+OPENCV_CFLAGS = @OPENCV_CFLAGS@
+OPENCV_LIBS = @OPENCV_LIBS@
+OPENCV_PREFIX = @OPENCV_PREFIX@
+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
+OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
+OPENJPEG_LIBS = @OPENJPEG_LIBS@
+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
+OPENNI2_LIBS = @OPENNI2_LIBS@
+OPUS_CFLAGS = @OPUS_CFLAGS@
+OPUS_LIBS = @OPUS_LIBS@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PVR_CFLAGS = @PVR_CFLAGS@
+PVR_LIBS = @PVR_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
+RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
+RSVG_CFLAGS = @RSVG_CFLAGS@
+RSVG_LIBS = @RSVG_LIBS@
+RTMP_CFLAGS = @RTMP_CFLAGS@
+RTMP_LIBS = @RTMP_LIBS@
+SBC_CFLAGS = @SBC_CFLAGS@
+SBC_LIBS = @SBC_LIBS@
+SCHRO_CFLAGS = @SCHRO_CFLAGS@
+SCHRO_LIBS = @SCHRO_LIBS@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CLUTTER = @SDL_CLUTTER@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHM_LIBS = @SHM_LIBS@
+SLV2_CFLAGS = @SLV2_CFLAGS@
+SLV2_LIBS = @SLV2_LIBS@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+SNDIO_LIBS = @SNDIO_LIBS@
+SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@
+SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@
+SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
+SPANDSP_LIBS = @SPANDSP_LIBS@
+SPC_LIBS = @SPC_LIBS@
+SRTP_LIBS = @SRTP_LIBS@
+SSH2_CFLAGS = @SSH2_CFLAGS@
+SSH2_LIBS = @SSH2_LIBS@
+STRIP = @STRIP@
+TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@
+TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@
+TIGER_CFLAGS = @TIGER_CFLAGS@
+TIGER_LIBS = @TIGER_LIBS@
+TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
+TIMIDITY_LIBS = @TIMIDITY_LIBS@
+USE_GLES2 = @USE_GLES2@
+USE_NLS = @USE_NLS@
+USE_OPENGL = @USE_OPENGL@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VDPAU_CFLAGS = @VDPAU_CFLAGS@
+VDPAU_LIBS = @VDPAU_LIBS@
+VERSION = @VERSION@
+VOAACENC_CFLAGS = @VOAACENC_CFLAGS@
+VOAACENC_LIBS = @VOAACENC_LIBS@
+VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@
+VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@
+WASAPI_LIBS = @WASAPI_LIBS@
+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
+WAYLAND_LIBS = @WAYLAND_LIBS@
+WEBP_CFLAGS = @WEBP_CFLAGS@
+WEBP_LIBS = @WEBP_LIBS@
+WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@
+WILDMIDI_LIBS = @WILDMIDI_LIBS@
+WINKS_LIBS = @WINKS_LIBS@
+WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@
+WINSOCK2_LIBS = @WINSOCK2_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XVID_LIBS = @XVID_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZBAR_CFLAGS = @ZBAR_CFLAGS@
+ZBAR_LIBS = @ZBAR_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
+lib_LTLIBRARIES = libgstwayland-@GST_API_VERSION@.la
+libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c
+libgstwayland_@GST_API_VERSION@includedir = \
+	$(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland
+
+libgstwayland_@GST_API_VERSION@include_HEADERS = wayland.h
+libgstwayland_@GST_API_VERSION@_la_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) \
+	$(GST_PLUGINS_BASE_CFLAGS) \
+	$(GST_CFLAGS) \
+	$(WAYLAND_CFLAGS)
+
+libgstwayland_@GST_API_VERSION@_la_LIBADD = \
+	$(GST_LIBS) \
+	$(WAYLAND_LIBS) \
+	-lgstvideo-$(GST_API_VERSION)
+
+libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \
+	$(GST_LIB_LDFLAGS) \
+	$(GST_ALL_LDFLAGS) \
+	$(GST_LT_LDFLAGS)
+
+@HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstWayland-@GST_API_VERSION@.gir
+@HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \
+@HAVE_INTROSPECTION_TRUE@	$(libgstwayland_@GST_API_VERSION@include_HEADERS)) \
+@HAVE_INTROSPECTION_TRUE@	$(patsubst %,$(builddir)/%, \
+@HAVE_INTROSPECTION_TRUE@	$(built_headers))
+@HAVE_INTROSPECTION_TRUE@gir_sources = $(patsubst %,$(srcdir)/%, \
+@HAVE_INTROSPECTION_TRUE@	$(libgstwayland_@GST_API_VERSION@_la_SOURCES)) \
+@HAVE_INTROSPECTION_TRUE@	$(patsubst %,$(builddir)/%, \
+@HAVE_INTROSPECTION_TRUE@	$(built_sources))
+
+# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
+# install anything - we need to install inside our prefix.
+@HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0
+@HAVE_INTROSPECTION_TRUE@gir_DATA = $(BUILT_GIRSOURCES)
+@HAVE_INTROSPECTION_TRUE@typelibsdir = $(libdir)/girepository-1.0/
+@HAVE_INTROSPECTION_TRUE@typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@HAVE_INTROSPECTION_TRUE@CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst-libs/gst/wayland/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gst-libs/gst/wayland/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libgstwayland-@GST_API_VERSION@.la: $(libgstwayland_@GST_API_VERSION@_la_OBJECTS) $(libgstwayland_@GST_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libgstwayland_@GST_API_VERSION@_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstwayland_@GST_API_VERSION@_la_LINK) -rpath $(libdir) $(libgstwayland_@GST_API_VERSION@_la_OBJECTS) $(libgstwayland_@GST_API_VERSION@_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstwayland_@GST_API_VERSION@_la-wayland.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libgstwayland_@GST_API_VERSION@_la-wayland.lo: wayland.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwayland_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -MT libgstwayland_@GST_API_VERSION@_la-wayland.lo -MD -MP -MF $(DEPDIR)/libgstwayland_@GST_API_VERSION@_la-wayland.Tpo -c -o libgstwayland_@GST_API_VERSION@_la-wayland.lo `test -f 'wayland.c' || echo '$(srcdir)/'`wayland.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstwayland_@GST_API_VERSION@_la-wayland.Tpo $(DEPDIR)/libgstwayland_@GST_API_VERSION@_la-wayland.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wayland.c' object='libgstwayland_@GST_API_VERSION@_la-wayland.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstwayland_@GST_API_VERSION@_la_CFLAGS) $(CFLAGS) -c -o libgstwayland_@GST_API_VERSION@_la-wayland.lo `test -f 'wayland.c' || echo '$(srcdir)/'`wayland.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-girDATA: $(gir_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \
+	done
+
+uninstall-girDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
+install-typelibsDATA: $(typelibs_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(typelibsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(typelibsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibsdir)" || exit $$?; \
+	done
+
+uninstall-typelibsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(typelibsdir)'; $(am__uninstall_files_from_dir)
+install-libgstwayland_@GST_API_VERSION@includeHEADERS: $(libgstwayland_@GST_API_VERSION@include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(libgstwayland_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstwayland_@GST_API_VERSION@includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)" || exit $$?; \
+	done
+
+uninstall-libgstwayland_@GST_API_VERSION@includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgstwayland_@GST_API_VERSION@include_HEADERS)'; test -n "$(libgstwayland_@GST_API_VERSION@includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(libgstwayland_@GST_API_VERSION@includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-girDATA \
+	install-libgstwayland_@GST_API_VERSION@includeHEADERS \
+	install-typelibsDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
+	uninstall-libgstwayland_@GST_API_VERSION@includeHEADERS \
+	uninstall-typelibsDATA
+
+.MAKE: install-am install-strip
+
+.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-libgstwayland_@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-am uninstall uninstall-am uninstall-girDATA \
+	uninstall-libLTLIBRARIES \
+	uninstall-libgstwayland_@GST_API_VERSION@includeHEADERS \
+	uninstall-typelibsDATA
+
+
+@HAVE_INTROSPECTION_TRUE@GstWayland-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstwayland-@GST_API_VERSION@.la
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@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 GstWayland \
+@HAVE_INTROSPECTION_TRUE@		--nsversion=@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--strip-prefix=Gst \
+@HAVE_INTROSPECTION_TRUE@		--warn-all \
+@HAVE_INTROSPECTION_TRUE@		--c-include "gst/wayland/wayland.h" \
+@HAVE_INTROSPECTION_TRUE@		-I$(top_srcdir)/gst-libs \
+@HAVE_INTROSPECTION_TRUE@		-I$(top_builddir)/gst-libs \
+@HAVE_INTROSPECTION_TRUE@		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+@HAVE_INTROSPECTION_TRUE@		--library=libgstwayland-@GST_API_VERSION@.la \
+@HAVE_INTROSPECTION_TRUE@		--include=Gst-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--libtool="$(top_builddir)/libtool" \
+@HAVE_INTROSPECTION_TRUE@		--pkg gstreamer-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--pkg-export gstreamer-wayland-@GST_API_VERSION@ \
+@HAVE_INTROSPECTION_TRUE@		--add-init-section="gst_init(NULL,NULL);" \
+@HAVE_INTROSPECTION_TRUE@		-DGST_USE_UNSTABLE_API \
+@HAVE_INTROSPECTION_TRUE@		--output $@ \
+@HAVE_INTROSPECTION_TRUE@		$(gir_headers) \
+@HAVE_INTROSPECTION_TRUE@		$(gir_sources)
+
+@HAVE_INTROSPECTION_TRUE@%.typelib: %.gir $(INTROSPECTION_COMPILER)
+@HAVE_INTROSPECTION_TRUE@	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
+@HAVE_INTROSPECTION_TRUE@		$(INTROSPECTION_COMPILER) \
+@HAVE_INTROSPECTION_TRUE@		--includedir=$(srcdir) \
+@HAVE_INTROSPECTION_TRUE@		--includedir=$(builddir) \
+@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:  $(BUILT_SOURCES) Makefile.am
+	androgenizer -:PROJECT libgstwayland -:STATIC libgstwayland-@GST_API_VERSION@ \
+	 -:TAGS eng debug \
+         -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+	 -:SOURCES $(libgstwayland_@GST_API_VERSION@_la_SOURCES) \
+         $(built_sources) \
+	 -:CFLAGS $(DEFS) $(libgstwayland_@GST_API_VERSION@_la_CFLAGS) \
+	 -:LDFLAGS $(libgstwayland_@GST_API_VERSION@_la_LDFLAGS) \
+	           $(libgstwayland@GST_API_VERSION@_la_LIBADD) \
+	           -ldl \
+	 -:HEADER_TARGET gstreamer-@GST_API_VERSION@/gst/wayland \
+	 -:HEADERS $(libgstwaylandinclude_HEADERS) \
+         $(built_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/wayland/wayland.c b/gst-libs/gst/wayland/wayland.c
new file mode 100644
index 0000000..6e7fefa
--- /dev/null
+++ b/gst-libs/gst/wayland/wayland.c
@@ -0,0 +1,129 @@
+/*
+ * GStreamer Wayland Library
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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
+
+#include <gst/wayland/wayland.h>
+#include <gst/video/videooverlay.h>
+
+gboolean
+gst_is_wayland_display_handle_need_context_message (GstMessage * msg)
+{
+  const gchar *type = NULL;
+
+  g_return_val_if_fail (GST_IS_MESSAGE (msg), FALSE);
+
+  if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_NEED_CONTEXT &&
+      gst_message_parse_context_type (msg, &type)) {
+    return !g_strcmp0 (type, GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE);
+  }
+
+  return FALSE;
+}
+
+GstContext *
+gst_wayland_display_handle_context_new (struct wl_display * display)
+{
+  GstContext *context =
+      gst_context_new (GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE, TRUE);
+  gst_structure_set (gst_context_writable_structure (context),
+      "handle", G_TYPE_POINTER, display, NULL);
+  return context;
+}
+
+struct wl_display *
+gst_wayland_display_handle_context_get_handle (GstContext * context)
+{
+  const GstStructure *s;
+  struct wl_display *display;
+
+  g_return_val_if_fail (GST_IS_CONTEXT (context), NULL);
+
+  s = gst_context_get_structure (context);
+  gst_structure_get (s, "handle", G_TYPE_POINTER, &display, NULL);
+  return display;
+}
+
+
+G_DEFINE_INTERFACE (GstWaylandVideo, gst_wayland_video, GST_TYPE_VIDEO_OVERLAY);
+
+static void
+gst_wayland_video_default_init (GstWaylandVideoInterface * klass)
+{
+  (void) klass;
+}
+
+/**
+ * gst_wayland_video_begin_geometry_change:
+ *
+ * Notifies the video sink that we are about to change its
+ * geometry (probably using set_render_rectangle()). This is useful
+ * in order to allow the sink to synchronize resizing/moving of the
+ * video area with the parent surface and avoid glitches, in cases
+ * where the video area is being painted asynchronously from another
+ * thread, like in waylandsink.
+ *
+ * Please note that any calls to this method MUST be matched by
+ * calls to end_geometry_change() and AFTER the parent surface has
+ * commited its geometry changes.
+ */
+void
+gst_wayland_video_begin_geometry_change (GstWaylandVideo * video)
+{
+  GstWaylandVideoInterface *iface;
+
+  g_return_if_fail (video != NULL);
+  g_return_if_fail (GST_IS_WAYLAND_VIDEO (video));
+
+  iface = GST_WAYLAND_VIDEO_GET_INTERFACE (video);
+
+  if (iface->begin_geometry_change) {
+    iface->begin_geometry_change (video);
+  }
+}
+
+/**
+ * gst_wayland_video_end_geometry_change:
+ *
+ * Notifies the video sink that we just finished changing the
+ * geometry of both itself and its parent surface. This should
+ * have been earlier preceeded by a call to begin_geometry_change()
+ * which notified the sink before any of these changes had happened.
+ *
+ * It is important to call this method only AFTER the parent surface
+ * has commited its geometry changes, otherwise no synchronization
+ * is actually achieved.
+ */
+void
+gst_wayland_video_end_geometry_change (GstWaylandVideo * video)
+{
+  GstWaylandVideoInterface *iface;
+
+  g_return_if_fail (video != NULL);
+  g_return_if_fail (GST_IS_WAYLAND_VIDEO (video));
+
+  iface = GST_WAYLAND_VIDEO_GET_INTERFACE (video);
+
+  if (iface->end_geometry_change) {
+    iface->end_geometry_change (video);
+  }
+}
diff --git a/gst-libs/gst/wayland/wayland.h b/gst-libs/gst/wayland/wayland.h
new file mode 100644
index 0000000..ff4b2db
--- /dev/null
+++ b/gst-libs/gst/wayland/wayland.h
@@ -0,0 +1,85 @@
+/*
+ * GStreamer Wayland Library
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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.
+ */
+
+#ifndef __GST_WAYLAND_H__
+#define __GST_WAYLAND_H__
+
+#ifndef GST_USE_UNSTABLE_API
+#warning "The GStreamer wayland library is unstable API and may change in future."
+#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
+#include <gst/gst.h>
+#include <wayland-client.h>
+
+G_BEGIN_DECLS
+
+/* The type of GstContext used to pass the wl_display pointer
+ * from the application to the sink */
+#define GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE "GstWaylandDisplayHandleContextType"
+
+gboolean gst_is_wayland_display_handle_need_context_message (GstMessage * msg);
+GstContext *
+gst_wayland_display_handle_context_new (struct wl_display * display);
+struct wl_display *
+gst_wayland_display_handle_context_get_handle (GstContext * context);
+
+
+#define GST_TYPE_WAYLAND_VIDEO \
+    (gst_wayland_video_get_type ())
+#define GST_WAYLAND_VIDEO(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideo))
+#define GST_IS_WAYLAND_VIDEO(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WAYLAND_VIDEO))
+#define GST_WAYLAND_VIDEO_GET_INTERFACE(inst) \
+    (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideoInterface))
+
+/**
+ * GstWaylandVideo:
+ *
+ * Opaque #GstWaylandVideo interface structure
+ */
+typedef struct _GstWaylandVideo GstWaylandVideo;
+typedef struct _GstWaylandVideoInterface GstWaylandVideoInterface;
+
+
+/**
+ * GstWaylandVideoInterface:
+ * @iface: parent interface type.
+ *
+ * #GstWaylandVideo interface
+ */
+struct _GstWaylandVideoInterface {
+  GTypeInterface iface;
+
+  /* virtual functions */
+  void (*begin_geometry_change)    (GstWaylandVideo *video);
+  void (*end_geometry_change)     (GstWaylandVideo *video);
+};
+
+GType   gst_wayland_video_get_type (void);
+
+/* virtual function wrappers */
+void gst_wayland_video_begin_geometry_change (GstWaylandVideo * video);
+void gst_wayland_video_end_geometry_change (GstWaylandVideo * video);
+
+G_END_DECLS
+
+#endif /* __GST_WAYLAND_H__ */
diff --git a/gst-plugins-bad.doap b/gst-plugins-bad.doap
index 3a5b5a3..ab4afd4 100644
--- a/gst-plugins-bad.doap
+++ b/gst-plugins-bad.doap
@@ -35,6 +35,16 @@
 
 <release>
   <Version>
+   <revision>1.3.3</revision>
+   <branch>1.3</branch>
+   <name></name>
+   <created>2014-06-22</created>
+   <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.3.3.tar.xz" />
+  </Version>
+ </release>
+
+<release>
+  <Version>
    <revision>1.3.2</revision>
    <branch>1.3</branch>
    <name></name>
diff --git a/gst-plugins-bad.spec b/gst-plugins-bad.spec
index 51d3e41..9e72901 100644
--- a/gst-plugins-bad.spec
+++ b/gst-plugins-bad.spec
@@ -6,7 +6,7 @@
 
 Summary: GStreamer streaming media framework "bad" plug-ins
 Name: %{gstreamer}-plugins-bad
-Version: 1.3.2
+Version: 1.3.3
 Release: 1.gst
 # The freeze and nfs plugins are LGPLv2 (only)
 License: LGPLv2+ and LGPLv2
@@ -178,10 +178,8 @@
 %{_libdir}/gstreamer-%{majorminor}/libgstmpeg2enc.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmplex.so
 %{_libdir}/gstreamer-%{majorminor}/libgstfaac.so
-%{_libdir}/gstreamer-%{majorminor}/libgstmfc.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmpegpsmux.so
 %{_libdir}/gstreamer-%{majorminor}/libgstdecklink.so
-%{_libdir}/gstreamer-%{majorminor}/libgsteglglessink.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopenal.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopenjpeg.so
 %{_libdir}/gstreamer-%{majorminor}/libgstwaylandsink.so
@@ -276,11 +274,19 @@
 %{_libdir}/gstreamer-%{majorminor}/libgstfrei0r.so
 %{_libdir}/gstreamer-%{majorminor}/libgstaudiomixer.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopencv.so
+%{_libdir}/gstreamer-%{majorminor}/libgstivfparse.so
+%{_libdir}/gstreamer-%{majorminor}/libgstjp2kdecimator.so
+%{_libdir}/gstreamer-%{majorminor}/libgstopengl.so
+%{_libdir}/gstreamer-%{majorminor}/libgstsndfile.so
+%{_libdir}/gstreamer-%{majorminor}/libgststereo.so
+%{_libdir}/gstreamer-%{majorminor}/libgstvideosignal.so
+%{_libdir}/gstreamer-%{majorminor}/libgstvmnc.so
+%{_libdir}/gstreamer-%{majorminor}/libgstwebp.so
+
 %{_datadir}/gst-plugins-bad/1.0/opencv_haarcascades/fist.xml
 %{_datadir}/gst-plugins-bad/1.0/opencv_haarcascades/palm.xml
 
 %{_libdir}/libgstbasecamerabinsrc-*
-%{_libdir}/libgstegl-*
 %{_libdir}/libgstmpegts-*
 %{_libdir}/libgsturidownloader*
 
@@ -317,7 +323,6 @@
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstbasecamerasrc.h
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstcamerabin-enum.h
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstcamerabinpreview.h
-%{_includedir}/gstreamer-%{majorminor}/gst/egl/egl.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-atsc-section.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-dvb-descriptor.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-dvb-section.h
@@ -328,20 +333,55 @@
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gstfragment.h
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gsturidownloader.h
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gsturidownloader_debug.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/egl/gsteglimagememory.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/egl/gstgldisplay_egl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/all_functions.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/base.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/blending.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/eglimage.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/fbo.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/fixedfunction.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/gles.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/gstgl_compat.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/opengl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/shaders.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgl_fwd.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglapi.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglbufferpool.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglcolorconvert.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglconfig.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglcontext.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgldisplay.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgldownload.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgles2.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglfeature.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglfilter.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglframebuffer.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmemory.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmixer.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmixerpad.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglshader.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglshadervariables.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglupload.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgluploadmeta.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglutils.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglwindow.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/x11/gstgldisplay_x11.h
+%{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gstmpegts-enumtypes.h
+
+%{_libdir}/libgstgl-1.0.so*
 
 # pkg-config files
 %{_libdir}/pkgconfig/gstreamer-plugins-bad-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-codecparsers-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-insertbin-%{majorminor}.pc
-%{_libdir}/pkgconfig/gstreamer-egl-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-mpegts-%{majorminor}.pc
+%{_libdir}/pkgconfig//gstreamer-gl-1.0.pc
 
-
-%{_libdir}/girepository-%{majorminor}/GstEGL-1.0.typelib
 %{_libdir}/girepository-%{majorminor}/GstInsertBin-1.0.typelib
 %{_libdir}/girepository-%{majorminor}/GstMpegts-1.0.typelib
 
-%{_datadir}/gir-%{majorminor}/GstEGL-1.0.gir
 %{_datadir}/gir-%{majorminor}/GstInsertBin-1.0.gir
 %{_datadir}/gir-%{majorminor}/GstMpegts-1.0.gir
 
diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in
index 6ffedf3..c011bec 100644
--- a/gst-plugins-bad.spec.in
+++ b/gst-plugins-bad.spec.in
@@ -178,10 +178,8 @@
 %{_libdir}/gstreamer-%{majorminor}/libgstmpeg2enc.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmplex.so
 %{_libdir}/gstreamer-%{majorminor}/libgstfaac.so
-%{_libdir}/gstreamer-%{majorminor}/libgstmfc.so
 %{_libdir}/gstreamer-%{majorminor}/libgstmpegpsmux.so
 %{_libdir}/gstreamer-%{majorminor}/libgstdecklink.so
-%{_libdir}/gstreamer-%{majorminor}/libgsteglglessink.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopenal.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopenjpeg.so
 %{_libdir}/gstreamer-%{majorminor}/libgstwaylandsink.so
@@ -276,11 +274,19 @@
 %{_libdir}/gstreamer-%{majorminor}/libgstfrei0r.so
 %{_libdir}/gstreamer-%{majorminor}/libgstaudiomixer.so
 %{_libdir}/gstreamer-%{majorminor}/libgstopencv.so
+%{_libdir}/gstreamer-%{majorminor}/libgstivfparse.so
+%{_libdir}/gstreamer-%{majorminor}/libgstjp2kdecimator.so
+%{_libdir}/gstreamer-%{majorminor}/libgstopengl.so
+%{_libdir}/gstreamer-%{majorminor}/libgstsndfile.so
+%{_libdir}/gstreamer-%{majorminor}/libgststereo.so
+%{_libdir}/gstreamer-%{majorminor}/libgstvideosignal.so
+%{_libdir}/gstreamer-%{majorminor}/libgstvmnc.so
+%{_libdir}/gstreamer-%{majorminor}/libgstwebp.so
+
 %{_datadir}/gst-plugins-bad/1.0/opencv_haarcascades/fist.xml
 %{_datadir}/gst-plugins-bad/1.0/opencv_haarcascades/palm.xml
 
 %{_libdir}/libgstbasecamerabinsrc-*
-%{_libdir}/libgstegl-*
 %{_libdir}/libgstmpegts-*
 %{_libdir}/libgsturidownloader*
 
@@ -317,7 +323,6 @@
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstbasecamerasrc.h
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstcamerabin-enum.h
 %{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc/gstcamerabinpreview.h
-%{_includedir}/gstreamer-%{majorminor}/gst/egl/egl.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-atsc-section.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-dvb-descriptor.h
 %{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gst-dvb-section.h
@@ -328,20 +333,55 @@
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gstfragment.h
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gsturidownloader.h
 %{_includedir}/gstreamer-%{majorminor}/gst/uridownloader/gsturidownloader_debug.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/egl/gsteglimagememory.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/egl/gstgldisplay_egl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/all_functions.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/base.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/blending.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/eglimage.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/fbo.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/fixedfunction.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/gles.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/gstgl_compat.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/opengl.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/glprototypes/shaders.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgl_fwd.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglapi.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglbufferpool.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglcolorconvert.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglconfig.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglcontext.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgldisplay.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgldownload.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgles2.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglfeature.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglfilter.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglframebuffer.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmemory.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmixer.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglmixerpad.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglshader.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglshadervariables.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglupload.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstgluploadmeta.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglutils.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/gstglwindow.h
+%{_includedir}/gstreamer-%{majorminor}/gst/gl/x11/gstgldisplay_x11.h
+%{_includedir}/gstreamer-%{majorminor}/gst/mpegts/gstmpegts-enumtypes.h
+
+%{_libdir}/libgstgl-1.0.so*
 
 # pkg-config files
 %{_libdir}/pkgconfig/gstreamer-plugins-bad-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-codecparsers-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-insertbin-%{majorminor}.pc
-%{_libdir}/pkgconfig/gstreamer-egl-%{majorminor}.pc
 %{_libdir}/pkgconfig/gstreamer-mpegts-%{majorminor}.pc
+%{_libdir}/pkgconfig//gstreamer-gl-1.0.pc
 
-
-%{_libdir}/girepository-%{majorminor}/GstEGL-1.0.typelib
 %{_libdir}/girepository-%{majorminor}/GstInsertBin-1.0.typelib
 %{_libdir}/girepository-%{majorminor}/GstMpegts-1.0.typelib
 
-%{_datadir}/gir-%{majorminor}/GstEGL-1.0.gir
 %{_datadir}/gir-%{majorminor}/GstInsertBin-1.0.gir
 %{_datadir}/gir-%{majorminor}/GstMpegts-1.0.gir
 
diff --git a/gst/Makefile.in b/gst/Makefile.in
index 3f34b4b..04b8592 100644
--- a/gst/Makefile.in
+++ b/gst/Makefile.in
@@ -323,6 +323,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -409,6 +411,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -700,6 +703,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = $(GST_PLUGINS_SELECTED)
 DIST_SUBDIRS = $(GST_PLUGINS_ALL)
 all: all-recursive
diff --git a/gst/accurip/Makefile.in b/gst/accurip/Makefile.in
index a43a458..60111e1 100644
--- a/gst/accurip/Makefile.in
+++ b/gst/accurip/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaccurip.la
 libgstaccurip_la_SOURCES = gstaccurip.c gstaccurip.h
 libgstaccurip_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
diff --git a/gst/adpcmdec/Makefile.in b/gst/adpcmdec/Makefile.in
index af69f35..d3bda87 100644
--- a/gst/adpcmdec/Makefile.in
+++ b/gst/adpcmdec/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstadpcmdec.la
 
 # sources used to compile this plug-in
diff --git a/gst/adpcmenc/Makefile.in b/gst/adpcmenc/Makefile.in
index da982e0..71dd179 100644
--- a/gst/adpcmenc/Makefile.in
+++ b/gst/adpcmenc/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstadpcmenc.la
 
 # sources used to compile this plug-in
diff --git a/gst/aiff/Makefile.in b/gst/aiff/Makefile.in
index c37ad40..d0ff845 100644
--- a/gst/aiff/Makefile.in
+++ b/gst/aiff/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaiff.la
 libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c
 libgstaiff_la_CFLAGS = \
diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c
index 1ba9e79..14a4993 100644
--- a/gst/aiff/aiffparse.c
+++ b/gst/aiff/aiffparse.c
@@ -1247,6 +1247,12 @@
   GstClockTime timestamp, next_timestamp, duration;
   guint64 pos, nextpos;
 
+  if (aiff->bytes_per_sample <= 0) {
+    GST_ELEMENT_ERROR (aiff, STREAM, WRONG_TYPE, (NULL),
+        ("File is not a valid AIFF file (invalid bytes per sample)"));
+    return GST_FLOW_ERROR;
+  }
+
 iterate_adapter:
   GST_LOG_OBJECT (aiff,
       "offset: %" G_GINT64_FORMAT " , end: %" G_GINT64_FORMAT " , dataleft: %"
@@ -1262,7 +1268,7 @@
       MIN (gst_guint64_to_gdouble (aiff->dataleft),
       aiff->max_buf_size * ABS (aiff->segment.rate));
 
-  if (desired >= aiff->bytes_per_sample && aiff->bytes_per_sample > 0)
+  if (desired >= aiff->bytes_per_sample)
     desired -= (desired % aiff->bytes_per_sample);
 
   GST_LOG_OBJECT (aiff, "Fetching %" G_GINT64_FORMAT " bytes of data "
diff --git a/gst/asfmux/Makefile.in b/gst/asfmux/Makefile.in
index a108f15..2793e75 100644
--- a/gst/asfmux/Makefile.in
+++ b/gst/asfmux/Makefile.in
@@ -349,6 +349,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -435,6 +437,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -726,6 +729,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstasfmux.la
 
 # sources used to compile this plug-in
diff --git a/gst/audiofxbad/Makefile.in b/gst/audiofxbad/Makefile.in
index 28de343..5e5f064 100644
--- a/gst/audiofxbad/Makefile.in
+++ b/gst/audiofxbad/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaudiofxbad.la
 libgstaudiofxbad_la_SOURCES = gstaudiofxbad.c \
     gstaudiochannelmix.c gstaudiochannelmix.h
diff --git a/gst/audiomixer/Makefile.in b/gst/audiomixer/Makefile.in
index a4cff6c..4b9b933 100644
--- a/gst/audiomixer/Makefile.in
+++ b/gst/audiomixer/Makefile.in
@@ -371,6 +371,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -457,6 +459,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -748,6 +751,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaudiomixer.la
 ORC_SOURCE = gstaudiomixerorc
 EXTRA_DIST = $(ORC_SOURCE).orc
diff --git a/gst/audiovisualizers/Makefile.in b/gst/audiovisualizers/Makefile.in
index 5fdcda3..e0a09e1 100644
--- a/gst/audiovisualizers/Makefile.in
+++ b/gst/audiovisualizers/Makefile.in
@@ -353,6 +353,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -439,6 +441,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -730,6 +733,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstaudiovisualizers.la
 libgstaudiovisualizers_la_SOURCES = plugin.c \
     gstaudiovisualizer.c gstaudiovisualizer.h \
diff --git a/gst/autoconvert/Makefile.in b/gst/autoconvert/Makefile.in
index c54bdcb..67228de 100644
--- a/gst/autoconvert/Makefile.in
+++ b/gst/autoconvert/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstautoconvert.la
 libgstautoconvert_la_SOURCES = gstautoconvert.c gstautovideoconvert.c plugin.c
 libgstautoconvert_la_CFLAGS = $(GST_CFLAGS)
diff --git a/gst/bayer/Makefile.in b/gst/bayer/Makefile.in
index b27631b..36e4aa8 100644
--- a/gst/bayer/Makefile.in
+++ b/gst/bayer/Makefile.in
@@ -370,6 +370,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -456,6 +458,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -747,6 +750,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstbayer.la
 ORC_SOURCE = gstbayerorc
 EXTRA_DIST = $(ORC_SOURCE).orc
diff --git a/gst/camerabin2/Makefile.in b/gst/camerabin2/Makefile.in
index f54f149..6555f9a 100644
--- a/gst/camerabin2/Makefile.in
+++ b/gst/camerabin2/Makefile.in
@@ -351,6 +351,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -437,6 +439,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -728,6 +731,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstcamerabin2.la
 libgstcamerabin2_la_SOURCES = gstviewfinderbin.c \
 				camerabingeneral.c \
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index e651a35..c77585a 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -1056,11 +1056,20 @@
         g_mutex_unlock (&camerabin->preview_list_mutex);
 
         if (location) {
+          GstStructure *new_structure;
           GValue value = { 0 };
+
           g_value_init (&value, G_TYPE_STRING);
           g_value_take_string (&value, location);
-          gst_structure_take_value ((GstStructure *) structure, "location",
-              &value);
+
+          /* need to do a copy because the structure isn't mutable */
+          new_structure = gst_structure_copy (structure);
+          gst_structure_take_value (new_structure, "location", &value);
+
+          gst_message_unref (message);
+          message =
+              gst_message_new_element (GST_OBJECT_CAST (camerabin),
+              new_structure);
         }
 
         GST_LOG_OBJECT (bin, "received preview-image message");
diff --git a/gst/cdxaparse/Makefile.in b/gst/cdxaparse/Makefile.in
index c0b5f67..85ff3dd 100644
--- a/gst/cdxaparse/Makefile.in
+++ b/gst/cdxaparse/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstcdxaparse.la
 libgstcdxaparse_la_SOURCES = \
 	gstcdxaparse.c \
diff --git a/gst/coloreffects/Makefile.in b/gst/coloreffects/Makefile.in
index bafa629..d411a21 100644
--- a/gst/coloreffects/Makefile.in
+++ b/gst/coloreffects/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstcoloreffects.la
 libgstcoloreffects_la_SOURCES = \
 	gstplugin.c \
diff --git a/gst/compositor/Makefile.am b/gst/compositor/Makefile.am
new file mode 100644
index 0000000..a91f0fa
--- /dev/null
+++ b/gst/compositor/Makefile.am
@@ -0,0 +1,29 @@
+plugin_LTLIBRARIES = libgstcompositor.la
+
+ORC_SOURCE=compositororc
+
+include $(top_srcdir)/common/orc.mak
+
+libgstcompositor_la_SOURCES = \
+	blend.c \
+	compositor.c
+
+
+nodist_libgstcompositor_la_SOURCES = $(ORC_NODIST_SOURCES)
+libgstcompositor_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
+libgstcompositor_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-@GST_API_VERSION@ \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
+libgstcompositor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstcompositor_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+# headers we need but don't want installed
+noinst_HEADERS = \
+	blend.h \
+	compositor.h \
+	compositorpad.h
diff --git a/gst/compositor/Makefile.in b/gst/compositor/Makefile.in
new file mode 100644
index 0000000..98b936d
--- /dev/null
+++ b/gst/compositor/Makefile.in
@@ -0,0 +1,1183 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# This is a makefile.am fragment to build Orc code.
+#
+# Define ORC_SOURCE and then include this file, such as:
+#
+#  ORC_SOURCE=gstadderorc
+#  include $(top_srcdir)/common/orc.mak
+#
+# This fragment will create tmp-orc.c and gstadderorc.h from
+# gstadderorc.orc.
+#
+# When 'make dist' is run at the top level, or 'make orc-update'
+# in a directory including this fragment, the generated source 
+# files will be copied to $(ORC_SOURCE)-dist.[ch].  These files
+# should be checked in to git, since they are used if Orc is
+# disabled.
+# 
+# Note that this file defines BUILT_SOURCES, so any later usage
+# of BUILT_SOURCES in the Makefile.am that includes this file
+# must use '+='.
+#
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(top_srcdir)/common/orc.mak $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(top_srcdir)/depcomp $(noinst_HEADERS)
+subdir = gst/compositor
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
+	$(top_srcdir)/common/m4/as-auto-alt.m4 \
+	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
+	$(top_srcdir)/common/m4/as-libtool.m4 \
+	$(top_srcdir)/common/m4/as-version.m4 \
+	$(top_srcdir)/common/m4/ax_create_stdint_h.m4 \
+	$(top_srcdir)/common/m4/gst-arch.m4 \
+	$(top_srcdir)/common/m4/gst-args.m4 \
+	$(top_srcdir)/common/m4/gst-check.m4 \
+	$(top_srcdir)/common/m4/gst-default.m4 \
+	$(top_srcdir)/common/m4/gst-dowhile.m4 \
+	$(top_srcdir)/common/m4/gst-error.m4 \
+	$(top_srcdir)/common/m4/gst-feature.m4 \
+	$(top_srcdir)/common/m4/gst-gettext.m4 \
+	$(top_srcdir)/common/m4/gst-glib2.m4 \
+	$(top_srcdir)/common/m4/gst-package-release-datetime.m4 \
+	$(top_srcdir)/common/m4/gst-platform.m4 \
+	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
+	$(top_srcdir)/common/m4/gst-plugindir.m4 \
+	$(top_srcdir)/common/m4/gst-x11.m4 \
+	$(top_srcdir)/common/m4/gst.m4 \
+	$(top_srcdir)/common/m4/gtk-doc.m4 \
+	$(top_srcdir)/common/m4/introspection.m4 \
+	$(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \
+	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gsettings.m4 \
+	$(top_srcdir)/m4/gst-fionread.m4 $(top_srcdir)/m4/gst-sdl.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libgcrypt.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(plugindir)"
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libgstcompositor_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libgstcompositor_la_OBJECTS = libgstcompositor_la-blend.lo \
+	libgstcompositor_la-compositor.lo
+am__objects_1 = libgstcompositor_la-tmp-orc.lo
+nodist_libgstcompositor_la_OBJECTS = $(am__objects_1)
+libgstcompositor_la_OBJECTS = $(am_libgstcompositor_la_OBJECTS) \
+	$(nodist_libgstcompositor_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libgstcompositor_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(libgstcompositor_la_CFLAGS) $(CFLAGS) \
+	$(libgstcompositor_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libgstcompositor_la_SOURCES) \
+	$(nodist_libgstcompositor_la_SOURCES)
+DIST_SOURCES = $(libgstcompositor_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+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@
+ACMENC_CFLAGS = @ACMENC_CFLAGS@
+ACMMP3DEC_CFLAGS = @ACMMP3DEC_CFLAGS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APEXSINK_CFLAGS = @APEXSINK_CFLAGS@
+APEXSINK_LIBS = @APEXSINK_LIBS@
+AR = @AR@
+AS = @AS@
+ASSRENDER_CFLAGS = @ASSRENDER_CFLAGS@
+ASSRENDER_LIBS = @ASSRENDER_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
+BZ2_LIBS = @BZ2_LIBS@
+CC = @CC@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHROMAPRINT_CFLAGS = @CHROMAPRINT_CFLAGS@
+CHROMAPRINT_LIBS = @CHROMAPRINT_LIBS@
+CLUTTER_CFLAGS = @CLUTTER_CFLAGS@
+CLUTTER_GLX_CFLAGS = @CLUTTER_GLX_CFLAGS@
+CLUTTER_GLX_LIBS = @CLUTTER_GLX_LIBS@
+CLUTTER_LIBS = @CLUTTER_LIBS@
+CLUTTER_X11_CFLAGS = @CLUTTER_X11_CFLAGS@
+CLUTTER_X11_LIBS = @CLUTTER_X11_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DAALA_CFLAGS = @DAALA_CFLAGS@
+DAALA_LIBS = @DAALA_LIBS@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DCCP_LIBS = @DCCP_LIBS@
+DECKLINK_CXXFLAGS = @DECKLINK_CXXFLAGS@
+DECKLINK_LIBS = @DECKLINK_LIBS@
+DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@
+DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@
+DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@
+DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@
+DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@
+DIRECT3D_LIBS = @DIRECT3D_LIBS@
+DIRECTDRAW_LIBS = @DIRECTDRAW_LIBS@
+DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
+DIRECTFB_LIBS = @DIRECTFB_LIBS@
+DIRECTSOUND_LIBS = @DIRECTSOUND_LIBS@
+DIRECTX_CFLAGS = @DIRECTX_CFLAGS@
+DIRECTX_LDFLAGS = @DIRECTX_LDFLAGS@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DTS_LIBS = @DTS_LIBS@
+DUMPBIN = @DUMPBIN@
+DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
+DVDNAV_LIBS = @DVDNAV_LIBS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ERROR_CFLAGS = @ERROR_CFLAGS@
+ERROR_CXXFLAGS = @ERROR_CXXFLAGS@
+ERROR_OBJCFLAGS = @ERROR_OBJCFLAGS@
+EXEEXT = @EXEEXT@
+EXIF_CFLAGS = @EXIF_CFLAGS@
+EXIF_LIBS = @EXIF_LIBS@
+FAAC_LIBS = @FAAC_LIBS@
+FAAD_IS_NEAAC = @FAAD_IS_NEAAC@
+FAAD_LIBS = @FAAD_LIBS@
+FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+FLITE_CFLAGS = @FLITE_CFLAGS@
+FLITE_LIBS = @FLITE_LIBS@
+FLUIDSYNTH_CFLAGS = @FLUIDSYNTH_CFLAGS@
+FLUIDSYNTH_LIBS = @FLUIDSYNTH_LIBS@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LDFLAGS = @GIO_LDFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
+GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GLIB_PREFIX = @GLIB_PREFIX@
+GLIB_REQ = @GLIB_REQ@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GL_OBJCFLAGS = @GL_OBJCFLAGS@
+GME_LIBS = @GME_LIBS@
+GMODULE_EXPORT_CFLAGS = @GMODULE_EXPORT_CFLAGS@
+GMODULE_EXPORT_LIBS = @GMODULE_EXPORT_LIBS@
+GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
+GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GMYTH_CFLAGS = @GMYTH_CFLAGS@
+GMYTH_LIBS = @GMYTH_LIBS@
+GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
+GREP = @GREP@
+GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
+GSETTINGS_LIBS = @GSETTINGS_LIBS@
+GSM_LIBS = @GSM_LIBS@
+GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
+GSTPB_PREFIX = @GSTPB_PREFIX@
+GST_AGE = @GST_AGE@
+GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@
+GST_API_VERSION = @GST_API_VERSION@
+GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
+GST_BASE_LIBS = @GST_BASE_LIBS@
+GST_CFLAGS = @GST_CFLAGS@
+GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
+GST_CHECK_LIBS = @GST_CHECK_LIBS@
+GST_CONTROLLER_CFLAGS = @GST_CONTROLLER_CFLAGS@
+GST_CONTROLLER_LIBS = @GST_CONTROLLER_LIBS@
+GST_CURRENT = @GST_CURRENT@
+GST_CXXFLAGS = @GST_CXXFLAGS@
+GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
+GST_LIBS = @GST_LIBS@
+GST_LIBVERSION = @GST_LIBVERSION@
+GST_LIB_LDFLAGS = @GST_LIB_LDFLAGS@
+GST_LICENSE = @GST_LICENSE@
+GST_LT_LDFLAGS = @GST_LT_LDFLAGS@
+GST_OBJCFLAGS = @GST_OBJCFLAGS@
+GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@
+GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@
+GST_OPTION_OBJCFLAGS = @GST_OPTION_OBJCFLAGS@
+GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
+GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
+GST_PKG_CONFIG_PATH = @GST_PKG_CONFIG_PATH@
+GST_PLUGINS_ALL = @GST_PLUGINS_ALL@
+GST_PLUGINS_BAD_CFLAGS = @GST_PLUGINS_BAD_CFLAGS@
+GST_PLUGINS_BAD_CXXFLAGS = @GST_PLUGINS_BAD_CXXFLAGS@
+GST_PLUGINS_BAD_OBJCFLAGS = @GST_PLUGINS_BAD_OBJCFLAGS@
+GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
+GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
+GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
+GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
+GST_PLUGINS_GOOD_CFLAGS = @GST_PLUGINS_GOOD_CFLAGS@
+GST_PLUGINS_GOOD_DIR = @GST_PLUGINS_GOOD_DIR@
+GST_PLUGINS_GOOD_LIBS = @GST_PLUGINS_GOOD_LIBS@
+GST_PLUGINS_LIBAV_CFLAGS = @GST_PLUGINS_LIBAV_CFLAGS@
+GST_PLUGINS_LIBAV_DIR = @GST_PLUGINS_LIBAV_DIR@
+GST_PLUGINS_LIBAV_LIBS = @GST_PLUGINS_LIBAV_LIBS@
+GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@
+GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@
+GST_PLUGINS_UGLY_CFLAGS = @GST_PLUGINS_UGLY_CFLAGS@
+GST_PLUGINS_UGLY_DIR = @GST_PLUGINS_UGLY_DIR@
+GST_PLUGINS_UGLY_LIBS = @GST_PLUGINS_UGLY_LIBS@
+GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
+GST_PLUGIN_LIBTOOLFLAGS = @GST_PLUGIN_LIBTOOLFLAGS@
+GST_PREFIX = @GST_PREFIX@
+GST_REVISION = @GST_REVISION@
+GST_TOOLS_DIR = @GST_TOOLS_DIR@
+GST_VIDEO_CFLAGS = @GST_VIDEO_CFLAGS@
+GST_VIDEO_LIBS = @GST_VIDEO_LIBS@
+GTK3_CFLAGS = @GTK3_CFLAGS@
+GTK3_LIBS = @GTK3_LIBS@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GTK_BASE_DIR = @GTK_BASE_DIR@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+G_UDEV_CFLAGS = @G_UDEV_CFLAGS@
+G_UDEV_LIBS = @G_UDEV_LIBS@
+HAVE_CLUTTER = @HAVE_CLUTTER@
+HAVE_CLUTTER_GLX = @HAVE_CLUTTER_GLX@
+HAVE_CLUTTER_X11 = @HAVE_CLUTTER_X11@
+HAVE_CXX = @HAVE_CXX@
+HAVE_DIRECT3D = @HAVE_DIRECT3D@
+HAVE_DIRECTDRAW = @HAVE_DIRECTDRAW@
+HAVE_DIRECTSOUND = @HAVE_DIRECTSOUND@
+HAVE_DTS = @HAVE_DTS@
+HAVE_EGL = @HAVE_EGL@
+HAVE_FAAC = @HAVE_FAAC@
+HAVE_FAAD = @HAVE_FAAD@
+HAVE_FLITE = @HAVE_FLITE@
+HAVE_GL = @HAVE_GL@
+HAVE_GLES2 = @HAVE_GLES2@
+HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
+HAVE_GSM = @HAVE_GSM@
+HAVE_GTK3 = @HAVE_GTK3@
+HAVE_JPEG = @HAVE_JPEG@
+HAVE_NAS = @HAVE_NAS@
+HAVE_OPENJPEG = @HAVE_OPENJPEG@
+HAVE_PNG = @HAVE_PNG@
+HAVE_SRTP = @HAVE_SRTP@
+HAVE_WASAPI = @HAVE_WASAPI@
+HAVE_WILDMIDI = @HAVE_WILDMIDI@
+HAVE_WINKS = @HAVE_WINKS@
+HAVE_WINSCREENCAP = @HAVE_WINSCREENCAP@
+HAVE_X = @HAVE_X@
+HAVE_X11 = @HAVE_X11@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+JPEG_LIBS = @JPEG_LIBS@
+KATE_CFLAGS = @KATE_CFLAGS@
+KATE_LIBS = @KATE_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDC1394_CFLAGS = @LIBDC1394_CFLAGS@
+LIBDC1394_LIBS = @LIBDC1394_LIBS@
+LIBDIR = @LIBDIR@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBM = @LIBM@
+LIBMMS_CFLAGS = @LIBMMS_CFLAGS@
+LIBMMS_LIBS = @LIBMMS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
+LIBPNG_LIBS = @LIBPNG_LIBS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
+LIBUDEV_LIBS = @LIBUDEV_LIBS@
+LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
+LIBUSB_LIBS = @LIBUSB_LIBS@
+LIBVISUAL_CFLAGS = @LIBVISUAL_CFLAGS@
+LIBVISUAL_LIBS = @LIBVISUAL_LIBS@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALEDIR = @LOCALEDIR@
+LRDF_CFLAGS = @LRDF_CFLAGS@
+LRDF_LIBS = @LRDF_LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MIMIC_CFLAGS = @MIMIC_CFLAGS@
+MIMIC_LIBS = @MIMIC_LIBS@
+MJPEG_CFLAGS = @MJPEG_CFLAGS@
+MJPEG_LIBS = @MJPEG_LIBS@
+MKDIR_P = @MKDIR_P@
+MODPLUG_CFLAGS = @MODPLUG_CFLAGS@
+MODPLUG_LIBS = @MODPLUG_LIBS@
+MPEG2ENC_CFLAGS = @MPEG2ENC_CFLAGS@
+MPEG2ENC_LIBS = @MPEG2ENC_LIBS@
+MPG123_CFLAGS = @MPG123_CFLAGS@
+MPG123_LIBS = @MPG123_LIBS@
+MPLEX_CFLAGS = @MPLEX_CFLAGS@
+MPLEX_LDFLAGS = @MPLEX_LDFLAGS@
+MPLEX_LIBS = @MPLEX_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+MUSEPACK_LIBS = @MUSEPACK_LIBS@
+NAS_CFLAGS = @NAS_CFLAGS@
+NAS_LIBS = @NAS_LIBS@
+NEON_CFLAGS = @NEON_CFLAGS@
+NEON_LIBS = @NEON_LIBS@
+NETTLE_CFLAGS = @NETTLE_CFLAGS@
+NETTLE_LIBS = @NETTLE_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJC = @OBJC@
+OBJCDEPMODE = @OBJCDEPMODE@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OFA_CFLAGS = @OFA_CFLAGS@
+OFA_LIBS = @OFA_LIBS@
+OPENAL_CFLAGS = @OPENAL_CFLAGS@
+OPENAL_LIBS = @OPENAL_LIBS@
+OPENCV_CFLAGS = @OPENCV_CFLAGS@
+OPENCV_LIBS = @OPENCV_LIBS@
+OPENCV_PREFIX = @OPENCV_PREFIX@
+OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
+OPENEXR_LIBS = @OPENEXR_LIBS@
+OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@
+OPENJPEG_LIBS = @OPENJPEG_LIBS@
+OPENNI2_CFLAGS = @OPENNI2_CFLAGS@
+OPENNI2_LIBS = @OPENNI2_LIBS@
+OPUS_CFLAGS = @OPUS_CFLAGS@
+OPUS_LIBS = @OPUS_LIBS@
+ORCC = @ORCC@
+ORCC_FLAGS = @ORCC_FLAGS@
+ORC_CFLAGS = @ORC_CFLAGS@
+ORC_LIBS = @ORC_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@
+PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLUGINDIR = @PLUGINDIR@
+POSUB = @POSUB@
+PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PVR_CFLAGS = @PVR_CFLAGS@
+PVR_LIBS = @PVR_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RSVG_2_36_2_CFLAGS = @RSVG_2_36_2_CFLAGS@
+RSVG_2_36_2_LIBS = @RSVG_2_36_2_LIBS@
+RSVG_CFLAGS = @RSVG_CFLAGS@
+RSVG_LIBS = @RSVG_LIBS@
+RTMP_CFLAGS = @RTMP_CFLAGS@
+RTMP_LIBS = @RTMP_LIBS@
+SBC_CFLAGS = @SBC_CFLAGS@
+SBC_LIBS = @SBC_LIBS@
+SCHRO_CFLAGS = @SCHRO_CFLAGS@
+SCHRO_LIBS = @SCHRO_LIBS@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CLUTTER = @SDL_CLUTTER@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHM_LIBS = @SHM_LIBS@
+SLV2_CFLAGS = @SLV2_CFLAGS@
+SLV2_LIBS = @SLV2_LIBS@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+SNDIO_LIBS = @SNDIO_LIBS@
+SOUNDTOUCH_CFLAGS = @SOUNDTOUCH_CFLAGS@
+SOUNDTOUCH_LIBS = @SOUNDTOUCH_LIBS@
+SPANDSP_CFLAGS = @SPANDSP_CFLAGS@
+SPANDSP_LIBS = @SPANDSP_LIBS@
+SPC_LIBS = @SPC_LIBS@
+SRTP_LIBS = @SRTP_LIBS@
+SSH2_CFLAGS = @SSH2_CFLAGS@
+SSH2_LIBS = @SSH2_LIBS@
+STRIP = @STRIP@
+TELETEXTDEC_CFLAGS = @TELETEXTDEC_CFLAGS@
+TELETEXTDEC_LIBS = @TELETEXTDEC_LIBS@
+TIGER_CFLAGS = @TIGER_CFLAGS@
+TIGER_LIBS = @TIGER_LIBS@
+TIMIDITY_CFLAGS = @TIMIDITY_CFLAGS@
+TIMIDITY_LIBS = @TIMIDITY_LIBS@
+USE_GLES2 = @USE_GLES2@
+USE_NLS = @USE_NLS@
+USE_OPENGL = @USE_OPENGL@
+VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+VALGRIND_LIBS = @VALGRIND_LIBS@
+VALGRIND_PATH = @VALGRIND_PATH@
+VDPAU_CFLAGS = @VDPAU_CFLAGS@
+VDPAU_LIBS = @VDPAU_LIBS@
+VERSION = @VERSION@
+VOAACENC_CFLAGS = @VOAACENC_CFLAGS@
+VOAACENC_LIBS = @VOAACENC_LIBS@
+VOAMRWBENC_CFLAGS = @VOAMRWBENC_CFLAGS@
+VOAMRWBENC_LIBS = @VOAMRWBENC_LIBS@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WARNING_CXXFLAGS = @WARNING_CXXFLAGS@
+WARNING_OBJCFLAGS = @WARNING_OBJCFLAGS@
+WASAPI_LIBS = @WASAPI_LIBS@
+WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
+WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
+WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
+WAYLAND_LIBS = @WAYLAND_LIBS@
+WEBP_CFLAGS = @WEBP_CFLAGS@
+WEBP_LIBS = @WEBP_LIBS@
+WILDMIDI_CFLAGS = @WILDMIDI_CFLAGS@
+WILDMIDI_LIBS = @WILDMIDI_LIBS@
+WINKS_LIBS = @WINKS_LIBS@
+WINSCREENCAP_LIBS = @WINSCREENCAP_LIBS@
+WINSOCK2_LIBS = @WINSOCK2_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
+XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+XMKMF = @XMKMF@
+XVID_LIBS = @XVID_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZBAR_CFLAGS = @ZBAR_CFLAGS@
+ZBAR_LIBS = @ZBAR_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_OBJC = @ac_ct_OBJC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+plugindir = @plugindir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
+plugin_LTLIBRARIES = libgstcompositor.la
+ORC_SOURCE = compositororc
+EXTRA_DIST = $(ORC_SOURCE).orc
+ORC_NODIST_SOURCES = tmp-orc.c $(ORC_SOURCE).h
+BUILT_SOURCES = tmp-orc.c $(ORC_SOURCE).h
+orcc_v_gen = $(orcc_v_gen_$(V))
+orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
+orcc_v_gen_0 = @echo "  ORCC   $@";
+cp_v_gen = $(cp_v_gen_$(V))
+cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
+cp_v_gen_0 = @echo "  CP     $@";
+libgstcompositor_la_SOURCES = \
+	blend.c \
+	compositor.c
+
+nodist_libgstcompositor_la_SOURCES = $(ORC_NODIST_SOURCES)
+libgstcompositor_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+	-I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ORC_CFLAGS)
+
+libgstcompositor_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+	-lgstvideo-@GST_API_VERSION@ \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
+
+libgstcompositor_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstcompositor_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
+
+# headers we need but don't want installed
+noinst_HEADERS = \
+	blend.h \
+	compositor.h \
+	compositorpad.h
+
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/common/orc.mak $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/compositor/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gst/compositor/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+$(top_srcdir)/common/orc.mak:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
+	}
+
+uninstall-pluginLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
+	done
+
+clean-pluginLTLIBRARIES:
+	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+	@list='$(plugin_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libgstcompositor.la: $(libgstcompositor_la_OBJECTS) $(libgstcompositor_la_DEPENDENCIES) $(EXTRA_libgstcompositor_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libgstcompositor_la_LINK) -rpath $(plugindir) $(libgstcompositor_la_OBJECTS) $(libgstcompositor_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcompositor_la-blend.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcompositor_la-compositor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcompositor_la-tmp-orc.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libgstcompositor_la-blend.lo: blend.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -MT libgstcompositor_la-blend.lo -MD -MP -MF $(DEPDIR)/libgstcompositor_la-blend.Tpo -c -o libgstcompositor_la-blend.lo `test -f 'blend.c' || echo '$(srcdir)/'`blend.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcompositor_la-blend.Tpo $(DEPDIR)/libgstcompositor_la-blend.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='blend.c' object='libgstcompositor_la-blend.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -c -o libgstcompositor_la-blend.lo `test -f 'blend.c' || echo '$(srcdir)/'`blend.c
+
+libgstcompositor_la-compositor.lo: compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -MT libgstcompositor_la-compositor.lo -MD -MP -MF $(DEPDIR)/libgstcompositor_la-compositor.Tpo -c -o libgstcompositor_la-compositor.lo `test -f 'compositor.c' || echo '$(srcdir)/'`compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcompositor_la-compositor.Tpo $(DEPDIR)/libgstcompositor_la-compositor.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='compositor.c' object='libgstcompositor_la-compositor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -c -o libgstcompositor_la-compositor.lo `test -f 'compositor.c' || echo '$(srcdir)/'`compositor.c
+
+libgstcompositor_la-tmp-orc.lo: tmp-orc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -MT libgstcompositor_la-tmp-orc.lo -MD -MP -MF $(DEPDIR)/libgstcompositor_la-tmp-orc.Tpo -c -o libgstcompositor_la-tmp-orc.lo `test -f 'tmp-orc.c' || echo '$(srcdir)/'`tmp-orc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstcompositor_la-tmp-orc.Tpo $(DEPDIR)/libgstcompositor_la-tmp-orc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tmp-orc.c' object='libgstcompositor_la-tmp-orc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcompositor_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcompositor_la_CFLAGS) $(CFLAGS) -c -o libgstcompositor_la-tmp-orc.lo `test -f 'tmp-orc.c' || echo '$(srcdir)/'`tmp-orc.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+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
+
+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'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(plugindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+	clean-pluginLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pluginLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pluginLTLIBRARIES
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-local clean-pluginLTLIBRARIES \
+	cscopelist-am ctags ctags-am dist-hook distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-pluginLTLIBRARIES \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am \
+	uninstall-pluginLTLIBRARIES
+
+
+orc-update: tmp-orc.c $(ORC_SOURCE).h
+	$(top_srcdir)/common/gst-indent tmp-orc.c
+	cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c
+	cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h
+
+@HAVE_ORCC_TRUE@tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_TRUE@	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_SOURCE).orc
+
+@HAVE_ORCC_TRUE@$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_TRUE@	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --header --include glib.h -o $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE).orc
+@HAVE_ORCC_FALSE@tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
+@HAVE_ORCC_FALSE@	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.c tmp-orc.c
+
+@HAVE_ORCC_FALSE@$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
+@HAVE_ORCC_FALSE@	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.h $(ORC_SOURCE).h
+
+clean-local: clean-orc
+.PHONY: clean-orc
+clean-orc:
+	rm -f tmp-orc.c $(ORC_SOURCE).h
+
+dist-hook: dist-hook-orc
+.PHONY: dist-hook-orc
+
+# we try and copy updated orc -dist files below, but don't fail if it
+# doesn't work as the srcdir might not be writable
+dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
+	$(top_srcdir)/common/gst-indent tmp-orc.c
+	rm -f tmp-orc.c~
+	cmp -s tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || \
+	  cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || true
+	cmp -s $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || \
+	  cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || true
+	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
+	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h
+
+# 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/compositor/blend.c b/gst/compositor/blend.c
new file mode 100644
index 0000000..7fe8e53
--- /dev/null
+++ b/gst/compositor/blend.c
@@ -0,0 +1,1059 @@
+/*
+ * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2006 Mindfruit Bv.
+ *   Author: Sjoerd Simons <sjoerd@luon.net>
+ *   Author: Alex Ugarte <alexugarte@gmail.com>
+ * Copyright (C) 2009 Alex Ugarte <augarte@vicomtech.org>
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "blend.h"
+#include "compositororc.h"
+
+#include <string.h>
+
+#include <gst/video/video.h>
+
+#define BLEND(D,S,alpha) (((D) * (256 - (alpha)) + (S) * (alpha)) >> 8)
+
+GST_DEBUG_CATEGORY_STATIC (gst_compositor_blend_debug);
+#define GST_CAT_DEFAULT gst_compositor_blend_debug
+
+/* Below are the implementations of everything */
+
+/* A32 is for AYUV, ARGB and BGRA */
+#define BLEND_A32(name, method, LOOP)		\
+static void \
+method##_ ##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
+    gdouble src_alpha, GstVideoFrame * destframe) \
+{ \
+  guint s_alpha; \
+  gint src_stride, dest_stride; \
+  gint dest_width, dest_height; \
+  guint8 *src, *dest; \
+  gint src_width, src_height; \
+  \
+  src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
+  src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
+  src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 0); \
+  src_stride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 0); \
+  dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 0); \
+  dest_width = GST_VIDEO_FRAME_COMP_WIDTH (destframe, 0); \
+  dest_height = GST_VIDEO_FRAME_COMP_HEIGHT (destframe, 0); \
+  \
+  s_alpha = CLAMP ((gint) (src_alpha * 256), 0, 256); \
+  \
+  /* If it's completely transparent... we just return */ \
+  if (G_UNLIKELY (s_alpha == 0)) \
+    return; \
+  \
+  /* adjust src pointers for negative sizes */ \
+  if (xpos < 0) { \
+    src += -xpos * 4; \
+    src_width -= -xpos; \
+    xpos = 0; \
+  } \
+  if (ypos < 0) { \
+    src += -ypos * src_stride; \
+    src_height -= -ypos; \
+    ypos = 0; \
+  } \
+  /* adjust width/height if the src is bigger than dest */ \
+  if (xpos + src_width > dest_width) { \
+    src_width = dest_width - xpos; \
+  } \
+  if (ypos + src_height > dest_height) { \
+    src_height = dest_height - ypos; \
+  } \
+  \
+  dest = dest + 4 * xpos + (ypos * dest_stride); \
+  \
+  LOOP (dest, src, src_height, src_width, src_stride, dest_stride, s_alpha); \
+}
+
+#define BLEND_A32_LOOP(name, method)			\
+static inline void \
+_##method##_loop_##name (guint8 * dest, const guint8 * src, gint src_height, \
+    gint src_width, gint src_stride, gint dest_stride, guint s_alpha) \
+{ \
+  s_alpha = MIN (255, s_alpha); \
+  compositor_orc_##method##_##name (dest, dest_stride, src, src_stride, \
+      s_alpha, src_width, src_height); \
+}
+
+BLEND_A32_LOOP (argb, blend);
+BLEND_A32_LOOP (bgra, blend);
+BLEND_A32_LOOP (argb, overlay);
+BLEND_A32_LOOP (bgra, overlay);
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+BLEND_A32 (argb, blend, _blend_loop_argb);
+BLEND_A32 (bgra, blend, _blend_loop_bgra);
+BLEND_A32 (argb, overlay, _overlay_loop_argb);
+BLEND_A32 (bgra, overlay, _overlay_loop_bgra);
+#else
+BLEND_A32 (argb, blend, _blend_loop_bgra);
+BLEND_A32 (bgra, blend, _blend_loop_argb);
+BLEND_A32 (argb, overlay, _overlay_loop_bgra);
+BLEND_A32 (bgra, overlay, _overlay_loop_argb);
+#endif
+
+#define A32_CHECKER_C(name, RGB, A, C1, C2, C3) \
+static void \
+fill_checker_##name##_c (GstVideoFrame * frame) \
+{ \
+  gint i, j; \
+  gint val; \
+  static const gint tab[] = { 80, 160, 80, 160 }; \
+  gint width, height; \
+  guint8 *dest; \
+  \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  \
+  if (!RGB) { \
+    for (i = 0; i < height; i++) { \
+      for (j = 0; j < width; j++) { \
+        dest[A] = 0xff; \
+        dest[C1] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+        dest[C2] = 128; \
+        dest[C3] = 128; \
+        dest += 4; \
+      } \
+    } \
+  } else { \
+    for (i = 0; i < height; i++) { \
+      for (j = 0; j < width; j++) { \
+        val = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+        dest[A] = 0xFF; \
+        dest[C1] = val; \
+        dest[C2] = val; \
+        dest[C3] = val; \
+        dest += 4; \
+      } \
+    } \
+  } \
+}
+
+A32_CHECKER_C (argb, TRUE, 0, 1, 2, 3);
+A32_CHECKER_C (bgra, TRUE, 3, 2, 1, 0);
+A32_CHECKER_C (ayuv, FALSE, 0, 1, 2, 3);
+
+#define YUV_TO_R(Y,U,V) (CLAMP (1.164 * (Y - 16) + 1.596 * (V - 128), 0, 255))
+#define YUV_TO_G(Y,U,V) (CLAMP (1.164 * (Y - 16) - 0.813 * (V - 128) - 0.391 * (U - 128), 0, 255))
+#define YUV_TO_B(Y,U,V) (CLAMP (1.164 * (Y - 16) + 2.018 * (U - 128), 0, 255))
+
+#define A32_COLOR(name, RGB, A, C1, C2, C3) \
+static void \
+fill_color_##name (GstVideoFrame * frame, gint Y, gint U, gint V) \
+{ \
+  gint c1, c2, c3; \
+  guint32 val; \
+  gint width, height; \
+  guint8 *dest; \
+  \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  \
+  if (RGB) { \
+    c1 = YUV_TO_R (Y, U, V); \
+    c2 = YUV_TO_G (Y, U, V); \
+    c3 = YUV_TO_B (Y, U, V); \
+  } else { \
+    c1 = Y; \
+    c2 = U; \
+    c3 = V; \
+  } \
+  val = GUINT32_FROM_BE ((0xff << A) | (c1 << C1) | (c2 << C2) | (c3 << C3)); \
+  \
+  compositor_orc_splat_u32 ((guint32 *) dest, val, height * width); \
+}
+
+A32_COLOR (argb, TRUE, 24, 16, 8, 0);
+A32_COLOR (bgra, TRUE, 0, 8, 16, 24);
+A32_COLOR (abgr, TRUE, 24, 0, 8, 16);
+A32_COLOR (rgba, TRUE, 0, 24, 16, 8);
+A32_COLOR (ayuv, FALSE, 24, 16, 8, 0);
+
+/* Y444, Y42B, I420, YV12, Y41B */
+#define PLANAR_YUV_BLEND(format_name,format_enum,x_round,y_round,MEMCPY,BLENDLOOP) \
+inline static void \
+_blend_##format_name (const guint8 * src, guint8 * dest, \
+    gint src_stride, gint dest_stride, gint src_width, gint src_height, \
+    gdouble src_alpha) \
+{ \
+  gint i; \
+  gint b_alpha; \
+  \
+  /* If it's completely transparent... we just return */ \
+  if (G_UNLIKELY (src_alpha == 0.0)) { \
+    GST_INFO ("Fast copy (alpha == 0.0)"); \
+    return; \
+  } \
+  \
+  /* If it's completely opaque, we do a fast copy */ \
+  if (G_UNLIKELY (src_alpha == 1.0)) { \
+    GST_INFO ("Fast copy (alpha == 1.0)"); \
+    for (i = 0; i < src_height; i++) { \
+      MEMCPY (dest, src, src_width); \
+      src += src_stride; \
+      dest += dest_stride; \
+    } \
+    return; \
+  } \
+  \
+  b_alpha = CLAMP ((gint) (src_alpha * 256), 0, 256); \
+  \
+  BLENDLOOP(dest, dest_stride, src, src_stride, b_alpha, src_width, src_height); \
+} \
+\
+static void \
+blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
+    gdouble src_alpha, GstVideoFrame * destframe) \
+{ \
+  const guint8 *b_src; \
+  guint8 *b_dest; \
+  gint b_src_width; \
+  gint b_src_height; \
+  gint xoffset = 0; \
+  gint yoffset = 0; \
+  gint src_comp_rowstride, dest_comp_rowstride; \
+  gint src_comp_height; \
+  gint src_comp_width; \
+  gint comp_ypos, comp_xpos; \
+  gint comp_yoffset, comp_xoffset; \
+  gint dest_width, dest_height; \
+  const GstVideoFormatInfo *info; \
+  gint src_width, src_height; \
+  \
+  src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
+  src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
+  \
+  info = srcframe->info.finfo; \
+  dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
+  dest_height = GST_VIDEO_FRAME_HEIGHT (destframe); \
+  \
+  xpos = x_round (xpos); \
+  ypos = y_round (ypos); \
+  \
+  b_src_width = src_width; \
+  b_src_height = src_height; \
+  \
+  /* adjust src pointers for negative sizes */ \
+  if (xpos < 0) { \
+    xoffset = -xpos; \
+    b_src_width -= -xpos; \
+    xpos = 0; \
+  } \
+  if (ypos < 0) { \
+    yoffset += -ypos; \
+    b_src_height -= -ypos; \
+    ypos = 0; \
+  } \
+  /* If x or y offset are larger then the source it's outside of the picture */ \
+  if (xoffset > src_width || yoffset > src_height) { \
+    return; \
+  } \
+  \
+  /* adjust width/height if the src is bigger than dest */ \
+  if (xpos + src_width > dest_width) { \
+    b_src_width = dest_width - xpos; \
+  } \
+  if (ypos + src_height > dest_height) { \
+    b_src_height = dest_height - ypos; \
+  } \
+  if (b_src_width < 0 || b_src_height < 0) { \
+    return; \
+  } \
+  \
+  /* First mix Y, then U, then V */ \
+  b_src = GST_VIDEO_FRAME_COMP_DATA (srcframe, 0); \
+  b_dest = GST_VIDEO_FRAME_COMP_DATA (destframe, 0); \
+  src_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
+  dest_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 0); \
+  src_comp_width = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info, 0, b_src_width); \
+  src_comp_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info, 0, b_src_height); \
+  comp_xpos = (xpos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 0, xpos); \
+  comp_ypos = (ypos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 0, ypos); \
+  comp_xoffset = (xoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 0, xoffset); \
+  comp_yoffset = (yoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 0, yoffset); \
+  _blend_##format_name (b_src + comp_xoffset + comp_yoffset * src_comp_rowstride, \
+      b_dest + comp_xpos + comp_ypos * dest_comp_rowstride, \
+      src_comp_rowstride, \
+      dest_comp_rowstride, src_comp_width, src_comp_height, \
+      src_alpha); \
+  \
+  b_src = GST_VIDEO_FRAME_COMP_DATA (srcframe, 1); \
+  b_dest = GST_VIDEO_FRAME_COMP_DATA (destframe, 1); \
+  src_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 1); \
+  dest_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 1); \
+  src_comp_width = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info, 1, b_src_width); \
+  src_comp_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info, 1, b_src_height); \
+  comp_xpos = (xpos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 1, xpos); \
+  comp_ypos = (ypos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 1, ypos); \
+  comp_xoffset = (xoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 1, xoffset); \
+  comp_yoffset = (yoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 1, yoffset); \
+  _blend_##format_name (b_src + comp_xoffset + comp_yoffset * src_comp_rowstride, \
+      b_dest + comp_xpos + comp_ypos * dest_comp_rowstride, \
+      src_comp_rowstride, \
+      dest_comp_rowstride, src_comp_width, src_comp_height, \
+      src_alpha); \
+  \
+  b_src = GST_VIDEO_FRAME_COMP_DATA (srcframe, 2); \
+  b_dest = GST_VIDEO_FRAME_COMP_DATA (destframe, 2); \
+  src_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 2); \
+  dest_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 2); \
+  src_comp_width = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info, 2, b_src_width); \
+  src_comp_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info, 2, b_src_height); \
+  comp_xpos = (xpos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 2, xpos); \
+  comp_ypos = (ypos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 2, ypos); \
+  comp_xoffset = (xoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 2, xoffset); \
+  comp_yoffset = (yoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 2, yoffset); \
+  _blend_##format_name (b_src + comp_xoffset + comp_yoffset * src_comp_rowstride, \
+      b_dest + comp_xpos + comp_ypos * dest_comp_rowstride, \
+      src_comp_rowstride, \
+      dest_comp_rowstride, src_comp_width, src_comp_height, \
+      src_alpha); \
+}
+
+#define PLANAR_YUV_FILL_CHECKER(format_name, format_enum, MEMSET) \
+static void \
+fill_checker_##format_name (GstVideoFrame * frame) \
+{ \
+  gint i, j; \
+  static const int tab[] = { 80, 160, 80, 160 }; \
+  guint8 *p; \
+  gint comp_width, comp_height; \
+  gint rowstride; \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 0); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    for (j = 0; j < comp_width; j++) { \
+      *p++ = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+    } \
+    p += rowstride - comp_width; \
+  } \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 1); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 1); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 1); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, 0x80, comp_width); \
+    p += rowstride; \
+  } \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 2); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 2); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 2); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 2); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, 0x80, comp_width); \
+    p += rowstride; \
+  } \
+}
+
+#define PLANAR_YUV_FILL_COLOR(format_name,format_enum,MEMSET) \
+static void \
+fill_color_##format_name (GstVideoFrame * frame, \
+    gint colY, gint colU, gint colV) \
+{ \
+  guint8 *p; \
+  gint comp_width, comp_height; \
+  gint rowstride; \
+  gint i; \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 0); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, colY, comp_width); \
+    p += rowstride; \
+  } \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 1); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 1); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 1); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, colU, comp_width); \
+    p += rowstride; \
+  } \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 2); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 2); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 2); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 2); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, colV, comp_width); \
+    p += rowstride; \
+  } \
+}
+
+#define GST_ROUND_UP_1(x) (x)
+
+PLANAR_YUV_BLEND (i420, GST_VIDEO_FORMAT_I420, GST_ROUND_UP_2,
+    GST_ROUND_UP_2, memcpy, compositor_orc_blend_u8);
+PLANAR_YUV_FILL_CHECKER (i420, GST_VIDEO_FORMAT_I420, memset);
+PLANAR_YUV_FILL_COLOR (i420, GST_VIDEO_FORMAT_I420, memset);
+PLANAR_YUV_FILL_COLOR (yv12, GST_VIDEO_FORMAT_YV12, memset);
+PLANAR_YUV_BLEND (y444, GST_VIDEO_FORMAT_Y444, GST_ROUND_UP_1,
+    GST_ROUND_UP_1, memcpy, compositor_orc_blend_u8);
+PLANAR_YUV_FILL_CHECKER (y444, GST_VIDEO_FORMAT_Y444, memset);
+PLANAR_YUV_FILL_COLOR (y444, GST_VIDEO_FORMAT_Y444, memset);
+PLANAR_YUV_BLEND (y42b, GST_VIDEO_FORMAT_Y42B, GST_ROUND_UP_2,
+    GST_ROUND_UP_1, memcpy, compositor_orc_blend_u8);
+PLANAR_YUV_FILL_CHECKER (y42b, GST_VIDEO_FORMAT_Y42B, memset);
+PLANAR_YUV_FILL_COLOR (y42b, GST_VIDEO_FORMAT_Y42B, memset);
+PLANAR_YUV_BLEND (y41b, GST_VIDEO_FORMAT_Y41B, GST_ROUND_UP_4,
+    GST_ROUND_UP_1, memcpy, compositor_orc_blend_u8);
+PLANAR_YUV_FILL_CHECKER (y41b, GST_VIDEO_FORMAT_Y41B, memset);
+PLANAR_YUV_FILL_COLOR (y41b, GST_VIDEO_FORMAT_Y41B, memset);
+
+/* NV12, NV21 */
+#define NV_YUV_BLEND(format_name,MEMCPY,BLENDLOOP) \
+inline static void \
+_blend_##format_name (const guint8 * src, guint8 * dest, \
+    gint src_stride, gint dest_stride, gint src_width, gint src_height, \
+    gdouble src_alpha) \
+{ \
+  gint i; \
+  gint b_alpha; \
+  \
+  /* If it's completely transparent... we just return */ \
+  if (G_UNLIKELY (src_alpha == 0.0)) { \
+    GST_INFO ("Fast copy (alpha == 0.0)"); \
+    return; \
+  } \
+  \
+  /* If it's completely opaque, we do a fast copy */ \
+  if (G_UNLIKELY (src_alpha == 1.0)) { \
+    GST_INFO ("Fast copy (alpha == 1.0)"); \
+    for (i = 0; i < src_height; i++) { \
+      MEMCPY (dest, src, src_width); \
+      src += src_stride; \
+      dest += dest_stride; \
+    } \
+    return; \
+  } \
+  \
+  b_alpha = CLAMP ((gint) (src_alpha * 256), 0, 256); \
+  \
+  BLENDLOOP(dest, dest_stride, src, src_stride, b_alpha, src_width, src_height); \
+} \
+\
+static void \
+blend_##format_name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
+    gdouble src_alpha, GstVideoFrame * destframe)                    \
+{ \
+  const guint8 *b_src; \
+  guint8 *b_dest; \
+  gint b_src_width; \
+  gint b_src_height; \
+  gint xoffset = 0; \
+  gint yoffset = 0; \
+  gint src_comp_rowstride, dest_comp_rowstride; \
+  gint src_comp_height; \
+  gint src_comp_width; \
+  gint comp_ypos, comp_xpos; \
+  gint comp_yoffset, comp_xoffset; \
+  gint dest_width, dest_height; \
+  const GstVideoFormatInfo *info; \
+  gint src_width, src_height; \
+  \
+  src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
+  src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
+  \
+  info = srcframe->info.finfo; \
+  dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
+  dest_height = GST_VIDEO_FRAME_HEIGHT (destframe); \
+  \
+  xpos = GST_ROUND_UP_2 (xpos); \
+  ypos = GST_ROUND_UP_2 (ypos); \
+  \
+  b_src_width = src_width; \
+  b_src_height = src_height; \
+  \
+  /* adjust src pointers for negative sizes */ \
+  if (xpos < 0) { \
+    xoffset = -xpos; \
+    b_src_width -= -xpos; \
+    xpos = 0; \
+  } \
+  if (ypos < 0) { \
+    yoffset += -ypos; \
+    b_src_height -= -ypos; \
+    ypos = 0; \
+  } \
+  /* If x or y offset are larger then the source it's outside of the picture */ \
+  if (xoffset > src_width || yoffset > src_height) { \
+    return; \
+  } \
+  \
+  /* adjust width/height if the src is bigger than dest */ \
+  if (xpos + src_width > dest_width) { \
+    b_src_width = dest_width - xpos; \
+  } \
+  if (ypos + src_height > dest_height) { \
+    b_src_height = dest_height - ypos; \
+  } \
+  if (b_src_width < 0 || b_src_height < 0) { \
+    return; \
+  } \
+  \
+  /* First mix Y, then UV */ \
+  b_src = GST_VIDEO_FRAME_COMP_DATA (srcframe, 0); \
+  b_dest = GST_VIDEO_FRAME_COMP_DATA (destframe, 0); \
+  src_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
+  dest_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 0); \
+  src_comp_width = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info, 0, b_src_width); \
+  src_comp_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info, 0, b_src_height); \
+  comp_xpos = (xpos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 0, xpos); \
+  comp_ypos = (ypos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 0, ypos); \
+  comp_xoffset = (xoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 0, xoffset); \
+  comp_yoffset = (yoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 0, yoffset); \
+  _blend_##format_name (b_src + comp_xoffset + comp_yoffset * src_comp_rowstride, \
+      b_dest + comp_xpos + comp_ypos * dest_comp_rowstride, \
+      src_comp_rowstride, \
+      dest_comp_rowstride, src_comp_width, src_comp_height, \
+      src_alpha); \
+  \
+  b_src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 1); \
+  b_dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 1); \
+  src_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 1); \
+  dest_comp_rowstride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 1); \
+  src_comp_width = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH(info, 1, b_src_width); \
+  src_comp_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT(info, 1, b_src_height); \
+  comp_xpos = (xpos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 1, xpos); \
+  comp_ypos = (ypos == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 1, ypos); \
+  comp_xoffset = (xoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (info, 1, xoffset); \
+  comp_yoffset = (yoffset == 0) ? 0 : GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, 1, yoffset); \
+  _blend_##format_name (b_src + comp_xoffset * 2 + comp_yoffset * src_comp_rowstride, \
+      b_dest + comp_xpos * 2 + comp_ypos * dest_comp_rowstride, \
+      src_comp_rowstride, \
+      dest_comp_rowstride, 2 * src_comp_width, src_comp_height, \
+      src_alpha); \
+}
+
+#define NV_YUV_FILL_CHECKER(format_name, MEMSET)        \
+static void \
+fill_checker_##format_name (GstVideoFrame * frame) \
+{ \
+  gint i, j; \
+  static const int tab[] = { 80, 160, 80, 160 }; \
+  guint8 *p; \
+  gint comp_width, comp_height; \
+  gint rowstride; \
+  \
+  p = GST_VIDEO_FRAME_COMP_DATA (frame, 0); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    for (j = 0; j < comp_width; j++) { \
+      *p++ = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+    } \
+    p += rowstride - comp_width; \
+  } \
+  \
+  p = GST_VIDEO_FRAME_PLANE_DATA (frame, 1); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 1); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 1); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (p, 0x80, comp_width * 2); \
+    p += rowstride; \
+  } \
+}
+
+#define NV_YUV_FILL_COLOR(format_name,MEMSET) \
+static void \
+fill_color_##format_name (GstVideoFrame * frame, \
+    gint colY, gint colU, gint colV) \
+{ \
+  guint8 *y, *u, *v; \
+  gint comp_width, comp_height; \
+  gint rowstride; \
+  gint i, j; \
+  \
+  y = GST_VIDEO_FRAME_COMP_DATA (frame, 0); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 0); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 0); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    MEMSET (y, colY, comp_width); \
+    y += rowstride; \
+  } \
+  \
+  u = GST_VIDEO_FRAME_COMP_DATA (frame, 1); \
+  v = GST_VIDEO_FRAME_COMP_DATA (frame, 2); \
+  comp_width = GST_VIDEO_FRAME_COMP_WIDTH (frame, 1); \
+  comp_height = GST_VIDEO_FRAME_COMP_HEIGHT (frame, 1); \
+  rowstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); \
+  \
+  for (i = 0; i < comp_height; i++) { \
+    for (j = 0; j < comp_width; j++) { \
+      u[j*2] = colU; \
+      v[j*2] = colV; \
+    } \
+    u += rowstride; \
+    v += rowstride; \
+  } \
+}
+
+NV_YUV_BLEND (nv12, memcpy, compositor_orc_blend_u8);
+NV_YUV_FILL_CHECKER (nv12, memset);
+NV_YUV_FILL_COLOR (nv12, memset);
+NV_YUV_BLEND (nv21, memcpy, compositor_orc_blend_u8);
+NV_YUV_FILL_CHECKER (nv21, memset);
+
+/* RGB, BGR, xRGB, xBGR, RGBx, BGRx */
+
+#define RGB_BLEND(name, bpp, MEMCPY, BLENDLOOP) \
+static void \
+blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
+    gdouble src_alpha, GstVideoFrame * destframe) \
+{ \
+  gint b_alpha; \
+  gint i; \
+  gint src_stride, dest_stride; \
+  gint dest_width, dest_height; \
+  guint8 *dest, *src; \
+  gint src_width, src_height; \
+  \
+  src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
+  src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
+  \
+  src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 0); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 0); \
+  \
+  dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
+  dest_height = GST_VIDEO_FRAME_HEIGHT (destframe); \
+  \
+  src_stride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
+  dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 0); \
+  \
+  b_alpha = CLAMP ((gint) (src_alpha * 256), 0, 256); \
+  \
+  /* adjust src pointers for negative sizes */ \
+  if (xpos < 0) { \
+    src += -xpos * bpp; \
+    src_width -= -xpos; \
+    xpos = 0; \
+  } \
+  if (ypos < 0) { \
+    src += -ypos * src_stride; \
+    src_height -= -ypos; \
+    ypos = 0; \
+  } \
+  /* adjust width/height if the src is bigger than dest */ \
+  if (xpos + src_width > dest_width) { \
+    src_width = dest_width - xpos; \
+  } \
+  if (ypos + src_height > dest_height) { \
+    src_height = dest_height - ypos; \
+  } \
+  \
+  dest = dest + bpp * xpos + (ypos * dest_stride); \
+  /* If it's completely transparent... we just return */ \
+  if (G_UNLIKELY (src_alpha == 0.0)) { \
+    GST_INFO ("Fast copy (alpha == 0.0)"); \
+    return; \
+  } \
+  \
+  /* If it's completely opaque, we do a fast copy */ \
+  if (G_UNLIKELY (src_alpha == 1.0)) { \
+    GST_INFO ("Fast copy (alpha == 1.0)"); \
+    for (i = 0; i < src_height; i++) { \
+      MEMCPY (dest, src, bpp * src_width); \
+      src += src_stride; \
+      dest += dest_stride; \
+    } \
+    return; \
+  } \
+  \
+  BLENDLOOP(dest, dest_stride, src, src_stride, b_alpha, src_width * bpp, src_height); \
+}
+
+#define RGB_FILL_CHECKER_C(name, bpp, r, g, b) \
+static void \
+fill_checker_##name##_c (GstVideoFrame * frame) \
+{ \
+  gint i, j; \
+  static const int tab[] = { 80, 160, 80, 160 }; \
+  gint stride, dest_add, width, height; \
+  guint8 *dest; \
+  \
+  width = GST_VIDEO_FRAME_WIDTH (frame); \
+  height = GST_VIDEO_FRAME_HEIGHT (frame); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  stride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  dest_add = stride - width * bpp; \
+  \
+  for (i = 0; i < height; i++) { \
+    for (j = 0; j < width; j++) { \
+      dest[r] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)];       /* red */ \
+      dest[g] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)];       /* green */ \
+      dest[b] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)];       /* blue */ \
+      dest += bpp; \
+    } \
+    dest += dest_add; \
+  } \
+}
+
+#define RGB_FILL_COLOR(name, bpp, MEMSET_RGB) \
+static void \
+fill_color_##name (GstVideoFrame * frame, \
+    gint colY, gint colU, gint colV) \
+{ \
+  gint red, green, blue; \
+  gint i; \
+  gint dest_stride; \
+  gint width, height; \
+  guint8 *dest; \
+  \
+  width = GST_VIDEO_FRAME_WIDTH (frame); \
+  height = GST_VIDEO_FRAME_HEIGHT (frame); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  \
+  red = YUV_TO_R (colY, colU, colV); \
+  green = YUV_TO_G (colY, colU, colV); \
+  blue = YUV_TO_B (colY, colU, colV); \
+  \
+  for (i = 0; i < height; i++) { \
+    MEMSET_RGB (dest, red, green, blue, width); \
+    dest += dest_stride; \
+  } \
+}
+
+#define MEMSET_RGB_C(name, r, g, b) \
+static inline void \
+_memset_##name##_c (guint8* dest, gint red, gint green, gint blue, gint width) { \
+  gint j; \
+  \
+  for (j = 0; j < width; j++) { \
+    dest[r] = red; \
+    dest[g] = green; \
+    dest[b] = blue; \
+    dest += 3; \
+  } \
+}
+
+#define MEMSET_XRGB(name, r, g, b) \
+static inline void \
+_memset_##name (guint8* dest, gint red, gint green, gint blue, gint width) { \
+  guint32 val; \
+  \
+  val = GUINT32_FROM_BE ((red << r) | (green << g) | (blue << b)); \
+  compositor_orc_splat_u32 ((guint32 *) dest, val, width); \
+}
+
+#define _orc_memcpy_u32(dest,src,len) compositor_orc_memcpy_u32((guint32 *) dest, (const guint32 *) src, len/4)
+
+RGB_BLEND (rgb, 3, memcpy, compositor_orc_blend_u8);
+RGB_FILL_CHECKER_C (rgb, 3, 0, 1, 2);
+MEMSET_RGB_C (rgb, 0, 1, 2);
+RGB_FILL_COLOR (rgb_c, 3, _memset_rgb_c);
+
+MEMSET_RGB_C (bgr, 2, 1, 0);
+RGB_FILL_COLOR (bgr_c, 3, _memset_bgr_c);
+
+RGB_BLEND (xrgb, 4, _orc_memcpy_u32, compositor_orc_blend_u8);
+RGB_FILL_CHECKER_C (xrgb, 4, 1, 2, 3);
+MEMSET_XRGB (xrgb, 24, 16, 0);
+RGB_FILL_COLOR (xrgb, 4, _memset_xrgb);
+
+MEMSET_XRGB (xbgr, 0, 16, 24);
+RGB_FILL_COLOR (xbgr, 4, _memset_xbgr);
+
+MEMSET_XRGB (rgbx, 24, 16, 8);
+RGB_FILL_COLOR (rgbx, 4, _memset_rgbx);
+
+MEMSET_XRGB (bgrx, 8, 16, 24);
+RGB_FILL_COLOR (bgrx, 4, _memset_bgrx);
+
+/* YUY2, YVYU, UYVY */
+
+#define PACKED_422_BLEND(name, MEMCPY, BLENDLOOP) \
+static void \
+blend_##name (GstVideoFrame * srcframe, gint xpos, gint ypos, \
+    gdouble src_alpha, GstVideoFrame * destframe) \
+{ \
+  gint b_alpha; \
+  gint i; \
+  gint src_stride, dest_stride; \
+  gint dest_width, dest_height; \
+  guint8 *src, *dest; \
+  gint src_width, src_height; \
+  \
+  src_width = GST_VIDEO_FRAME_WIDTH (srcframe); \
+  src_height = GST_VIDEO_FRAME_HEIGHT (srcframe); \
+  \
+  dest_width = GST_VIDEO_FRAME_WIDTH (destframe); \
+  dest_height = GST_VIDEO_FRAME_HEIGHT (destframe); \
+  \
+  src = GST_VIDEO_FRAME_PLANE_DATA (srcframe, 0); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (destframe, 0); \
+  \
+  src_stride = GST_VIDEO_FRAME_COMP_STRIDE (srcframe, 0); \
+  dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (destframe, 0); \
+  \
+  b_alpha = CLAMP ((gint) (src_alpha * 256), 0, 256); \
+  \
+  xpos = GST_ROUND_UP_2 (xpos); \
+  \
+  /* adjust src pointers for negative sizes */ \
+  if (xpos < 0) { \
+    src += -xpos * 2; \
+    src_width -= -xpos; \
+    xpos = 0; \
+  } \
+  if (ypos < 0) { \
+    src += -ypos * src_stride; \
+    src_height -= -ypos; \
+    ypos = 0; \
+  } \
+  \
+  /* adjust width/height if the src is bigger than dest */ \
+  if (xpos + src_width > dest_width) { \
+    src_width = dest_width - xpos; \
+  } \
+  if (ypos + src_height > dest_height) { \
+    src_height = dest_height - ypos; \
+  } \
+  \
+  dest = dest + 2 * xpos + (ypos * dest_stride); \
+  /* If it's completely transparent... we just return */ \
+  if (G_UNLIKELY (src_alpha == 0.0)) { \
+    GST_INFO ("Fast copy (alpha == 0.0)"); \
+    return; \
+  } \
+  \
+  /* If it's completely opaque, we do a fast copy */ \
+  if (G_UNLIKELY (src_alpha == 1.0)) { \
+    GST_INFO ("Fast copy (alpha == 1.0)"); \
+    for (i = 0; i < src_height; i++) { \
+      MEMCPY (dest, src, 2 * src_width); \
+      src += src_stride; \
+      dest += dest_stride; \
+    } \
+    return; \
+  } \
+  \
+  BLENDLOOP(dest, dest_stride, src, src_stride, b_alpha, 2 * src_width, src_height); \
+}
+
+#define PACKED_422_FILL_CHECKER_C(name, Y1, U, Y2, V) \
+static void \
+fill_checker_##name##_c (GstVideoFrame * frame) \
+{ \
+  gint i, j; \
+  static const int tab[] = { 80, 160, 80, 160 }; \
+  gint dest_add; \
+  gint width, height; \
+  guint8 *dest; \
+  \
+  width = GST_VIDEO_FRAME_WIDTH (frame); \
+  width = GST_ROUND_UP_2 (width); \
+  height = GST_VIDEO_FRAME_HEIGHT (frame); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  dest_add = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0) - width * 2; \
+  width /= 2; \
+  \
+  for (i = 0; i < height; i++) { \
+    for (j = 0; j < width; j++) { \
+      dest[Y1] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+      dest[Y2] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \
+      dest[U] = 128; \
+      dest[V] = 128; \
+      dest += 4; \
+    } \
+    dest += dest_add; \
+  } \
+}
+
+#define PACKED_422_FILL_COLOR(name, Y1, U, Y2, V) \
+static void \
+fill_color_##name (GstVideoFrame * frame, \
+    gint colY, gint colU, gint colV) \
+{ \
+  gint i; \
+  gint dest_stride; \
+  guint32 val; \
+  gint width, height; \
+  guint8 *dest; \
+  \
+  width = GST_VIDEO_FRAME_WIDTH (frame); \
+  width = GST_ROUND_UP_2 (width); \
+  height = GST_VIDEO_FRAME_HEIGHT (frame); \
+  dest = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); \
+  dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); \
+  width /= 2; \
+  \
+  val = GUINT32_FROM_BE ((colY << Y1) | (colY << Y2) | (colU << U) | (colV << V)); \
+  \
+  for (i = 0; i < height; i++) { \
+    compositor_orc_splat_u32 ((guint32 *) dest, val, width); \
+    dest += dest_stride; \
+  } \
+}
+
+PACKED_422_BLEND (yuy2, memcpy, compositor_orc_blend_u8);
+PACKED_422_FILL_CHECKER_C (yuy2, 0, 1, 2, 3);
+PACKED_422_FILL_CHECKER_C (uyvy, 1, 0, 3, 2);
+PACKED_422_FILL_COLOR (yuy2, 24, 16, 8, 0);
+PACKED_422_FILL_COLOR (yvyu, 24, 0, 8, 16);
+PACKED_422_FILL_COLOR (uyvy, 16, 24, 0, 8);
+
+/* Init function */
+BlendFunction gst_compositor_blend_argb;
+BlendFunction gst_compositor_blend_bgra;
+BlendFunction gst_compositor_overlay_argb;
+BlendFunction gst_compositor_overlay_bgra;
+/* AYUV/ABGR is equal to ARGB, RGBA is equal to BGRA */
+BlendFunction gst_compositor_blend_y444;
+BlendFunction gst_compositor_blend_y42b;
+BlendFunction gst_compositor_blend_i420;
+/* I420 is equal to YV12 */
+BlendFunction gst_compositor_blend_nv12;
+BlendFunction gst_compositor_blend_nv21;
+BlendFunction gst_compositor_blend_y41b;
+BlendFunction gst_compositor_blend_rgb;
+/* BGR is equal to RGB */
+BlendFunction gst_compositor_blend_rgbx;
+/* BGRx, xRGB, xBGR are equal to RGBx */
+BlendFunction gst_compositor_blend_yuy2;
+/* YVYU and UYVY are equal to YUY2 */
+
+FillCheckerFunction gst_compositor_fill_checker_argb;
+FillCheckerFunction gst_compositor_fill_checker_bgra;
+/* ABGR is equal to ARGB, RGBA is equal to BGRA */
+FillCheckerFunction gst_compositor_fill_checker_ayuv;
+FillCheckerFunction gst_compositor_fill_checker_y444;
+FillCheckerFunction gst_compositor_fill_checker_y42b;
+FillCheckerFunction gst_compositor_fill_checker_i420;
+/* I420 is equal to YV12 */
+FillCheckerFunction gst_compositor_fill_checker_nv12;
+FillCheckerFunction gst_compositor_fill_checker_nv21;
+FillCheckerFunction gst_compositor_fill_checker_y41b;
+FillCheckerFunction gst_compositor_fill_checker_rgb;
+/* BGR is equal to RGB */
+FillCheckerFunction gst_compositor_fill_checker_xrgb;
+/* BGRx, xRGB, xBGR are equal to RGBx */
+FillCheckerFunction gst_compositor_fill_checker_yuy2;
+/* YVYU is equal to YUY2 */
+FillCheckerFunction gst_compositor_fill_checker_uyvy;
+
+FillColorFunction gst_compositor_fill_color_argb;
+FillColorFunction gst_compositor_fill_color_bgra;
+FillColorFunction gst_compositor_fill_color_abgr;
+FillColorFunction gst_compositor_fill_color_rgba;
+FillColorFunction gst_compositor_fill_color_ayuv;
+FillColorFunction gst_compositor_fill_color_y444;
+FillColorFunction gst_compositor_fill_color_y42b;
+FillColorFunction gst_compositor_fill_color_i420;
+FillColorFunction gst_compositor_fill_color_yv12;
+FillColorFunction gst_compositor_fill_color_nv12;
+/* NV21 is equal to NV12 */
+FillColorFunction gst_compositor_fill_color_y41b;
+FillColorFunction gst_compositor_fill_color_rgb;
+FillColorFunction gst_compositor_fill_color_bgr;
+FillColorFunction gst_compositor_fill_color_xrgb;
+FillColorFunction gst_compositor_fill_color_xbgr;
+FillColorFunction gst_compositor_fill_color_rgbx;
+FillColorFunction gst_compositor_fill_color_bgrx;
+FillColorFunction gst_compositor_fill_color_yuy2;
+FillColorFunction gst_compositor_fill_color_yvyu;
+FillColorFunction gst_compositor_fill_color_uyvy;
+
+void
+gst_compositor_init_blend (void)
+{
+  GST_DEBUG_CATEGORY_INIT (gst_compositor_blend_debug, "compositor_blend", 0,
+      "video compositor blending functions");
+
+  gst_compositor_blend_argb = blend_argb;
+  gst_compositor_blend_bgra = blend_bgra;
+  gst_compositor_overlay_argb = overlay_argb;
+  gst_compositor_overlay_bgra = overlay_bgra;
+  gst_compositor_blend_i420 = blend_i420;
+  gst_compositor_blend_nv12 = blend_nv12;
+  gst_compositor_blend_nv21 = blend_nv21;
+  gst_compositor_blend_y444 = blend_y444;
+  gst_compositor_blend_y42b = blend_y42b;
+  gst_compositor_blend_y41b = blend_y41b;
+  gst_compositor_blend_rgb = blend_rgb;
+  gst_compositor_blend_xrgb = blend_xrgb;
+  gst_compositor_blend_yuy2 = blend_yuy2;
+
+  gst_compositor_fill_checker_argb = fill_checker_argb_c;
+  gst_compositor_fill_checker_bgra = fill_checker_bgra_c;
+  gst_compositor_fill_checker_ayuv = fill_checker_ayuv_c;
+  gst_compositor_fill_checker_i420 = fill_checker_i420;
+  gst_compositor_fill_checker_nv12 = fill_checker_nv12;
+  gst_compositor_fill_checker_nv21 = fill_checker_nv21;
+  gst_compositor_fill_checker_y444 = fill_checker_y444;
+  gst_compositor_fill_checker_y42b = fill_checker_y42b;
+  gst_compositor_fill_checker_y41b = fill_checker_y41b;
+  gst_compositor_fill_checker_rgb = fill_checker_rgb_c;
+  gst_compositor_fill_checker_xrgb = fill_checker_xrgb_c;
+  gst_compositor_fill_checker_yuy2 = fill_checker_yuy2_c;
+  gst_compositor_fill_checker_uyvy = fill_checker_uyvy_c;
+
+  gst_compositor_fill_color_argb = fill_color_argb;
+  gst_compositor_fill_color_bgra = fill_color_bgra;
+  gst_compositor_fill_color_abgr = fill_color_abgr;
+  gst_compositor_fill_color_rgba = fill_color_rgba;
+  gst_compositor_fill_color_ayuv = fill_color_ayuv;
+  gst_compositor_fill_color_i420 = fill_color_i420;
+  gst_compositor_fill_color_yv12 = fill_color_yv12;
+  gst_compositor_fill_color_nv12 = fill_color_nv12;
+  gst_compositor_fill_color_y444 = fill_color_y444;
+  gst_compositor_fill_color_y42b = fill_color_y42b;
+  gst_compositor_fill_color_y41b = fill_color_y41b;
+  gst_compositor_fill_color_rgb = fill_color_rgb_c;
+  gst_compositor_fill_color_bgr = fill_color_bgr_c;
+  gst_compositor_fill_color_xrgb = fill_color_xrgb;
+  gst_compositor_fill_color_xbgr = fill_color_xbgr;
+  gst_compositor_fill_color_rgbx = fill_color_rgbx;
+  gst_compositor_fill_color_bgrx = fill_color_bgrx;
+  gst_compositor_fill_color_yuy2 = fill_color_yuy2;
+  gst_compositor_fill_color_yvyu = fill_color_yvyu;
+  gst_compositor_fill_color_uyvy = fill_color_uyvy;
+}
diff --git a/gst/compositor/blend.h b/gst/compositor/blend.h
new file mode 100644
index 0000000..1cc127c
--- /dev/null
+++ b/gst/compositor/blend.h
@@ -0,0 +1,103 @@
+/* 
+ * Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __BLEND_H__
+#define __BLEND_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+typedef void (*BlendFunction) (GstVideoFrame *srcframe, gint xpos, gint ypos, gdouble src_alpha, GstVideoFrame * destframe);
+typedef void (*FillCheckerFunction) (GstVideoFrame * frame);
+typedef void (*FillColorFunction) (GstVideoFrame * frame, gint c1, gint c2, gint c3);
+
+extern BlendFunction gst_compositor_blend_argb;
+extern BlendFunction gst_compositor_blend_bgra;
+#define gst_compositor_blend_ayuv gst_compositor_blend_argb
+#define gst_compositor_blend_abgr gst_compositor_blend_argb
+#define gst_compositor_blend_rgba gst_compositor_blend_bgra
+extern BlendFunction gst_compositor_overlay_argb;
+extern BlendFunction gst_compositor_overlay_bgra;
+#define gst_compositor_overlay_ayuv gst_compositor_overlay_argb
+#define gst_compositor_overlay_abgr gst_compositor_overlay_argb
+#define gst_compositor_overlay_rgba gst_compositor_overlay_bgra
+extern BlendFunction gst_compositor_blend_i420;
+#define gst_compositor_blend_yv12 gst_compositor_blend_i420
+extern BlendFunction gst_compositor_blend_nv12;
+extern BlendFunction gst_compositor_blend_nv21;
+extern BlendFunction gst_compositor_blend_y41b;
+extern BlendFunction gst_compositor_blend_y42b;
+extern BlendFunction gst_compositor_blend_y444;
+extern BlendFunction gst_compositor_blend_rgb;
+#define gst_compositor_blend_bgr gst_compositor_blend_rgb
+extern BlendFunction gst_compositor_blend_rgbx;
+#define gst_compositor_blend_bgrx gst_compositor_blend_rgbx
+#define gst_compositor_blend_xrgb gst_compositor_blend_rgbx
+#define gst_compositor_blend_xbgr gst_compositor_blend_rgbx
+extern BlendFunction gst_compositor_blend_yuy2;
+#define gst_compositor_blend_uyvy gst_compositor_blend_yuy2;
+#define gst_compositor_blend_yvyu gst_compositor_blend_yuy2;
+
+extern FillCheckerFunction gst_compositor_fill_checker_argb;
+#define gst_compositor_fill_checker_abgr gst_compositor_fill_checker_argb
+extern FillCheckerFunction gst_compositor_fill_checker_bgra;
+#define gst_compositor_fill_checker_rgba gst_compositor_fill_checker_bgra
+extern FillCheckerFunction gst_compositor_fill_checker_ayuv;
+extern FillCheckerFunction gst_compositor_fill_checker_i420;
+#define gst_compositor_fill_checker_yv12 gst_compositor_fill_checker_i420
+extern FillCheckerFunction gst_compositor_fill_checker_nv12;
+extern FillCheckerFunction gst_compositor_fill_checker_nv21;
+extern FillCheckerFunction gst_compositor_fill_checker_y41b;
+extern FillCheckerFunction gst_compositor_fill_checker_y42b;
+extern FillCheckerFunction gst_compositor_fill_checker_y444;
+extern FillCheckerFunction gst_compositor_fill_checker_rgb;
+#define gst_compositor_fill_checker_bgr gst_compositor_fill_checker_rgb
+extern FillCheckerFunction gst_compositor_fill_checker_rgbx;
+#define gst_compositor_fill_checker_bgrx gst_compositor_fill_checker_rgbx
+#define gst_compositor_fill_checker_xrgb gst_compositor_fill_checker_rgbx
+#define gst_compositor_fill_checker_xbgr gst_compositor_fill_checker_rgbx
+extern FillCheckerFunction gst_compositor_fill_checker_yuy2;
+#define gst_compositor_fill_checker_yvyu gst_compositor_fill_checker_yuy2;
+extern FillCheckerFunction gst_compositor_fill_checker_uyvy;
+
+extern FillColorFunction gst_compositor_fill_color_argb;
+extern FillColorFunction gst_compositor_fill_color_abgr;
+extern FillColorFunction gst_compositor_fill_color_bgra;
+extern FillColorFunction gst_compositor_fill_color_rgba;
+extern FillColorFunction gst_compositor_fill_color_ayuv;
+extern FillColorFunction gst_compositor_fill_color_i420;
+extern FillColorFunction gst_compositor_fill_color_yv12;
+extern FillColorFunction gst_compositor_fill_color_nv12;
+#define gst_compositor_fill_color_nv21 gst_compositor_fill_color_nv12;
+extern FillColorFunction gst_compositor_fill_color_y41b;
+extern FillColorFunction gst_compositor_fill_color_y42b;
+extern FillColorFunction gst_compositor_fill_color_y444;
+extern FillColorFunction gst_compositor_fill_color_rgb;
+extern FillColorFunction gst_compositor_fill_color_bgr;
+extern FillColorFunction gst_compositor_fill_color_xrgb;
+extern FillColorFunction gst_compositor_fill_color_xbgr;
+extern FillColorFunction gst_compositor_fill_color_rgbx;
+extern FillColorFunction gst_compositor_fill_color_bgrx;
+extern FillColorFunction gst_compositor_fill_color_yuy2;
+extern FillColorFunction gst_compositor_fill_color_yvyu;
+extern FillColorFunction gst_compositor_fill_color_uyvy;
+
+void gst_compositor_init_blend (void);
+
+#endif /* __BLEND_H__ */
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c
new file mode 100644
index 0000000..805b674
--- /dev/null
+++ b/gst/compositor/compositor.c
@@ -0,0 +1,604 @@
+/* Video compositor plugin
+ * Copyright (C) 2004, 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
+ * Copyright (C) 2014 Thibault Saunier <tsaunier@gnome.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.
+ */
+
+/**
+ * SECTION:element-compositor
+ *
+ * Compositor can accept AYUV, ARGB and BGRA video streams. For each of the requested
+ * sink pads it will compare the incoming geometry and framerate to define the
+ * output parameters. Indeed output video frames will have the geometry of the
+ * biggest incoming video stream and the framerate of the fastest incoming one.
+ *
+ * Compositor will do colorspace conversion.
+ * 
+ * Individual parameters for each input stream can be configured on the
+ * #GstCompositorPad.
+ *
+ * <refsect2>
+ * <title>Sample pipelines</title>
+ * |[
+ * gst-launch-1.0 \
+ *   videotestsrc pattern=1 ! \
+ *   video/x-raw,format=AYUV,framerate=\(fraction\)10/1,width=100,height=100 ! \
+ *   videobox border-alpha=0 top=-70 bottom=-70 right=-220 ! \
+ *   compositor name=comp sink_0::alpha=0.7 sink_1::alpha=0.5 ! \
+ *   videoconvert ! xvimagesink \
+ *   videotestsrc ! \
+ *   video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=320,height=240 ! comp.
+ * ]| A pipeline to demonstrate compositor used together with videobox.
+ * This should show a 320x240 pixels video test source with some transparency
+ * showing the background checker pattern. Another video test source with just
+ * the snow pattern of 100x100 pixels is overlayed on top of the first one on
+ * the left vertically centered with a small transparency showing the first
+ * video test source behind and the checker pattern under it. Note that the
+ * framerate of the output video is 10 frames per second.
+ * |[
+ * gst-launch-1.0 videotestsrc pattern=1 ! \
+ *   video/x-raw, framerate=\(fraction\)10/1, width=100, height=100 ! \
+ *   compositor name=comp ! videoconvert ! ximagesink \
+ *   videotestsrc !  \
+ *   video/x-raw, framerate=\(fraction\)5/1, width=320, height=240 ! comp.
+ * ]| A pipeline to demostrate bgra comping. (This does not demonstrate alpha blending). 
+ * |[
+ * gst-launch-1.0 videotestsrc pattern=1 ! \
+ *   video/x-raw,format =I420, framerate=\(fraction\)10/1, width=100, height=100 ! \
+ *   compositor name=comp ! videoconvert ! ximagesink \
+ *   videotestsrc ! \
+ *   video/x-raw,format=I420, framerate=\(fraction\)5/1, width=320, height=240 ! comp.
+ * ]| A pipeline to test I420
+ * |[
+ * gst-launch-1.0 compositor name=comp sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! \
+ *   videoconvert ! ximagesink \
+ *   videotestsrc pattern=snow timestamp-offset=3000000000 ! \
+ *   "video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1" ! \
+ *   timeoverlay ! queue2 ! comp. \
+ *   videotestsrc pattern=smpte ! \
+ *   "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1" ! \
+ *   timeoverlay ! queue2 ! comp.
+ * ]| A pipeline to demonstrate synchronized compositing (the second stream starts after 3 seconds)
+ * </refsect2>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+
+#include "compositor.h"
+#include "compositorpad.h"
+
+#ifdef DISABLE_ORC
+#define orc_memset memset
+#else
+#include <orc/orcfunctions.h>
+#endif
+
+GST_DEBUG_CATEGORY_STATIC (gst_compositor_debug);
+#define GST_CAT_DEFAULT gst_compositor_debug
+
+#define FORMATS " { AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, "\
+                "   YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, "\
+                "   RGBx, BGRx } "
+
+static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (FORMATS))
+    );
+
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
+    GST_PAD_SINK,
+    GST_PAD_REQUEST,
+    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (FORMATS))
+    );
+
+#define DEFAULT_PAD_ZORDER 0
+#define DEFAULT_PAD_XPOS   0
+#define DEFAULT_PAD_YPOS   0
+#define DEFAULT_PAD_ALPHA  1.0
+enum
+{
+  PROP_PAD_0,
+  PROP_PAD_ZORDER,
+  PROP_PAD_XPOS,
+  PROP_PAD_YPOS,
+  PROP_PAD_ALPHA
+};
+
+G_DEFINE_TYPE (GstCompositorPad, gst_compositor_pad,
+    GST_TYPE_VIDEO_AGGREGATOR_PAD);
+
+static void
+gst_compositor_pad_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstCompositorPad *pad = GST_COMPOSITOR_PAD (object);
+
+  switch (prop_id) {
+    case PROP_PAD_ZORDER:
+      g_value_set_uint (value, pad->zorder);
+      break;
+    case PROP_PAD_XPOS:
+      g_value_set_int (value, pad->xpos);
+      break;
+    case PROP_PAD_YPOS:
+      g_value_set_int (value, pad->ypos);
+      break;
+    case PROP_PAD_ALPHA:
+      g_value_set_double (value, pad->alpha);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_compositor_pad_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstCompositorPad *pad = GST_COMPOSITOR_PAD (object);
+
+  switch (prop_id) {
+    case PROP_PAD_XPOS:
+      pad->xpos = g_value_get_int (value);
+      break;
+    case PROP_PAD_YPOS:
+      pad->ypos = g_value_get_int (value);
+      break;
+    case PROP_PAD_ALPHA:
+      pad->alpha = g_value_get_double (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_compositor_pad_class_init (GstCompositorPadClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+
+  gobject_class->set_property = gst_compositor_pad_set_property;
+  gobject_class->get_property = gst_compositor_pad_get_property;
+
+  g_object_class_install_property (gobject_class, PROP_PAD_XPOS,
+      g_param_spec_int ("xpos", "X Position", "X Position of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_XPOS,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_YPOS,
+      g_param_spec_int ("ypos", "Y Position", "Y Position of the picture",
+          G_MININT, G_MAXINT, DEFAULT_PAD_YPOS,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_PAD_ALPHA,
+      g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
+          DEFAULT_PAD_ALPHA,
+          G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_compositor_pad_init (GstCompositorPad * compo_pad)
+{
+  compo_pad->xpos = DEFAULT_PAD_XPOS;
+  compo_pad->ypos = DEFAULT_PAD_YPOS;
+  compo_pad->alpha = DEFAULT_PAD_ALPHA;
+}
+
+
+/* GstCompositor */
+#define DEFAULT_BACKGROUND COMPOSITOR_BACKGROUND_CHECKER
+enum
+{
+  PROP_0,
+  PROP_BACKGROUND
+};
+
+#define GST_TYPE_COMPOSITOR_BACKGROUND (gst_compositor_background_get_type())
+static GType
+gst_compositor_background_get_type (void)
+{
+  static GType compositor_background_type = 0;
+
+  static const GEnumValue compositor_background[] = {
+    {COMPOSITOR_BACKGROUND_CHECKER, "Checker pattern", "checker"},
+    {COMPOSITOR_BACKGROUND_BLACK, "Black", "black"},
+    {COMPOSITOR_BACKGROUND_WHITE, "White", "white"},
+    {COMPOSITOR_BACKGROUND_TRANSPARENT,
+        "Transparent Background to enable further compositing", "transparent"},
+    {0, NULL, NULL},
+  };
+
+  if (!compositor_background_type) {
+    compositor_background_type =
+        g_enum_register_static ("GstCompositorBackground",
+        compositor_background);
+  }
+  return compositor_background_type;
+}
+
+static void
+gst_compositor_get_property (GObject * object,
+    guint prop_id, GValue * value, GParamSpec * pspec)
+{
+  GstCompositor *self = GST_COMPOSITOR (object);
+
+  switch (prop_id) {
+    case PROP_BACKGROUND:
+      g_value_set_enum (value, self->background);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
+gst_compositor_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+  GstCompositor *self = GST_COMPOSITOR (object);
+
+  switch (prop_id) {
+    case PROP_BACKGROUND:
+      self->background = g_value_get_enum (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+#define gst_compositor_parent_class parent_class
+G_DEFINE_TYPE (GstCompositor, gst_compositor, GST_TYPE_VIDEO_AGGREGATOR);
+
+static gboolean
+set_functions (GstCompositor * self, GstVideoInfo * info)
+{
+  gboolean ret = FALSE;
+
+  self->blend = NULL;
+  self->overlay = NULL;
+  self->fill_checker = NULL;
+  self->fill_color = NULL;
+
+  switch (GST_VIDEO_INFO_FORMAT (info)) {
+    case GST_VIDEO_FORMAT_AYUV:
+      self->blend = gst_compositor_blend_ayuv;
+      self->overlay = gst_compositor_overlay_ayuv;
+      self->fill_checker = gst_compositor_fill_checker_ayuv;
+      self->fill_color = gst_compositor_fill_color_ayuv;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_ARGB:
+      self->blend = gst_compositor_blend_argb;
+      self->overlay = gst_compositor_overlay_argb;
+      self->fill_checker = gst_compositor_fill_checker_argb;
+      self->fill_color = gst_compositor_fill_color_argb;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_BGRA:
+      self->blend = gst_compositor_blend_bgra;
+      self->overlay = gst_compositor_overlay_bgra;
+      self->fill_checker = gst_compositor_fill_checker_bgra;
+      self->fill_color = gst_compositor_fill_color_bgra;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_ABGR:
+      self->blend = gst_compositor_blend_abgr;
+      self->overlay = gst_compositor_overlay_abgr;
+      self->fill_checker = gst_compositor_fill_checker_abgr;
+      self->fill_color = gst_compositor_fill_color_abgr;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_RGBA:
+      self->blend = gst_compositor_blend_rgba;
+      self->overlay = gst_compositor_overlay_rgba;
+      self->fill_checker = gst_compositor_fill_checker_rgba;
+      self->fill_color = gst_compositor_fill_color_rgba;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_Y444:
+      self->blend = gst_compositor_blend_y444;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_y444;
+      self->fill_color = gst_compositor_fill_color_y444;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_Y42B:
+      self->blend = gst_compositor_blend_y42b;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_y42b;
+      self->fill_color = gst_compositor_fill_color_y42b;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_YUY2:
+      self->blend = gst_compositor_blend_yuy2;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_yuy2;
+      self->fill_color = gst_compositor_fill_color_yuy2;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_UYVY:
+      self->blend = gst_compositor_blend_uyvy;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_uyvy;
+      self->fill_color = gst_compositor_fill_color_uyvy;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_YVYU:
+      self->blend = gst_compositor_blend_yvyu;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_yvyu;
+      self->fill_color = gst_compositor_fill_color_yvyu;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_I420:
+      self->blend = gst_compositor_blend_i420;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_i420;
+      self->fill_color = gst_compositor_fill_color_i420;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_YV12:
+      self->blend = gst_compositor_blend_yv12;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_yv12;
+      self->fill_color = gst_compositor_fill_color_yv12;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_NV12:
+      self->blend = gst_compositor_blend_nv12;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_nv12;
+      self->fill_color = gst_compositor_fill_color_nv12;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_NV21:
+      self->blend = gst_compositor_blend_nv21;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_nv21;
+      self->fill_color = gst_compositor_fill_color_nv21;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_Y41B:
+      self->blend = gst_compositor_blend_y41b;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_y41b;
+      self->fill_color = gst_compositor_fill_color_y41b;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_RGB:
+      self->blend = gst_compositor_blend_rgb;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_rgb;
+      self->fill_color = gst_compositor_fill_color_rgb;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_BGR:
+      self->blend = gst_compositor_blend_bgr;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_bgr;
+      self->fill_color = gst_compositor_fill_color_bgr;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_xRGB:
+      self->blend = gst_compositor_blend_xrgb;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_xrgb;
+      self->fill_color = gst_compositor_fill_color_xrgb;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_xBGR:
+      self->blend = gst_compositor_blend_xbgr;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_xbgr;
+      self->fill_color = gst_compositor_fill_color_xbgr;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_RGBx:
+      self->blend = gst_compositor_blend_rgbx;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_rgbx;
+      self->fill_color = gst_compositor_fill_color_rgbx;
+      ret = TRUE;
+      break;
+    case GST_VIDEO_FORMAT_BGRx:
+      self->blend = gst_compositor_blend_bgrx;
+      self->overlay = self->blend;
+      self->fill_checker = gst_compositor_fill_checker_bgrx;
+      self->fill_color = gst_compositor_fill_color_bgrx;
+      ret = TRUE;
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+static gboolean
+_update_info (GstVideoAggregator * vagg, GstVideoInfo * info)
+{
+  GList *l;
+  gint best_width = -1, best_height = -1;
+  gboolean ret = FALSE;
+
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *vaggpad = l->data;
+    GstCompositorPad *compositor_pad = GST_COMPOSITOR_PAD (vaggpad);
+    gint this_width, this_height;
+    gint width, height;
+
+    width = GST_VIDEO_INFO_WIDTH (&vaggpad->info);
+    height = GST_VIDEO_INFO_HEIGHT (&vaggpad->info);
+
+    if (width == 0 || height == 0)
+      continue;
+
+    this_width = width + MAX (compositor_pad->xpos, 0);
+    this_height = height + MAX (compositor_pad->ypos, 0);
+
+    if (best_width < this_width)
+      best_width = this_width;
+    if (best_height < this_height)
+      best_height = this_height;
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  if (best_width > 0 && best_height > 0) {
+    gst_video_info_set_format (info, GST_VIDEO_INFO_FORMAT (info),
+        best_width, best_height);
+    ret = set_functions (GST_COMPOSITOR (vagg), info);
+  }
+
+  return ret;
+}
+
+static GstFlowReturn
+gst_compositor_aggregate_frames (GstVideoAggregator * vagg, GstBuffer * outbuf)
+{
+  GList *l;
+  GstCompositor *self = GST_COMPOSITOR (vagg);
+  BlendFunction composite;
+  GstVideoFrame out_frame, *outframe;
+
+  if (!gst_video_frame_map (&out_frame, &vagg->info, outbuf, GST_MAP_WRITE)) {
+
+    return GST_FLOW_ERROR;
+  }
+
+  outframe = &out_frame;
+  /* default to blending */
+  composite = self->blend;
+  switch (self->background) {
+    case COMPOSITOR_BACKGROUND_CHECKER:
+      self->fill_checker (outframe);
+      break;
+    case COMPOSITOR_BACKGROUND_BLACK:
+      self->fill_color (outframe, 16, 128, 128);
+      break;
+    case COMPOSITOR_BACKGROUND_WHITE:
+      self->fill_color (outframe, 240, 128, 128);
+      break;
+    case COMPOSITOR_BACKGROUND_TRANSPARENT:
+    {
+      guint i, plane, num_planes, height;
+
+      num_planes = GST_VIDEO_FRAME_N_PLANES (outframe);
+      for (plane = 0; plane < num_planes; ++plane) {
+        guint8 *pdata;
+        gsize rowsize, plane_stride;
+
+        pdata = GST_VIDEO_FRAME_PLANE_DATA (outframe, plane);
+        plane_stride = GST_VIDEO_FRAME_PLANE_STRIDE (outframe, plane);
+        rowsize = GST_VIDEO_FRAME_COMP_WIDTH (outframe, plane)
+            * GST_VIDEO_FRAME_COMP_PSTRIDE (outframe, plane);
+        height = GST_VIDEO_FRAME_COMP_HEIGHT (outframe, plane);
+        for (i = 0; i < height; ++i) {
+          memset (pdata, 0, rowsize);
+          pdata += plane_stride;
+        }
+      }
+
+      /* use overlay to keep background transparent */
+      composite = self->overlay;
+      break;
+    }
+  }
+
+  GST_OBJECT_LOCK (vagg);
+  for (l = GST_ELEMENT (vagg)->sinkpads; l; l = l->next) {
+    GstVideoAggregatorPad *pad = l->data;
+    GstCompositorPad *compo_pad = GST_COMPOSITOR_PAD (pad);
+
+    if (pad->aggregated_frame != NULL) {
+      composite (pad->aggregated_frame, compo_pad->xpos, compo_pad->ypos,
+          compo_pad->alpha, outframe);
+    }
+  }
+  GST_OBJECT_UNLOCK (vagg);
+
+  gst_video_frame_unmap (outframe);
+
+  return GST_FLOW_OK;
+}
+
+/* GObject boilerplate */
+static void
+gst_compositor_class_init (GstCompositorClass * klass)
+{
+  GObjectClass *gobject_class = (GObjectClass *) klass;
+  GstElementClass *gstelement_class = (GstElementClass *) klass;
+  GstVideoAggregatorClass *videoaggregator_class =
+      (GstVideoAggregatorClass *) klass;
+  GstAggregatorClass *agg_class = (GstAggregatorClass *) klass;
+
+  gobject_class->get_property = gst_compositor_get_property;
+  gobject_class->set_property = gst_compositor_set_property;
+
+  agg_class->sinkpads_type = GST_TYPE_COMPOSITOR_PAD;
+  videoaggregator_class->update_info = _update_info;
+  videoaggregator_class->aggregate_frames = gst_compositor_aggregate_frames;
+
+  g_object_class_install_property (gobject_class, PROP_BACKGROUND,
+      g_param_spec_enum ("background", "Background", "Background type",
+          GST_TYPE_COMPOSITOR_BACKGROUND,
+          DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&src_factory));
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&sink_factory));
+
+  gst_element_class_set_static_metadata (gstelement_class, "Compositor",
+      "Filter/Editor/Video/Compositor",
+      "Composite multiple video streams", "Wim Taymans <wim@fluendo.com>, "
+      "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+}
+
+static void
+gst_compositor_init (GstCompositor * self)
+{
+  self->background = DEFAULT_BACKGROUND;
+  /* initialize variables */
+}
+
+/* Element registration */
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+  GST_DEBUG_CATEGORY_INIT (gst_compositor_debug, "compositor", 0, "compositor");
+
+  gst_compositor_init_blend ();
+
+  return gst_element_register (plugin, "compositor", GST_RANK_PRIMARY + 1,
+      GST_TYPE_COMPOSITOR);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    compositor,
+    "Compositor", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME,
+    GST_PACKAGE_ORIGIN)
diff --git a/gst/compositor/compositor.h b/gst/compositor/compositor.h
new file mode 100644
index 0000000..a6b4d9f
--- /dev/null
+++ b/gst/compositor/compositor.h
@@ -0,0 +1,86 @@
+/* Generic video compositor plugin
+ * Copyright (C) 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+ 
+#ifndef __GST_COMPOSITOR_H__
+#define __GST_COMPOSITOR_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+#include <gst/video/gstvideoaggregator.h>
+
+#include "blend.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_COMPOSITOR (gst_compositor_get_type())
+#define GST_COMPOSITOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COMPOSITOR, GstCompositor))
+#define GST_COMPOSITOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR, GstCompositorClass))
+#define GST_IS_COMPOSITOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COMPOSITOR))
+#define GST_IS_COMPOSITOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COMPOSITOR))
+
+typedef struct _GstCompositor GstCompositor;
+typedef struct _GstCompositorClass GstCompositorClass;
+
+/**
+ * GstcompositorBackground:
+ * @COMPOSITOR_BACKGROUND_CHECKER: checker pattern background
+ * @COMPOSITOR_BACKGROUND_BLACK: solid color black background
+ * @COMPOSITOR_BACKGROUND_WHITE: solid color white background
+ * @COMPOSITOR_BACKGROUND_TRANSPARENT: background is left transparent and layers are composited using "A OVER B" composition rules. This is only applicable to AYUV and ARGB (and variants) as it preserves the alpha channel and allows for further mixing.
+ *
+ * The different backgrounds compositor can blend over.
+ */
+typedef enum
+{
+  COMPOSITOR_BACKGROUND_CHECKER,
+  COMPOSITOR_BACKGROUND_BLACK,
+  COMPOSITOR_BACKGROUND_WHITE,
+  COMPOSITOR_BACKGROUND_TRANSPARENT,
+}
+GstCompositorBackground;
+
+/**
+ * GstCompositor:
+ *
+ * The opaque #GstCompositor structure.
+ */
+struct _GstCompositor
+{
+  GstVideoAggregator videoaggregator;
+  GstCompositorBackground background;
+
+  BlendFunction blend, overlay;
+  FillCheckerFunction fill_checker;
+  FillColorFunction fill_color;
+};
+
+struct _GstCompositorClass
+{
+  GstVideoAggregatorClass parent_class;
+};
+
+GType gst_compositor_get_type (void);
+
+G_END_DECLS
+#endif /* __GST_COMPOSITOR_H__ */
diff --git a/gst/compositor/compositororc-dist.c b/gst/compositor/compositororc-dist.c
new file mode 100644
index 0000000..db71b93
--- /dev/null
+++ b/gst/compositor/compositororc-dist.c
@@ -0,0 +1,2400 @@
+
+/* autogenerated from compositororc.orc */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <glib.h>
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+typedef int8_t orc_int8;
+typedef int16_t orc_int16;
+typedef int32_t orc_int32;
+typedef int64_t orc_int64;
+typedef uint8_t orc_uint8;
+typedef uint16_t orc_uint16;
+typedef uint32_t orc_uint32;
+typedef uint64_t orc_uint64;
+#define ORC_UINT64_C(x) UINT64_C(x)
+#elif defined(_MSC_VER)
+typedef signed __int8 orc_int8;
+typedef signed __int16 orc_int16;
+typedef signed __int32 orc_int32;
+typedef signed __int64 orc_int64;
+typedef unsigned __int8 orc_uint8;
+typedef unsigned __int16 orc_uint16;
+typedef unsigned __int32 orc_uint32;
+typedef unsigned __int64 orc_uint64;
+#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
+#else
+#include <limits.h>
+typedef signed char orc_int8;
+typedef short orc_int16;
+typedef int orc_int32;
+typedef unsigned char orc_uint8;
+typedef unsigned short orc_uint16;
+typedef unsigned int orc_uint32;
+#if INT_MAX == LONG_MAX
+typedef long long orc_int64;
+typedef unsigned long long orc_uint64;
+#define ORC_UINT64_C(x) (x##ULL)
+#else
+typedef long orc_int64;
+typedef unsigned long orc_uint64;
+#define ORC_UINT64_C(x) (x##UL)
+#endif
+#endif
+typedef union
+{
+  orc_int16 i;
+  orc_int8 x2[2];
+} orc_union16;
+typedef union
+{
+  orc_int32 i;
+  float f;
+  orc_int16 x2[2];
+  orc_int8 x4[4];
+} orc_union32;
+typedef union
+{
+  orc_int64 i;
+  double f;
+  orc_int32 x2[2];
+  float x2f[2];
+  orc_int16 x4[4];
+} orc_union64;
+#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+
+#ifndef ORC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define ORC_INTERNAL __hidden
+#elif defined (__GNUC__)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#else
+#define ORC_INTERNAL
+#endif
+#endif
+
+
+#ifndef DISABLE_ORC
+#include <orc/orc.h>
+#endif
+void compositor_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
+void compositor_orc_memcpy_u32 (guint32 * ORC_RESTRICT d1,
+    const guint32 * ORC_RESTRICT s1, int n);
+void compositor_orc_blend_u8 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_blend_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+
+
+/* begin Orc C target preamble */
+#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
+#define ORC_ABS(a) ((a)<0 ? -(a) : (a))
+#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
+#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))
+#define ORC_SB_MAX 127
+#define ORC_SB_MIN (-1-ORC_SB_MAX)
+#define ORC_UB_MAX 255
+#define ORC_UB_MIN 0
+#define ORC_SW_MAX 32767
+#define ORC_SW_MIN (-1-ORC_SW_MAX)
+#define ORC_UW_MAX 65535
+#define ORC_UW_MIN 0
+#define ORC_SL_MAX 2147483647
+#define ORC_SL_MIN (-1-ORC_SL_MAX)
+#define ORC_UL_MAX 4294967295U
+#define ORC_UL_MIN 0
+#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)
+#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)
+#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)
+#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)
+#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)
+#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)
+#define ORC_SWAP_W(x) ((((x)&0xffU)<<8) | (((x)&0xff00U)>>8))
+#define ORC_SWAP_L(x) ((((x)&0xffU)<<24) | (((x)&0xff00U)<<8) | (((x)&0xff0000U)>>8) | (((x)&0xff000000U)>>24))
+#define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56))
+#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
+#define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff))
+#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
+#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
+#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+/* end Orc C target preamble */
+
+
+
+/* compositor_orc_splat_u32 */
+#ifdef DISABLE_ORC
+void
+compositor_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  ptr0 = (orc_union32 *) d1;
+
+  /* 0: loadpl */
+  var32.i = p1;
+
+  for (i = 0; i < n; i++) {
+    /* 1: copyl */
+    var33.i = var32.i;
+    /* 2: storel */
+    ptr0[i] = var33;
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+
+  /* 0: loadpl */
+  var32.i = ex->params[24];
+
+  for (i = 0; i < n; i++) {
+    /* 1: copyl */
+    var33.i = var32.i;
+    /* 2: storel */
+    ptr0[i] = var33;
+  }
+
+}
+
+void
+compositor_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 24, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111, 114,
+        99, 95, 115, 112, 108, 97, 116, 95, 117, 51, 50, 11, 4, 4, 16, 4,
+        112, 0, 24, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_splat_u32);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "compositor_orc_splat_u32");
+      orc_program_set_backup_function (p, _backup_compositor_orc_splat_u32);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_parameter (p, 4, "p1");
+
+      orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_memcpy_u32 */
+#ifdef DISABLE_ORC
+void
+compositor_orc_memcpy_u32 (guint32 * ORC_RESTRICT d1,
+    const guint32 * ORC_RESTRICT s1, int n)
+{
+  int i;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  ptr0 = (orc_union32 *) d1;
+  ptr4 = (orc_union32 *) s1;
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var32 = ptr4[i];
+    /* 1: copyl */
+    var33.i = var32.i;
+    /* 2: storel */
+    ptr0[i] = var33;
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_memcpy_u32 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int n = ex->n;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union32 var32;
+  orc_union32 var33;
+
+  ptr0 = (orc_union32 *) ex->arrays[0];
+  ptr4 = (orc_union32 *) ex->arrays[4];
+
+
+  for (i = 0; i < n; i++) {
+    /* 0: loadl */
+    var32 = ptr4[i];
+    /* 1: copyl */
+    var33.i = var32.i;
+    /* 2: storel */
+    ptr0[i] = var33;
+  }
+
+}
+
+void
+compositor_orc_memcpy_u32 (guint32 * ORC_RESTRICT d1,
+    const guint32 * ORC_RESTRICT s1, int n)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 9, 25, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111, 114,
+        99, 95, 109, 101, 109, 99, 112, 121, 95, 117, 51, 50, 11, 4, 4, 12,
+        4, 4, 112, 0, 4, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_memcpy_u32);
+#else
+      p = orc_program_new ();
+      orc_program_set_name (p, "compositor_orc_memcpy_u32");
+      orc_program_set_backup_function (p, _backup_compositor_orc_memcpy_u32);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+
+      orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_blend_u8 */
+#ifdef DISABLE_ORC
+void
+compositor_orc_blend_u8 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var34;
+  orc_int8 var35;
+  orc_union16 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 5: loadpw */
+    var36.i = p1;
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var34 = ptr0[i];
+      /* 1: convubw */
+      var38.i = (orc_uint8) var34;
+      /* 2: loadb */
+      var35 = ptr4[i];
+      /* 3: convubw */
+      var39.i = (orc_uint8) var35;
+      /* 4: subw */
+      var40.i = var39.i - var38.i;
+      /* 6: mullw */
+      var41.i = (var40.i * var36.i) & 0xffff;
+      /* 7: shlw */
+      var42.i = var38.i << 8;
+      /* 8: addw */
+      var43.i = var42.i + var41.i;
+      /* 9: shruw */
+      var44.i = ((orc_uint16) var43.i) >> 8;
+      /* 10: convsuswb */
+      var37 = ORC_CLAMP_UB (var44.i);
+      /* 11: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_blend_u8 (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var34;
+  orc_int8 var35;
+  orc_union16 var36;
+  orc_int8 var37;
+  orc_union16 var38;
+  orc_union16 var39;
+  orc_union16 var40;
+  orc_union16 var41;
+  orc_union16 var42;
+  orc_union16 var43;
+  orc_union16 var44;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 5: loadpw */
+    var36.i = ex->params[24];
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadb */
+      var34 = ptr0[i];
+      /* 1: convubw */
+      var38.i = (orc_uint8) var34;
+      /* 2: loadb */
+      var35 = ptr4[i];
+      /* 3: convubw */
+      var39.i = (orc_uint8) var35;
+      /* 4: subw */
+      var40.i = var39.i - var38.i;
+      /* 6: mullw */
+      var41.i = (var40.i * var36.i) & 0xffff;
+      /* 7: shlw */
+      var42.i = var38.i << 8;
+      /* 8: addw */
+      var43.i = var42.i + var41.i;
+      /* 9: shruw */
+      var44.i = ((orc_uint16) var43.i) >> 8;
+      /* 10: convsuswb */
+      var37 = ORC_CLAMP_UB (var44.i);
+      /* 11: storeb */
+      ptr0[i] = var37;
+    }
+  }
+
+}
+
+void
+compositor_orc_blend_u8 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 23, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111,
+        114, 99, 95, 98, 108, 101, 110, 100, 95, 117, 56, 11, 1, 1, 12, 1,
+        1, 14, 1, 8, 0, 0, 0, 16, 2, 20, 2, 20, 2, 150, 32, 0,
+        150, 33, 4, 98, 33, 33, 32, 89, 33, 33, 24, 93, 32, 32, 16, 70,
+        33, 32, 33, 95, 33, 33, 16, 160, 0, 33, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_u8);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "compositor_orc_blend_u8");
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_u8);
+      orc_program_add_destination (p, 1, "d1");
+      orc_program_add_source (p, 1, "s1");
+      orc_program_add_constant (p, 1, 0x00000008, "c1");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_temporary (p, 2, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+
+      orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shruw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2,
+          ORC_VAR_D1, ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_blend_argb */
+#ifdef DISABLE_ORC
+void
+compositor_orc_blend_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var39;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var40;
+#else
+  orc_union32 var40;
+#endif
+  orc_union32 var41;
+  orc_union16 var42;
+  orc_int8 var43;
+  orc_union32 var44;
+  orc_union64 var45;
+  orc_union64 var46;
+  orc_union64 var47;
+  orc_union64 var48;
+  orc_union32 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union32 var55;
+  orc_union32 var56;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 5: loadpw */
+    var39.x4[0] = p1;
+    var39.x4[1] = p1;
+    var39.x4[2] = p1;
+    var39.x4[3] = p1;
+    /* 16: loadpl */
+    var40.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var41 = ptr4[i];
+      /* 1: convlw */
+      var42.i = var41.i;
+      /* 2: convwb */
+      var43 = var42.i;
+      /* 3: splatbl */
+      var44.i =
+          ((var43 & 0xff) << 24) | ((var43 & 0xff) << 16) | ((var43 & 0xff) <<
+          8) | (var43 & 0xff);
+      /* 4: convubw */
+      var45.x4[0] = (orc_uint8) var44.x4[0];
+      var45.x4[1] = (orc_uint8) var44.x4[1];
+      var45.x4[2] = (orc_uint8) var44.x4[2];
+      var45.x4[3] = (orc_uint8) var44.x4[3];
+      /* 6: mullw */
+      var46.x4[0] = (var45.x4[0] * var39.x4[0]) & 0xffff;
+      var46.x4[1] = (var45.x4[1] * var39.x4[1]) & 0xffff;
+      var46.x4[2] = (var45.x4[2] * var39.x4[2]) & 0xffff;
+      var46.x4[3] = (var45.x4[3] * var39.x4[3]) & 0xffff;
+      /* 7: shruw */
+      var47.x4[0] = ((orc_uint16) var46.x4[0]) >> 8;
+      var47.x4[1] = ((orc_uint16) var46.x4[1]) >> 8;
+      var47.x4[2] = ((orc_uint16) var46.x4[2]) >> 8;
+      var47.x4[3] = ((orc_uint16) var46.x4[3]) >> 8;
+      /* 8: convubw */
+      var48.x4[0] = (orc_uint8) var41.x4[0];
+      var48.x4[1] = (orc_uint8) var41.x4[1];
+      var48.x4[2] = (orc_uint8) var41.x4[2];
+      var48.x4[3] = (orc_uint8) var41.x4[3];
+      /* 9: loadl */
+      var49 = ptr0[i];
+      /* 10: convubw */
+      var50.x4[0] = (orc_uint8) var49.x4[0];
+      var50.x4[1] = (orc_uint8) var49.x4[1];
+      var50.x4[2] = (orc_uint8) var49.x4[2];
+      var50.x4[3] = (orc_uint8) var49.x4[3];
+      /* 11: subw */
+      var51.x4[0] = var48.x4[0] - var50.x4[0];
+      var51.x4[1] = var48.x4[1] - var50.x4[1];
+      var51.x4[2] = var48.x4[2] - var50.x4[2];
+      var51.x4[3] = var48.x4[3] - var50.x4[3];
+      /* 12: mullw */
+      var52.x4[0] = (var51.x4[0] * var47.x4[0]) & 0xffff;
+      var52.x4[1] = (var51.x4[1] * var47.x4[1]) & 0xffff;
+      var52.x4[2] = (var51.x4[2] * var47.x4[2]) & 0xffff;
+      var52.x4[3] = (var51.x4[3] * var47.x4[3]) & 0xffff;
+      /* 13: div255w */
+      var53.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[0] + 128)) +
+              (((orc_uint16) (var52.x4[0] + 128)) >> 8))) >> 8;
+      var53.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[1] + 128)) +
+              (((orc_uint16) (var52.x4[1] + 128)) >> 8))) >> 8;
+      var53.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[2] + 128)) +
+              (((orc_uint16) (var52.x4[2] + 128)) >> 8))) >> 8;
+      var53.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[3] + 128)) +
+              (((orc_uint16) (var52.x4[3] + 128)) >> 8))) >> 8;
+      /* 14: addw */
+      var54.x4[0] = var50.x4[0] + var53.x4[0];
+      var54.x4[1] = var50.x4[1] + var53.x4[1];
+      var54.x4[2] = var50.x4[2] + var53.x4[2];
+      var54.x4[3] = var50.x4[3] + var53.x4[3];
+      /* 15: convwb */
+      var55.x4[0] = var54.x4[0];
+      var55.x4[1] = var54.x4[1];
+      var55.x4[2] = var54.x4[2];
+      var55.x4[3] = var54.x4[3];
+      /* 17: orl */
+      var56.i = var55.i | var40.i;
+      /* 18: storel */
+      ptr0[i] = var56;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_blend_argb (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var39;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var40;
+#else
+  orc_union32 var40;
+#endif
+  orc_union32 var41;
+  orc_union16 var42;
+  orc_int8 var43;
+  orc_union32 var44;
+  orc_union64 var45;
+  orc_union64 var46;
+  orc_union64 var47;
+  orc_union64 var48;
+  orc_union32 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union32 var55;
+  orc_union32 var56;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 5: loadpw */
+    var39.x4[0] = ex->params[24];
+    var39.x4[1] = ex->params[24];
+    var39.x4[2] = ex->params[24];
+    var39.x4[3] = ex->params[24];
+    /* 16: loadpl */
+    var40.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var41 = ptr4[i];
+      /* 1: convlw */
+      var42.i = var41.i;
+      /* 2: convwb */
+      var43 = var42.i;
+      /* 3: splatbl */
+      var44.i =
+          ((var43 & 0xff) << 24) | ((var43 & 0xff) << 16) | ((var43 & 0xff) <<
+          8) | (var43 & 0xff);
+      /* 4: convubw */
+      var45.x4[0] = (orc_uint8) var44.x4[0];
+      var45.x4[1] = (orc_uint8) var44.x4[1];
+      var45.x4[2] = (orc_uint8) var44.x4[2];
+      var45.x4[3] = (orc_uint8) var44.x4[3];
+      /* 6: mullw */
+      var46.x4[0] = (var45.x4[0] * var39.x4[0]) & 0xffff;
+      var46.x4[1] = (var45.x4[1] * var39.x4[1]) & 0xffff;
+      var46.x4[2] = (var45.x4[2] * var39.x4[2]) & 0xffff;
+      var46.x4[3] = (var45.x4[3] * var39.x4[3]) & 0xffff;
+      /* 7: shruw */
+      var47.x4[0] = ((orc_uint16) var46.x4[0]) >> 8;
+      var47.x4[1] = ((orc_uint16) var46.x4[1]) >> 8;
+      var47.x4[2] = ((orc_uint16) var46.x4[2]) >> 8;
+      var47.x4[3] = ((orc_uint16) var46.x4[3]) >> 8;
+      /* 8: convubw */
+      var48.x4[0] = (orc_uint8) var41.x4[0];
+      var48.x4[1] = (orc_uint8) var41.x4[1];
+      var48.x4[2] = (orc_uint8) var41.x4[2];
+      var48.x4[3] = (orc_uint8) var41.x4[3];
+      /* 9: loadl */
+      var49 = ptr0[i];
+      /* 10: convubw */
+      var50.x4[0] = (orc_uint8) var49.x4[0];
+      var50.x4[1] = (orc_uint8) var49.x4[1];
+      var50.x4[2] = (orc_uint8) var49.x4[2];
+      var50.x4[3] = (orc_uint8) var49.x4[3];
+      /* 11: subw */
+      var51.x4[0] = var48.x4[0] - var50.x4[0];
+      var51.x4[1] = var48.x4[1] - var50.x4[1];
+      var51.x4[2] = var48.x4[2] - var50.x4[2];
+      var51.x4[3] = var48.x4[3] - var50.x4[3];
+      /* 12: mullw */
+      var52.x4[0] = (var51.x4[0] * var47.x4[0]) & 0xffff;
+      var52.x4[1] = (var51.x4[1] * var47.x4[1]) & 0xffff;
+      var52.x4[2] = (var51.x4[2] * var47.x4[2]) & 0xffff;
+      var52.x4[3] = (var51.x4[3] * var47.x4[3]) & 0xffff;
+      /* 13: div255w */
+      var53.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[0] + 128)) +
+              (((orc_uint16) (var52.x4[0] + 128)) >> 8))) >> 8;
+      var53.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[1] + 128)) +
+              (((orc_uint16) (var52.x4[1] + 128)) >> 8))) >> 8;
+      var53.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[2] + 128)) +
+              (((orc_uint16) (var52.x4[2] + 128)) >> 8))) >> 8;
+      var53.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var52.x4[3] + 128)) +
+              (((orc_uint16) (var52.x4[3] + 128)) >> 8))) >> 8;
+      /* 14: addw */
+      var54.x4[0] = var50.x4[0] + var53.x4[0];
+      var54.x4[1] = var50.x4[1] + var53.x4[1];
+      var54.x4[2] = var50.x4[2] + var53.x4[2];
+      var54.x4[3] = var50.x4[3] + var53.x4[3];
+      /* 15: convwb */
+      var55.x4[0] = var54.x4[0];
+      var55.x4[1] = var54.x4[1];
+      var55.x4[2] = var54.x4[2];
+      var55.x4[3] = var54.x4[3];
+      /* 17: orl */
+      var56.i = var55.i | var40.i;
+      /* 18: storel */
+      ptr0[i] = var56;
+    }
+  }
+
+}
+
+void
+compositor_orc_blend_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 25, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111,
+        114, 99, 95, 98, 108, 101, 110, 100, 95, 97, 114, 103, 98, 11, 4, 4,
+        12, 4, 4, 14, 4, 255, 0, 0, 0, 14, 4, 8, 0, 0, 0, 16,
+        2, 20, 4, 20, 2, 20, 1, 20, 4, 20, 8, 20, 8, 20, 8, 113,
+        32, 4, 163, 33, 32, 157, 34, 33, 152, 35, 34, 21, 2, 150, 38, 35,
+        21, 2, 89, 38, 38, 24, 21, 2, 95, 38, 38, 17, 21, 2, 150, 37,
+        32, 113, 32, 0, 21, 2, 150, 36, 32, 21, 2, 98, 37, 37, 36, 21,
+        2, 89, 37, 37, 38, 21, 2, 80, 37, 37, 21, 2, 70, 36, 36, 37,
+        21, 2, 157, 32, 36, 123, 32, 32, 16, 128, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_argb);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "compositor_orc_blend_argb");
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_argb);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 4, 0x000000ff, "c1");
+      orc_program_add_constant (p, 4, 0x00000008, "c2");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 4, "t4");
+      orc_program_add_temporary (p, 8, "t5");
+      orc_program_add_temporary (p, 8, "t6");
+      orc_program_add_temporary (p, 8, "t7");
+
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T7, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shruw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "subw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "orl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_blend_bgra */
+#ifdef DISABLE_ORC
+void
+compositor_orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var40;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var41;
+#else
+  orc_union32 var41;
+#endif
+  orc_union32 var42;
+  orc_union32 var43;
+  orc_union16 var44;
+  orc_int8 var45;
+  orc_union32 var46;
+  orc_union64 var47;
+  orc_union64 var48;
+  orc_union64 var49;
+  orc_union64 var50;
+  orc_union32 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union64 var55;
+  orc_union64 var56;
+  orc_union32 var57;
+  orc_union32 var58;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 6: loadpw */
+    var40.x4[0] = p1;
+    var40.x4[1] = p1;
+    var40.x4[2] = p1;
+    var40.x4[3] = p1;
+    /* 17: loadpl */
+    var41.i = (int) 0xff000000; /* -16777216 or 2.11371e-314f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var42 = ptr4[i];
+      /* 1: shrul */
+      var43.i = ((orc_uint32) var42.i) >> 24;
+      /* 2: convlw */
+      var44.i = var43.i;
+      /* 3: convwb */
+      var45 = var44.i;
+      /* 4: splatbl */
+      var46.i =
+          ((var45 & 0xff) << 24) | ((var45 & 0xff) << 16) | ((var45 & 0xff) <<
+          8) | (var45 & 0xff);
+      /* 5: convubw */
+      var47.x4[0] = (orc_uint8) var46.x4[0];
+      var47.x4[1] = (orc_uint8) var46.x4[1];
+      var47.x4[2] = (orc_uint8) var46.x4[2];
+      var47.x4[3] = (orc_uint8) var46.x4[3];
+      /* 7: mullw */
+      var48.x4[0] = (var47.x4[0] * var40.x4[0]) & 0xffff;
+      var48.x4[1] = (var47.x4[1] * var40.x4[1]) & 0xffff;
+      var48.x4[2] = (var47.x4[2] * var40.x4[2]) & 0xffff;
+      var48.x4[3] = (var47.x4[3] * var40.x4[3]) & 0xffff;
+      /* 8: shruw */
+      var49.x4[0] = ((orc_uint16) var48.x4[0]) >> 8;
+      var49.x4[1] = ((orc_uint16) var48.x4[1]) >> 8;
+      var49.x4[2] = ((orc_uint16) var48.x4[2]) >> 8;
+      var49.x4[3] = ((orc_uint16) var48.x4[3]) >> 8;
+      /* 9: convubw */
+      var50.x4[0] = (orc_uint8) var42.x4[0];
+      var50.x4[1] = (orc_uint8) var42.x4[1];
+      var50.x4[2] = (orc_uint8) var42.x4[2];
+      var50.x4[3] = (orc_uint8) var42.x4[3];
+      /* 10: loadl */
+      var51 = ptr0[i];
+      /* 11: convubw */
+      var52.x4[0] = (orc_uint8) var51.x4[0];
+      var52.x4[1] = (orc_uint8) var51.x4[1];
+      var52.x4[2] = (orc_uint8) var51.x4[2];
+      var52.x4[3] = (orc_uint8) var51.x4[3];
+      /* 12: subw */
+      var53.x4[0] = var50.x4[0] - var52.x4[0];
+      var53.x4[1] = var50.x4[1] - var52.x4[1];
+      var53.x4[2] = var50.x4[2] - var52.x4[2];
+      var53.x4[3] = var50.x4[3] - var52.x4[3];
+      /* 13: mullw */
+      var54.x4[0] = (var53.x4[0] * var49.x4[0]) & 0xffff;
+      var54.x4[1] = (var53.x4[1] * var49.x4[1]) & 0xffff;
+      var54.x4[2] = (var53.x4[2] * var49.x4[2]) & 0xffff;
+      var54.x4[3] = (var53.x4[3] * var49.x4[3]) & 0xffff;
+      /* 14: div255w */
+      var55.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[0] + 128)) +
+              (((orc_uint16) (var54.x4[0] + 128)) >> 8))) >> 8;
+      var55.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[1] + 128)) +
+              (((orc_uint16) (var54.x4[1] + 128)) >> 8))) >> 8;
+      var55.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[2] + 128)) +
+              (((orc_uint16) (var54.x4[2] + 128)) >> 8))) >> 8;
+      var55.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[3] + 128)) +
+              (((orc_uint16) (var54.x4[3] + 128)) >> 8))) >> 8;
+      /* 15: addw */
+      var56.x4[0] = var52.x4[0] + var55.x4[0];
+      var56.x4[1] = var52.x4[1] + var55.x4[1];
+      var56.x4[2] = var52.x4[2] + var55.x4[2];
+      var56.x4[3] = var52.x4[3] + var55.x4[3];
+      /* 16: convwb */
+      var57.x4[0] = var56.x4[0];
+      var57.x4[1] = var56.x4[1];
+      var57.x4[2] = var56.x4[2];
+      var57.x4[3] = var56.x4[3];
+      /* 18: orl */
+      var58.i = var57.i | var41.i;
+      /* 19: storel */
+      ptr0[i] = var58;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_blend_bgra (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var40;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var41;
+#else
+  orc_union32 var41;
+#endif
+  orc_union32 var42;
+  orc_union32 var43;
+  orc_union16 var44;
+  orc_int8 var45;
+  orc_union32 var46;
+  orc_union64 var47;
+  orc_union64 var48;
+  orc_union64 var49;
+  orc_union64 var50;
+  orc_union32 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union64 var55;
+  orc_union64 var56;
+  orc_union32 var57;
+  orc_union32 var58;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 6: loadpw */
+    var40.x4[0] = ex->params[24];
+    var40.x4[1] = ex->params[24];
+    var40.x4[2] = ex->params[24];
+    var40.x4[3] = ex->params[24];
+    /* 17: loadpl */
+    var41.i = (int) 0xff000000; /* -16777216 or 2.11371e-314f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var42 = ptr4[i];
+      /* 1: shrul */
+      var43.i = ((orc_uint32) var42.i) >> 24;
+      /* 2: convlw */
+      var44.i = var43.i;
+      /* 3: convwb */
+      var45 = var44.i;
+      /* 4: splatbl */
+      var46.i =
+          ((var45 & 0xff) << 24) | ((var45 & 0xff) << 16) | ((var45 & 0xff) <<
+          8) | (var45 & 0xff);
+      /* 5: convubw */
+      var47.x4[0] = (orc_uint8) var46.x4[0];
+      var47.x4[1] = (orc_uint8) var46.x4[1];
+      var47.x4[2] = (orc_uint8) var46.x4[2];
+      var47.x4[3] = (orc_uint8) var46.x4[3];
+      /* 7: mullw */
+      var48.x4[0] = (var47.x4[0] * var40.x4[0]) & 0xffff;
+      var48.x4[1] = (var47.x4[1] * var40.x4[1]) & 0xffff;
+      var48.x4[2] = (var47.x4[2] * var40.x4[2]) & 0xffff;
+      var48.x4[3] = (var47.x4[3] * var40.x4[3]) & 0xffff;
+      /* 8: shruw */
+      var49.x4[0] = ((orc_uint16) var48.x4[0]) >> 8;
+      var49.x4[1] = ((orc_uint16) var48.x4[1]) >> 8;
+      var49.x4[2] = ((orc_uint16) var48.x4[2]) >> 8;
+      var49.x4[3] = ((orc_uint16) var48.x4[3]) >> 8;
+      /* 9: convubw */
+      var50.x4[0] = (orc_uint8) var42.x4[0];
+      var50.x4[1] = (orc_uint8) var42.x4[1];
+      var50.x4[2] = (orc_uint8) var42.x4[2];
+      var50.x4[3] = (orc_uint8) var42.x4[3];
+      /* 10: loadl */
+      var51 = ptr0[i];
+      /* 11: convubw */
+      var52.x4[0] = (orc_uint8) var51.x4[0];
+      var52.x4[1] = (orc_uint8) var51.x4[1];
+      var52.x4[2] = (orc_uint8) var51.x4[2];
+      var52.x4[3] = (orc_uint8) var51.x4[3];
+      /* 12: subw */
+      var53.x4[0] = var50.x4[0] - var52.x4[0];
+      var53.x4[1] = var50.x4[1] - var52.x4[1];
+      var53.x4[2] = var50.x4[2] - var52.x4[2];
+      var53.x4[3] = var50.x4[3] - var52.x4[3];
+      /* 13: mullw */
+      var54.x4[0] = (var53.x4[0] * var49.x4[0]) & 0xffff;
+      var54.x4[1] = (var53.x4[1] * var49.x4[1]) & 0xffff;
+      var54.x4[2] = (var53.x4[2] * var49.x4[2]) & 0xffff;
+      var54.x4[3] = (var53.x4[3] * var49.x4[3]) & 0xffff;
+      /* 14: div255w */
+      var55.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[0] + 128)) +
+              (((orc_uint16) (var54.x4[0] + 128)) >> 8))) >> 8;
+      var55.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[1] + 128)) +
+              (((orc_uint16) (var54.x4[1] + 128)) >> 8))) >> 8;
+      var55.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[2] + 128)) +
+              (((orc_uint16) (var54.x4[2] + 128)) >> 8))) >> 8;
+      var55.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var54.x4[3] + 128)) +
+              (((orc_uint16) (var54.x4[3] + 128)) >> 8))) >> 8;
+      /* 15: addw */
+      var56.x4[0] = var52.x4[0] + var55.x4[0];
+      var56.x4[1] = var52.x4[1] + var55.x4[1];
+      var56.x4[2] = var52.x4[2] + var55.x4[2];
+      var56.x4[3] = var52.x4[3] + var55.x4[3];
+      /* 16: convwb */
+      var57.x4[0] = var56.x4[0];
+      var57.x4[1] = var56.x4[1];
+      var57.x4[2] = var56.x4[2];
+      var57.x4[3] = var56.x4[3];
+      /* 18: orl */
+      var58.i = var57.i | var41.i;
+      /* 19: storel */
+      ptr0[i] = var58;
+    }
+  }
+
+}
+
+void
+compositor_orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 25, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111,
+        114, 99, 95, 98, 108, 101, 110, 100, 95, 98, 103, 114, 97, 11, 4, 4,
+        12, 4, 4, 14, 4, 0, 0, 0, 255, 14, 4, 24, 0, 0, 0, 14,
+        4, 8, 0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, 20,
+        4, 20, 8, 20, 8, 20, 8, 113, 32, 4, 126, 33, 32, 17, 163, 34,
+        33, 157, 35, 34, 152, 36, 35, 21, 2, 150, 39, 36, 21, 2, 89, 39,
+        39, 24, 21, 2, 95, 39, 39, 18, 21, 2, 150, 38, 32, 113, 32, 0,
+        21, 2, 150, 37, 32, 21, 2, 98, 38, 38, 37, 21, 2, 89, 38, 38,
+        39, 21, 2, 80, 38, 38, 21, 2, 70, 37, 37, 38, 21, 2, 157, 32,
+        37, 123, 32, 32, 16, 128, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_bgra);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "compositor_orc_blend_bgra");
+      orc_program_set_backup_function (p, _backup_compositor_orc_blend_bgra);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 4, 0xff000000, "c1");
+      orc_program_add_constant (p, 4, 0x00000018, "c2");
+      orc_program_add_constant (p, 4, 0x00000008, "c3");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 4, "t5");
+      orc_program_add_temporary (p, 8, "t6");
+      orc_program_add_temporary (p, 8, "t7");
+      orc_program_add_temporary (p, 8, "t8");
+
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shrul", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_C2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T8, ORC_VAR_T5, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shruw", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_C3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "subw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "div255w", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T6, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "orl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_overlay_argb */
+#ifdef DISABLE_ORC
+void
+compositor_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var41;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var42;
+#else
+  orc_union32 var42;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var43;
+#else
+  orc_union32 var43;
+#endif
+  orc_union32 var44;
+  orc_union16 var45;
+  orc_int8 var46;
+  orc_union32 var47;
+  orc_union64 var48;
+  orc_union64 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union32 var53;
+  orc_union64 var54;
+  orc_union64 var55;
+  orc_union32 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_union32 var59;
+  orc_union64 var60;
+  orc_union64 var61;
+  orc_union64 var62;
+  orc_union64 var63;
+  orc_union64 var64;
+  orc_union64 var65;
+  orc_union64 var66;
+  orc_union64 var67;
+  orc_union32 var68;
+  orc_union32 var69;
+  orc_union32 var70;
+  orc_union32 var71;
+  orc_union32 var72;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 5: loadpw */
+    var41.x4[0] = p1;
+    var41.x4[1] = p1;
+    var41.x4[2] = p1;
+    var41.x4[3] = p1;
+    /* 10: loadpl */
+    var53.i = (int) 0xffffffff; /* -1 or 2.122e-314f */
+    /* 26: loadpl */
+    var42.i = (int) 0xffffff00; /* -256 or 2.122e-314f */
+    /* 29: loadpl */
+    var43.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var44 = ptr4[i];
+      /* 1: convlw */
+      var45.i = var44.i;
+      /* 2: convwb */
+      var46 = var45.i;
+      /* 3: splatbl */
+      var47.i =
+          ((var46 & 0xff) << 24) | ((var46 & 0xff) << 16) | ((var46 & 0xff) <<
+          8) | (var46 & 0xff);
+      /* 4: convubw */
+      var48.x4[0] = (orc_uint8) var47.x4[0];
+      var48.x4[1] = (orc_uint8) var47.x4[1];
+      var48.x4[2] = (orc_uint8) var47.x4[2];
+      var48.x4[3] = (orc_uint8) var47.x4[3];
+      /* 6: mullw */
+      var49.x4[0] = (var48.x4[0] * var41.x4[0]) & 0xffff;
+      var49.x4[1] = (var48.x4[1] * var41.x4[1]) & 0xffff;
+      var49.x4[2] = (var48.x4[2] * var41.x4[2]) & 0xffff;
+      var49.x4[3] = (var48.x4[3] * var41.x4[3]) & 0xffff;
+      /* 7: shruw */
+      var50.x4[0] = ((orc_uint16) var49.x4[0]) >> 8;
+      var50.x4[1] = ((orc_uint16) var49.x4[1]) >> 8;
+      var50.x4[2] = ((orc_uint16) var49.x4[2]) >> 8;
+      var50.x4[3] = ((orc_uint16) var49.x4[3]) >> 8;
+      /* 8: convubw */
+      var51.x4[0] = (orc_uint8) var44.x4[0];
+      var51.x4[1] = (orc_uint8) var44.x4[1];
+      var51.x4[2] = (orc_uint8) var44.x4[2];
+      var51.x4[3] = (orc_uint8) var44.x4[3];
+      /* 9: mullw */
+      var52.x4[0] = (var51.x4[0] * var50.x4[0]) & 0xffff;
+      var52.x4[1] = (var51.x4[1] * var50.x4[1]) & 0xffff;
+      var52.x4[2] = (var51.x4[2] * var50.x4[2]) & 0xffff;
+      var52.x4[3] = (var51.x4[3] * var50.x4[3]) & 0xffff;
+      /* 11: convubw */
+      var54.x4[0] = (orc_uint8) var53.x4[0];
+      var54.x4[1] = (orc_uint8) var53.x4[1];
+      var54.x4[2] = (orc_uint8) var53.x4[2];
+      var54.x4[3] = (orc_uint8) var53.x4[3];
+      /* 12: subw */
+      var55.x4[0] = var54.x4[0] - var50.x4[0];
+      var55.x4[1] = var54.x4[1] - var50.x4[1];
+      var55.x4[2] = var54.x4[2] - var50.x4[2];
+      var55.x4[3] = var54.x4[3] - var50.x4[3];
+      /* 13: loadl */
+      var56 = ptr0[i];
+      /* 14: convlw */
+      var57.i = var56.i;
+      /* 15: convwb */
+      var58 = var57.i;
+      /* 16: splatbl */
+      var59.i =
+          ((var58 & 0xff) << 24) | ((var58 & 0xff) << 16) | ((var58 & 0xff) <<
+          8) | (var58 & 0xff);
+      /* 17: convubw */
+      var60.x4[0] = (orc_uint8) var59.x4[0];
+      var60.x4[1] = (orc_uint8) var59.x4[1];
+      var60.x4[2] = (orc_uint8) var59.x4[2];
+      var60.x4[3] = (orc_uint8) var59.x4[3];
+      /* 18: mullw */
+      var61.x4[0] = (var60.x4[0] * var55.x4[0]) & 0xffff;
+      var61.x4[1] = (var60.x4[1] * var55.x4[1]) & 0xffff;
+      var61.x4[2] = (var60.x4[2] * var55.x4[2]) & 0xffff;
+      var61.x4[3] = (var60.x4[3] * var55.x4[3]) & 0xffff;
+      /* 19: div255w */
+      var62.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[0] + 128)) +
+              (((orc_uint16) (var61.x4[0] + 128)) >> 8))) >> 8;
+      var62.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[1] + 128)) +
+              (((orc_uint16) (var61.x4[1] + 128)) >> 8))) >> 8;
+      var62.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[2] + 128)) +
+              (((orc_uint16) (var61.x4[2] + 128)) >> 8))) >> 8;
+      var62.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[3] + 128)) +
+              (((orc_uint16) (var61.x4[3] + 128)) >> 8))) >> 8;
+      /* 20: convubw */
+      var63.x4[0] = (orc_uint8) var56.x4[0];
+      var63.x4[1] = (orc_uint8) var56.x4[1];
+      var63.x4[2] = (orc_uint8) var56.x4[2];
+      var63.x4[3] = (orc_uint8) var56.x4[3];
+      /* 21: mullw */
+      var64.x4[0] = (var63.x4[0] * var62.x4[0]) & 0xffff;
+      var64.x4[1] = (var63.x4[1] * var62.x4[1]) & 0xffff;
+      var64.x4[2] = (var63.x4[2] * var62.x4[2]) & 0xffff;
+      var64.x4[3] = (var63.x4[3] * var62.x4[3]) & 0xffff;
+      /* 22: addw */
+      var65.x4[0] = var64.x4[0] + var52.x4[0];
+      var65.x4[1] = var64.x4[1] + var52.x4[1];
+      var65.x4[2] = var64.x4[2] + var52.x4[2];
+      var65.x4[3] = var64.x4[3] + var52.x4[3];
+      /* 23: addw */
+      var66.x4[0] = var62.x4[0] + var50.x4[0];
+      var66.x4[1] = var62.x4[1] + var50.x4[1];
+      var66.x4[2] = var62.x4[2] + var50.x4[2];
+      var66.x4[3] = var62.x4[3] + var50.x4[3];
+      /* 24: divluw */
+      var67.x4[0] =
+          ((var66.x4[0] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[0]) /
+          ((orc_uint16) var66.x4[0] & 0xff));
+      var67.x4[1] =
+          ((var66.x4[1] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[1]) /
+          ((orc_uint16) var66.x4[1] & 0xff));
+      var67.x4[2] =
+          ((var66.x4[2] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[2]) /
+          ((orc_uint16) var66.x4[2] & 0xff));
+      var67.x4[3] =
+          ((var66.x4[3] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[3]) /
+          ((orc_uint16) var66.x4[3] & 0xff));
+      /* 25: convwb */
+      var68.x4[0] = var67.x4[0];
+      var68.x4[1] = var67.x4[1];
+      var68.x4[2] = var67.x4[2];
+      var68.x4[3] = var67.x4[3];
+      /* 27: andl */
+      var69.i = var68.i & var42.i;
+      /* 28: convwb */
+      var70.x4[0] = var66.x4[0];
+      var70.x4[1] = var66.x4[1];
+      var70.x4[2] = var66.x4[2];
+      var70.x4[3] = var66.x4[3];
+      /* 30: andl */
+      var71.i = var70.i & var43.i;
+      /* 31: orl */
+      var72.i = var69.i | var71.i;
+      /* 32: storel */
+      ptr0[i] = var72;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_overlay_argb (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var41;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var42;
+#else
+  orc_union32 var42;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var43;
+#else
+  orc_union32 var43;
+#endif
+  orc_union32 var44;
+  orc_union16 var45;
+  orc_int8 var46;
+  orc_union32 var47;
+  orc_union64 var48;
+  orc_union64 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union32 var53;
+  orc_union64 var54;
+  orc_union64 var55;
+  orc_union32 var56;
+  orc_union16 var57;
+  orc_int8 var58;
+  orc_union32 var59;
+  orc_union64 var60;
+  orc_union64 var61;
+  orc_union64 var62;
+  orc_union64 var63;
+  orc_union64 var64;
+  orc_union64 var65;
+  orc_union64 var66;
+  orc_union64 var67;
+  orc_union32 var68;
+  orc_union32 var69;
+  orc_union32 var70;
+  orc_union32 var71;
+  orc_union32 var72;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 5: loadpw */
+    var41.x4[0] = ex->params[24];
+    var41.x4[1] = ex->params[24];
+    var41.x4[2] = ex->params[24];
+    var41.x4[3] = ex->params[24];
+    /* 10: loadpl */
+    var53.i = (int) 0xffffffff; /* -1 or 2.122e-314f */
+    /* 26: loadpl */
+    var42.i = (int) 0xffffff00; /* -256 or 2.122e-314f */
+    /* 29: loadpl */
+    var43.i = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var44 = ptr4[i];
+      /* 1: convlw */
+      var45.i = var44.i;
+      /* 2: convwb */
+      var46 = var45.i;
+      /* 3: splatbl */
+      var47.i =
+          ((var46 & 0xff) << 24) | ((var46 & 0xff) << 16) | ((var46 & 0xff) <<
+          8) | (var46 & 0xff);
+      /* 4: convubw */
+      var48.x4[0] = (orc_uint8) var47.x4[0];
+      var48.x4[1] = (orc_uint8) var47.x4[1];
+      var48.x4[2] = (orc_uint8) var47.x4[2];
+      var48.x4[3] = (orc_uint8) var47.x4[3];
+      /* 6: mullw */
+      var49.x4[0] = (var48.x4[0] * var41.x4[0]) & 0xffff;
+      var49.x4[1] = (var48.x4[1] * var41.x4[1]) & 0xffff;
+      var49.x4[2] = (var48.x4[2] * var41.x4[2]) & 0xffff;
+      var49.x4[3] = (var48.x4[3] * var41.x4[3]) & 0xffff;
+      /* 7: shruw */
+      var50.x4[0] = ((orc_uint16) var49.x4[0]) >> 8;
+      var50.x4[1] = ((orc_uint16) var49.x4[1]) >> 8;
+      var50.x4[2] = ((orc_uint16) var49.x4[2]) >> 8;
+      var50.x4[3] = ((orc_uint16) var49.x4[3]) >> 8;
+      /* 8: convubw */
+      var51.x4[0] = (orc_uint8) var44.x4[0];
+      var51.x4[1] = (orc_uint8) var44.x4[1];
+      var51.x4[2] = (orc_uint8) var44.x4[2];
+      var51.x4[3] = (orc_uint8) var44.x4[3];
+      /* 9: mullw */
+      var52.x4[0] = (var51.x4[0] * var50.x4[0]) & 0xffff;
+      var52.x4[1] = (var51.x4[1] * var50.x4[1]) & 0xffff;
+      var52.x4[2] = (var51.x4[2] * var50.x4[2]) & 0xffff;
+      var52.x4[3] = (var51.x4[3] * var50.x4[3]) & 0xffff;
+      /* 11: convubw */
+      var54.x4[0] = (orc_uint8) var53.x4[0];
+      var54.x4[1] = (orc_uint8) var53.x4[1];
+      var54.x4[2] = (orc_uint8) var53.x4[2];
+      var54.x4[3] = (orc_uint8) var53.x4[3];
+      /* 12: subw */
+      var55.x4[0] = var54.x4[0] - var50.x4[0];
+      var55.x4[1] = var54.x4[1] - var50.x4[1];
+      var55.x4[2] = var54.x4[2] - var50.x4[2];
+      var55.x4[3] = var54.x4[3] - var50.x4[3];
+      /* 13: loadl */
+      var56 = ptr0[i];
+      /* 14: convlw */
+      var57.i = var56.i;
+      /* 15: convwb */
+      var58 = var57.i;
+      /* 16: splatbl */
+      var59.i =
+          ((var58 & 0xff) << 24) | ((var58 & 0xff) << 16) | ((var58 & 0xff) <<
+          8) | (var58 & 0xff);
+      /* 17: convubw */
+      var60.x4[0] = (orc_uint8) var59.x4[0];
+      var60.x4[1] = (orc_uint8) var59.x4[1];
+      var60.x4[2] = (orc_uint8) var59.x4[2];
+      var60.x4[3] = (orc_uint8) var59.x4[3];
+      /* 18: mullw */
+      var61.x4[0] = (var60.x4[0] * var55.x4[0]) & 0xffff;
+      var61.x4[1] = (var60.x4[1] * var55.x4[1]) & 0xffff;
+      var61.x4[2] = (var60.x4[2] * var55.x4[2]) & 0xffff;
+      var61.x4[3] = (var60.x4[3] * var55.x4[3]) & 0xffff;
+      /* 19: div255w */
+      var62.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[0] + 128)) +
+              (((orc_uint16) (var61.x4[0] + 128)) >> 8))) >> 8;
+      var62.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[1] + 128)) +
+              (((orc_uint16) (var61.x4[1] + 128)) >> 8))) >> 8;
+      var62.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[2] + 128)) +
+              (((orc_uint16) (var61.x4[2] + 128)) >> 8))) >> 8;
+      var62.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var61.x4[3] + 128)) +
+              (((orc_uint16) (var61.x4[3] + 128)) >> 8))) >> 8;
+      /* 20: convubw */
+      var63.x4[0] = (orc_uint8) var56.x4[0];
+      var63.x4[1] = (orc_uint8) var56.x4[1];
+      var63.x4[2] = (orc_uint8) var56.x4[2];
+      var63.x4[3] = (orc_uint8) var56.x4[3];
+      /* 21: mullw */
+      var64.x4[0] = (var63.x4[0] * var62.x4[0]) & 0xffff;
+      var64.x4[1] = (var63.x4[1] * var62.x4[1]) & 0xffff;
+      var64.x4[2] = (var63.x4[2] * var62.x4[2]) & 0xffff;
+      var64.x4[3] = (var63.x4[3] * var62.x4[3]) & 0xffff;
+      /* 22: addw */
+      var65.x4[0] = var64.x4[0] + var52.x4[0];
+      var65.x4[1] = var64.x4[1] + var52.x4[1];
+      var65.x4[2] = var64.x4[2] + var52.x4[2];
+      var65.x4[3] = var64.x4[3] + var52.x4[3];
+      /* 23: addw */
+      var66.x4[0] = var62.x4[0] + var50.x4[0];
+      var66.x4[1] = var62.x4[1] + var50.x4[1];
+      var66.x4[2] = var62.x4[2] + var50.x4[2];
+      var66.x4[3] = var62.x4[3] + var50.x4[3];
+      /* 24: divluw */
+      var67.x4[0] =
+          ((var66.x4[0] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[0]) /
+          ((orc_uint16) var66.x4[0] & 0xff));
+      var67.x4[1] =
+          ((var66.x4[1] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[1]) /
+          ((orc_uint16) var66.x4[1] & 0xff));
+      var67.x4[2] =
+          ((var66.x4[2] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[2]) /
+          ((orc_uint16) var66.x4[2] & 0xff));
+      var67.x4[3] =
+          ((var66.x4[3] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var65.x4[3]) /
+          ((orc_uint16) var66.x4[3] & 0xff));
+      /* 25: convwb */
+      var68.x4[0] = var67.x4[0];
+      var68.x4[1] = var67.x4[1];
+      var68.x4[2] = var67.x4[2];
+      var68.x4[3] = var67.x4[3];
+      /* 27: andl */
+      var69.i = var68.i & var42.i;
+      /* 28: convwb */
+      var70.x4[0] = var66.x4[0];
+      var70.x4[1] = var66.x4[1];
+      var70.x4[2] = var66.x4[2];
+      var70.x4[3] = var66.x4[3];
+      /* 30: andl */
+      var71.i = var70.i & var43.i;
+      /* 31: orl */
+      var72.i = var69.i | var71.i;
+      /* 32: storel */
+      ptr0[i] = var72;
+    }
+  }
+
+}
+
+void
+compositor_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 27, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111,
+        114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 97, 114, 103, 98, 11,
+        4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 255, 0, 0,
+        0, 14, 4, 0, 255, 255, 255, 14, 4, 8, 0, 0, 0, 16, 2, 20,
+        4, 20, 2, 20, 1, 20, 8, 20, 8, 20, 8, 20, 4, 20, 8, 20,
+        8, 113, 32, 4, 163, 33, 32, 157, 34, 33, 152, 38, 34, 21, 2, 150,
+        35, 38, 21, 2, 89, 35, 35, 24, 21, 2, 95, 35, 35, 19, 21, 2,
+        150, 40, 32, 21, 2, 89, 40, 40, 35, 115, 38, 16, 21, 2, 150, 36,
+        38, 21, 2, 98, 36, 36, 35, 113, 32, 0, 163, 33, 32, 157, 34, 33,
+        152, 38, 34, 21, 2, 150, 37, 38, 21, 2, 89, 37, 37, 36, 21, 2,
+        80, 37, 37, 21, 2, 150, 39, 32, 21, 2, 89, 39, 39, 37, 21, 2,
+        70, 39, 39, 40, 21, 2, 70, 37, 37, 35, 21, 2, 81, 39, 39, 37,
+        21, 2, 157, 32, 39, 106, 32, 32, 18, 21, 2, 157, 38, 37, 106, 38,
+        38, 17, 123, 32, 32, 38, 128, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_overlay_argb);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "compositor_orc_overlay_argb");
+      orc_program_set_backup_function (p, _backup_compositor_orc_overlay_argb);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 4, 0xffffffff, "c1");
+      orc_program_add_constant (p, 4, 0x000000ff, "c2");
+      orc_program_add_constant (p, 4, 0xffffff00, "c3");
+      orc_program_add_constant (p, 4, 0x00000008, "c4");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 2, "t2");
+      orc_program_add_temporary (p, 1, "t3");
+      orc_program_add_temporary (p, 8, "t4");
+      orc_program_add_temporary (p, 8, "t5");
+      orc_program_add_temporary (p, 8, "t6");
+      orc_program_add_temporary (p, 4, "t7");
+      orc_program_add_temporary (p, 8, "t8");
+      orc_program_add_temporary (p, 8, "t9");
+
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T7, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shruw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T9, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadpl", 0, ORC_VAR_T7, ORC_VAR_C1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "subw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T7, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T8, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_T9,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "divluw", 2, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T8, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "andl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "andl", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "orl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
+
+
+/* compositor_orc_overlay_bgra */
+#ifdef DISABLE_ORC
+void
+compositor_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  int i;
+  int j;
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var42;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var43;
+#else
+  orc_union32 var43;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var44;
+#else
+  orc_union32 var44;
+#endif
+  orc_union32 var45;
+  orc_union32 var46;
+  orc_union16 var47;
+  orc_int8 var48;
+  orc_union32 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union32 var55;
+  orc_union64 var56;
+  orc_union64 var57;
+  orc_union32 var58;
+  orc_union32 var59;
+  orc_union16 var60;
+  orc_int8 var61;
+  orc_union32 var62;
+  orc_union64 var63;
+  orc_union64 var64;
+  orc_union64 var65;
+  orc_union64 var66;
+  orc_union64 var67;
+  orc_union64 var68;
+  orc_union64 var69;
+  orc_union64 var70;
+  orc_union32 var71;
+  orc_union32 var72;
+  orc_union32 var73;
+  orc_union32 var74;
+  orc_union32 var75;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+    /* 6: loadpw */
+    var42.x4[0] = p1;
+    var42.x4[1] = p1;
+    var42.x4[2] = p1;
+    var42.x4[3] = p1;
+    /* 11: loadpl */
+    var55.i = (int) 0xffffffff; /* -1 or 2.122e-314f */
+    /* 28: loadpl */
+    var43.i = (int) 0x00ffffff; /* 16777215 or 8.28905e-317f */
+    /* 31: loadpl */
+    var44.i = (int) 0xff000000; /* -16777216 or 2.11371e-314f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var45 = ptr4[i];
+      /* 1: shrul */
+      var46.i = ((orc_uint32) var45.i) >> 24;
+      /* 2: convlw */
+      var47.i = var46.i;
+      /* 3: convwb */
+      var48 = var47.i;
+      /* 4: splatbl */
+      var49.i =
+          ((var48 & 0xff) << 24) | ((var48 & 0xff) << 16) | ((var48 & 0xff) <<
+          8) | (var48 & 0xff);
+      /* 5: convubw */
+      var50.x4[0] = (orc_uint8) var49.x4[0];
+      var50.x4[1] = (orc_uint8) var49.x4[1];
+      var50.x4[2] = (orc_uint8) var49.x4[2];
+      var50.x4[3] = (orc_uint8) var49.x4[3];
+      /* 7: mullw */
+      var51.x4[0] = (var50.x4[0] * var42.x4[0]) & 0xffff;
+      var51.x4[1] = (var50.x4[1] * var42.x4[1]) & 0xffff;
+      var51.x4[2] = (var50.x4[2] * var42.x4[2]) & 0xffff;
+      var51.x4[3] = (var50.x4[3] * var42.x4[3]) & 0xffff;
+      /* 8: shruw */
+      var52.x4[0] = ((orc_uint16) var51.x4[0]) >> 8;
+      var52.x4[1] = ((orc_uint16) var51.x4[1]) >> 8;
+      var52.x4[2] = ((orc_uint16) var51.x4[2]) >> 8;
+      var52.x4[3] = ((orc_uint16) var51.x4[3]) >> 8;
+      /* 9: convubw */
+      var53.x4[0] = (orc_uint8) var45.x4[0];
+      var53.x4[1] = (orc_uint8) var45.x4[1];
+      var53.x4[2] = (orc_uint8) var45.x4[2];
+      var53.x4[3] = (orc_uint8) var45.x4[3];
+      /* 10: mullw */
+      var54.x4[0] = (var53.x4[0] * var52.x4[0]) & 0xffff;
+      var54.x4[1] = (var53.x4[1] * var52.x4[1]) & 0xffff;
+      var54.x4[2] = (var53.x4[2] * var52.x4[2]) & 0xffff;
+      var54.x4[3] = (var53.x4[3] * var52.x4[3]) & 0xffff;
+      /* 12: convubw */
+      var56.x4[0] = (orc_uint8) var55.x4[0];
+      var56.x4[1] = (orc_uint8) var55.x4[1];
+      var56.x4[2] = (orc_uint8) var55.x4[2];
+      var56.x4[3] = (orc_uint8) var55.x4[3];
+      /* 13: subw */
+      var57.x4[0] = var56.x4[0] - var52.x4[0];
+      var57.x4[1] = var56.x4[1] - var52.x4[1];
+      var57.x4[2] = var56.x4[2] - var52.x4[2];
+      var57.x4[3] = var56.x4[3] - var52.x4[3];
+      /* 14: loadl */
+      var58 = ptr0[i];
+      /* 15: shrul */
+      var59.i = ((orc_uint32) var58.i) >> 24;
+      /* 16: convlw */
+      var60.i = var59.i;
+      /* 17: convwb */
+      var61 = var60.i;
+      /* 18: splatbl */
+      var62.i =
+          ((var61 & 0xff) << 24) | ((var61 & 0xff) << 16) | ((var61 & 0xff) <<
+          8) | (var61 & 0xff);
+      /* 19: convubw */
+      var63.x4[0] = (orc_uint8) var62.x4[0];
+      var63.x4[1] = (orc_uint8) var62.x4[1];
+      var63.x4[2] = (orc_uint8) var62.x4[2];
+      var63.x4[3] = (orc_uint8) var62.x4[3];
+      /* 20: mullw */
+      var64.x4[0] = (var63.x4[0] * var57.x4[0]) & 0xffff;
+      var64.x4[1] = (var63.x4[1] * var57.x4[1]) & 0xffff;
+      var64.x4[2] = (var63.x4[2] * var57.x4[2]) & 0xffff;
+      var64.x4[3] = (var63.x4[3] * var57.x4[3]) & 0xffff;
+      /* 21: div255w */
+      var65.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[0] + 128)) +
+              (((orc_uint16) (var64.x4[0] + 128)) >> 8))) >> 8;
+      var65.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[1] + 128)) +
+              (((orc_uint16) (var64.x4[1] + 128)) >> 8))) >> 8;
+      var65.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[2] + 128)) +
+              (((orc_uint16) (var64.x4[2] + 128)) >> 8))) >> 8;
+      var65.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[3] + 128)) +
+              (((orc_uint16) (var64.x4[3] + 128)) >> 8))) >> 8;
+      /* 22: convubw */
+      var66.x4[0] = (orc_uint8) var58.x4[0];
+      var66.x4[1] = (orc_uint8) var58.x4[1];
+      var66.x4[2] = (orc_uint8) var58.x4[2];
+      var66.x4[3] = (orc_uint8) var58.x4[3];
+      /* 23: mullw */
+      var67.x4[0] = (var66.x4[0] * var65.x4[0]) & 0xffff;
+      var67.x4[1] = (var66.x4[1] * var65.x4[1]) & 0xffff;
+      var67.x4[2] = (var66.x4[2] * var65.x4[2]) & 0xffff;
+      var67.x4[3] = (var66.x4[3] * var65.x4[3]) & 0xffff;
+      /* 24: addw */
+      var68.x4[0] = var67.x4[0] + var54.x4[0];
+      var68.x4[1] = var67.x4[1] + var54.x4[1];
+      var68.x4[2] = var67.x4[2] + var54.x4[2];
+      var68.x4[3] = var67.x4[3] + var54.x4[3];
+      /* 25: addw */
+      var69.x4[0] = var65.x4[0] + var52.x4[0];
+      var69.x4[1] = var65.x4[1] + var52.x4[1];
+      var69.x4[2] = var65.x4[2] + var52.x4[2];
+      var69.x4[3] = var65.x4[3] + var52.x4[3];
+      /* 26: divluw */
+      var70.x4[0] =
+          ((var69.x4[0] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[0]) /
+          ((orc_uint16) var69.x4[0] & 0xff));
+      var70.x4[1] =
+          ((var69.x4[1] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[1]) /
+          ((orc_uint16) var69.x4[1] & 0xff));
+      var70.x4[2] =
+          ((var69.x4[2] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[2]) /
+          ((orc_uint16) var69.x4[2] & 0xff));
+      var70.x4[3] =
+          ((var69.x4[3] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[3]) /
+          ((orc_uint16) var69.x4[3] & 0xff));
+      /* 27: convwb */
+      var71.x4[0] = var70.x4[0];
+      var71.x4[1] = var70.x4[1];
+      var71.x4[2] = var70.x4[2];
+      var71.x4[3] = var70.x4[3];
+      /* 29: andl */
+      var72.i = var71.i & var43.i;
+      /* 30: convwb */
+      var73.x4[0] = var69.x4[0];
+      var73.x4[1] = var69.x4[1];
+      var73.x4[2] = var69.x4[2];
+      var73.x4[3] = var69.x4[3];
+      /* 32: andl */
+      var74.i = var73.i & var44.i;
+      /* 33: orl */
+      var75.i = var72.i | var74.i;
+      /* 34: storel */
+      ptr0[i] = var75;
+    }
+  }
+
+}
+
+#else
+static void
+_backup_compositor_orc_overlay_bgra (OrcExecutor * ORC_RESTRICT ex)
+{
+  int i;
+  int j;
+  int n = ex->n;
+  int m = ex->params[ORC_VAR_A1];
+  orc_union32 *ORC_RESTRICT ptr0;
+  const orc_union32 *ORC_RESTRICT ptr4;
+  orc_union64 var42;
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var43;
+#else
+  orc_union32 var43;
+#endif
+#if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__)
+  volatile orc_union32 var44;
+#else
+  orc_union32 var44;
+#endif
+  orc_union32 var45;
+  orc_union32 var46;
+  orc_union16 var47;
+  orc_int8 var48;
+  orc_union32 var49;
+  orc_union64 var50;
+  orc_union64 var51;
+  orc_union64 var52;
+  orc_union64 var53;
+  orc_union64 var54;
+  orc_union32 var55;
+  orc_union64 var56;
+  orc_union64 var57;
+  orc_union32 var58;
+  orc_union32 var59;
+  orc_union16 var60;
+  orc_int8 var61;
+  orc_union32 var62;
+  orc_union64 var63;
+  orc_union64 var64;
+  orc_union64 var65;
+  orc_union64 var66;
+  orc_union64 var67;
+  orc_union64 var68;
+  orc_union64 var69;
+  orc_union64 var70;
+  orc_union32 var71;
+  orc_union32 var72;
+  orc_union32 var73;
+  orc_union32 var74;
+  orc_union32 var75;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (ex->arrays[0], ex->params[0] * j);
+    ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
+
+    /* 6: loadpw */
+    var42.x4[0] = ex->params[24];
+    var42.x4[1] = ex->params[24];
+    var42.x4[2] = ex->params[24];
+    var42.x4[3] = ex->params[24];
+    /* 11: loadpl */
+    var55.i = (int) 0xffffffff; /* -1 or 2.122e-314f */
+    /* 28: loadpl */
+    var43.i = (int) 0x00ffffff; /* 16777215 or 8.28905e-317f */
+    /* 31: loadpl */
+    var44.i = (int) 0xff000000; /* -16777216 or 2.11371e-314f */
+
+    for (i = 0; i < n; i++) {
+      /* 0: loadl */
+      var45 = ptr4[i];
+      /* 1: shrul */
+      var46.i = ((orc_uint32) var45.i) >> 24;
+      /* 2: convlw */
+      var47.i = var46.i;
+      /* 3: convwb */
+      var48 = var47.i;
+      /* 4: splatbl */
+      var49.i =
+          ((var48 & 0xff) << 24) | ((var48 & 0xff) << 16) | ((var48 & 0xff) <<
+          8) | (var48 & 0xff);
+      /* 5: convubw */
+      var50.x4[0] = (orc_uint8) var49.x4[0];
+      var50.x4[1] = (orc_uint8) var49.x4[1];
+      var50.x4[2] = (orc_uint8) var49.x4[2];
+      var50.x4[3] = (orc_uint8) var49.x4[3];
+      /* 7: mullw */
+      var51.x4[0] = (var50.x4[0] * var42.x4[0]) & 0xffff;
+      var51.x4[1] = (var50.x4[1] * var42.x4[1]) & 0xffff;
+      var51.x4[2] = (var50.x4[2] * var42.x4[2]) & 0xffff;
+      var51.x4[3] = (var50.x4[3] * var42.x4[3]) & 0xffff;
+      /* 8: shruw */
+      var52.x4[0] = ((orc_uint16) var51.x4[0]) >> 8;
+      var52.x4[1] = ((orc_uint16) var51.x4[1]) >> 8;
+      var52.x4[2] = ((orc_uint16) var51.x4[2]) >> 8;
+      var52.x4[3] = ((orc_uint16) var51.x4[3]) >> 8;
+      /* 9: convubw */
+      var53.x4[0] = (orc_uint8) var45.x4[0];
+      var53.x4[1] = (orc_uint8) var45.x4[1];
+      var53.x4[2] = (orc_uint8) var45.x4[2];
+      var53.x4[3] = (orc_uint8) var45.x4[3];
+      /* 10: mullw */
+      var54.x4[0] = (var53.x4[0] * var52.x4[0]) & 0xffff;
+      var54.x4[1] = (var53.x4[1] * var52.x4[1]) & 0xffff;
+      var54.x4[2] = (var53.x4[2] * var52.x4[2]) & 0xffff;
+      var54.x4[3] = (var53.x4[3] * var52.x4[3]) & 0xffff;
+      /* 12: convubw */
+      var56.x4[0] = (orc_uint8) var55.x4[0];
+      var56.x4[1] = (orc_uint8) var55.x4[1];
+      var56.x4[2] = (orc_uint8) var55.x4[2];
+      var56.x4[3] = (orc_uint8) var55.x4[3];
+      /* 13: subw */
+      var57.x4[0] = var56.x4[0] - var52.x4[0];
+      var57.x4[1] = var56.x4[1] - var52.x4[1];
+      var57.x4[2] = var56.x4[2] - var52.x4[2];
+      var57.x4[3] = var56.x4[3] - var52.x4[3];
+      /* 14: loadl */
+      var58 = ptr0[i];
+      /* 15: shrul */
+      var59.i = ((orc_uint32) var58.i) >> 24;
+      /* 16: convlw */
+      var60.i = var59.i;
+      /* 17: convwb */
+      var61 = var60.i;
+      /* 18: splatbl */
+      var62.i =
+          ((var61 & 0xff) << 24) | ((var61 & 0xff) << 16) | ((var61 & 0xff) <<
+          8) | (var61 & 0xff);
+      /* 19: convubw */
+      var63.x4[0] = (orc_uint8) var62.x4[0];
+      var63.x4[1] = (orc_uint8) var62.x4[1];
+      var63.x4[2] = (orc_uint8) var62.x4[2];
+      var63.x4[3] = (orc_uint8) var62.x4[3];
+      /* 20: mullw */
+      var64.x4[0] = (var63.x4[0] * var57.x4[0]) & 0xffff;
+      var64.x4[1] = (var63.x4[1] * var57.x4[1]) & 0xffff;
+      var64.x4[2] = (var63.x4[2] * var57.x4[2]) & 0xffff;
+      var64.x4[3] = (var63.x4[3] * var57.x4[3]) & 0xffff;
+      /* 21: div255w */
+      var65.x4[0] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[0] + 128)) +
+              (((orc_uint16) (var64.x4[0] + 128)) >> 8))) >> 8;
+      var65.x4[1] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[1] + 128)) +
+              (((orc_uint16) (var64.x4[1] + 128)) >> 8))) >> 8;
+      var65.x4[2] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[2] + 128)) +
+              (((orc_uint16) (var64.x4[2] + 128)) >> 8))) >> 8;
+      var65.x4[3] =
+          ((orc_uint16) (((orc_uint16) (var64.x4[3] + 128)) +
+              (((orc_uint16) (var64.x4[3] + 128)) >> 8))) >> 8;
+      /* 22: convubw */
+      var66.x4[0] = (orc_uint8) var58.x4[0];
+      var66.x4[1] = (orc_uint8) var58.x4[1];
+      var66.x4[2] = (orc_uint8) var58.x4[2];
+      var66.x4[3] = (orc_uint8) var58.x4[3];
+      /* 23: mullw */
+      var67.x4[0] = (var66.x4[0] * var65.x4[0]) & 0xffff;
+      var67.x4[1] = (var66.x4[1] * var65.x4[1]) & 0xffff;
+      var67.x4[2] = (var66.x4[2] * var65.x4[2]) & 0xffff;
+      var67.x4[3] = (var66.x4[3] * var65.x4[3]) & 0xffff;
+      /* 24: addw */
+      var68.x4[0] = var67.x4[0] + var54.x4[0];
+      var68.x4[1] = var67.x4[1] + var54.x4[1];
+      var68.x4[2] = var67.x4[2] + var54.x4[2];
+      var68.x4[3] = var67.x4[3] + var54.x4[3];
+      /* 25: addw */
+      var69.x4[0] = var65.x4[0] + var52.x4[0];
+      var69.x4[1] = var65.x4[1] + var52.x4[1];
+      var69.x4[2] = var65.x4[2] + var52.x4[2];
+      var69.x4[3] = var65.x4[3] + var52.x4[3];
+      /* 26: divluw */
+      var70.x4[0] =
+          ((var69.x4[0] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[0]) /
+          ((orc_uint16) var69.x4[0] & 0xff));
+      var70.x4[1] =
+          ((var69.x4[1] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[1]) /
+          ((orc_uint16) var69.x4[1] & 0xff));
+      var70.x4[2] =
+          ((var69.x4[2] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[2]) /
+          ((orc_uint16) var69.x4[2] & 0xff));
+      var70.x4[3] =
+          ((var69.x4[3] & 0xff) ==
+          0) ? 255 : ORC_CLAMP_UB (((orc_uint16) var68.x4[3]) /
+          ((orc_uint16) var69.x4[3] & 0xff));
+      /* 27: convwb */
+      var71.x4[0] = var70.x4[0];
+      var71.x4[1] = var70.x4[1];
+      var71.x4[2] = var70.x4[2];
+      var71.x4[3] = var70.x4[3];
+      /* 29: andl */
+      var72.i = var71.i & var43.i;
+      /* 30: convwb */
+      var73.x4[0] = var69.x4[0];
+      var73.x4[1] = var69.x4[1];
+      var73.x4[2] = var69.x4[2];
+      var73.x4[3] = var69.x4[3];
+      /* 32: andl */
+      var74.i = var73.i & var44.i;
+      /* 33: orl */
+      var75.i = var72.i | var74.i;
+      /* 34: storel */
+      ptr0[i] = var75;
+    }
+  }
+
+}
+
+void
+compositor_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m)
+{
+  OrcExecutor _ex, *ex = &_ex;
+  static volatile int p_inited = 0;
+  static OrcCode *c = 0;
+  void (*func) (OrcExecutor *);
+
+  if (!p_inited) {
+    orc_once_mutex_lock ();
+    if (!p_inited) {
+      OrcProgram *p;
+
+#if 1
+      static const orc_uint8 bc[] = {
+        1, 7, 9, 27, 99, 111, 109, 112, 111, 115, 105, 116, 111, 114, 95, 111,
+        114, 99, 95, 111, 118, 101, 114, 108, 97, 121, 95, 98, 103, 114, 97, 11,
+        4, 4, 12, 4, 4, 14, 4, 255, 255, 255, 255, 14, 4, 0, 0, 0,
+        255, 14, 4, 255, 255, 255, 0, 14, 4, 24, 0, 0, 0, 14, 4, 8,
+        0, 0, 0, 16, 2, 20, 4, 20, 4, 20, 2, 20, 1, 20, 8, 20,
+        8, 20, 8, 20, 4, 20, 8, 20, 8, 113, 32, 4, 126, 33, 32, 19,
+        163, 34, 33, 157, 35, 34, 152, 39, 35, 21, 2, 150, 36, 39, 21, 2,
+        89, 36, 36, 24, 21, 2, 95, 36, 36, 20, 21, 2, 150, 41, 32, 21,
+        2, 89, 41, 41, 36, 115, 39, 16, 21, 2, 150, 37, 39, 21, 2, 98,
+        37, 37, 36, 113, 32, 0, 126, 33, 32, 19, 163, 34, 33, 157, 35, 34,
+        152, 39, 35, 21, 2, 150, 38, 39, 21, 2, 89, 38, 38, 37, 21, 2,
+        80, 38, 38, 21, 2, 150, 40, 32, 21, 2, 89, 40, 40, 38, 21, 2,
+        70, 40, 40, 41, 21, 2, 70, 38, 38, 36, 21, 2, 81, 40, 40, 38,
+        21, 2, 157, 32, 40, 106, 32, 32, 18, 21, 2, 157, 39, 38, 106, 39,
+        39, 17, 123, 32, 32, 39, 128, 0, 32, 2, 0,
+      };
+      p = orc_program_new_from_static_bytecode (bc);
+      orc_program_set_backup_function (p, _backup_compositor_orc_overlay_bgra);
+#else
+      p = orc_program_new ();
+      orc_program_set_2d (p);
+      orc_program_set_name (p, "compositor_orc_overlay_bgra");
+      orc_program_set_backup_function (p, _backup_compositor_orc_overlay_bgra);
+      orc_program_add_destination (p, 4, "d1");
+      orc_program_add_source (p, 4, "s1");
+      orc_program_add_constant (p, 4, 0xffffffff, "c1");
+      orc_program_add_constant (p, 4, 0xff000000, "c2");
+      orc_program_add_constant (p, 4, 0x00ffffff, "c3");
+      orc_program_add_constant (p, 4, 0x00000018, "c4");
+      orc_program_add_constant (p, 4, 0x00000008, "c5");
+      orc_program_add_parameter (p, 2, "p1");
+      orc_program_add_temporary (p, 4, "t1");
+      orc_program_add_temporary (p, 4, "t2");
+      orc_program_add_temporary (p, 2, "t3");
+      orc_program_add_temporary (p, 1, "t4");
+      orc_program_add_temporary (p, 8, "t5");
+      orc_program_add_temporary (p, 8, "t6");
+      orc_program_add_temporary (p, 8, "t7");
+      orc_program_add_temporary (p, 4, "t8");
+      orc_program_add_temporary (p, 8, "t9");
+      orc_program_add_temporary (p, 8, "t10");
+
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shrul", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_C4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T8, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_P1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shruw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T10, ORC_VAR_T1,
+          ORC_VAR_D1, ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T10, ORC_VAR_T10, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadpl", 0, ORC_VAR_T8, ORC_VAR_C1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T8, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "subw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "loadl", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "shrul", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_C4,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convlw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T6,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "div255w", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convubw", 2, ORC_VAR_T9, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "mullw", 2, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T10,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "addw", 2, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T5,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "divluw", 2, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T7,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T9, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "andl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C3,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_D1,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "andl", 0, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_C2,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "orl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T8,
+          ORC_VAR_D1);
+      orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
+          ORC_VAR_D1);
+#endif
+
+      orc_program_compile (p);
+      c = orc_program_take_code (p);
+      orc_program_free (p);
+    }
+    p_inited = TRUE;
+    orc_once_mutex_unlock ();
+  }
+  ex->arrays[ORC_VAR_A2] = c;
+  ex->program = 0;
+
+  ex->n = n;
+  ORC_EXECUTOR_M (ex) = m;
+  ex->arrays[ORC_VAR_D1] = d1;
+  ex->params[ORC_VAR_D1] = d1_stride;
+  ex->arrays[ORC_VAR_S1] = (void *) s1;
+  ex->params[ORC_VAR_S1] = s1_stride;
+  ex->params[ORC_VAR_P1] = p1;
+
+  func = c->exec;
+  func (ex);
+}
+#endif
diff --git a/gst/compositor/compositororc-dist.h b/gst/compositor/compositororc-dist.h
new file mode 100644
index 0000000..907b262
--- /dev/null
+++ b/gst/compositor/compositororc-dist.h
@@ -0,0 +1,96 @@
+
+/* autogenerated from compositororc.orc */
+
+#ifndef _COMPOSITORORC_H_
+#define _COMPOSITORORC_H_
+
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#ifndef _ORC_INTEGER_TYPEDEFS_
+#define _ORC_INTEGER_TYPEDEFS_
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <stdint.h>
+typedef int8_t orc_int8;
+typedef int16_t orc_int16;
+typedef int32_t orc_int32;
+typedef int64_t orc_int64;
+typedef uint8_t orc_uint8;
+typedef uint16_t orc_uint16;
+typedef uint32_t orc_uint32;
+typedef uint64_t orc_uint64;
+#define ORC_UINT64_C(x) UINT64_C(x)
+#elif defined(_MSC_VER)
+typedef signed __int8 orc_int8;
+typedef signed __int16 orc_int16;
+typedef signed __int32 orc_int32;
+typedef signed __int64 orc_int64;
+typedef unsigned __int8 orc_uint8;
+typedef unsigned __int16 orc_uint16;
+typedef unsigned __int32 orc_uint32;
+typedef unsigned __int64 orc_uint64;
+#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
+#else
+#include <limits.h>
+typedef signed char orc_int8;
+typedef short orc_int16;
+typedef int orc_int32;
+typedef unsigned char orc_uint8;
+typedef unsigned short orc_uint16;
+typedef unsigned int orc_uint32;
+#if INT_MAX == LONG_MAX
+typedef long long orc_int64;
+typedef unsigned long long orc_uint64;
+#define ORC_UINT64_C(x) (x##ULL)
+#else
+typedef long orc_int64;
+typedef unsigned long orc_uint64;
+#define ORC_UINT64_C(x) (x##UL)
+#endif
+#endif
+typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
+typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
+typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
+#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+
+#ifndef ORC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define ORC_INTERNAL __hidden
+#elif defined (__GNUC__)
+#define ORC_INTERNAL __attribute__((visibility("hidden")))
+#else
+#define ORC_INTERNAL
+#endif
+#endif
+
+void compositor_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
+void compositor_orc_memcpy_u32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n);
+void compositor_orc_blend_u8 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_blend_argb (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+void compositor_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/gst/compositor/compositororc.orc b/gst/compositor/compositororc.orc
new file mode 100644
index 0000000..5a348b2
--- /dev/null
+++ b/gst/compositor/compositororc.orc
@@ -0,0 +1,220 @@
+.function compositor_orc_splat_u32
+.dest 4 d1 guint32
+.param 4 p1 guint32
+
+copyl d1, p1
+
+.function compositor_orc_memcpy_u32
+.dest 4 d1 guint32
+.source 4 s1 guint32
+
+copyl d1, s1
+
+.function compositor_orc_blend_u8
+.flags 2d
+.dest 1 d1 guint8
+.source 1 s1 guint8
+.param 2 p1
+.temp 2 t1
+.temp 2 t2
+.const 1 c1 8 
+
+convubw t1, d1
+convubw t2, s1
+subw t2, t2, t1
+mullw t2, t2, p1
+shlw t1, t1, c1
+addw t2, t1, t2
+shruw t2, t2, c1
+convsuswb d1, t2
+
+
+.function compositor_orc_blend_argb
+.flags 2d
+.dest 4 d guint8
+.source 4 s guint8
+.param 2 alpha
+.temp 4 t
+.temp 2 tw
+.temp 1 tb
+.temp 4 a
+.temp 8 d_wide
+.temp 8 s_wide
+.temp 8 a_wide
+.const 4 a_alpha 0x000000ff
+
+loadl t, s
+convlw tw, t
+convwb tb, tw
+splatbl a, tb
+x4 convubw a_wide, a
+x4 mullw a_wide, a_wide, alpha
+x4 shruw a_wide, a_wide, 8
+x4 convubw s_wide, t
+loadl t, d
+x4 convubw d_wide, t
+x4 subw s_wide, s_wide, d_wide
+x4 mullw s_wide, s_wide, a_wide
+x4 div255w s_wide, s_wide
+x4 addw d_wide, d_wide, s_wide
+x4 convwb t, d_wide
+orl t, t, a_alpha
+storel d, t
+
+.function compositor_orc_blend_bgra
+.flags 2d
+.dest 4 d guint8
+.source 4 s guint8
+.param 2 alpha
+.temp 4 t
+.temp 4 t2
+.temp 2 tw
+.temp 1 tb
+.temp 4 a
+.temp 8 d_wide
+.temp 8 s_wide
+.temp 8 a_wide
+.const 4 a_alpha 0xff000000
+
+loadl t, s
+shrul t2, t, 24
+convlw tw, t2
+convwb tb, tw
+splatbl a, tb
+x4 convubw a_wide, a
+x4 mullw a_wide, a_wide, alpha
+x4 shruw a_wide, a_wide, 8
+x4 convubw s_wide, t
+loadl t, d
+x4 convubw d_wide, t
+x4 subw s_wide, s_wide, d_wide
+x4 mullw s_wide, s_wide, a_wide
+x4 div255w s_wide, s_wide
+x4 addw d_wide, d_wide, s_wide
+x4 convwb t, d_wide
+orl t, t, a_alpha
+storel d, t
+
+
+.function compositor_orc_overlay_argb
+.flags 2d
+.dest 4 d guint8
+.source 4 s guint8
+.param 2 alpha
+.temp 4 t
+.temp 2 tw
+.temp 1 tb
+.temp 8 alpha_s
+.temp 8 alpha_s_inv
+.temp 8 alpha_d
+.temp 4 a
+.temp 8 d_wide
+.temp 8 s_wide
+.const 4 xfs 0xffffffff
+.const 4 a_alpha 0x000000ff
+.const 4 a_alpha_inv 0xffffff00
+
+# calc source alpha as alpha_s = alpha_s * alpha / 256
+loadl t, s
+convlw tw, t
+convwb tb, tw
+splatbl a, tb
+x4 convubw alpha_s, a
+x4 mullw alpha_s, alpha_s, alpha
+x4 shruw alpha_s, alpha_s, 8
+x4 convubw s_wide, t
+x4 mullw s_wide, s_wide, alpha_s
+
+# calc destination alpha as alpha_d = (255-alpha_s) * alpha_d / 255
+loadpl a, xfs
+x4 convubw alpha_s_inv, a
+x4 subw alpha_s_inv, alpha_s_inv, alpha_s
+loadl t, d
+convlw tw, t
+convwb tb, tw
+splatbl a, tb
+x4 convubw alpha_d, a
+x4 mullw alpha_d, alpha_d, alpha_s_inv
+x4 div255w alpha_d, alpha_d
+x4 convubw d_wide, t
+x4 mullw d_wide, d_wide, alpha_d
+
+# calc final pixel as pix_d = pix_s*alpha_s + pix_d*alpha_d*(255-alpha_s)/255
+x4 addw d_wide, d_wide, s_wide
+
+# calc the final destination alpha_d = alpha_s + alpha_d * (255-alpha_s)/255
+x4 addw alpha_d, alpha_d, alpha_s
+
+# now normalize the pix_d by the final alpha to make it associative
+x4 divluw, d_wide, d_wide, alpha_d
+
+# pack the new alpha into the correct spot
+x4 convwb t, d_wide
+andl t, t, a_alpha_inv
+x4 convwb a, alpha_d
+andl a, a, a_alpha
+orl  t, t, a
+storel d, t
+
+.function compositor_orc_overlay_bgra
+.flags 2d
+.dest 4 d guint8
+.source 4 s guint8
+.param 2 alpha
+.temp 4 t
+.temp 4 t2
+.temp 2 tw
+.temp 1 tb
+.temp 8 alpha_s
+.temp 8 alpha_s_inv
+.temp 8 alpha_d
+.temp 4 a
+.temp 8 d_wide
+.temp 8 s_wide
+.const 4 xfs 0xffffffff
+.const 4 a_alpha 0xff000000
+.const 4 a_alpha_inv 0x00ffffff
+
+# calc source alpha as alpha_s = alpha_s * alpha / 256
+loadl t, s
+shrul t2, t, 24
+convlw tw, t2
+convwb tb, tw
+splatbl a, tb
+x4 convubw alpha_s, a
+x4 mullw alpha_s, alpha_s, alpha
+x4 shruw alpha_s, alpha_s, 8
+x4 convubw s_wide, t
+x4 mullw s_wide, s_wide, alpha_s
+
+# calc destination alpha as alpha_d = (255-alpha_s) * alpha_d / 255
+loadpl a, xfs
+x4 convubw alpha_s_inv, a
+x4 subw alpha_s_inv, alpha_s_inv, alpha_s
+loadl t, d
+shrul t2, t, 24
+convlw tw, t2
+convwb tb, tw
+splatbl a, tb
+x4 convubw alpha_d, a
+x4 mullw alpha_d, alpha_d, alpha_s_inv
+x4 div255w alpha_d, alpha_d
+x4 convubw d_wide, t
+x4 mullw d_wide, d_wide, alpha_d
+
+# calc final pixel as pix_d = pix_s*alpha_s + pix_d*alpha_d*(255-alpha_s)/255
+x4 addw d_wide, d_wide, s_wide
+
+# calc the final destination alpha_d = alpha_s + alpha_d * (255-alpha_s)/255
+x4 addw alpha_d, alpha_d, alpha_s
+
+# now normalize the pix_d by the final alpha to make it associative
+x4 divluw, d_wide, d_wide, alpha_d
+
+# pack the new alpha into the correct spot
+x4 convwb t, d_wide
+andl t, t, a_alpha_inv
+x4 convwb a, alpha_d
+andl a, a, a_alpha
+orl  t, t, a
+storel d, t
diff --git a/gst/compositor/compositorpad.h b/gst/compositor/compositorpad.h
new file mode 100644
index 0000000..0ba580e
--- /dev/null
+++ b/gst/compositor/compositorpad.h
@@ -0,0 +1,65 @@
+/* Generic compositor plugin pad
+ * Copyright (C) 2008 Wim Taymans <wim@fluendo.com>
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_COMPOSITOR_PAD_H__
+#define __GST_COMPOSITOR_PAD_H__
+
+#include <gst/gst.h>
+#include <gst/video/video.h>
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_COMPOSITOR_PAD (gst_compositor_pad_get_type())
+#define GST_COMPOSITOR_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COMPOSITOR_PAD, GstCompositorPad))
+#define GST_COMPOSITOR_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR_PAD, GstCompositorPadClass))
+#define GST_IS_COMPOSITOR_PAD(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COMPOSITOR_PAD))
+#define GST_IS_COMPOSITOR_PAD_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COMPOSITOR_PAD))
+
+typedef struct _GstCompositorPad GstCompositorPad;
+typedef struct _GstCompositorPadClass GstCompositorPadClass;
+
+/**
+ * GstCompositorPad:
+ *
+ * The opaque #GstCompositorPad structure.
+ */
+struct _GstCompositorPad
+{
+  GstVideoAggregatorPad parent;
+
+  /* properties */
+  gint xpos, ypos;
+  guint zorder;
+  gdouble alpha;
+};
+
+struct _GstCompositorPadClass
+{
+  GstVideoAggregatorPadClass parent_class;
+};
+
+GType gst_compositor_pad_get_type (void);
+
+G_END_DECLS
+#endif /* __GST_COMPOSITOR_PAD_H__ */
diff --git a/gst/dataurisrc/Makefile.in b/gst/dataurisrc/Makefile.in
index 9ae8a37..aeafcb5 100644
--- a/gst/dataurisrc/Makefile.in
+++ b/gst/dataurisrc/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdataurisrc.la
 libgstdataurisrc_la_SOURCES = gstdataurisrc.c gstdataurisrc.h
 libgstdataurisrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
diff --git a/gst/dccp/Makefile.in b/gst/dccp/Makefile.in
index cb4be7d..4520a8d 100644
--- a/gst/dccp/Makefile.in
+++ b/gst/dccp/Makefile.in
@@ -351,6 +351,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -437,6 +439,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -728,6 +731,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdccp.la
 
 # sources used to compile this plug-in
diff --git a/gst/debugutils/Makefile.in b/gst/debugutils/Makefile.in
index 8c1a696..272c8bd 100644
--- a/gst/debugutils/Makefile.in
+++ b/gst/debugutils/Makefile.in
@@ -366,6 +366,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -452,6 +454,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -743,6 +746,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 glib_gen_prefix = __gst_debugutils
 glib_gen_basename = debugutils
 enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
diff --git a/gst/dvbsuboverlay/Makefile.in b/gst/dvbsuboverlay/Makefile.in
index 76bedee..1758cdc 100644
--- a/gst/dvbsuboverlay/Makefile.in
+++ b/gst/dvbsuboverlay/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdvbsuboverlay.la
 libgstdvbsuboverlay_la_SOURCES = dvb-sub.c gstdvbsuboverlay.c
 libgstdvbsuboverlay_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/gst/dvdspu/Makefile.in b/gst/dvdspu/Makefile.in
index ad03067..8fe4f4f 100644
--- a/gst/dvdspu/Makefile.in
+++ b/gst/dvdspu/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdvdspu.la
 libgstdvdspu_la_SOURCES = gstdvdspu.c gstdvdspu-render.c gstspu-vobsub.c gstspu-vobsub-render.c gstspu-pgs.c
 libgstdvdspu_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/gst/faceoverlay/Makefile.in b/gst/faceoverlay/Makefile.in
index 4212d3a..e6a7b1e 100644
--- a/gst/faceoverlay/Makefile.in
+++ b/gst/faceoverlay/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfaceoverlay.la
 
 # sources used to compile this plug-in
diff --git a/gst/festival/Makefile.in b/gst/festival/Makefile.in
index 04e8da4..3ab0a8a 100644
--- a/gst/festival/Makefile.in
+++ b/gst/festival/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfestival.la
 libgstfestival_la_SOURCES = gstfestival.c 
 libgstfestival_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
diff --git a/gst/fieldanalysis/Makefile.in b/gst/fieldanalysis/Makefile.in
index 0671cf8..31f2dc6 100644
--- a/gst/fieldanalysis/Makefile.in
+++ b/gst/fieldanalysis/Makefile.in
@@ -372,6 +372,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -458,6 +460,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -749,6 +752,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfieldanalysis.la
 ORC_SOURCE = gstfieldanalysisorc
 EXTRA_DIST = $(ORC_SOURCE).orc
diff --git a/gst/freeverb/Makefile.in b/gst/freeverb/Makefile.in
index 3b73ff0..9a891b5 100644
--- a/gst/freeverb/Makefile.in
+++ b/gst/freeverb/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfreeverb.la
 
 # sources used to compile this plug-in
diff --git a/gst/frei0r/Makefile.in b/gst/frei0r/Makefile.in
index c150c49..1ad97d4 100644
--- a/gst/frei0r/Makefile.in
+++ b/gst/frei0r/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfrei0r.la
 libgstfrei0r_la_SOURCES = \
 	gstfrei0r.c \
diff --git a/gst/gaudieffects/Makefile.in b/gst/gaudieffects/Makefile.in
index f1f4121..31edfef 100644
--- a/gst/gaudieffects/Makefile.in
+++ b/gst/gaudieffects/Makefile.in
@@ -378,6 +378,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -464,6 +466,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -755,6 +758,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstgaudieffects.la
 ORC_SOURCE = gstgaudieffectsorc
 EXTRA_DIST = $(ORC_SOURCE).orc
diff --git a/gst/gdp/Makefile.in b/gst/gdp/Makefile.in
index ebdc90e..f07254c 100644
--- a/gst/gdp/Makefile.in
+++ b/gst/gdp/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstgdp.la
 libgstgdp_la_SOURCES = \
 	dataprotocol.c \
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index 41fdeb4..721cc60 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -558,6 +558,12 @@
     string =
         g_strndup ((gchar *) payload, GST_DP_HEADER_PAYLOAD_LENGTH (header));
     s = gst_structure_from_string (string, NULL);
+    if (s == NULL) {
+      GST_WARNING ("Could not parse payload string: %s", string);
+      g_free (string);
+      return NULL;
+    }
+
     g_free (string);
   }
   GST_LOG ("Creating event of type 0x%x with structure '%" GST_PTR_FORMAT "'",
diff --git a/gst/geometrictransform/Makefile.in b/gst/geometrictransform/Makefile.in
index f54a276..60d52ae 100644
--- a/gst/geometrictransform/Makefile.in
+++ b/gst/geometrictransform/Makefile.in
@@ -367,6 +367,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -453,6 +455,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -744,6 +747,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstgeometrictransform.la 
 libgstgeometrictransform_la_SOURCES = plugin.c \
                                       gstgeometrictransform.c \
diff --git a/gst/hdvparse/Makefile.in b/gst/hdvparse/Makefile.in
index 028172d..01904cb 100644
--- a/gst/hdvparse/Makefile.in
+++ b/gst/hdvparse/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgsthdvparse.la
 libgsthdvparse_la_SOURCES = \
 	gsthdvparse.c
diff --git a/gst/id3tag/Makefile.in b/gst/id3tag/Makefile.in
index 7055bd6..335ec78 100644
--- a/gst/id3tag/Makefile.in
+++ b/gst/id3tag/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstid3tag.la
 libgstid3tag_la_SOURCES = \
 	gstid3mux.c \
diff --git a/gst/inter/Makefile.in b/gst/inter/Makefile.in
index a58111c..391d6ad 100644
--- a/gst/inter/Makefile.in
+++ b/gst/inter/Makefile.in
@@ -361,6 +361,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -447,6 +449,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -738,6 +741,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstinter.la
 libgstinter_la_SOURCES = \
 	gstinteraudiosink.c \
diff --git a/gst/interlace/Makefile.in b/gst/interlace/Makefile.in
index 8f2322b..dc13d03 100644
--- a/gst/interlace/Makefile.in
+++ b/gst/interlace/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstinterlace.la
 libgstinterlace_la_SOURCES = \
 	gstinterlace.c
diff --git a/gst/ivfparse/Makefile.in b/gst/ivfparse/Makefile.in
index 100d859..7ecb36a 100644
--- a/gst/ivfparse/Makefile.in
+++ b/gst/ivfparse/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstivfparse.la
 libgstivfparse_la_SOURCES = gstivfparse.c
 libgstivfparse_la_CFLAGS = \
diff --git a/gst/ivtc/Makefile.in b/gst/ivtc/Makefile.in
index 4342cc1..6cf25f1 100644
--- a/gst/ivtc/Makefile.in
+++ b/gst/ivtc/Makefile.in
@@ -343,6 +343,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -429,6 +431,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -720,6 +723,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstivtc.la
 libgstivtc_la_SOURCES = \
 	gstivtc.c gstivtc.h \
diff --git a/gst/jp2kdecimator/Makefile.in b/gst/jp2kdecimator/Makefile.in
index 6074fb8..01bd9ea 100644
--- a/gst/jp2kdecimator/Makefile.in
+++ b/gst/jp2kdecimator/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstjp2kdecimator.la
 libgstjp2kdecimator_la_SOURCES = \
 	gstjp2kdecimator.c \
diff --git a/gst/jpegformat/Makefile.in b/gst/jpegformat/Makefile.in
index e7843a9..7489da6 100644
--- a/gst/jpegformat/Makefile.in
+++ b/gst/jpegformat/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstjpegformat.la
 libgstjpegformat_la_SOURCES = gstjpegformat.c gstjpegparse.c gstjifmux.c
 libgstjpegformat_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
diff --git a/gst/librfb/Makefile.in b/gst/librfb/Makefile.in
index 22e4d73..71ba434 100644
--- a/gst/librfb/Makefile.in
+++ b/gst/librfb/Makefile.in
@@ -354,6 +354,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -440,6 +442,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -731,6 +734,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = librfb.la
 plugin_LTLIBRARIES = libgstrfbsrc.la
 libgstrfbsrc_la_SOURCES = gstrfbsrc.c
diff --git a/gst/liveadder/Makefile.in b/gst/liveadder/Makefile.in
index cfcd19e..c4b4d0c 100644
--- a/gst/liveadder/Makefile.in
+++ b/gst/liveadder/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstliveadder.la
 libgstliveadder_la_SOURCES = liveadder.c
 libgstliveadder_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index eed3f73..1c3b7a0 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -1114,15 +1114,18 @@
 
     mix_duration = mix_end - mix_start;
 
-    gst_buffer_map (oldbuffer, &oldmap, GST_MAP_WRITE);
-    gst_buffer_map (buffer, &map, GST_MAP_READ);
-    adder->func (oldmap.data +
-        gst_live_adder_length_from_duration (adder, old_skip),
-        map.data +
-        gst_live_adder_length_from_duration (adder, skip),
-        gst_live_adder_length_from_duration (adder, mix_duration));
-    gst_buffer_unmap (oldbuffer, &oldmap);
-    gst_buffer_unmap (buffer, &map);
+    if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP)) {
+      GST_BUFFER_FLAG_UNSET (oldbuffer, GST_BUFFER_FLAG_GAP);
+      gst_buffer_map (oldbuffer, &oldmap, GST_MAP_WRITE);
+      gst_buffer_map (buffer, &map, GST_MAP_READ);
+      adder->func (oldmap.data +
+          gst_live_adder_length_from_duration (adder, old_skip),
+          map.data +
+          gst_live_adder_length_from_duration (adder, skip),
+          gst_live_adder_length_from_duration (adder, mix_duration));
+      gst_buffer_unmap (oldbuffer, &oldmap);
+      gst_buffer_unmap (buffer, &map);
+    }
     skip += mix_duration;
   }
 
diff --git a/gst/midi/Makefile.in b/gst/midi/Makefile.in
index 2d06a04..04d0efc 100644
--- a/gst/midi/Makefile.in
+++ b/gst/midi/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmidi.la
 libgstmidi_la_SOURCES = midi.c midiparse.c
 libgstmidi_la_CFLAGS = \
diff --git a/gst/mpegdemux/Makefile.in b/gst/mpegdemux/Makefile.in
index e6d6c48..1cfd266 100644
--- a/gst/mpegdemux/Makefile.in
+++ b/gst/mpegdemux/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpegpsdemux.la
 libgstmpegpsdemux_la_SOURCES = \
 	plugin.c \
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index b360dc1..90c00cb 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -274,6 +274,7 @@
 
   demux->adapter = gst_adapter_new ();
   demux->rev_adapter = gst_adapter_new ();
+  demux->flowcombiner = gst_flow_combiner_new ();
 
   gst_flups_demux_reset (demux);
 }
@@ -285,6 +286,7 @@
   g_free (demux->streams);
   g_free (demux->streams_found);
 
+  gst_flow_combiner_free (demux->flowcombiner);
   g_object_unref (demux->adapter);
   g_object_unref (demux->rev_adapter);
 
@@ -301,8 +303,10 @@
     GstFluPSStream *stream = demux->streams[i];
 
     if (stream != NULL) {
-      if (stream->pad && GST_PAD_PARENT (stream->pad))
+      if (stream->pad && GST_PAD_PARENT (stream->pad)) {
+        gst_flow_combiner_remove_pad (demux->flowcombiner, stream->pad);
         gst_element_remove_pad (GST_ELEMENT_CAST (demux), stream->pad);
+      }
 
       if (stream->pending_tags)
         gst_tag_list_unref (stream->pending_tags);
@@ -455,7 +459,6 @@
   stream->discont = TRUE;
   stream->need_segment = TRUE;
   stream->notlinked = FALSE;
-  stream->last_flow = GST_FLOW_OK;
   stream->type = stream_type;
   stream->pending_tags = NULL;
   stream->pad = gst_pad_new_from_template (template, name);
@@ -522,6 +525,7 @@
 
     if (demux->need_no_more_pads) {
       gst_element_add_pad (GST_ELEMENT (demux), stream->pad);
+      gst_flow_combiner_add_pad (demux->flowcombiner, stream->pad);
     } else {
       /* only likely to confuse decodebin etc, so discard */
       /* FIXME should perform full switch protocol:
@@ -662,7 +666,7 @@
   GST_LOG_OBJECT (demux, "pushing stream id 0x%02x type 0x%02x, pts time: %"
       GST_TIME_FORMAT ", size %" G_GSIZE_FORMAT,
       stream->id, stream->type, GST_TIME_ARGS (pts), gst_buffer_get_size (buf));
-  stream->last_flow = result = gst_pad_push (stream->pad, buf);
+  result = gst_pad_push (stream->pad, buf);
   GST_LOG_OBJECT (demux, "result: %s", gst_flow_get_name (result));
 
   return result;
@@ -792,7 +796,6 @@
           break;
         case 0x7:
           /* FIXME: What range is SDDS? */
-          break;
         default:
           GST_WARNING_OBJECT (demux,
               "Unknown audio stream format in language code event: %d",
@@ -887,7 +890,6 @@
 
     if (G_LIKELY (stream)) {
       stream->last_ts = GST_CLOCK_TIME_NONE;
-      stream->last_flow = GST_FLOW_OK;
     }
   }
 }
@@ -2259,7 +2261,6 @@
     ret = gst_flups_demux_send_data (demux, demux->current_stream, out_buf);
     if (ret == GST_FLOW_NOT_LINKED) {
       demux->current_stream->notlinked = TRUE;
-      ret = GST_FLOW_OK;
     }
   }
 
@@ -3028,42 +3029,13 @@
 static GstFlowReturn
 gst_flups_demux_combine_flows (GstFluPSDemux * demux, GstFlowReturn ret)
 {
-  gint i, count = demux->found_count, streams = 0;
-  gboolean unexpected = FALSE, not_linked = TRUE;
-
   GST_LOG_OBJECT (demux, "flow return: %s", gst_flow_get_name (ret));
 
-  /* only return NOT_LINKED if all other pads returned NOT_LINKED */
-  for (i = 0; i < count; i++) {
-    GstFluPSStream *stream = demux->streams_found[i];
+  ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
 
-    if (G_UNLIKELY (!stream))
-      continue;
+  if (G_UNLIKELY (demux->need_no_more_pads && ret == GST_FLOW_NOT_LINKED))
+    ret = GST_FLOW_OK;
 
-    ret = stream->last_flow;
-    streams++;
-
-    /* some streams may still have to appear,
-     * and only those ones may end up linked */
-    if (G_UNLIKELY (demux->need_no_more_pads && ret == GST_FLOW_NOT_LINKED))
-      ret = GST_FLOW_OK;
-
-    /* no unexpected or unlinked, return */
-    if (G_LIKELY (ret != GST_FLOW_EOS && ret != GST_FLOW_NOT_LINKED))
-      goto done;
-
-    /* we check to see if we have at least 1 unexpected or all unlinked */
-    unexpected |= (ret == GST_FLOW_EOS);
-    not_linked &= (ret == GST_FLOW_NOT_LINKED);
-  }
-
-  /* when we get here, we all have unlinked or unexpected */
-  if (not_linked && streams)
-    ret = GST_FLOW_NOT_LINKED;
-  else if (unexpected)
-    ret = GST_FLOW_EOS;
-
-done:
   GST_LOG_OBJECT (demux, "combined flow return: %s", gst_flow_get_name (ret));
   return ret;
 }
diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h
index a8f9e13..dcc1505 100644
--- a/gst/mpegdemux/gstmpegdemux.h
+++ b/gst/mpegdemux/gstmpegdemux.h
@@ -47,6 +47,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstadapter.h>
+#include <gst/base/gstflowcombiner.h>
 
 #include "gstpesfilter.h"
 
@@ -93,7 +94,6 @@
 
   GstClockTime segment_thresh;
   GstClockTime last_ts;
-  GstFlowReturn last_flow;
 
   gboolean discont;
   gboolean notlinked;
@@ -152,6 +152,8 @@
   gint found_count;
   gboolean need_no_more_pads;
 
+  GstFlowCombiner *flowcombiner;
+
   /* Indicates an MPEG-2 stream */
   gboolean is_mpeg2_pack;
 };
diff --git a/gst/mpegpsmux/Makefile.in b/gst/mpegpsmux/Makefile.in
index 0f0c04c..62496ed 100644
--- a/gst/mpegpsmux/Makefile.in
+++ b/gst/mpegpsmux/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpegpsmux.la
 libgstmpegpsmux_la_SOURCES = \
 	mpegpsmux.c \
diff --git a/gst/mpegtsdemux/Makefile.am b/gst/mpegtsdemux/Makefile.am
index 68e136b..3bf5123 100644
--- a/gst/mpegtsdemux/Makefile.am
+++ b/gst/mpegtsdemux/Makefile.am
@@ -13,6 +13,7 @@
 	$(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstmpegtsdemux_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
 	$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) \
 	-lgstpbutils-@GST_API_VERSION@ \
 	$(GST_BASE_LIBS) $(GST_LIBS)
diff --git a/gst/mpegtsdemux/Makefile.in b/gst/mpegtsdemux/Makefile.in
index f92ab65..0b49f20 100644
--- a/gst/mpegtsdemux/Makefile.in
+++ b/gst/mpegtsdemux/Makefile.in
@@ -155,6 +155,7 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstmpegtsdemux_la_DEPENDENCIES = $(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1)
 am_libgstmpegtsdemux_la_OBJECTS =  \
@@ -351,6 +352,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -437,6 +440,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -728,6 +732,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpegtsdemux.la
 libgstmpegtsdemux_la_SOURCES = \
 	mpegtspacketizer.c \
@@ -743,6 +748,7 @@
 
 libgstmpegtsdemux_la_LIBADD = \
 	$(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-$(GST_API_VERSION).la \
+	$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \
 	$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) \
 	-lgstpbutils-@GST_API_VERSION@ \
 	$(GST_BASE_LIBS) $(GST_LIBS)
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index 0fef7c7..13b99a5 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -88,6 +88,8 @@
     GstStateChange transition);
 static gboolean mpegts_base_get_tags_from_eit (MpegTSBase * base,
     GstMpegTsSection * section);
+static gboolean mpegts_base_parse_atsc_mgt (MpegTSBase * base,
+    GstMpegTsSection * section);
 static gboolean remove_each_program (gpointer key, MpegTSBaseProgram * program,
     MpegTSBase * base);
 
@@ -915,6 +917,9 @@
       /* some tag xtraction + posting */
       post_message = mpegts_base_get_tags_from_eit (base, section);
       break;
+    case GST_MPEGTS_SECTION_ATSC_MGT:
+      post_message = mpegts_base_parse_atsc_mgt (base, section);
+      break;
     default:
       break;
   }
@@ -926,6 +931,29 @@
   gst_mpegts_section_unref (section);
 }
 
+static gboolean
+mpegts_base_parse_atsc_mgt (MpegTSBase * base, GstMpegTsSection * section)
+{
+  const GstMpegTsAtscMGT *mgt;
+  gint i;
+
+  mgt = gst_mpegts_section_get_atsc_mgt (section);
+  if (G_UNLIKELY (mgt == NULL))
+    return FALSE;
+
+  for (i = 0; i < mgt->tables->len; ++i) {
+    GstMpegTsAtscMGTTable *table = g_ptr_array_index (mgt->tables, i);
+
+    if ((table->table_type >= GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_EIT0 &&
+            table->table_type <= GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_EIT127) ||
+        (table->table_type >= GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_ETT0 &&
+            table->table_type <= GST_MPEG_TS_ATSC_MGT_TABLE_TYPE_ETT127)) {
+      MPEGTS_BIT_SET (base->known_psi, table->pid);
+    }
+  }
+
+  return TRUE;
+}
 
 static gboolean
 mpegts_base_get_tags_from_eit (MpegTSBase * base, GstMpegTsSection * section)
@@ -1067,6 +1095,10 @@
       res = GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, event);
   }
 
+  /* Always return TRUE for sticky events */
+  if (GST_EVENT_IS_STICKY (event))
+    res = TRUE;
+
   return res;
 }
 
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index ba347cf..b504739 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -453,9 +453,13 @@
 
   packet->data = data;
 
-  if (FLAGS_HAS_AFC (tmp))
+  packet->afc_flags = 0;
+  packet->pcr = G_MAXUINT64;
+
+  if (FLAGS_HAS_AFC (tmp)) {
     if (!mpegts_packetizer_parse_adaptation_field_control (packetizer, packet))
       return FALSE;
+  }
 
   if (FLAGS_HAS_PAYLOAD (tmp))
     packet->payload = packet->data;
@@ -1200,7 +1204,7 @@
  *
  *  J = N + n
  *
- *   N   : a constant network delay.
+ *   D   : a constant network delay.
  *   n   : random added noise. The noise is concentrated around 0
  *
  * In the receiver we can track the elapsed time at the sender with:
@@ -1851,7 +1855,7 @@
     guint64 pcr, guint64 offset)
 {
   PCROffsetCurrent *current = pcrtable->current;
-  guint32 corpcr, coroffset;
+  gint64 corpcr, coroffset;
 
   packetizer->nb_seen_offsets += 1;
 
@@ -1926,9 +1930,9 @@
       current->first_offset);
   GST_DEBUG ("Last PCR: +%" GST_TIME_FORMAT " offset: +%u",
       GST_TIME_ARGS (PCRTIME_TO_GSTTIME (current->pending[current->last].pcr)),
-      current->pending[current->last].pcr);
-  GST_DEBUG ("To add (corrected) PCR:%" GST_TIME_FORMAT " offset:%u",
-      GST_TIME_ARGS (PCRTIME_TO_GSTTIME (corpcr)), coroffset);
+      current->pending[current->last].offset);
+  GST_DEBUG ("To add (corrected) PCR:%" GST_TIME_FORMAT " offset:%"
+      G_GINT64_FORMAT, GST_TIME_ARGS (PCRTIME_TO_GSTTIME (corpcr)), coroffset);
 
   /* Do we need to close the current group ? */
   /* Check for wrapover/discont */
@@ -2076,27 +2080,38 @@
 
   pcrtable = get_pcr_table (packetizer, pid);
 
-  if (g_list_length (pcrtable->groups) < 2) {
+  if (g_list_length (pcrtable->groups) < 1) {
     GST_WARNING ("Not enough observations to return a duration estimate");
     return GST_CLOCK_TIME_NONE;
   }
 
-  /* FIXME : Refine this later to use neighbouring groups */
-  tmp = g_list_last (pcrtable->groups);
-  last = tmp->data;
+  if (g_list_length (pcrtable->groups) > 1) {
+    GST_LOG ("Using last group");
 
-  if (G_UNLIKELY (last->flags & PCR_GROUP_FLAG_ESTIMATED))
-    _reevaluate_group_pcr_offset (pcrtable, last);
+    /* FIXME : Refine this later to use neighbouring groups */
+    tmp = g_list_last (pcrtable->groups);
+    last = tmp->data;
 
-  /* lastpcr is the full value in PCR from the first first chunk of data */
-  lastpcr = last->values[last->last_value].pcr + last->pcr_offset;
-  /* lastoffset is the full offset from the first chunk of data */
-  lastoffset =
-      last->values[last->last_value].offset + last->first_offset -
-      packetizer->refoffset;
+    if (G_UNLIKELY (last->flags & PCR_GROUP_FLAG_ESTIMATED))
+      _reevaluate_group_pcr_offset (pcrtable, last);
 
-  GST_DEBUG ("lastpcr:%" GST_TIME_FORMAT " lastoffset:%" G_GUINT64_FORMAT,
-      GST_TIME_ARGS (PCRTIME_TO_GSTTIME (lastpcr)), lastoffset);
+    /* lastpcr is the full value in PCR from the first first chunk of data */
+    lastpcr = last->values[last->last_value].pcr + last->pcr_offset;
+    /* lastoffset is the full offset from the first chunk of data */
+    lastoffset =
+        last->values[last->last_value].offset + last->first_offset -
+        packetizer->refoffset;
+  } else {
+    PCROffsetCurrent *current = pcrtable->current;
+    /* If doing progressive read, use current */
+    GST_LOG ("Using current group");
+    lastpcr = current->group->pcr_offset + current->pending[current->last].pcr;
+    lastoffset = current->first_offset + current->pending[current->last].offset;
+  }
+  GST_DEBUG ("lastpcr:%" GST_TIME_FORMAT " lastoffset:%" G_GUINT64_FORMAT
+      " refoffset:%" G_GUINT64_FORMAT,
+      GST_TIME_ARGS (PCRTIME_TO_GSTTIME (lastpcr)), lastoffset,
+      packetizer->refoffset);
 
   /* Convert byte difference into time difference (and transformed from 27MHz to 1GHz) */
   res =
@@ -2120,12 +2135,24 @@
   /* Use clock skew if present */
   if (packetizer->calculate_skew
       && GST_CLOCK_TIME_IS_VALID (pcrtable->base_time)) {
-    GST_DEBUG ("pts %" G_GUINT64_FORMAT " base_pcrtime:%" G_GUINT64_FORMAT
-        " base_time:%" GST_TIME_FORMAT, pts, pcrtable->base_pcrtime,
-        GST_TIME_ARGS (pcrtable->base_time));
-    res =
-        pts + pcrtable->pcroffset - pcrtable->base_pcrtime +
-        pcrtable->base_time + pcrtable->skew;
+    GST_DEBUG ("pts %" GST_TIME_FORMAT " base_pcrtime:%" GST_TIME_FORMAT
+        " base_time:%" GST_TIME_FORMAT " pcroffset:%" GST_TIME_FORMAT,
+        GST_TIME_ARGS (pts),
+        GST_TIME_ARGS (pcrtable->base_pcrtime),
+        GST_TIME_ARGS (pcrtable->base_time),
+        GST_TIME_ARGS (pcrtable->pcroffset));
+    res = pts + pcrtable->pcroffset;
+
+    /* Don't return anything if we differ too much against last seen PCR */
+    /* FIXME : Ideally we want to figure out whether we have a wraparound or
+     * a reset so we can provide actual values.
+     * That being said, this will only happen for the small interval of time
+     * where PTS/DTS are wrapping just before we see the first reset/wrap PCR
+     */
+    if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
+      res = GST_CLOCK_TIME_NONE;
+    else
+      res += pcrtable->base_time + pcrtable->skew - pcrtable->base_pcrtime;
   } else if (packetizer->calculate_offset && pcrtable->groups) {
     gint64 refpcr = G_MAXINT64, refpcroffset;
     PCROffsetGroup *group = pcrtable->current->group;
@@ -2147,8 +2174,16 @@
           GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->pcr_offset)));
       refpcr = group->first_pcr;
       refpcroffset = group->pcr_offset;
-      if (pts < PCRTIME_TO_GSTTIME (refpcr))
-        refpcr -= PCR_MAX_VALUE;
+      if (pts < PCRTIME_TO_GSTTIME (refpcr)) {
+        /* Only apply wrapover if we're certain it is, and avoid
+         * returning bogus values if it's a PTS/DTS which is *just*
+         * before the start of the current group
+         */
+        if (PCRTIME_TO_GSTTIME (refpcr) - pts > GST_SECOND) {
+          pts += PCR_GST_MAX_VALUE;
+        } else
+          refpcr = G_MAXINT64;
+      }
     } else {
       GList *tmp;
       /* Otherwise, find a suitable group */
@@ -2190,7 +2225,8 @@
       }
     }
     if (refpcr != G_MAXINT64)
-      res = pts - PCRTIME_TO_GSTTIME (refpcr - refpcroffset);
+      res =
+          pts - PCRTIME_TO_GSTTIME (refpcr) + PCRTIME_TO_GSTTIME (refpcroffset);
     else
       GST_WARNING ("No groups, can't calculate timestamp");
   } else
@@ -2341,7 +2377,11 @@
 
   pcr_offset = GSTTIME_TO_PCRTIME (offset);
 
-  group = pcrtable->current->group;
+  /* Pick delta from *first* group */
+  if (pcrtable->groups)
+    group = pcrtable->groups->data;
+  else
+    group = pcrtable->current->group;
   GST_DEBUG ("Current group PCR %" GST_TIME_FORMAT " (offset %"
       G_GUINT64_FORMAT " pcr_offset %" GST_TIME_FORMAT,
       GST_TIME_ARGS (PCRTIME_TO_GSTTIME (group->first_pcr)),
@@ -2351,6 +2391,10 @@
   /* Remember the difference between previous initial pcr_offset and
    * new initial pcr_offset */
   delta = pcr_offset - group->pcr_offset;
+  if (delta == 0) {
+    GST_DEBUG ("No shift to apply");
+    return;
+  }
   GST_DEBUG ("Shifting groups by %" GST_TIME_FORMAT
       " for new initial pcr_offset %" GST_TIME_FORMAT,
       GST_TIME_ARGS (PCRTIME_TO_GSTTIME (delta)), GST_TIME_ARGS (offset));
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 957e532..5d11271 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -44,6 +44,9 @@
 #include "gstmpegdefs.h"
 #include "mpegtspacketizer.h"
 #include "pesparse.h"
+#include <gst/codecparsers/gsth264parser.h>
+#include <gst/codecparsers/gstmpegvideoparser.h>
+#include <gst/base/gstbytewriter.h>
 
 /*
  * tsdemux
@@ -59,7 +62,7 @@
 /* seek to SEEK_TIMESTAMP_OFFSET before the desired offset and search then
  * either accurately or for the next timestamp
  */
-#define SEEK_TIMESTAMP_OFFSET (500 * GST_MSECOND)
+#define SEEK_TIMESTAMP_OFFSET (2500 * GST_MSECOND)
 
 #define SEGMENT_FORMAT "[format:%s, rate:%f, start:%"			\
   GST_TIME_FORMAT", stop:%"GST_TIME_FORMAT", time:%"GST_TIME_FORMAT	\
@@ -71,6 +74,7 @@
     GST_TIME_ARGS((a).time), GST_TIME_ARGS((a).base),			\
     GST_TIME_ARGS((a).position), GST_TIME_ARGS((a).duration)
 
+#define GST_FLOW_REWINDING GST_FLOW_CUSTOM_ERROR
 
 GST_DEBUG_CATEGORY_STATIC (ts_demux_debug);
 #define GST_CAT_DEFAULT ts_demux_debug
@@ -109,6 +113,28 @@
 
 typedef struct _TSDemuxStream TSDemuxStream;
 
+typedef struct _TSDemuxH264ParsingInfos TSDemuxH264ParsingInfos;
+
+/* Returns TRUE if a keyframe was found */
+typedef gboolean (*GstTsDemuxKeyFrameScanFunction) (TSDemuxStream * stream,
+    guint8 * data, const gsize data_size, const gsize max_frame_offset);
+
+typedef struct
+{
+  guint8 *data;
+  gsize size;
+} SimpleBuffer;
+
+struct _TSDemuxH264ParsingInfos
+{
+  /* H264 parsing data */
+  GstH264NalParser *parser;
+  GstByteWriter *sps;
+  GstByteWriter *pps;
+  GstByteWriter *sei;
+  SimpleBuffer framedata;
+};
+
 struct _TSDemuxStream
 {
   MpegTSBaseStream stream;
@@ -121,9 +147,6 @@
   /* TRUE if we are waiting for a valid timestamp */
   gboolean pending_ts;
 
-  /* the return of the latest push */
-  GstFlowReturn flow_return;
-
   /* Output data */
   PendingPacketState state;
 
@@ -163,6 +186,12 @@
 
   /* if != 0, output only PES from that substream */
   guint8 target_pes_substream;
+  gboolean needs_keyframe;
+
+  GstClockTime seeked_pts, seeked_dts;
+
+  GstTsDemuxKeyFrameScanFunction scan_function;
+  TSDemuxH264ParsingInfos h264infos;
 };
 
 #define VIDEO_CAPS \
@@ -262,7 +291,8 @@
 static void gst_ts_demux_flush_streams (GstTSDemux * tsdemux);
 static GstFlowReturn
 gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream);
-static void gst_ts_demux_stream_flush (TSDemuxStream * stream);
+static void gst_ts_demux_stream_flush (TSDemuxStream * stream,
+    GstTSDemux * demux);
 
 static gboolean push_event (MpegTSBase * base, GstEvent * event);
 
@@ -283,6 +313,16 @@
     _extra_init ());
 
 static void
+gst_ts_demux_dispose (GObject * object)
+{
+  GstTSDemux *demux = GST_TS_DEMUX_CAST (object);
+
+  gst_flow_combiner_free (demux->flowcombiner);
+
+  GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
+}
+
+static void
 gst_ts_demux_class_init (GstTSDemuxClass * klass)
 {
   GObjectClass *gobject_class;
@@ -292,6 +332,7 @@
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->set_property = gst_ts_demux_set_property;
   gobject_class->get_property = gst_ts_demux_get_property;
+  gobject_class->dispose = gst_ts_demux_dispose;
 
   g_object_class_install_property (gobject_class, PROP_PROGRAM_NUMBER,
       g_param_spec_int ("program-number", "Program number",
@@ -359,6 +400,8 @@
 
   demux->have_group_id = FALSE;
   demux->group_id = G_MAXUINT;
+
+  demux->last_seek_offset = -1;
 }
 
 static void
@@ -371,6 +414,7 @@
   /* We are not interested in sections (all handled by mpegtsbase) */
   base->push_section = FALSE;
 
+  demux->flowcombiner = gst_flow_combiner_new ();
   demux->requested_program_number = -1;
   demux->program_number = -1;
   gst_ts_demux_reset (base);
@@ -467,7 +511,7 @@
            and D.0.2 (Audio and video presentation synchronization)
 
            We can end up with an interval of up to 700ms between valid
-           PCR/SCR. We therefore allow a latency of 700ms for that.
+           PTS/DTS. We therefore allow a latency of 700ms for that.
          */
         gst_query_parse_latency (query, &live, &min_lat, &max_lat);
         if (min_lat != -1)
@@ -525,9 +569,213 @@
 
 }
 
+static void
+clear_simple_buffer (SimpleBuffer * sbuf)
+{
+  if (!sbuf->data)
+    return;
+
+  g_free (sbuf->data);
+  sbuf->size = 0;
+  sbuf->data = NULL;
+}
+
+static gboolean
+scan_keyframe_h264 (TSDemuxStream * stream, const guint8 * data,
+    const gsize data_size, const gsize max_frame_offset)
+{
+  gint offset = 0;
+  GstH264NalUnit unit, frame_unit = { 0, };
+  GstH264ParserResult res = GST_H264_PARSER_OK;
+  TSDemuxH264ParsingInfos *h264infos = &stream->h264infos;
+
+  GstH264NalParser *parser = h264infos->parser;
+
+  if (G_UNLIKELY (parser == NULL)) {
+    parser = h264infos->parser = gst_h264_nal_parser_new ();
+    h264infos->sps = gst_byte_writer_new ();
+    h264infos->pps = gst_byte_writer_new ();
+    h264infos->sei = gst_byte_writer_new ();
+  }
+
+  while (res == GST_H264_PARSER_OK) {
+    res =
+        gst_h264_parser_identify_nalu (parser, data, offset, data_size, &unit);
+
+    if (res != GST_H264_PARSER_OK && res != GST_H264_PARSER_NO_NAL_END) {
+      GST_INFO_OBJECT (stream->pad, "Error identifying nalu: %i", res);
+      break;
+    }
+
+    res = gst_h264_parser_parse_nal (parser, &unit);
+    if (res != GST_H264_PARSER_OK) {
+      break;
+    }
+
+    switch (unit.type) {
+      case GST_H264_NAL_SEI:
+        if (frame_unit.size)
+          break;
+
+        if (gst_byte_writer_put_data (h264infos->sei,
+                unit.data + unit.sc_offset,
+                unit.size + unit.offset - unit.sc_offset)) {
+          GST_DEBUG ("adding SEI %u", unit.size + unit.offset - unit.sc_offset);
+        } else {
+          GST_WARNING ("Could not write SEI");
+        }
+        break;
+      case GST_H264_NAL_PPS:
+        if (frame_unit.size)
+          break;
+
+        if (gst_byte_writer_put_data (h264infos->pps,
+                unit.data + unit.sc_offset,
+                unit.size + unit.offset - unit.sc_offset)) {
+          GST_DEBUG ("adding PPS %u", unit.size + unit.offset - unit.sc_offset);
+        } else {
+          GST_WARNING ("Could not write PPS");
+        }
+        break;
+      case GST_H264_NAL_SPS:
+        if (frame_unit.size)
+          break;
+
+        if (gst_byte_writer_put_data (h264infos->sps,
+                unit.data + unit.sc_offset,
+                unit.size + unit.offset - unit.sc_offset)) {
+          GST_DEBUG ("adding SPS %u", unit.size + unit.offset - unit.sc_offset);
+        } else {
+          GST_WARNING ("Could not write SPS");
+        }
+        break;
+        /* these units are considered keyframes in h264parse */
+      case GST_H264_NAL_SLICE:
+      case GST_H264_NAL_SLICE_DPA:
+      case GST_H264_NAL_SLICE_DPB:
+      case GST_H264_NAL_SLICE_DPC:
+      case GST_H264_NAL_SLICE_IDR:
+      {
+        GstH264SliceHdr slice;
+
+        if (h264infos->framedata.size)
+          break;
+
+        res = gst_h264_parser_parse_slice_hdr (parser, &unit, &slice,
+            FALSE, FALSE);
+
+        if (GST_H264_IS_I_SLICE (&slice) || GST_H264_IS_SI_SLICE (&slice)) {
+          if (*(unit.data + unit.offset + 1) & 0x80) {
+            /* means first_mb_in_slice == 0 */
+            /* real frame data */
+            GST_DEBUG_OBJECT (stream->pad, "Found keyframe at: %u",
+                unit.sc_offset);
+            frame_unit = unit;
+          }
+        }
+
+        break;
+      }
+      default:
+        break;
+    }
+
+    if (offset == unit.sc_offset + unit.size)
+      break;
+
+    offset = unit.sc_offset + unit.size;
+  }
+
+  /* We've got all the infos we need (SPS / PPS and a keyframe, plus
+   * and possibly SEI units. We can stop rewinding the stream
+   */
+  if (gst_byte_writer_get_size (h264infos->sps) &&
+      gst_byte_writer_get_size (h264infos->pps) &&
+      (h264infos->framedata.size || frame_unit.size)) {
+    guint8 *data = NULL;
+
+    gsize tmpsize = gst_byte_writer_get_size (h264infos->pps);
+
+    /*  We know that the SPS is first so just put all our data in there */
+    data = gst_byte_writer_reset_and_get_data (h264infos->pps);
+    gst_byte_writer_put_data (h264infos->sps, data, tmpsize);
+    g_free (data);
+
+    tmpsize = gst_byte_writer_get_size (h264infos->sei);
+    if (tmpsize) {
+      GST_DEBUG ("Adding SEI");
+      data = gst_byte_writer_reset_and_get_data (h264infos->sei);
+      gst_byte_writer_put_data (h264infos->sps, data, tmpsize);
+      g_free (data);
+    }
+
+    if (frame_unit.size) {      /*  We found the everything in one go! */
+      GST_DEBUG ("Adding Keyframe");
+      gst_byte_writer_put_data (h264infos->sps,
+          frame_unit.data + frame_unit.sc_offset,
+          stream->current_size - frame_unit.sc_offset);
+    } else {
+      GST_DEBUG ("Adding Keyframe");
+      gst_byte_writer_put_data (h264infos->sps,
+          h264infos->framedata.data, h264infos->framedata.size);
+      clear_simple_buffer (&h264infos->framedata);
+    }
+
+    g_free (stream->data);
+    stream->current_size = gst_byte_writer_get_size (h264infos->sps);
+    stream->data = gst_byte_writer_reset_and_get_data (h264infos->sps);
+    gst_byte_writer_init (h264infos->sps);
+    gst_byte_writer_init (h264infos->pps);
+    gst_byte_writer_init (h264infos->sei);
+
+    return TRUE;
+  }
+
+  if (frame_unit.size) {
+    GST_DEBUG_OBJECT (stream->pad, "Keep the keyframe as this is the one"
+        " we will push later");
+
+    h264infos->framedata.data =
+        g_memdup (frame_unit.data + frame_unit.sc_offset,
+        stream->current_size - frame_unit.sc_offset);
+    h264infos->framedata.size = stream->current_size - frame_unit.sc_offset;
+  }
+
+  return FALSE;
+}
+
+/* We merge data from TS packets so that the scanning methods get a continuous chunk,
+ however the scanning method will return keyframe offset which needs to be translated
+ back to actual offset in file */
+typedef struct
+{
+  gint64 real_offset;           /* offset of TS packet */
+  gint merged_offset;           /* offset of merged data in buffer */
+} OffsetInfo;
+
+static gboolean
+gst_ts_demux_adjust_seek_offset_for_keyframe (TSDemuxStream * stream,
+    guint8 * data, guint64 size)
+{
+  int scan_pid = -1;
+
+  if (!stream->scan_function)
+    return TRUE;
+
+  scan_pid = ((MpegTSBaseStream *) stream)->pid;
+
+  if (scan_pid != -1) {
+    return stream->scan_function (stream, data, size, size);
+  }
+
+  return TRUE;
+}
+
 static GstFlowReturn
 gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event)
 {
+  GList *tmp;
+
   GstTSDemux *demux = (GstTSDemux *) base;
   GstFlowReturn res = GST_FLOW_ERROR;
   gdouble rate;
@@ -535,8 +783,6 @@
   GstSeekFlags flags;
   GstSeekType start_type, stop_type;
   gint64 start, stop;
-  GstSegment seeksegment;
-  gboolean update;
   guint64 start_offset;
 
   gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
@@ -556,22 +802,9 @@
     goto done;
   }
 
-  /* copy segment, we need this because we still need the old
-   * segment when we close the current segment. */
-  memcpy (&seeksegment, &demux->segment, sizeof (GstSegment));
-
   /* configure the segment with the seek variables */
   GST_DEBUG_OBJECT (demux, "configuring seek");
-  GST_DEBUG ("seeksegment before set_seek " SEGMENT_FORMAT,
-      SEGMENT_ARGS (seeksegment));
 
-  gst_segment_do_seek (&seeksegment, rate, format, flags, start_type, start,
-      stop_type, stop, &update);
-
-  GST_DEBUG ("seeksegment after set_seek " SEGMENT_FORMAT,
-      SEGMENT_ARGS (seeksegment));
-
-  /* Convert start/stop to offset */
   start_offset =
       mpegts_packetizer_ts_to_offset (base->packetizer, MAX (0,
           start - SEEK_TIMESTAMP_OFFSET), demux->program->pcr_pid);
@@ -583,16 +816,32 @@
 
   /* record offset and rate */
   base->seek_offset = start_offset;
+  demux->last_seek_offset = base->seek_offset;
   demux->rate = rate;
   res = GST_FLOW_OK;
 
-  /* Drop segment info, it needs to be recreated after the actual seek */
-  gst_segment_init (&demux->segment, GST_FORMAT_UNDEFINED);
+  if (flags & GST_SEEK_FLAG_ACCURATE) {
+    /* keep the seek infos for our segment */
+    gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
+        start, stop_type, stop, NULL);
+  } else {
+    /* Drop segment infos, it will be  recreated with actual seek infos */
+    gst_segment_init (&demux->segment, GST_FORMAT_UNDEFINED);
+  }
   if (demux->segment_event) {
     gst_event_unref (demux->segment_event);
     demux->segment_event = NULL;
   }
 
+  for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
+    TSDemuxStream *stream = tmp->data;
+
+    stream->needs_keyframe = TRUE;
+
+    stream->seeked_pts = GST_CLOCK_TIME_NONE;
+    stream->seeked_dts = GST_CLOCK_TIME_NONE;
+  }
+
 done:
   return res;
 }
@@ -688,37 +937,6 @@
   return TRUE;
 }
 
-static GstFlowReturn
-tsdemux_combine_flows (GstTSDemux * demux, TSDemuxStream * stream,
-    GstFlowReturn ret)
-{
-  GList *tmp;
-
-  /* Store the value */
-  stream->flow_return = ret;
-
-  /* any other error that is not-linked can be returned right away */
-  if (ret != GST_FLOW_NOT_LINKED)
-    goto done;
-
-  /* Only return NOT_LINKED if all other pads returned NOT_LINKED */
-  for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
-    stream = (TSDemuxStream *) tmp->data;
-    if (stream->pad) {
-      ret = stream->flow_return;
-      /* some other return value (must be SUCCESS but we can return
-       * other values as well) */
-      if (ret != GST_FLOW_NOT_LINKED)
-        goto done;
-    }
-    /* if we get here, all other pads were unlinked and we return
-     * NOT_LINKED then */
-  }
-
-done:
-  return ret;
-}
-
 static inline void
 add_iso639_language_to_tags (TSDemuxStream * stream, gchar * lang_code)
 {
@@ -1057,7 +1275,7 @@
         break;
       }
 
-      /* If stream has ac3 descriptor 
+      /* If stream has ac3 descriptor
        * OR program is ATSC (GA94)
        * OR stream registration is AC-3
        * then it's regular AC3 */
@@ -1152,12 +1370,24 @@
 gst_ts_demux_stream_added (MpegTSBase * base, MpegTSBaseStream * bstream,
     MpegTSBaseProgram * program)
 {
+  GstTSDemux *demux = (GstTSDemux *) base;
   TSDemuxStream *stream = (TSDemuxStream *) bstream;
 
   if (!stream->pad) {
     /* Create the pad */
-    if (bstream->stream_type != 0xff)
+    if (bstream->stream_type != 0xff) {
       stream->pad = create_pad_for_stream (base, bstream, program);
+      if (stream->pad)
+        gst_flow_combiner_add_pad (demux->flowcombiner, stream->pad);
+    }
+
+    if (bstream->stream_type == GST_MPEG_TS_STREAM_TYPE_VIDEO_H264) {
+      stream->scan_function =
+          (GstTsDemuxKeyFrameScanFunction) scan_keyframe_h264;
+    } else {
+      stream->scan_function = NULL;
+    }
+
     stream->active = FALSE;
 
     stream->need_newsegment = TRUE;
@@ -1170,7 +1400,19 @@
     stream->first_dts = GST_CLOCK_TIME_NONE;
     stream->continuity_counter = CONTINUITY_UNSET;
   }
-  stream->flow_return = GST_FLOW_OK;
+}
+
+static void
+tsdemux_h264_parsing_info_clear (TSDemuxH264ParsingInfos * h264infos)
+{
+  clear_simple_buffer (&h264infos->framedata);
+
+  if (h264infos->parser) {
+    gst_h264_nal_parser_free (h264infos->parser);
+    gst_byte_writer_free (h264infos->sps);
+    gst_byte_writer_free (h264infos->pps);
+    gst_byte_writer_free (h264infos->sei);
+  }
 }
 
 static void
@@ -1179,6 +1421,8 @@
   TSDemuxStream *stream = (TSDemuxStream *) bstream;
 
   if (stream->pad) {
+    gst_flow_combiner_remove_pad (GST_TS_DEMUX_CAST (base)->flowcombiner,
+        stream->pad);
     if (stream->active && gst_pad_is_active (stream->pad)) {
       /* Flush out all data */
       GST_DEBUG_OBJECT (stream->pad, "Flushing out pending data");
@@ -1193,8 +1437,10 @@
     }
     stream->pad = NULL;
   }
-  gst_ts_demux_stream_flush (stream);
-  stream->flow_return = GST_FLOW_NOT_LINKED;
+
+  gst_ts_demux_stream_flush (stream, GST_TS_DEMUX_CAST (base));
+
+  tsdemux_h264_parsing_info_clear (&stream->h264infos);
 }
 
 static void
@@ -1228,7 +1474,7 @@
 }
 
 static void
-gst_ts_demux_stream_flush (TSDemuxStream * stream)
+gst_ts_demux_stream_flush (TSDemuxStream * stream, GstTSDemux * tsdemux)
 {
   GST_DEBUG ("flushing stream %p", stream);
 
@@ -1246,9 +1492,7 @@
   stream->first_dts = GST_CLOCK_TIME_NONE;
   stream->raw_pts = -1;
   stream->raw_dts = -1;
-  if (stream->flow_return == GST_FLOW_FLUSHING) {
-    stream->flow_return = GST_FLOW_OK;
-  }
+  stream->pending_ts = TRUE;
   stream->continuity_counter = CONTINUITY_UNSET;
 }
 
@@ -1259,7 +1503,7 @@
     return;
 
   g_list_foreach (demux->program->stream_list,
-      (GFunc) gst_ts_demux_stream_flush, NULL);
+      (GFunc) gst_ts_demux_stream_flush, demux);
 }
 
 static void
@@ -1368,7 +1612,7 @@
 
 /* This is called when we haven't got a valid initial PTS/DTS on all streams */
 static gboolean
-check_pending_buffers (GstTSDemux * demux, TSDemuxStream * stream)
+check_pending_buffers (GstTSDemux * demux)
 {
   gboolean have_observation = FALSE;
   /* The biggest offset */
@@ -1521,7 +1765,7 @@
           (stream->pts != GST_CLOCK_TIME_NONE
               || stream->dts != GST_CLOCK_TIME_NONE))) {
     GST_DEBUG ("Got pts/dts update, rechecking all streams");
-    check_pending_buffers (demux, stream);
+    check_pending_buffers (demux);
   } else if (stream->first_dts == GST_CLOCK_TIME_NONE) {
     if (GST_CLOCK_TIME_IS_VALID (stream->dts))
       stream->first_dts = stream->dts;
@@ -1711,6 +1955,12 @@
       demux->segment.time = firstts;
       demux->segment.rate = demux->rate;
     }
+  } else if (demux->segment.start < firstts) {
+    /* Take into account the offset to the first buffer timestamp */
+    if (GST_CLOCK_TIME_IS_VALID (demux->segment.stop))
+      demux->segment.stop += firstts - demux->segment.start;
+    demux->segment.position = firstts;
+    demux->segment.start = firstts;
   }
 
   if (!demux->segment_event) {
@@ -1781,17 +2031,44 @@
     goto beach;
   }
 
-  buffer = gst_buffer_new_wrapped (stream->data, stream->current_size);
+  if (stream->needs_keyframe) {
+    MpegTSBase *base = (MpegTSBase *) demux;
 
-  if (G_UNLIKELY (stream->pending_ts && !check_pending_buffers (demux, stream))) {
-    PendingBuffer *pend;
-    pend = g_slice_new0 (PendingBuffer);
-    pend->buffer = buffer;
-    pend->pts = stream->raw_pts;
-    pend->dts = stream->raw_dts;
-    stream->pending = g_list_append (stream->pending, pend);
-    GST_DEBUG ("Not enough information to push buffers yet, storing buffer");
-    goto beach;
+    if ((gst_ts_demux_adjust_seek_offset_for_keyframe (stream, stream->data,
+                stream->current_size)) || demux->last_seek_offset == 0) {
+      GST_DEBUG_OBJECT (stream->pad,
+          "Got Keyframe, ready to go at %" GST_TIME_FORMAT,
+          GST_TIME_ARGS (stream->pts));
+      buffer = gst_buffer_new_wrapped (stream->data, stream->current_size);
+      stream->seeked_pts = stream->pts;
+      stream->seeked_dts = stream->dts;
+      stream->needs_keyframe = FALSE;
+    } else {
+      base->seek_offset = demux->last_seek_offset - 200 * base->packetsize;
+      if (demux->last_seek_offset < 200 * base->packetsize)
+        base->seek_offset = 0;
+      demux->last_seek_offset = base->seek_offset;
+      mpegts_packetizer_flush (base->packetizer, FALSE);
+      base->mode = BASE_MODE_SEEKING;
+
+      stream->continuity_counter = CONTINUITY_UNSET;
+      res = GST_FLOW_REWINDING;
+      g_free (stream->data);
+      goto beach;
+    }
+  } else {
+    buffer = gst_buffer_new_wrapped (stream->data, stream->current_size);
+
+    if (G_UNLIKELY (stream->pending_ts && !check_pending_buffers (demux))) {
+      PendingBuffer *pend;
+      pend = g_slice_new0 (PendingBuffer);
+      pend->buffer = buffer;
+      pend->pts = stream->raw_pts;
+      pend->dts = stream->raw_dts;
+      stream->pending = g_list_append (stream->pending, pend);
+      GST_DEBUG ("Not enough information to push buffers yet, storing buffer");
+      goto beach;
+    }
   }
 
   if (G_UNLIKELY (!stream->active))
@@ -1822,6 +2099,20 @@
     stream->pending = NULL;
   }
 
+  if ((GST_CLOCK_TIME_IS_VALID (stream->seeked_pts)
+          && stream->pts < stream->seeked_pts) ||
+      (GST_CLOCK_TIME_IS_VALID (stream->seeked_dts) &&
+          stream->pts < stream->seeked_dts)) {
+    GST_INFO_OBJECT (stream->pad,
+        "Droping with PTS: %" GST_TIME_FORMAT " DTS: %" GST_TIME_FORMAT
+        " after seeking as other stream needed to be seeked further"
+        "(seeked PTS: %" GST_TIME_FORMAT " DTS: %" GST_TIME_FORMAT ")",
+        GST_TIME_ARGS (stream->pts), GST_TIME_ARGS (stream->dts),
+        GST_TIME_ARGS (stream->seeked_pts), GST_TIME_ARGS (stream->seeked_dts));
+    gst_buffer_unref (buffer);
+    goto beach;
+  }
+
   GST_DEBUG_OBJECT (stream->pad, "stream->pts %" GST_TIME_FORMAT,
       GST_TIME_ARGS (stream->pts));
   if (GST_CLOCK_TIME_IS_VALID (stream->pts))
@@ -1840,7 +2131,7 @@
 
   res = gst_pad_push (stream->pad, buffer);
   GST_DEBUG_OBJECT (stream->pad, "Returned %s", gst_flow_get_name (res));
-  res = tsdemux_combine_flows (demux, stream, res);
+  res = gst_flow_combiner_update_flow (demux->flowcombiner, res);
   GST_DEBUG_OBJECT (stream->pad, "combined %s", gst_flow_get_name (res));
 
 beach:
@@ -1881,6 +2172,12 @@
     }
   }
 
+  /* We are rewinding to find a keyframe,
+   * and didn't want the data to be queued
+   */
+  if (res == GST_FLOW_REWINDING)
+    res = GST_FLOW_OK;
+
   return res;
 }
 
diff --git a/gst/mpegtsdemux/tsdemux.h b/gst/mpegtsdemux/tsdemux.h
index e85c2ba..16112fc 100644
--- a/gst/mpegtsdemux/tsdemux.h
+++ b/gst/mpegtsdemux/tsdemux.h
@@ -29,6 +29,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstbytereader.h>
+#include <gst/base/gstflowcombiner.h>
 #include "mpegtsbase.h"
 #include "mpegtspacketizer.h"
 
@@ -82,6 +83,11 @@
 
   /* Pending seek rate (default 1.0) */
   gdouble rate;
+
+  GstFlowCombiner *flowcombiner;
+
+  /* Used when seeking for a keyframe to go backward in the stream */
+  guint64 last_seek_offset;
 };
 
 struct _GstTSDemuxClass
diff --git a/gst/mpegtsmux/Makefile.in b/gst/mpegtsmux/Makefile.in
index a2d73c4..4fb8b18 100644
--- a/gst/mpegtsmux/Makefile.in
+++ b/gst/mpegtsmux/Makefile.in
@@ -390,6 +390,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -476,6 +478,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -767,6 +770,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmpegtsmux.la
 SUBDIRS = tsmux
 libgstmpegtsmux_la_SOURCES = \
diff --git a/gst/mpegtsmux/tsmux/Makefile.in b/gst/mpegtsmux/tsmux/Makefile.in
index f1e4c6f..9f7df2e 100644
--- a/gst/mpegtsmux/tsmux/Makefile.in
+++ b/gst/mpegtsmux/tsmux/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,6 +696,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 noinst_LTLIBRARIES = libtsmux.la
 libtsmux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
 libtsmux_la_LIBADD = $(GST_LIBS) \
diff --git a/gst/mve/Makefile.in b/gst/mve/Makefile.in
index eec22bf..b3d817c 100644
--- a/gst/mve/Makefile.in
+++ b/gst/mve/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmve.la
 libgstmve_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstmve_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
diff --git a/gst/mxf/Makefile.in b/gst/mxf/Makefile.in
index 728a87f..ab5dcfe 100644
--- a/gst/mxf/Makefile.in
+++ b/gst/mxf/Makefile.in
@@ -352,6 +352,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -438,6 +440,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -729,6 +732,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstmxf.la
 libgstmxf_la_SOURCES = \
 	mxf.c \
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index eb7fd4a..1c093b4 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -103,7 +103,6 @@
 static void
 gst_mxf_demux_pad_init (GstMXFDemuxPad * pad)
 {
-  pad->last_flow = GST_FLOW_OK;
   pad->position = 0;
 }
 
@@ -128,7 +127,8 @@
 static void
 gst_mxf_demux_remove_pad (GstMXFDemuxPad * pad, GstMXFDemux * demux)
 {
-  gst_element_remove_pad (GST_ELEMENT (demux), GST_PAD (pad));
+  gst_flow_combiner_remove_pad (demux->flowcombiner, GST_PAD_CAST (pad));
+  gst_element_remove_pad (GST_ELEMENT (demux), GST_PAD_CAST (pad));
 }
 
 static void
@@ -283,39 +283,6 @@
 }
 
 static GstFlowReturn
-gst_mxf_demux_combine_flows (GstMXFDemux * demux,
-    GstMXFDemuxPad * pad, GstFlowReturn ret)
-{
-  guint i;
-
-  /* store the value */
-  pad->last_flow = ret;
-
-  /* any other error that is not-linked can be returned right away */
-  if (ret != GST_FLOW_NOT_LINKED)
-    goto done;
-
-  /* only return NOT_LINKED if all other pads returned NOT_LINKED */
-  for (i = 0; i < demux->src->len; i++) {
-    GstMXFDemuxPad *opad = g_ptr_array_index (demux->src, i);
-
-    if (opad == NULL)
-      continue;
-
-    ret = opad->last_flow;
-    /* some other return value (must be SUCCESS but we can return
-     * other values as well) */
-    if (ret != GST_FLOW_NOT_LINKED)
-      goto done;
-  }
-  /* if we get here, all other pads were unlinked and we return
-   * NOT_LINKED then */
-done:
-  GST_LOG_OBJECT (demux, "combined return %s", gst_flow_get_name (ret));
-  return ret;
-}
-
-static GstFlowReturn
 gst_mxf_demux_pull_range (GstMXFDemux * demux, guint64 offset,
     guint size, GstBuffer ** buffer)
 {
@@ -376,8 +343,8 @@
   for (i = 0; i < demux->src->len; i++) {
     GstMXFDemuxPad *p = g_ptr_array_index (demux->src, i);
 
-    if (!p->eos && p->last_flow < earliest) {
-      earliest = p->last_flow;
+    if (!p->eos && p->position < earliest) {
+      earliest = p->position;
       pad = p;
     }
   }
@@ -1271,8 +1238,10 @@
 
   g_rw_lock_writer_unlock (&demux->metadata_lock);
 
-  for (l = pads; l; l = l->next)
+  for (l = pads; l; l = l->next) {
+    gst_flow_combiner_add_pad (demux->flowcombiner, l->data);
     gst_element_add_pad (GST_ELEMENT_CAST (demux), l->data);
+  }
   g_list_free (pads);
 
   if (first_run)
@@ -1856,7 +1825,8 @@
 
     ret = gst_pad_push (GST_PAD_CAST (pad), outbuf);
     outbuf = NULL;
-    ret = gst_mxf_demux_combine_flows (demux, pad, ret);
+    ret = gst_flow_combiner_update_flow (demux->flowcombiner, ret);
+    GST_LOG_OBJECT (demux, "combined return %s", gst_flow_get_name (ret));
 
     if (pad->position > demux->segment.position)
       demux->segment.position = pad->position;
@@ -3256,7 +3226,6 @@
 
       /* Reset EOS flag on all pads */
       p->eos = FALSE;
-      p->last_flow = GST_FLOW_OK;
       gst_mxf_demux_pad_set_position (demux, p, start);
 
       position = p->current_essence_track_position;
@@ -3420,7 +3389,6 @@
 
       /* Reset EOS flag on all pads */
       p->eos = FALSE;
-      p->last_flow = GST_FLOW_OK;
       gst_mxf_demux_pad_set_position (demux, p, start);
 
       /* we always want to send data starting with a key unit */
@@ -4106,6 +4074,11 @@
     demux->adapter = NULL;
   }
 
+  if (demux->flowcombiner) {
+    gst_flow_combiner_free (demux->flowcombiner);
+    demux->flowcombiner = NULL;
+  }
+
   if (demux->close_seg_event) {
     gst_event_unref (demux->close_seg_event);
     demux->close_seg_event = NULL;
@@ -4191,6 +4164,7 @@
   demux->max_drift = 500 * GST_MSECOND;
 
   demux->adapter = gst_adapter_new ();
+  demux->flowcombiner = gst_flow_combiner_new ();
   g_rw_lock_init (&demux->metadata_lock);
 
   demux->src = g_ptr_array_new ();
diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h
index f31d964..38c7725 100644
--- a/gst/mxf/mxfdemux.h
+++ b/gst/mxf/mxfdemux.h
@@ -22,6 +22,7 @@
 
 #include <gst/gst.h>
 #include <gst/base/gstadapter.h>
+#include <gst/base/gstflowcombiner.h>
 
 #include "mxfessence.h"
 
@@ -95,7 +96,6 @@
 
   GstClockTime position;
   gdouble position_accumulated_error;
-  GstFlowReturn last_flow;
   gboolean eos, discont;
 
   GstTagList *tags;
@@ -131,6 +131,8 @@
 
   GstAdapter *adapter;
 
+  GstFlowCombiner *flowcombiner;
+
   GstSegment segment;
   guint32 seqnum;
 
diff --git a/gst/nuvdemux/Makefile.in b/gst/nuvdemux/Makefile.in
index 51e039f..953d63a 100644
--- a/gst/nuvdemux/Makefile.in
+++ b/gst/nuvdemux/Makefile.in
@@ -343,6 +343,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -429,6 +431,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -720,6 +723,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstnuvdemux.la
 libgstnuvdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
 libgstnuvdemux_la_LIBADD = $(GST_BASE_LIBS)
diff --git a/gst/patchdetect/Makefile.in b/gst/patchdetect/Makefile.in
index 18bdcfd..efe88e9 100644
--- a/gst/patchdetect/Makefile.in
+++ b/gst/patchdetect/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstpatchdetect.la
 
 #ORC_SOURCE=gstpatchdetectorc
diff --git a/gst/pcapparse/Makefile.in b/gst/pcapparse/Makefile.in
index e4fe986..a72e045 100644
--- a/gst/pcapparse/Makefile.in
+++ b/gst/pcapparse/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstpcapparse.la
 libgstpcapparse_la_SOURCES = \
 	gstpcapparse.c gstirtspparse.c plugin.c
diff --git a/gst/pnm/Makefile.am b/gst/pnm/Makefile.am
index 5ccec7e..e6c397b 100644
--- a/gst/pnm/Makefile.am
+++ b/gst/pnm/Makefile.am
@@ -1,8 +1,8 @@
 plugin_LTLIBRARIES = libgstpnm.la
 
 libgstpnm_la_SOURCES = gstpnmutils.c gstpnm.c gstpnmdec.c gstpnmenc.c
-libgstpnm_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
-libgstpnm_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstvideo-@GST_API_VERSION@
+libgstpnm_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstpnm_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-@GST_API_VERSION@
 libgstpnm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstpnm_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
diff --git a/gst/pnm/Makefile.in b/gst/pnm/Makefile.in
index 994236d..7ac628e 100644
--- a/gst/pnm/Makefile.in
+++ b/gst/pnm/Makefile.in
@@ -155,7 +155,7 @@
 LTLIBRARIES = $(plugin_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libgstpnm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_libgstpnm_la_OBJECTS = libgstpnm_la-gstpnmutils.lo \
 	libgstpnm_la-gstpnm.lo libgstpnm_la-gstpnmdec.lo \
 	libgstpnm_la-gstpnmenc.lo
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,10 +726,11 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstpnm.la
 libgstpnm_la_SOURCES = gstpnmutils.c gstpnm.c gstpnmdec.c gstpnmenc.c
-libgstpnm_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
-libgstpnm_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) -lgstvideo-@GST_API_VERSION@
+libgstpnm_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstpnm_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-@GST_API_VERSION@
 libgstpnm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstpnm_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 noinst_HEADERS = gstpnmdec.h gstpnmutils.h gstpnmenc.h
diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c
index 9dce097..9c1c2cf 100644
--- a/gst/pnm/gstpnmdec.c
+++ b/gst/pnm/gstpnmdec.c
@@ -30,10 +30,6 @@
  * </refsect2>
  */
 
-/*
- * FIXME: Port to GstVideoDecoder
- */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -43,110 +39,95 @@
 
 #include <gst/gstutils.h>
 #include <gst/video/video.h>
-
+#include <gst/base/gstbytereader.h>
 #include <string.h>
+#include <stdio.h>
+
+static gboolean gst_pnmdec_start (GstVideoDecoder * decoder);
+static GstFlowReturn gst_pnmdec_parse (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame, GstAdapter * adapter, gboolean at_eos);
+static GstFlowReturn gst_pnmdec_handle_frame (GstVideoDecoder * decoder,
+    GstVideoCodecFrame * frame);
+static GstFlowReturn
+gst_pnmdec_parse_ascii (GstPnmdec * s, const guint8 * b, guint bs);
+
+G_DEFINE_TYPE (GstPnmdec, gst_pnmdec, GST_TYPE_VIDEO_DECODER);
 
 static GstStaticPadTemplate gst_pnmdec_src_pad_template =
-    GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
+    GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("RGB") "; "
         GST_VIDEO_CAPS_MAKE ("GRAY8")));
 
 static GstStaticPadTemplate gst_pnmdec_sink_pad_template =
-GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
+GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
     GST_STATIC_CAPS (MIME_ALL));
 
-G_DEFINE_TYPE (GstPnmdec, gst_pnmdec, GST_TYPE_ELEMENT);
 
-static GstFlowReturn
-gst_pnmdec_push (GstPnmdec * s, GstPad * src, GstBuffer * buf)
+static void
+gst_pnmdec_class_init (GstPnmdecClass * klass)
 {
-  /* Need to convert from PNM rowstride to GStreamer rowstride */
-  if (s->mngr.info.width % 4 != 0) {
-    guint i_rowstride;
-    guint o_rowstride;
-    GstBuffer *obuf;
-    guint i;
-    GstMapInfo imap, omap;
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstVideoDecoderClass *vdec_class = (GstVideoDecoderClass *) klass;
 
-    if (s->mngr.info.type == GST_PNM_TYPE_PIXMAP) {
-      i_rowstride = 3 * s->mngr.info.width;
-      o_rowstride = GST_ROUND_UP_4 (i_rowstride);
-    } else {
-      i_rowstride = s->mngr.info.width;
-      o_rowstride = GST_ROUND_UP_4 (i_rowstride);
-    }
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_pnmdec_src_pad_template));
+  gst_element_class_add_pad_template (element_class,
+      gst_static_pad_template_get (&gst_pnmdec_sink_pad_template));
+  gst_element_class_set_static_metadata (element_class, "PNM image decoder",
+      "Codec/Decoder/Image",
+      "Decodes images in portable pixmap/graymap/bitmap/anymamp (PNM) format",
+      "Lutz Mueller <lutz@users.sourceforge.net>");
 
-    obuf = gst_buffer_new_and_alloc (o_rowstride * s->mngr.info.height);
-
-    gst_buffer_copy_into (obuf, buf, GST_BUFFER_COPY_METADATA, 0, 0);
-
-    gst_buffer_map (obuf, &omap, GST_MAP_WRITE);
-    gst_buffer_map (buf, &imap, GST_MAP_READ);
-    for (i = 0; i < s->mngr.info.height; i++)
-      memcpy (omap.data + i * o_rowstride, imap.data + i * i_rowstride,
-          i_rowstride);
-    gst_buffer_unmap (buf, &imap);
-    gst_buffer_unmap (obuf, &omap);
-    gst_buffer_unref (buf);
-    return gst_pad_push (src, obuf);
-  } else {
-    return gst_pad_push (src, buf);
-  }
+  vdec_class->start = gst_pnmdec_start;
+  vdec_class->parse = gst_pnmdec_parse;
+  vdec_class->handle_frame = gst_pnmdec_handle_frame;
 }
 
-static GstFlowReturn
-gst_pnmdec_chain_raw (GstPnmdec * s, GstPad * src, GstBuffer * buf)
+static void
+gst_pnmdec_flush (GstPnmdec * s)
 {
-  GstFlowReturn r = GST_FLOW_OK;
-  GstBuffer *out;
-
-  /* If we got the whole image, just push the buffer. */
-  if (gst_buffer_get_size (buf) == s->size) {
-    memset (&s->mngr, 0, sizeof (GstPnmInfoMngr));
-    s->size = 0;
-    return gst_pnmdec_push (s, src, buf);
-  }
-
-  /* We didn't get the whole image. */
-  if (!s->buf) {
-    s->buf = buf;
-  } else {
-    out = gst_buffer_append (s->buf, buf);
-    s->buf = out;
-  }
-  if (!s->buf)
-    return GST_FLOW_ERROR;
-
-  /* Do we now have the full image? If yes, push. */
-  if (gst_buffer_get_size (s->buf) == s->size) {
-    r = gst_pnmdec_push (s, src, s->buf);
+  s->mngr.info.width = 0;
+  s->mngr.info.height = 0;
+  s->mngr.info.fields = 0;
+  s->mngr.info.max = 0;
+  s->size = 0;
+  s->current_size = 0;
+  if (s->buf) {
+    gst_buffer_unref (s->buf);
     s->buf = NULL;
-    memset (&s->mngr, 0, sizeof (GstPnmInfoMngr));
-    s->size = 0;
   }
+}
 
-  return r;
+static void
+gst_pnmdec_init (GstPnmdec * s)
+{
+  /* Initialize decoder */
+  s->buf = NULL;
+  gst_pnmdec_flush (s);
 }
 
 static GstFlowReturn
-gst_pnmdec_chain_ascii (GstPnmdec * s, GstPad * src, GstBuffer * buf)
+gst_pnmdec_parse_ascii (GstPnmdec * s, const guint8 * b, guint bs)
 {
   GScanner *scanner;
-  GstBuffer *out;
   guint i = 0;
-  gchar *b;
-  guint bs;
   guint target;
   GstMapInfo map;
-  GstMapInfo outmap;
+  guint8 *outdata;
 
-  gst_buffer_map (buf, &map, GST_MAP_READ);
-  b = (gchar *) map.data;
-  bs = map.size;
-  target = s->size - (s->buf ? map.size : 0);
+  target = s->size - s->current_size;
 
-  if (!bs)
+  gst_buffer_map (s->buf, &map, GST_MAP_WRITE);
+
+  /* leave the number of bytes already parsed */
+  outdata = map.data + s->current_size;
+  if (!bs) {
     goto drop_ok;
+  }
 
   if (s->last_byte) {
     while (*b >= '0' && *b <= '9') {
@@ -162,27 +143,21 @@
     }
   }
 
-  out = gst_buffer_new_and_alloc (target);
-
-  gst_buffer_map (out, &outmap, GST_MAP_READWRITE);
-
   if (s->last_byte) {
-    outmap.data[i++] = s->last_byte;
+    outdata[i++] = s->last_byte;
     s->last_byte = 0;
   }
 
   scanner = g_scanner_new (NULL);
-  g_scanner_input_text (scanner, b, bs);
+  g_scanner_input_text (scanner, (gchar *) b, bs);
   while (!g_scanner_eof (scanner)) {
     switch (g_scanner_get_next_token (scanner)) {
       case G_TOKEN_INT:
         if (i == target) {
           GST_DEBUG_OBJECT (s, "PNM file contains too much data.");
-          gst_buffer_unmap (out, &outmap);
-          gst_buffer_unref (out);
           goto drop_error;
         }
-        outmap.data[i++] = scanner->value.v_int;
+        outdata[i++] = scanner->value.v_int;
         break;
       default:
         /* Should we care? */ ;
@@ -191,154 +166,202 @@
   g_scanner_destroy (scanner);
 
   /* If we didn't get the whole image, handle the last byte with care. */
-  if (i && i < target && b[bs - 1] > '0' && b[bs - 1] <= '9')
-    s->last_byte = outmap.data[--i];
-
-  gst_buffer_unmap (buf, &map);
-  gst_buffer_unref (buf);
-  if (!i) {
-    gst_buffer_unref (out);
-    return GST_FLOW_OK;
+  if (i && i < target && b[bs - 1] > '0' && b[bs - 1] <= '9') {
+    s->last_byte = outdata[--i];
   }
 
-  gst_buffer_set_size (out, i);
-  return gst_pnmdec_chain_raw (s, src, out);
+  /* Update the number of bytes parsed in this scan */
+  s->current_size += i;
+  gst_buffer_unmap (s->buf, &map);
 
+  return GST_FLOW_OK;
 drop_ok:
-  gst_buffer_unmap (buf, &map);
-  gst_buffer_unref (buf);
+  gst_buffer_unmap (s->buf, &map);
   return GST_FLOW_OK;
 
 drop_error:
-  gst_buffer_unmap (buf, &map);
-  gst_buffer_unref (buf);
+  gst_buffer_unmap (s->buf, &map);
+
   return GST_FLOW_ERROR;
 }
 
 static GstFlowReturn
-gst_pnmdec_chain (GstPad * pad, GstObject * parent, GstBuffer * data)
+gst_pnmdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
 {
-  GstPnmdec *s = GST_PNMDEC (parent);
-  GstPad *src = gst_element_get_static_pad (GST_ELEMENT (s), "src");
-  GstCaps *caps = NULL;
+  GstPnmdec *s = (GstPnmdec *) decoder;
+  GstMapInfo imap, omap;
+  guint i_rowstride;
+  guint o_rowstride;
   GstFlowReturn r = GST_FLOW_OK;
-  guint offset = 0;
+  gint bytes, i;
 
-  if (s->mngr.info.fields != GST_PNM_INFO_FIELDS_ALL) {
-    GstMapInfo map;
-    GstPnmInfoMngrResult res;
-
-    gst_buffer_map (data, &map, GST_MAP_READ);
-    res = gst_pnm_info_mngr_scan (&s->mngr, map.data, map.size);
-    gst_buffer_unmap (data, &map);
-
-    switch (res) {
-      case GST_PNM_INFO_MNGR_RESULT_FAILED:
-        gst_buffer_unref (data);
-        r = GST_FLOW_ERROR;
-        goto out;
-      case GST_PNM_INFO_MNGR_RESULT_READING:
-        gst_buffer_unref (data);
-        r = GST_FLOW_OK;
-        goto out;
-      case GST_PNM_INFO_MNGR_RESULT_FINISHED:
-        offset = s->mngr.data_offset;
-        caps = gst_caps_copy (gst_pad_get_pad_template_caps (src));
-        switch (s->mngr.info.type) {
-          case GST_PNM_TYPE_BITMAP:
-            GST_DEBUG_OBJECT (s, "FIXME: BITMAP format not implemented!");
-            gst_caps_unref (caps);
-            gst_buffer_unref (data);
-            r = GST_FLOW_ERROR;
-            goto out;
-          case GST_PNM_TYPE_GRAYMAP:
-            gst_caps_remove_structure (caps, 0);
-            s->size = s->mngr.info.width * s->mngr.info.height * 1;
-            break;
-          case GST_PNM_TYPE_PIXMAP:
-            gst_caps_remove_structure (caps, 1);
-            s->size = s->mngr.info.width * s->mngr.info.height * 3;
-            break;
-        }
-        gst_caps_set_simple (caps,
-            "width", G_TYPE_INT, s->mngr.info.width,
-            "height", G_TYPE_INT, s->mngr.info.height, "framerate",
-            GST_TYPE_FRACTION, 0, 1, NULL);
-        if (!gst_pad_set_caps (src, caps)) {
-          gst_caps_unref (caps);
-          gst_buffer_unref (data);
-          r = GST_FLOW_ERROR;
-          goto out;
-        }
-        gst_caps_unref (caps);
-    }
-  }
-
-  if (offset == gst_buffer_get_size (data)) {
-    gst_buffer_unref (data);
-    r = GST_FLOW_OK;
+  r = gst_video_decoder_allocate_output_frame (decoder, frame);
+  if (r != GST_FLOW_OK) {
     goto out;
   }
 
-  if (offset) {
-    GstBuffer *buf = gst_buffer_copy_region (data, GST_BUFFER_COPY_ALL, offset,
-        gst_buffer_get_size (data) - offset);
-    gst_buffer_unref (data);
-    data = buf;
+  if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
+    /* In case of ASCII parsed data is stored in buf, so input needs to be
+       taken from here for frame processing */
+    gst_buffer_map (s->buf, &imap, GST_MAP_READ);
+  } else {
+    gst_buffer_map (frame->input_buffer, &imap, GST_MAP_READ);
+  }
+  gst_buffer_map (frame->output_buffer, &omap, GST_MAP_WRITE);
+
+  gst_buffer_copy_into (frame->output_buffer, frame->input_buffer,
+      GST_BUFFER_COPY_METADATA, 0, 0);
+
+  if (s->mngr.info.type == GST_PNM_TYPE_BITMAP) {
+    bytes = (s->mngr.info.width * s->mngr.info.height + 7) / 8;
+    for (i = 0; i < bytes; i++) {
+      omap.data[i * 8] = (imap.data[i] & 0x80) ? 0 : 255;
+      omap.data[i * 8 + 1] = (imap.data[i] & 0x40) ? 0 : 255;
+      omap.data[i * 8 + 2] = (imap.data[i] & 0x20) ? 0 : 255;
+      omap.data[i * 8 + 3] = (imap.data[i] & 0x10) ? 0 : 255;
+      omap.data[i * 8 + 4] = (imap.data[i] & 0x08) ? 0 : 255;
+      omap.data[i * 8 + 5] = (imap.data[i] & 0x04) ? 0 : 255;
+      omap.data[i * 8 + 6] = (imap.data[i] & 0x02) ? 0 : 255;
+      omap.data[i * 8 + 7] = (imap.data[i] & 0x01) ? 0 : 255;
+    }
+  } else
+    /* Need to convert from PNM rowstride to GStreamer rowstride */
+  if (s->mngr.info.width % 4 != 0) {
+    if (s->mngr.info.type == GST_PNM_TYPE_PIXMAP) {
+      i_rowstride = 3 * s->mngr.info.width;
+      o_rowstride = GST_ROUND_UP_4 (i_rowstride);
+    } else {
+      i_rowstride = s->mngr.info.width;
+      o_rowstride = GST_ROUND_UP_4 (i_rowstride);
+    }
+
+    for (i = 0; i < s->mngr.info.height; i++)
+      memcpy (omap.data + i * o_rowstride, imap.data + i * i_rowstride,
+          i_rowstride);
+  } else {
+    memcpy (omap.data, imap.data, s->size);
   }
 
-  if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII)
-    r = gst_pnmdec_chain_ascii (s, src, data);
-  else
-    r = gst_pnmdec_chain_raw (s, src, data);
+  if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
+    gst_buffer_unmap (s->buf, &imap);
+  } else {
+    gst_buffer_unmap (frame->input_buffer, &imap);
+  }
+  gst_buffer_unmap (frame->output_buffer, &omap);
+
+  r = gst_video_decoder_finish_frame (GST_VIDEO_DECODER (s), frame);
 
 out:
-  gst_object_unref (src);
+  gst_pnmdec_flush (s);
 
   return r;
 }
 
-static void
-gst_pnmdec_finalize (GObject * object)
+static GstFlowReturn
+gst_pnmdec_parse (GstVideoDecoder * decoder, GstVideoCodecFrame * frame,
+    GstAdapter * adapter, gboolean at_eos)
 {
-  GstPnmdec *dec = GST_PNMDEC (object);
+  gsize size;
+  GstPnmdec *s = GST_PNMDEC (decoder);
+  GstFlowReturn r = GST_FLOW_OK;
+  guint offset = 0;
+  GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
+  const guint8 *raw_data;
+  GstVideoCodecState *output_state;
 
-  if (dec->buf) {
-    gst_buffer_unref (dec->buf);
-    dec->buf = NULL;
+  GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
+
+  size = gst_adapter_available (adapter);
+  if (size < 8) {
+    goto need_more_data;
+  }
+  raw_data = gst_adapter_map (adapter, size);
+
+  if (s->mngr.info.fields != GST_PNM_INFO_FIELDS_ALL) {
+    GstPnmInfoMngrResult res;
+
+    res = gst_pnm_info_mngr_scan (&s->mngr, raw_data, size);
+
+    switch (res) {
+      case GST_PNM_INFO_MNGR_RESULT_FAILED:
+        r = GST_FLOW_ERROR;
+        goto out;
+      case GST_PNM_INFO_MNGR_RESULT_READING:
+        r = GST_FLOW_OK;
+        goto out;
+      case GST_PNM_INFO_MNGR_RESULT_FINISHED:
+        switch (s->mngr.info.type) {
+          case GST_PNM_TYPE_BITMAP:
+            if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
+              r = GST_FLOW_ERROR;
+              goto out;
+            }
+            s->size = s->mngr.info.width * s->mngr.info.height * 1;
+            format = GST_VIDEO_FORMAT_GRAY8;
+            break;
+          case GST_PNM_TYPE_GRAYMAP:
+            s->size = s->mngr.info.width * s->mngr.info.height * 1;
+            format = GST_VIDEO_FORMAT_GRAY8;
+            break;
+          case GST_PNM_TYPE_PIXMAP:
+            s->size = s->mngr.info.width * s->mngr.info.height * 3;
+            format = GST_VIDEO_FORMAT_RGB;
+            break;
+        }
+        output_state =
+            gst_video_decoder_set_output_state (GST_VIDEO_DECODER (s), format,
+            s->mngr.info.width, s->mngr.info.height, NULL);
+        gst_video_codec_state_unref (output_state);
+        if (gst_video_decoder_negotiate (GST_VIDEO_DECODER (s)) == FALSE) {
+          r = GST_FLOW_NOT_NEGOTIATED;
+          goto out;
+        }
+
+        if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
+          s->mngr.data_offset++;
+          /* It is not possible to know the size of input ascii data to parse.
+             So we have to parse and know the number of pixels parsed and
+             then finally decide when we have full frame */
+          s->buf = gst_buffer_new_and_alloc (s->size);
+        }
+        offset = s->mngr.data_offset;
+        gst_adapter_flush (adapter, offset);
+        size = size - offset;
+    }
   }
 
-  G_OBJECT_CLASS (gst_pnmdec_parent_class)->finalize (object);
+  if (s->mngr.info.encoding == GST_PNM_ENCODING_ASCII) {
+    /* Parse ASCII data dn populate s->current_size with the number of 
+       bytes actually parsed from the input data */
+    r = gst_pnmdec_parse_ascii (s, raw_data + offset, size);
+  } else {
+    /* Bitmap Contains 8 pixels in a byte */
+    if (s->mngr.info.type == GST_PNM_TYPE_BITMAP)
+      s->current_size += (size * 8);
+    else
+      s->current_size += size;
+  }
+
+  gst_video_decoder_add_to_frame (decoder, size);
+  if (s->size <= s->current_size) {
+    goto have_full_frame;
+  }
+
+need_more_data:
+  return GST_VIDEO_DECODER_FLOW_NEED_DATA;
+
+have_full_frame:
+  return gst_video_decoder_have_frame (decoder);
+
+out:
+  return r;
 }
 
-static void
-gst_pnmdec_init (GstPnmdec * s)
+static gboolean
+gst_pnmdec_start (GstVideoDecoder * decoder)
 {
-  GstPad *pad;
+  GstPnmdec *pnmdec = (GstPnmdec *) decoder;
 
-  pad =
-      gst_pad_new_from_static_template (&gst_pnmdec_sink_pad_template, "sink");
-  gst_pad_set_chain_function (pad, gst_pnmdec_chain);
-  gst_element_add_pad (GST_ELEMENT (s), pad);
-
-  pad = gst_pad_new_from_static_template (&gst_pnmdec_src_pad_template, "src");
-  gst_element_add_pad (GST_ELEMENT (s), pad);
-}
-
-static void
-gst_pnmdec_class_init (GstPnmdecClass * klass)
-{
-  GObjectClass *gobject_class = (GObjectClass *) klass;
-  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_pnmdec_sink_pad_template));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_pnmdec_src_pad_template));
-  gst_element_class_set_static_metadata (element_class, "PNM image decoder",
-      "Codec/Decoder/Image",
-      "Decodes images in portable pixmap/graymap/bitmap/anymamp (PNM) format",
-      "Lutz Mueller <lutz@users.sourceforge.net>");
-
-  gobject_class->finalize = gst_pnmdec_finalize;
+  gst_video_decoder_set_packetized (GST_VIDEO_DECODER (pnmdec), FALSE);
+  return TRUE;
 }
diff --git a/gst/pnm/gstpnmdec.h b/gst/pnm/gstpnmdec.h
index 6cb128e..a148f72 100644
--- a/gst/pnm/gstpnmdec.h
+++ b/gst/pnm/gstpnmdec.h
@@ -21,6 +21,7 @@
 #define __GST_PNMDEC_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 
 #include "gstpnmutils.h"
 
@@ -38,15 +39,15 @@
 struct _GstPnmdec
 {
   GstElement element;
-
+  GstVideoDecoder decoder;
   GstPnmInfoMngr mngr;
-  guint size, last_byte;
+  guint size, last_byte, current_size ;
   GstBuffer *buf;
 };
 
 struct _GstPnmdecClass
 {
-  GstElementClass parent_class;
+  GstVideoDecoderClass parent_class ;
 };
 
 GType gst_pnmdec_get_type (void) G_GNUC_CONST;
diff --git a/gst/pnm/gstpnmutils.c b/gst/pnm/gstpnmutils.c
index 030d665..e8a6ece 100644
--- a/gst/pnm/gstpnmutils.c
+++ b/gst/pnm/gstpnmutils.c
@@ -156,6 +156,11 @@
             mngr->info.fields |= GST_PNM_INFO_FIELDS_HEIGHT;
             mngr->state = GST_PNM_INFO_MNGR_STATE_WHITE_SPACE;
             mngr->data_offset += i;
+            if (mngr->info.type == GST_PNM_TYPE_BITMAP) {
+              mngr->data_offset += 1;
+              mngr->info.fields |= GST_PNM_INFO_FIELDS_MAX;
+              return GST_PNM_INFO_MNGR_RESULT_FINISHED;
+            }
             return gst_pnm_info_mngr_scan (mngr, buf + i, buf_len - i);
           default:
             return GST_PNM_INFO_MNGR_RESULT_FAILED;
diff --git a/gst/rawparse/Makefile.in b/gst/rawparse/Makefile.in
index 4d0b40b..395a091 100644
--- a/gst/rawparse/Makefile.in
+++ b/gst/rawparse/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstrawparse.la
 libgstrawparse_la_SOURCES = \
 	gstrawparse.c \
diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c
index afefd4a..18b2eac 100644
--- a/gst/rawparse/gstrawparse.c
+++ b/gst/rawparse/gstrawparse.c
@@ -724,7 +724,7 @@
       break;
     }
     default:
-      ret = gst_pad_event_default (rp->sinkpad, parent, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
   }
 
@@ -926,7 +926,7 @@
         ret = gst_raw_parse_handle_seek_pull (rp, event);
       break;
     default:
-      ret = gst_pad_event_default (rp->srcpad, parent, event);
+      ret = gst_pad_event_default (pad, parent, event);
       break;
   }
 
@@ -1030,7 +1030,7 @@
     }
     default:
       /* else forward upstream */
-      ret = gst_pad_query_default (rp->sinkpad, parent, query);
+      ret = gst_pad_query_default (pad, parent, query);
       break;
   }
 
diff --git a/gst/real/Makefile.in b/gst/real/Makefile.in
index 993f970..5059cac 100644
--- a/gst/real/Makefile.in
+++ b/gst/real/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstreal.la 
 libgstreal_la_SOURCES = \
 	gstrealvideodec.c \
diff --git a/gst/removesilence/Makefile.in b/gst/removesilence/Makefile.in
index 5d92869..a05d43b 100644
--- a/gst/removesilence/Makefile.in
+++ b/gst/removesilence/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstremovesilence.la
 libgstremovesilence_la_SOURCES = gstremovesilence.c vad_private.c
 libgstremovesilence_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/gst/sdi/Makefile.in b/gst/sdi/Makefile.in
index ca645e4..1015007 100644
--- a/gst/sdi/Makefile.in
+++ b/gst/sdi/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsdi.la
 libgstsdi_la_SOURCES = gstsdi.c \
 	gstsdidemux.c \
diff --git a/gst/sdp/Makefile.in b/gst/sdp/Makefile.in
index ff4b35e..74adc1a 100644
--- a/gst/sdp/Makefile.in
+++ b/gst/sdp/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsdpelem.la
 libgstsdpelem_la_SOURCES = gstsdpelem.c gstsdpdemux.h gstsdpdemux.c
 libgstsdpelem_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GIO_CFLAGS)
diff --git a/gst/segmentclip/Makefile.in b/gst/segmentclip/Makefile.in
index 6ad07a4..122ace3 100644
--- a/gst/segmentclip/Makefile.in
+++ b/gst/segmentclip/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsegmentclip.la
 libgstsegmentclip_la_SOURCES = gstsegmentclip.c gstaudiosegmentclip.c gstvideosegmentclip.c plugin.c
 libgstsegmentclip_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/gst/siren/Makefile.in b/gst/siren/Makefile.in
index a1c945a..2c9fad2 100644
--- a/gst/siren/Makefile.in
+++ b/gst/siren/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsiren.la
 libgstsiren_la_SOURCES = gstsiren.c \
 	gstsirendec.c gstsirendec.h \
diff --git a/gst/smooth/Makefile.in b/gst/smooth/Makefile.in
index 7953de3..2f7bd09 100644
--- a/gst/smooth/Makefile.in
+++ b/gst/smooth/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsmooth.la
 libgstsmooth_la_SOURCES = gstsmooth.c
 libgstsmooth_la_CFLAGS = \
diff --git a/gst/speed/Makefile.in b/gst/speed/Makefile.in
index 4c55f06..f713580 100644
--- a/gst/speed/Makefile.in
+++ b/gst/speed/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstspeed.la
 libgstspeed_la_SOURCES = gstspeed.c
 libgstspeed_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c
index 27e41c7..40d1612 100644
--- a/gst/speed/gstspeed.c
+++ b/gst/speed/gstspeed.c
@@ -275,8 +275,12 @@
       gst_query_set_position (query, GST_FORMAT_TIME, -1);
 
       if (!gst_pad_peer_query_position (filter->sinkpad, rformat, &cur)) {
-        GST_LOG_OBJECT (filter, "query on peer pad failed");
-        goto error;
+        GST_LOG_OBJECT (filter, "TIME query on peer pad failed, trying BYTES");
+        rformat = GST_FORMAT_BYTES;
+        if (!gst_pad_peer_query_position (filter->sinkpad, rformat, &cur)) {
+          GST_LOG_OBJECT (filter, "BYTES query on peer pad failed too");
+          goto error;
+        }
       }
 
       if (rformat == GST_FORMAT_BYTES)
diff --git a/gst/stereo/Makefile.in b/gst/stereo/Makefile.in
index 31889fb..8156521 100644
--- a/gst/stereo/Makefile.in
+++ b/gst/stereo/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgststereo.la
 libgststereo_la_SOURCES = gststereo.c
 libgststereo_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS)
diff --git a/gst/subenc/Makefile.in b/gst/subenc/Makefile.in
index cfa05ad..5150ab5 100644
--- a/gst/subenc/Makefile.in
+++ b/gst/subenc/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstsubenc.la
 libgstsubenc_la_SOURCES = \
 	gstsrtenc.c \
diff --git a/gst/tta/Makefile.in b/gst/tta/Makefile.in
index 90f192d..87a46b7 100644
--- a/gst/tta/Makefile.in
+++ b/gst/tta/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgsttta.la
 libgsttta_la_SOURCES = gsttta.c \
 	 gstttaparse.c \
diff --git a/gst/videofilters/Makefile.in b/gst/videofilters/Makefile.in
index 88b97af..497a41d 100644
--- a/gst/videofilters/Makefile.in
+++ b/gst/videofilters/Makefile.in
@@ -350,6 +350,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -436,6 +438,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -727,6 +730,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvideofiltersbad.la
 
 #ORC_SOURCE=gstvideofiltersbadorc
diff --git a/gst/videomeasure/Makefile.in b/gst/videomeasure/Makefile.in
index 7482d34..7ab3df3 100644
--- a/gst/videomeasure/Makefile.in
+++ b/gst/videomeasure/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvideomeasure.la 
 noinst_HEADERS = gstvideomeasure_ssim.h gstvideomeasure_collector.h
 libgstvideomeasure_la_SOURCES = \
diff --git a/gst/videoparsers/Makefile.in b/gst/videoparsers/Makefile.in
index 7ceafdf..856ab1b 100644
--- a/gst/videoparsers/Makefile.in
+++ b/gst/videoparsers/Makefile.in
@@ -357,6 +357,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -443,6 +445,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -734,6 +737,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvideoparsersbad.la
 libgstvideoparsersbad_la_SOURCES = plugin.c \
 	h263parse.c gsth263parse.c \
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index f88d89d..2b43b30 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -609,6 +609,8 @@
         if (pres == GST_H264_PARSER_OK) {
           if (GST_H264_IS_I_SLICE (&slice) || GST_H264_IS_SI_SLICE (&slice))
             h264parse->keyframe |= TRUE;
+
+          h264parse->field_pic_flag = slice.field_pic_flag;
         }
       }
       if (G_LIKELY (nal_type != GST_H264_NAL_SLICE_IDR &&
@@ -1171,6 +1173,7 @@
     caps = gst_caps_copy (sink_caps);
   } else {
     gint crop_width, crop_height;
+    gint fps_num, fps_den;
 
     if (sps->frame_cropping_flag) {
       crop_width = sps->crop_rect_width;
@@ -1191,12 +1194,13 @@
 
     /* 0/1 is set as the default in the codec parser, we will set
      * it in case we have no info */
-    if (G_UNLIKELY (h264parse->fps_num != sps->fps_num
-            || h264parse->fps_den != sps->fps_den)) {
-      GST_DEBUG_OBJECT (h264parse, "framerate changed %d/%d",
-          sps->fps_num, sps->fps_den);
-      h264parse->fps_num = sps->fps_num;
-      h264parse->fps_den = sps->fps_den;
+    gst_h264_video_calculate_framerate (sps, h264parse->field_pic_flag,
+        h264parse->sei_pic_struct, &fps_num, &fps_den);
+    if (G_UNLIKELY (h264parse->fps_num != fps_num
+            || h264parse->fps_den != fps_den)) {
+      GST_DEBUG_OBJECT (h264parse, "framerate changed %d/%d", fps_num, fps_den);
+      h264parse->fps_num = fps_num;
+      h264parse->fps_den = fps_den;
       modified = TRUE;
     }
 
@@ -1211,11 +1215,12 @@
     }
 
     if (G_UNLIKELY (modified || h264parse->update_caps)) {
-      gint fps_num = h264parse->fps_num;
-      gint fps_den = h264parse->fps_den;
       gint width, height;
       GstClockTime latency;
 
+      fps_num = h264parse->fps_num;
+      fps_den = h264parse->fps_den;
+
       caps = gst_caps_copy (sink_caps);
 
       /* sps should give this but upstream overrides */
diff --git a/gst/videosignal/Makefile.in b/gst/videosignal/Makefile.in
index bf6f88d..089d1b8 100644
--- a/gst/videosignal/Makefile.in
+++ b/gst/videosignal/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvideosignal.la 
 libgstvideosignal_la_SOURCES = gstvideosignal.c   \
                                gstvideoanalyse.c \
diff --git a/gst/vmnc/Makefile.in b/gst/vmnc/Makefile.in
index 3830824..7628fe0 100644
--- a/gst/vmnc/Makefile.in
+++ b/gst/vmnc/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvmnc.la
 noinst_HEADERS = vmncdec.h
 libgstvmnc_la_SOURCES = vmncdec.c
diff --git a/gst/y4m/Makefile.in b/gst/y4m/Makefile.in
index c59075a..9a44903 100644
--- a/gst/y4m/Makefile.in
+++ b/gst/y4m/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgsty4mdec.la
 libgsty4mdec_la_SOURCES = gsty4mdec.c
 libgsty4mdec_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
diff --git a/gst/yadif/Makefile.in b/gst/yadif/Makefile.in
index 6d4a126..37a75f0 100644
--- a/gst/yadif/Makefile.in
+++ b/gst/yadif/Makefile.in
@@ -343,6 +343,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -429,6 +431,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -720,6 +723,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstyadif.la
 libgstyadif_la_SOURCES = gstyadif.c gstyadif.h vf_yadif.c yadif.c
 libgstyadif_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 9429c81..93f8c9a 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -258,6 +258,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -344,6 +346,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -635,6 +638,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
 	a52.m4 \
 	aalib.m4 \
diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am
index 3e53a6e..65fdc7b 100644
--- a/pkgconfig/Makefile.am
+++ b/pkgconfig/Makefile.am
@@ -4,13 +4,15 @@
 	gstreamer-plugins-bad-@GST_API_VERSION@.pc \
 	gstreamer-codecparsers-@GST_API_VERSION@.pc \
 	gstreamer-insertbin-@GST_API_VERSION@.pc \
-	gstreamer-mpegts-@GST_API_VERSION@.pc
+	gstreamer-mpegts-@GST_API_VERSION@.pc \
+	gstreamer-wayland-@GST_API_VERSION@.pc
 
 pcverfiles_uninstalled = \
 	gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \
 	gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \
 	gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \
-	gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc
+	gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc \
+	gstreamer-wayland-@GST_API_VERSION@-uninstalled.pc
 
 if HAVE_GST_GL
 pcverfiles += gstreamer-gl-@GST_API_VERSION@.pc
@@ -38,7 +40,8 @@
            gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \
            gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
            gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \
-           gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in
+           gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in \
+           gstreamer-wayland.pc.in gstreamer-wayland-uninstalled.pc.in
 
 DISTCLEANFILES = $(pcinfiles:.in=)
 EXTRA_DIST = $(pcinfiles)
diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in
index d4b99f2..dbac30f 100644
--- a/pkgconfig/Makefile.in
+++ b/pkgconfig/Makefile.in
@@ -92,7 +92,13 @@
 	$(srcdir)/gstreamer-gl.pc.in \
 	$(srcdir)/gstreamer-gl-uninstalled.pc.in \
 	$(srcdir)/gstreamer-mpegts.pc.in \
-	$(srcdir)/gstreamer-mpegts-uninstalled.pc.in
+	$(srcdir)/gstreamer-mpegts-uninstalled.pc.in \
+	$(srcdir)/gstreamer-wayland.pc.in \
+	$(srcdir)/gstreamer-wayland-uninstalled.pc.in \
+	$(srcdir)/gstreamer-bad-base.pc.in \
+	$(srcdir)/gstreamer-bad-base-uninstalled.pc.in \
+	$(srcdir)/gstreamer-bad-video.pc.in \
+	$(srcdir)/gstreamer-bad-video-uninstalled.pc.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
 	$(top_srcdir)/common/m4/as-auto-alt.m4 \
@@ -137,7 +143,10 @@
 	gstreamer-codecparsers-uninstalled.pc gstreamer-insertbin.pc \
 	gstreamer-insertbin-uninstalled.pc gstreamer-gl.pc \
 	gstreamer-gl-uninstalled.pc gstreamer-mpegts.pc \
-	gstreamer-mpegts-uninstalled.pc
+	gstreamer-mpegts-uninstalled.pc gstreamer-wayland.pc \
+	gstreamer-wayland-uninstalled.pc gstreamer-bad-base.pc \
+	gstreamer-bad-base-uninstalled.pc gstreamer-bad-video.pc \
+	gstreamer-bad-video-uninstalled.pc
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -305,6 +314,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -391,6 +402,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -682,17 +694,20 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 
 ### all of the standard pc files we need to generate
 pcverfiles = gstreamer-plugins-bad-@GST_API_VERSION@.pc \
 	gstreamer-codecparsers-@GST_API_VERSION@.pc \
 	gstreamer-insertbin-@GST_API_VERSION@.pc \
-	gstreamer-mpegts-@GST_API_VERSION@.pc $(am__append_1)
+	gstreamer-mpegts-@GST_API_VERSION@.pc \
+	gstreamer-wayland-@GST_API_VERSION@.pc $(am__append_1)
 pcverfiles_uninstalled =  \
 	gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \
 	gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \
 	gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \
 	gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc \
+	gstreamer-wayland-@GST_API_VERSION@-uninstalled.pc \
 	$(am__append_2)
 cp_verbose = $(cp_verbose_$(V))
 cp_verbose_ = $(cp_verbose_$(AM_DEFAULT_VERBOSITY))
@@ -705,7 +720,8 @@
            gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \
            gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
            gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \
-           gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in
+           gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in \
+           gstreamer-wayland.pc.in gstreamer-wayland-uninstalled.pc.in
 
 DISTCLEANFILES = $(pcinfiles:.in=)
 EXTRA_DIST = $(pcinfiles)
@@ -762,6 +778,18 @@
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 gstreamer-mpegts-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-mpegts-uninstalled.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-wayland.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-wayland.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-wayland-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-wayland-uninstalled.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-bad-base.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-bad-base.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-bad-base-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-bad-base-uninstalled.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-bad-video.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-bad-video.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+gstreamer-bad-video-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/gstreamer-bad-video-uninstalled.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
 	-rm -f *.lo
diff --git a/pkgconfig/gstreamer-bad-base-uninstalled.pc.in b/pkgconfig/gstreamer-bad-base-uninstalled.pc.in
new file mode 100644
index 0000000..560eb13
--- /dev/null
+++ b/pkgconfig/gstreamer-bad-base-uninstalled.pc.in
@@ -0,0 +1,15 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}/../gst-libs/gst/base
+includedir=${pcfiledir}/../gst-libs
+pluginsdir=${pcfiledir}/..
+
+Name: GStreamer bad base classes, uninstalled
+Description: Bad base classes for GStreamer elements, Not Installed
+Version: @VERSION@
+Requires: gstreamer-@GST_API_VERSION@
+
+Libs: -L${libdir} ${libdir}/libgstbadbase-@GST_API_VERSION@.la @BADBASE_LIBS@
+Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@
+
+libraries=badbase
diff --git a/pkgconfig/gstreamer-bad-base.pc.in b/pkgconfig/gstreamer-bad-base.pc.in
new file mode 100644
index 0000000..a03013b
--- /dev/null
+++ b/pkgconfig/gstreamer-bad-base.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gstreamer-@GST_API_VERSION@
+pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@
+
+Name: GStreamer bad base classes, uninstalled
+Description: Bad base classes for GStreamer elements, Not Installed
+Version: @VERSION@
+Requires: gstreamer-@GST_API_VERSION@
+
+Libs: -L${libdir} ${libdir}/libgstbadbase-@GST_API_VERSION@.la @BADBASE_LIBS@
+Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@
+
+libraries=badbase
diff --git a/pkgconfig/gstreamer-bad-video-uninstalled.pc.in b/pkgconfig/gstreamer-bad-video-uninstalled.pc.in
new file mode 100644
index 0000000..6a2a206
--- /dev/null
+++ b/pkgconfig/gstreamer-bad-video-uninstalled.pc.in
@@ -0,0 +1,15 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}/../gst-libs/gst/video
+includedir=${pcfiledir}/../gst-libs
+pluginsdir=${pcfiledir}/..
+
+Name: GStreamer bad video library, uninstalled
+Description: Bad video library for GStreamer, Not Installed
+Version: @VERSION@
+Requires: gstreamer-@GST_API_VERSION@
+
+Libs: -L${libdir} ${libdir}/libgstbadvideo-@GST_API_VERSION@.la @BADBASE_LIBS@
+Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@
+
+libraries=badvideo
diff --git a/pkgconfig/gstreamer-bad-video.pc.in b/pkgconfig/gstreamer-bad-video.pc.in
new file mode 100644
index 0000000..4fdf889
--- /dev/null
+++ b/pkgconfig/gstreamer-bad-video.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gstreamer-@GST_API_VERSION@
+pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@
+
+Name: GStreamer bad video library, uninstalled
+Description: Bad video library for GStreamer elements, Not Installed
+Version: @VERSION@
+Requires: gstreamer-@GST_API_VERSION@
+
+Libs: -L${libdir} ${libdir}/libgstbadvideo-@GST_API_VERSION@.la @BADBASE_LIBS@
+Cflags: -I${includedir} -I@srcdir@/.. @BADBASE_CFLAGS@
+
+libraries=badvideo
diff --git a/pkgconfig/gstreamer-wayland-uninstalled.pc.in b/pkgconfig/gstreamer-wayland-uninstalled.pc.in
new file mode 100644
index 0000000..fe01de6
--- /dev/null
+++ b/pkgconfig/gstreamer-wayland-uninstalled.pc.in
@@ -0,0 +1,12 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}/../gst-libs/gst/wayland
+includedir=${pcfiledir}/../gst-libs
+
+Name: GStreamer Wayland, Uninstalled
+Description: GStreamer Wayland support, uninstalled
+Requires: gstreamer-@GST_API_VERSION@ gstreamer-video-@GST_API_VERSION@
+Version: @VERSION@
+Libs: -L${libdir} ${libdir}/libgstwayland-@GST_API_VERSION@.la
+Cflags: -I${includedir}
+
diff --git a/pkgconfig/gstreamer-wayland.pc.in b/pkgconfig/gstreamer-wayland.pc.in
new file mode 100644
index 0000000..fa1e2ab
--- /dev/null
+++ b/pkgconfig/gstreamer-wayland.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gstreamer-@GST_API_VERSION@
+
+Name: GStreamer Wayland
+Description: GStreamer Wayland support
+Requires: gstreamer-@GST_API_VERSION@ gstreamer-video-@GST_API_VERSION@
+Version: @VERSION@
+Libs: -L${libdir} -lgstwayland-@GST_API_VERSION@
+Cflags: -I${includedir}
+
diff --git a/po/af.gmo b/po/af.gmo
index 2749d1d..c488c20 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index 03b1309..552a8f6 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: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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 77a33cc..498a713 100644
--- a/po/az.gmo
+++ b/po/az.gmo
Binary files differ
diff --git a/po/az.po b/po/az.po
index 43b1b8e..bd7cece 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: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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 bfacf90..a5effe0 100644
--- a/po/bg.gmo
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
index 919ce8c..3c204c6 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-04-26 22:30+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 c891fa6..853a7f0 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 4c69aae..8b06c0f 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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 43d5917..341f8e4 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index 568ac7e..43d6e5f 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -11,7 +11,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.1.4\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2013-09-18 10:05+0200\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 b8b44a6..5adfba3 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index 88d4209..bc70015 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1,15 +1,15 @@
 # Danish translation of gst-plugins-bad.
-# Copyright (C) 2011 gst.
+# Copyright (C) 2014 Mogens Jaeger og Joe Hansen.
 # This file is distributed under the same license as the gst-plugins-bad package.
 # Mogens Jaeger <mogens@jaeger.tf>, 2007.
-# Joe Hansen <joedalton2@yahoo.dk>, 2008, 2009, 2011, 2013.
+# Joe Hansen <joedalton2@yahoo.dk>, 2008, 2009, 2011, 2013, 2014.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.2.1\n"
+"Project-Id-Version: gst-plugins-bad-1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-12-08 11:28+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-24 11:28+0200\n"
 "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
 "Language: da\n"
@@ -52,9 +52,8 @@
 msgid "Couldn't download fragments"
 msgstr "Kunne ikke hente fragmenter"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Kunne ikke åbne filen »%s« for læsning."
+msgstr "Kunne ikke åbne sndfile-strøm for læsning."
 
 msgid "No file name specified for writing."
 msgstr "Intet filnavn er angivet til skrivning."
@@ -114,9 +113,9 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Kunne ikke hente indstillinger fra forende-enheden »%s«."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Kunne ikke hente indstillinger fra forende-enheden »%s«."
+msgstr "Kunne opregne leveringssystemer fra forende-enheden »%s«."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/de.gmo b/po/de.gmo
index b8050e3..d7c99c5 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 099356d..3b22043 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1,4 +1,4 @@
-# German po for gst-plugins-bad 1.1.4
+# German po for gst-plugins-bad 1.3.2
 # Copyright (C) 2007 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gst-plugins-bad package.
 # Andre Klapper <ak-47@gmx.net>, 2008.
@@ -6,10 +6,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-09-21 13:34+0100\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-22 18:27+0100\n"
 "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
 "Language: de\n"
@@ -55,9 +55,8 @@
 msgid "Couldn't download fragments"
 msgstr "Fragmente konnten nicht heruntergeladen werden"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Datei »%s« konnte nicht zum Lesen geöffnet werden."
+msgstr "sndfile-Datenstrom konnte nicht zum Lesen geöffnet werden."
 
 msgid "No file name specified for writing."
 msgstr "Kein Dateiname zum Schreiben angegeben."
@@ -122,10 +121,10 @@
 msgstr ""
 "Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
 msgstr ""
-"Einstellungen des Frontend-Geräts »%s« konnten nicht aufgerufen werden."
+"Ausliefersystem des Frontend-Geräts »%s« kann nicht durchgezählt werden."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/el.gmo b/po/el.gmo
index 1df489c..109096c 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index 6bb88ca..a7b4c09 100644
--- a/po/el.po
+++ b/po/el.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2012-05-05 19:17+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 6fcce58..4175071 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 30694d6..b6e26a7 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: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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 2decad7..e8d200a 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index a661d72..021a866 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-06-04 22:18+0200\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 90cd2ef..61e02d4 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 7252713..9376bf1 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-10-02 15:47+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 98ed0f0..bc4716c 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index c6fb647..d9a5387 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.17.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2010-03-25 12:30+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 9c5ed4d..a76d79e 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index ad799a8..019040b 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -11,7 +11,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2009-08-12 22:13+0300\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 9552fe7..577cd74 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 5430e9f..af4fb94 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-04-28 09:13+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 997ed16..5c7b48a 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index df8130d..69dd602 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-09-05 12:50+0200\n"
 "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
diff --git a/po/gst-plugins-bad-1.0.pot b/po/gst-plugins-bad-1.0.pot
index d54f147..1476c26 100644
--- a/po/gst-plugins-bad-1.0.pot
+++ b/po/gst-plugins-bad-1.0.pot
@@ -5,9 +5,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.3.2\n"
+"Project-Id-Version: gst-plugins-bad 1.3.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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"
@@ -39,25 +39,25 @@
 msgid "Could not read DVD."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:802 ext/smoothstreaming/gstmssdemux.c:986
+#: ext/smoothstreaming/gstmssdemux.c:802 ext/smoothstreaming/gstmssdemux.c:995
 msgid "This file contains no playable streams."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:952
+#: ext/smoothstreaming/gstmssdemux.c:961
 msgid "Couldn't get the Manifest's URI"
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:1405
+#: ext/smoothstreaming/gstmssdemux.c:1437
 msgid "Failed to get fragment URL."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:1500 ext/sndfile/gstsfsink.c:439
-#: gst/mpegtsdemux/mpegtsbase.c:1334 gst/mpegtsdemux/mpegtsbase.c:1338
+#: ext/smoothstreaming/gstmssdemux.c:1532 ext/sndfile/gstsfsink.c:439
+#: gst/mpegtsdemux/mpegtsbase.c:1366 gst/mpegtsdemux/mpegtsbase.c:1370
 #: gst/nuvdemux/gstnuvdemux.c:737
 msgid "Internal data stream error."
 msgstr ""
 
-#: ext/smoothstreaming/gstmssdemux.c:1546
+#: ext/smoothstreaming/gstmssdemux.c:1578
 msgid "Couldn't download fragments"
 msgstr ""
 
@@ -97,7 +97,7 @@
 msgid "Could not start sndio"
 msgstr ""
 
-#: gst/aiff/aiffparse.c:1457
+#: gst/aiff/aiffparse.c:1463
 msgid "Internal data flow error."
 msgstr ""
 
@@ -105,7 +105,7 @@
 msgid "Generated file has a larger preroll time than its streams duration"
 msgstr ""
 
-#: gst/camerabin2/camerabingeneral.c:166 gst/camerabin2/gstcamerabin2.c:1865
+#: gst/camerabin2/camerabingeneral.c:166 gst/camerabin2/gstcamerabin2.c:1874
 #: gst/camerabin2/gstviewfinderbin.c:271
 #, c-format
 msgid "Missing element '%s' - check your GStreamer installation."
@@ -124,45 +124,45 @@
 msgid "Given file name \"%s\" can't be converted to local file name encoding."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1020 sys/dvb/gstdvbsrc.c:1168
+#: sys/dvb/gstdvbsrc.c:1115 sys/dvb/gstdvbsrc.c:1301
 #, c-format
 msgid "Device \"%s\" does not exist."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1024
+#: sys/dvb/gstdvbsrc.c:1119
 #, c-format
 msgid "Could not open frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1037
+#: sys/dvb/gstdvbsrc.c:1132
 #, c-format
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1053
+#: sys/dvb/gstdvbsrc.c:1148
 #, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
 msgstr ""
 
-#: sys/dvb/gstdvbsrc.c:1172
+#: sys/dvb/gstdvbsrc.c:1305
 #, c-format
 msgid "Could not open file \"%s\" for reading."
 msgstr ""
 
-#: sys/dvb/parsechannels.c:157
+#: sys/dvb/parsechannels.c:159
 msgid "Couldn't find DVB channel configuration file"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:160
+#: sys/dvb/parsechannels.c:162
 #, c-format
 msgid "Couldn't load DVB channel configuration file: %s"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:169
+#: sys/dvb/parsechannels.c:171
 msgid "DVB channel configuration file doesn't contain any channels"
 msgstr ""
 
-#: sys/dvb/parsechannels.c:437
+#: sys/dvb/parsechannels.c:447
 #, c-format
 msgid "Couldn't find details for DVB channel %s"
 msgstr ""
diff --git a/po/hr.gmo b/po/hr.gmo
index ecb3517..027853e 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 2a89cb1..4d24d5a 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2012-04-16 02:06+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 6a2e677..731e05d 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 13f4122..4b41bec 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -6,17 +6,17 @@
 # Balázs Úr <urbalazs at gmail dot com>, 2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.2.1\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2014-03-16 12:02+0100\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-23 20:42+0200\n"
 "Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
 "Language: hu\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 1.2\n"
+"X-Generator: Lokalize 1.5\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
 msgid "Could not read title information for DVD."
@@ -54,9 +54,8 @@
 msgid "Couldn't download fragments"
 msgstr "Nem sikerült letölteni a töredékeket"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "A fájl („%s”) nem nyitható meg olvasásra."
+msgstr "A hangfájl folyam nem nyitható meg olvasásra."
 
 msgid "No file name specified for writing."
 msgstr "Nincs megadva fájlnév az íráshoz."
@@ -118,9 +117,10 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Nem kérhetők le a beállítások az előtéteszköztől („%s”)."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Nem kérhetők le a beállítások az előtéteszköztől („%s”)."
+msgstr ""
+"Nem lehet felsorolni a szállító rendszereket a(z) „%s” előtéteszköztől."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/id.gmo b/po/id.gmo
index a3e30fc..3c19c75 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index dccc8fb..d786c98 100644
--- a/po/id.po
+++ b/po/id.po
@@ -1,15 +1,15 @@
 # Indonesian translations for gst-plugins-bad package.
 # This file is put in the public domain.
-# Andhika Padmawan <andhika.padmawan@gmail.com>, 2009-2012.
 # Andika Triwidada <andika@gmail.com>, 2013.
+# Andhika Padmawan <andhika.padmawan@gmail.com>, 2009-2014.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-10-15 15:39+0700\n"
-"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-31 22:16+0700\n"
+"Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
 "Language: id\n"
 "MIME-Version: 1.0\n"
@@ -52,9 +52,8 @@
 msgid "Couldn't download fragments"
 msgstr "Tak bisa mengunduh fragmen."
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Tak dapat membuka berkas \"%s\" untuk dibaca."
+msgstr "Tak dapat membuka stream sndfile untuk dibaca."
 
 msgid "No file name specified for writing."
 msgstr "Tak ada nama berkas yang ditentukan untuk ditulis."
@@ -115,9 +114,10 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Tak dapat mendapatkan pengaturan dari divais ujung-depan \"%s\"."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Tak dapat mendapatkan pengaturan dari divais ujung-depan \"%s\"."
+msgstr ""
+"Tak dapat menghitung sistem pengantaran dari divais ujung-depan \"%s\"."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/it.gmo b/po/it.gmo
index c88afce..f15e44c 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 0f36d07..e4ed5d8 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2009-08-14 00:12+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 9c4e4c8..9e6e3c8 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index e9b0895..6efd8cd 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-04-26 19:38+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/ky.gmo b/po/ky.gmo
index 239f684..20a08f2 100644
--- a/po/ky.gmo
+++ b/po/ky.gmo
Binary files differ
diff --git a/po/ky.po b/po/ky.po
index 32674de..73cf04b 100644
--- a/po/ky.po
+++ b/po/ky.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.5\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2007-11-13 17:16+0600\n"
 "Last-Translator: Ilyas Bakirov <just_ilyas@yahoo.com>\n"
 "Language-Team: Kirghiz <i18n-team-ky-kyrgyz@lists.sourceforge.net>\n"
diff --git a/po/lt.gmo b/po/lt.gmo
index 3302a1b..32c82cc 100644
--- a/po/lt.gmo
+++ b/po/lt.gmo
Binary files differ
diff --git a/po/lt.po b/po/lt.po
index 233d5a7..87a3e88 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.6.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2008-05-14 02:13+0300\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 56deb8b..3cfa8eb 100644
--- a/po/lv.gmo
+++ b/po/lv.gmo
Binary files differ
diff --git a/po/lv.po b/po/lv.po
index 1c646e1..24df994 100644
--- a/po/lv.po
+++ b/po/lv.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2014-04-20 15:52+0300\n"
 "Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n"
 "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
diff --git a/po/mt.gmo b/po/mt.gmo
index 29d3143..98cd23c 100644
--- a/po/mt.gmo
+++ b/po/mt.gmo
Binary files differ
diff --git a/po/mt.po b/po/mt.po
index 1304486..765ce49 100644
--- a/po/mt.po
+++ b/po/mt.po
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.8.3\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2008-10-26 20:27+0100\n"
 "Last-Translator: Michel Bugeja <michelbugeja@rabatmalta.com>\n"
 "Language-Team: Maltese <translation-team-mt@lists.sourceforge.net>\n"
diff --git a/po/nb.gmo b/po/nb.gmo
index f22f671..de58618 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index 9f4ed30..5ae46ad 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2014-01-22 17:56+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 62f3992..d7a6bb6 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index cde7b74..9e01868 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,15 +1,15 @@
-# translation of gst-plugins-bad-1.1.4.nl.po to Dutch
+# translation of gst-plugins-bad-1.3.2.nl.po to Dutch
 # translation of gst-plugins-bad to Dutch
 # Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is distributed under the same license as the gst-plugins-bad package.
-# Freek de Kruijf <f.de.kruijf@gmail.com>, 2007, 2008, 2009, 2011, 2013.
+# Freek de Kruijf <f.de.kruijf@gmail.com>, 2007, 2008, 2009, 2011, 2013, 2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-09-15 13:26+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-22 00:31+0200\n"
 "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
 "Language: nl\n"
@@ -54,9 +54,8 @@
 msgid "Couldn't download fragments"
 msgstr "Kan fragmenten niet downloaden"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Kan bestand \"%s\" niet openen om te lezen."
+msgstr "Kan sndfile-stream niet openen om te lezen."
 
 msgid "No file name specified for writing."
 msgstr "Geen bestandsnaam gespecificeerd voor de uitvoer."
@@ -119,9 +118,9 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Kan de instellingen van het frontend-apparaat \"%s\" niet verkrijgen."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Kan de instellingen van het frontend-apparaat \"%s\" niet verkrijgen."
+msgstr "Kan de afleversystemen van het frontend-apparaat \"%s\" niet opnoemen."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/or.gmo b/po/or.gmo
index d5e3814..aa87a6c 100644
--- a/po/or.gmo
+++ b/po/or.gmo
Binary files differ
diff --git a/po/or.po b/po/or.po
index cf7efe4..7bc8a4e 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: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\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 c36b37f..4a25f5a 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 4bd5a96..28fe3a8 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,13 +1,13 @@
 # Polish translation for gst-plugins-bad.
 # This file is distributed under the same license as the gst-plugins-bad package.
-# Jakub Bogusz <qboosh@pld-linux.org>, 2007-2013.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2007-2014.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-09-15 11:29+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-22 18:34+0200\n"
 "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
 "Language: pl\n"
@@ -50,9 +50,8 @@
 msgid "Couldn't download fragments"
 msgstr "Nie udało się pobrać fragmentów"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Nie udało się otworzyć pliku \"%s\" do odczytu."
+msgstr "Nie udało się otworzyć strumienia sndfile do odczytu."
 
 msgid "No file name specified for writing."
 msgstr "Nie określono nazwy pliku do zapisu."
@@ -113,9 +112,10 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Nie udało się pobrać ustawień z urządzenia frontendu \"%s\"."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Nie udało się pobrać ustawień z urządzenia frontendu \"%s\"."
+msgstr ""
+"Nie można wyliczyć systemów dostarczania z urządzenia frontendu \"%s\"."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 0649922..0eea4ef 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 750fd5a..cede153 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2013-12-17 01:09-0200\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 03d63ad..cfa0431 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 84c4407..f041006 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.18.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2010-08-16 03:11+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 68b9f98..32527e2 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index b2b07e1..398459b 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -3,25 +3,25 @@
 #
 # Артём Попов <artfwo@gmail.com>, 2009.
 # Pavel Maryanov <acid_jack@ukr.net>, 2009.
-# Yuri Kozlov <yuray@komyakino.ru>, 2011, 2013.
+# Yuri Kozlov <yuray@komyakino.ru>, 2011, 2013, 2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-09-15 08:26+0400\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-22 19:59+0400\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@mx.ru>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 1.4\n"
+"X-Generator: Lokalize 1.5\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "Could not read title information for DVD."
-msgstr "Не удалось прочесть информацию о структуре DVD."
+msgstr "Не удалось прочитать информацию о структуре DVD."
 
 #, c-format
 msgid "Failed to open DVD device '%s'."
@@ -34,11 +34,11 @@
 "Could not read DVD. This may be because the DVD is encrypted and a DVD "
 "decryption library is not installed."
 msgstr ""
-"Не удалось прочесть DVD. Это могло произойти из-за того, что DVD закодирован "
-"и не установлена библиотека декодирования DVD."
+"Не удалось прочитать DVD. Это могло произойти из-за того, что DVD "
+"закодирован и не установлена библиотека декодирования DVD."
 
 msgid "Could not read DVD."
-msgstr "Не удалось прочесть DVD."
+msgstr "Не удалось прочитать DVD."
 
 msgid "This file contains no playable streams."
 msgstr "Файл не содержит воспроизводимых потоков."
@@ -55,9 +55,8 @@
 msgid "Couldn't download fragments"
 msgstr "Не удалось скачать фрагменты"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Не удалось открыть для чтения файл «%s»."
+msgstr "Не удалось открыть поток sndfile для чтения."
 
 msgid "No file name specified for writing."
 msgstr "Не указано имя файла для записи."
@@ -112,15 +111,15 @@
 
 #, c-format
 msgid "Could not open frontend device \"%s\"."
-msgstr "Не удалось открыть DVB-декодер «%s»."
+msgstr "Не удалось открыть клиентское устройство «%s»."
 
 #, c-format
 msgid "Could not get settings from frontend device \"%s\"."
-msgstr "Не удалось получить параметры DVB-декодера «%s»."
+msgstr "Не удалось получить параметры клиентского устройства «%s»."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Не удалось получить параметры DVB-декодера «%s»."
+msgstr "Не удалось пронумеровать системы доставки клиентского устройства «%s»."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/sk.gmo b/po/sk.gmo
index 7ccdf3b..5600516 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 7c3db41..84d1b1e 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 1.2.1\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2014-01-30 10:44+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 6f90f12..4e14165 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index faba9d4..c71dd90 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-04-26 15:21+0100\n"
 "Last-Translator: Klemen Košir <klemen.kosir@gmx.com>\n"
 "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
diff --git a/po/sq.gmo b/po/sq.gmo
index 63670b3..924bacf 100644
--- a/po/sq.gmo
+++ b/po/sq.gmo
Binary files differ
diff --git a/po/sq.po b/po/sq.po
index 5dfbed5..16ab381 100644
--- a/po/sq.po
+++ b/po/sq.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.7.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2008-08-15 16:07+0200\n"
 "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
 "Language-Team: Albanian <translation-team-sq@lists.sourceforge.net>\n"
diff --git a/po/sr.gmo b/po/sr.gmo
index 094ab1e..5562514 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index efe1f54..4e5a997 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,14 +1,14 @@
 # Serbian translation of gst-plugins
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2014 Free Software Foundation, Inc.
 # This file is distributed under the same license as the gst-plugins-bad package.
 # Danilo Segan <dsegan@gmx.net>, 2004.
-# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011, 2013.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad-1.1.4\n"
+"Project-Id-Version: gst-plugins-bad-1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-10-04 11:47+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-06-18 19:15+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
 "Language: sr\n"
@@ -17,7 +17,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Project-Style: gnome\n"
 
 msgid "Could not read title information for DVD."
 msgstr "Не могу да прочитам информације о наслову ДВД-а."
@@ -54,9 +53,8 @@
 msgid "Couldn't download fragments"
 msgstr "Не могу да преузмем одломке"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Не могу да отворим датотеку „%s“ за читање."
+msgstr "Не могу да отворим ток датотеке звука за читање."
 
 msgid "No file name specified for writing."
 msgstr "Није наведен назив датотеке за упис."
@@ -116,9 +114,9 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Не могу да добавим подешавања са управљачког уређаја „%s“."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Не могу да добавим подешавања са управљачког уређаја „%s“."
+msgstr "Не могу да нумеришем системе доставе са управљачког уређаја „%s“."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/sv.gmo b/po/sv.gmo
index dd0631c..2783dab 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 31bcc68..9f90b95 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.13.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2009-08-12 20:29+0100\n"
 "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
diff --git a/po/tr.gmo b/po/tr.gmo
index 5d193fe..35630f4 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index 647c65c..ee8b814 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-0.10.21.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2011-04-26 19:21+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 d0f6d4d..21cedc5 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index 20a51aa..1a836be 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the gst-plugins-bad package.
 #
 # Maxim V. Dziumanenko <dziumanenko@gmail.com>, 2004-2007.
-# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2013.
+# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2013, 2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: gst-plugins-bad 1.1.4\n"
+"Project-Id-Version: gst-plugins-bad 1.3.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
-"PO-Revision-Date: 2013-09-14 22:32+0300\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
+"PO-Revision-Date: 2014-05-22 07:31+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
 "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
 "Language: uk\n"
@@ -55,9 +55,8 @@
 msgid "Couldn't download fragments"
 msgstr "Не вдалося отримати фрагменти"
 
-#, fuzzy
 msgid "Could not open sndfile stream for reading."
-msgstr "Не вдалося відкрити файл «%s» для читання."
+msgstr "Не вдалося відкрити потік sndfile для читання."
 
 msgid "No file name specified for writing."
 msgstr "Не вказано назви файла для запису."
@@ -121,9 +120,11 @@
 msgid "Could not get settings from frontend device \"%s\"."
 msgstr "Не вдалося отримати параметри пристрою відтворення «%s»."
 
-#, fuzzy, c-format
+#, c-format
 msgid "Cannot enumerate delivery systems from frontend device \"%s\"."
-msgstr "Не вдалося отримати параметри пристрою відтворення «%s»."
+msgstr ""
+"Не вдалося виконати нумерування систем надання даних для інтерфейсного "
+"пристрою «%s»."
 
 #, c-format
 msgid "Could not open file \"%s\" for reading."
diff --git a/po/vi.gmo b/po/vi.gmo
index ed16783..e15afc0 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index ddd91c8..5660eb4 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad-1.1.4\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2013-09-16 14:18+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 2a47d04..e70ac72 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 9a0a587..5f1bf84 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gst-plugins-bad 0.10.16.2\n"
 "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n"
-"POT-Creation-Date: 2014-05-21 12:31+0200\n"
+"POT-Creation-Date: 2014-06-22 17:56+0200\n"
 "PO-Revision-Date: 2009-11-20 18:12中国标准时间\n"
 "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
diff --git a/sys/Makefile.in b/sys/Makefile.in
index 1c9db54..0f5562b 100644
--- a/sys/Makefile.in
+++ b/sys/Makefile.in
@@ -323,6 +323,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -409,6 +411,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -700,6 +703,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @USE_ACM_FALSE@ACM_DIR = 
 @USE_ACM_TRUE@ACM_DIR = acmenc acmmp3dec
 @USE_ANDROID_MEDIA_FALSE@ANDROID_MEDIA_DIR = 
diff --git a/sys/acmenc/Makefile.in b/sys/acmenc/Makefile.in
index 0c31e4c..0d97b93 100644
--- a/sys/acmenc/Makefile.in
+++ b/sys/acmenc/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstacmenc.la
 libgstacmenc_la_SOURCES = acmenc.c
 libgstacmenc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/acmmp3dec/Makefile.in b/sys/acmmp3dec/Makefile.in
index d9ac4e3..2fc4bbd 100644
--- a/sys/acmmp3dec/Makefile.in
+++ b/sys/acmmp3dec/Makefile.in
@@ -342,6 +342,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -428,6 +430,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -719,6 +722,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstacmmp3dec.la
 libgstacmmp3dec_la_SOURCES = acmmp3dec.c
 libgstacmmp3dec_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/androidmedia/Makefile.am b/sys/androidmedia/Makefile.am
index fba8777..3f17588 100644
--- a/sys/androidmedia/Makefile.am
+++ b/sys/androidmedia/Makefile.am
@@ -3,13 +3,15 @@
 libgstandroidmedia_la_SOURCES = \
 	gstamc.c \
 	gstamcaudiodec.c \
-	gstamcvideodec.c
+	gstamcvideodec.c \
+	gstamcvideoenc.c
 
 noinst_HEADERS = \
 	gstamc.h \
 	gstamc-constants.h \
 	gstamcaudiodec.h \
-	gstamcvideodec.h
+	gstamcvideodec.h \
+	gstamcvideoenc.h
 
 libgstandroidmedia_la_CFLAGS = \
 	$(GST_PLUGINS_BASE_CFLAGS) \
diff --git a/sys/androidmedia/Makefile.in b/sys/androidmedia/Makefile.in
index 5bcdd7e..7f1dd9b 100644
--- a/sys/androidmedia/Makefile.in
+++ b/sys/androidmedia/Makefile.in
@@ -159,7 +159,8 @@
 	$(am__DEPENDENCIES_1)
 am_libgstandroidmedia_la_OBJECTS = libgstandroidmedia_la-gstamc.lo \
 	libgstandroidmedia_la-gstamcaudiodec.lo \
-	libgstandroidmedia_la-gstamcvideodec.lo
+	libgstandroidmedia_la-gstamcvideodec.lo \
+	libgstandroidmedia_la-gstamcvideoenc.lo
 libgstandroidmedia_la_OBJECTS = $(am_libgstandroidmedia_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -347,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,17 +728,20 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstandroidmedia.la
 libgstandroidmedia_la_SOURCES = \
 	gstamc.c \
 	gstamcaudiodec.c \
-	gstamcvideodec.c
+	gstamcvideodec.c \
+	gstamcvideoenc.c
 
 noinst_HEADERS = \
 	gstamc.h \
 	gstamc-constants.h \
 	gstamcaudiodec.h \
-	gstamcvideodec.h
+	gstamcvideodec.h \
+	gstamcvideoenc.h
 
 libgstandroidmedia_la_CFLAGS = \
 	$(GST_PLUGINS_BASE_CFLAGS) \
@@ -835,6 +842,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstandroidmedia_la-gstamc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstandroidmedia_la-gstamcaudiodec.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstandroidmedia_la-gstamcvideodec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstandroidmedia_la-gstamcvideoenc.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -881,6 +889,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstandroidmedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstandroidmedia_la_CFLAGS) $(CFLAGS) -c -o libgstandroidmedia_la-gstamcvideodec.lo `test -f 'gstamcvideodec.c' || echo '$(srcdir)/'`gstamcvideodec.c
 
+libgstandroidmedia_la-gstamcvideoenc.lo: gstamcvideoenc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstandroidmedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstandroidmedia_la_CFLAGS) $(CFLAGS) -MT libgstandroidmedia_la-gstamcvideoenc.lo -MD -MP -MF $(DEPDIR)/libgstandroidmedia_la-gstamcvideoenc.Tpo -c -o libgstandroidmedia_la-gstamcvideoenc.lo `test -f 'gstamcvideoenc.c' || echo '$(srcdir)/'`gstamcvideoenc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libgstandroidmedia_la-gstamcvideoenc.Tpo $(DEPDIR)/libgstandroidmedia_la-gstamcvideoenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gstamcvideoenc.c' object='libgstandroidmedia_la-gstamcvideoenc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstandroidmedia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstandroidmedia_la_CFLAGS) $(CFLAGS) -c -o libgstandroidmedia_la-gstamcvideoenc.lo `test -f 'gstamcvideoenc.c' || echo '$(srcdir)/'`gstamcvideoenc.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
diff --git a/sys/androidmedia/gstamc-constants.h b/sys/androidmedia/gstamc-constants.h
index a885f22..6117032 100644
--- a/sys/androidmedia/gstamc-constants.h
+++ b/sys/androidmedia/gstamc-constants.h
@@ -96,6 +96,8 @@
   COLOR_TI_FormatYUV420PackedSemiPlanar = 0x7f000100,
   COLOR_QCOM_FormatYUV420SemiPlanar = 0x7fa30c00,
   COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7fa30c03,
+  /* NV12 but with stride and plane heights aligned to 32 */
+  COLOR_QCOM_FormatYVU420SemiPlanar32m = 0x7fa30c04,
   /* From hardware/ti/omap4xxx/domx/omx_core/inc/OMX_TI_IVCommon.h */
   COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced = 0x7f000001,
   /* This format is Exynos specific from the OMX vendor-specific
diff --git a/sys/androidmedia/gstamc.c b/sys/androidmedia/gstamc.c
index 67e3cdf..bfea8da 100644
--- a/sys/androidmedia/gstamc.c
+++ b/sys/androidmedia/gstamc.c
@@ -22,10 +22,17 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_ORC
+#include <orc/orc.h>
+#else
+#define orc_memcpy memcpy
+#endif
+
 #include "gstamc.h"
 #include "gstamc-constants.h"
 
 #include "gstamcvideodec.h"
+#include "gstamcvideoenc.h"
 #include "gstamcaudiodec.h"
 
 #include <gmodule.h>
@@ -35,6 +42,206 @@
 #include <string.h>
 #include <jni.h>
 
+/* getExceptionSummary() and getStackTrace() taken from Android's
+ *   platform/libnativehelper/JNIHelp.cpp
+ * Modified to work with normal C strings and without C++.
+ *
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Returns a human-readable summary of an exception object. The buffer will
+ * be populated with the "binary" class name and, if present, the
+ * exception message.
+ */
+static gchar *
+getExceptionSummary (JNIEnv * env, jthrowable exception)
+{
+  GString *gs = g_string_new ("");
+  jclass exceptionClass = NULL, classClass = NULL;
+  jmethodID classGetNameMethod, getMessage;
+  jstring classNameStr = NULL, messageStr = NULL;
+  const char *classNameChars, *messageChars;
+
+  /* get the name of the exception's class */
+  exceptionClass = (*env)->GetObjectClass (env, exception);
+  classClass = (*env)->GetObjectClass (env, exceptionClass);
+  classGetNameMethod =
+      (*env)->GetMethodID (env, classClass, "getName", "()Ljava/lang/String;");
+
+  classNameStr =
+      (jstring) (*env)->CallObjectMethod (env, exceptionClass,
+      classGetNameMethod);
+
+  if (classNameStr == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<error getting class name>");
+    goto done;
+  }
+
+  classNameChars = (*env)->GetStringUTFChars (env, classNameStr, NULL);
+  if (classNameChars == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<error getting class name UTF-8>");
+    goto done;
+  }
+
+  g_string_append (gs, classNameChars);
+
+  (*env)->ReleaseStringUTFChars (env, classNameStr, classNameChars);
+
+  /* if the exception has a detail message, get that */
+  getMessage =
+      (*env)->GetMethodID (env, exceptionClass, "getMessage",
+      "()Ljava/lang/String;");
+  messageStr = (jstring) (*env)->CallObjectMethod (env, exception, getMessage);
+  if (messageStr == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    goto done;
+  }
+  g_string_append (gs, ": ");
+
+  messageChars = (*env)->GetStringUTFChars (env, messageStr, NULL);
+  if (messageChars != NULL) {
+    g_string_append (gs, messageChars);
+    (*env)->ReleaseStringUTFChars (env, messageStr, messageChars);
+  } else {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<error getting message>");
+  }
+
+done:
+  if (exceptionClass)
+    (*env)->DeleteLocalRef (env, exceptionClass);
+  if (classClass)
+    (*env)->DeleteLocalRef (env, classClass);
+  if (classNameStr)
+    (*env)->DeleteLocalRef (env, classNameStr);
+  if (messageStr)
+    (*env)->DeleteLocalRef (env, messageStr);
+
+  return g_string_free (gs, FALSE);
+}
+
+/*
+ * Returns an exception (with stack trace) as a string.
+ */
+static gchar *
+getStackTrace (JNIEnv * env, jthrowable exception)
+{
+  GString *gs = g_string_new ("");
+  jclass stringWriterClass = NULL, printWriterClass = NULL;
+  jclass exceptionClass = NULL;
+  jmethodID stringWriterCtor, stringWriterToStringMethod;
+  jmethodID printWriterCtor, printStackTraceMethod;
+  jobject stringWriter = NULL, printWriter = NULL;
+  jstring messageStr = NULL;
+  const char *utfChars;
+
+  stringWriterClass = (*env)->FindClass (env, "java/io/StringWriter");
+
+  if (stringWriterClass == NULL) {
+    g_string_append (gs, "<error getting java.io.StringWriter class>");
+    goto done;
+  }
+
+  stringWriterCtor =
+      (*env)->GetMethodID (env, stringWriterClass, "<init>", "()V");
+  stringWriterToStringMethod =
+      (*env)->GetMethodID (env, stringWriterClass, "toString",
+      "()Ljava/lang/String;");
+
+  printWriterClass = (*env)->FindClass (env, "java/io/PrintWriter");
+  if (printWriterClass == NULL) {
+    g_string_append (gs, "<error getting java.io.PrintWriter class>");
+    goto done;
+  }
+
+  printWriterCtor =
+      (*env)->GetMethodID (env, printWriterClass, "<init>",
+      "(Ljava/io/Writer;)V");
+  stringWriter = (*env)->NewObject (env, stringWriterClass, stringWriterCtor);
+  if (stringWriter == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<error creating new StringWriter instance>");
+    goto done;
+  }
+
+  printWriter =
+      (*env)->NewObject (env, printWriterClass, printWriterCtor, stringWriter);
+  if (printWriter == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<error creating new PrintWriter instance>");
+    goto done;
+  }
+
+  exceptionClass = (*env)->GetObjectClass (env, exception);
+  printStackTraceMethod =
+      (*env)->GetMethodID (env, exceptionClass, "printStackTrace",
+      "(Ljava/io/PrintWriter;)V");
+  (*env)->CallVoidMethod (env, exception, printStackTraceMethod, printWriter);
+  if ((*env)->ExceptionCheck (env)) {
+    (*env)->ExceptionClear (env);
+    g_string_append (gs, "<exception while printing stack trace>");
+    goto done;
+  }
+
+  messageStr = (jstring) (*env)->CallObjectMethod (env, stringWriter,
+      stringWriterToStringMethod);
+  if (messageStr == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<failed to call StringWriter.toString()>");
+    goto done;
+  }
+
+  utfChars = (*env)->GetStringUTFChars (env, messageStr, NULL);
+  if (utfChars == NULL) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    g_string_append (gs, "<failed to get UTF chars for message>");
+    goto done;
+  }
+
+  g_string_append (gs, utfChars);
+
+  (*env)->ReleaseStringUTFChars (env, messageStr, utfChars);
+
+done:
+  if (stringWriterClass)
+    (*env)->DeleteLocalRef (env, stringWriterClass);
+  if (printWriterClass)
+    (*env)->DeleteLocalRef (env, printWriterClass);
+  if (exceptionClass)
+    (*env)->DeleteLocalRef (env, exceptionClass);
+  if (stringWriter)
+    (*env)->DeleteLocalRef (env, stringWriter);
+  if (printWriter)
+    (*env)->DeleteLocalRef (env, printWriter);
+  if (messageStr)
+    (*env)->DeleteLocalRef (env, messageStr);
+
+  return g_string_free (gs, FALSE);
+}
+
 #include <pthread.h>
 
 GST_DEBUG_CATEGORY (gst_amc_debug);
@@ -150,11 +357,40 @@
 }
 
 static gboolean
-initialize_java_vm (void)
+check_nativehelper (void)
 {
-  jsize n_vms;
+  GModule *module;
+  void **jni_invocation = NULL;
+  gboolean ret = FALSE;
 
-  java_module = g_module_open ("libdvm", G_MODULE_BIND_LOCAL);
+  module = g_module_open (NULL, G_MODULE_BIND_LOCAL);
+  if (!module)
+    return ret;
+
+  /* Check if libnativehelper is loaded in the process and if
+   * it has these awful wrappers for JNI_CreateJavaVM and
+   * JNI_GetCreatedJavaVMs that crash the app if you don't
+   * create a JniInvocation instance first. If it isn't we
+   * just fail here and don't initialize anything.
+   * See this code for reference:
+   * https://android.googlesource.com/platform/libnativehelper/+/master/JniInvocation.cpp
+   */
+  if (!g_module_symbol (module, "_ZN13JniInvocation15jni_invocation_E",
+          (gpointer *) & jni_invocation)) {
+    ret = TRUE;
+  } else {
+    ret = (jni_invocation != NULL && *jni_invocation != NULL);
+  }
+
+  g_module_close (module);
+
+  return ret;
+}
+
+static gboolean
+load_java_module (const gchar * name)
+{
+  java_module = g_module_open (name, G_MODULE_BIND_LOCAL);
   if (!java_module)
     goto load_failed;
 
@@ -166,6 +402,46 @@
           (gpointer *) & get_created_java_vms))
     goto symbol_error;
 
+  return TRUE;
+
+load_failed:
+  {
+    GST_ERROR ("Failed to load Java module '%s': %s", GST_STR_NULL (name),
+        g_module_error ());
+    return FALSE;
+  }
+symbol_error:
+  {
+    GST_ERROR ("Failed to locate required JNI symbols in '%s': %s",
+        GST_STR_NULL (name), g_module_error ());
+    g_module_close (java_module);
+    java_module = NULL;
+    return FALSE;
+  }
+}
+
+static gboolean
+initialize_java_vm (void)
+{
+  jsize n_vms;
+
+  /* Returns TRUE if we can safely
+   * a) get the current VMs and
+   * b) start a VM if none is started yet
+   *
+   * FIXME: On Android >= 4.4 we won't be able to safely start a
+   * VM on our own without using private C++ API!
+   */
+  if (!check_nativehelper ()) {
+    GST_ERROR ("Can't safely check for VMs or start a VM");
+    return FALSE;
+  }
+
+  if (!load_java_module (NULL)) {
+    if (!load_java_module ("libdvm"))
+      return FALSE;
+  }
+
   n_vms = 0;
   if (get_created_java_vms (&java_vm, 1, &n_vms) < 0)
     goto get_created_failed;
@@ -177,6 +453,8 @@
     JavaVMInitArgs vm_args;
     JavaVMOption options[4];
 
+    GST_DEBUG ("Found no existing Java VM, trying to start one");
+
     options[0].optionString = "-verbose:jni";
     options[1].optionString = "-verbose:gc";
     options[2].optionString = "-Xcheck:jni";
@@ -195,19 +473,6 @@
 
   return java_vm != NULL;
 
-load_failed:
-  {
-    GST_ERROR ("Failed to load libdvm: %s", g_module_error ());
-    return FALSE;
-  }
-symbol_error:
-  {
-    GST_ERROR ("Failed to locate required JNI symbols in libdvm: %s",
-        g_module_error ());
-    g_module_close (java_module);
-    java_module = NULL;
-    return FALSE;
-  }
 get_created_failed:
   {
     GST_ERROR ("Failed to get already created VMs");
@@ -224,8 +489,61 @@
   }
 }
 
+static void
+gst_amc_set_error_string (JNIEnv * env, GQuark domain, gint code, GError ** err,
+    const gchar * message)
+{
+  jthrowable exception;
+
+  if (!err) {
+    if ((*env)->ExceptionCheck (env))
+      (*env)->ExceptionClear (env);
+    return;
+  }
+
+  if ((*env)->ExceptionCheck (env)) {
+    if ((exception = (*env)->ExceptionOccurred (env))) {
+      gchar *exception_description, *exception_stacktrace;
+
+      /* Clear exception so that we can call Java methods again */
+      (*env)->ExceptionClear (env);
+
+      exception_description = getExceptionSummary (env, exception);
+      exception_stacktrace = getStackTrace (env, exception);
+      g_set_error (err, domain, code, "%s: %s\n%s", message,
+          exception_description, exception_stacktrace);
+      g_free (exception_description);
+      g_free (exception_stacktrace);
+
+      (*env)->DeleteLocalRef (env, exception);
+    } else {
+      (*env)->ExceptionClear (env);
+      g_set_error (err, domain, code, "%s", message);
+    }
+  } else {
+    g_set_error (err, domain, code, "%s", message);
+  }
+}
+
+G_GNUC_PRINTF (5, 6)
+     static void
+         gst_amc_set_error (JNIEnv * env, GQuark domain, gint code,
+    GError ** err, const gchar * format, ...)
+{
+  gchar *message;
+  va_list var_args;
+
+  va_start (var_args, format);
+  message = g_strdup_vprintf (format, var_args);
+  va_end (var_args);
+
+  gst_amc_set_error_string (env, domain, code, err, message);
+
+  g_free (message);
+}
+
 GstAmcCodec *
-gst_amc_codec_new (const gchar * name)
+gst_amc_codec_new (const gchar * name, GError ** err)
 {
   JNIEnv *env;
   GstAmcCodec *codec = NULL;
@@ -237,8 +555,11 @@
   env = gst_amc_get_jni_env ();
 
   name_str = (*env)->NewStringUTF (env, name);
-  if (name_str == NULL)
+  if (name_str == NULL) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create Java String");
     goto error;
+  }
 
   codec = g_slice_new0 (GstAmcCodec);
 
@@ -246,15 +567,15 @@
       (*env)->CallStaticObjectMethod (env, media_codec.klass,
       media_codec.create_by_codec_name, name_str);
   if ((*env)->ExceptionCheck (env) || !object) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to create codec '%s'", name);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create codec '%s'", name);
     goto error;
   }
 
   codec->object = (*env)->NewGlobalRef (env, object);
   if (!codec->object) {
-    GST_ERROR ("Failed to create global reference");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create global codec reference");
     goto error;
   }
 
@@ -287,7 +608,8 @@
 }
 
 gboolean
-gst_amc_codec_configure (GstAmcCodec * codec, GstAmcFormat * format, gint flags)
+gst_amc_codec_configure (GstAmcCodec * codec, GstAmcFormat * format, gint flags,
+    GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -300,8 +622,8 @@
   (*env)->CallVoidMethod (env, codec->object, media_codec.configure,
       format->object, NULL, NULL, flags);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
+        "Failed to configure codec");
     ret = FALSE;
     goto done;
   }
@@ -312,7 +634,7 @@
 }
 
 GstAmcFormat *
-gst_amc_codec_get_output_format (GstAmcCodec * codec)
+gst_amc_codec_get_output_format (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
   GstAmcFormat *ret = NULL;
@@ -326,8 +648,8 @@
       (*env)->CallObjectMethod (env, codec->object,
       media_codec.get_output_format);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
+        "Failed to get output format");
     goto done;
   }
 
@@ -335,8 +657,8 @@
 
   ret->object = (*env)->NewGlobalRef (env, object);
   if (!ret->object) {
-    GST_ERROR ("Failed to create global reference");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_SETTINGS, err,
+        "Failed to create global format reference");
     g_slice_free (GstAmcFormat, ret);
     ret = NULL;
   }
@@ -349,7 +671,7 @@
 }
 
 gboolean
-gst_amc_codec_start (GstAmcCodec * codec)
+gst_amc_codec_start (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -360,8 +682,8 @@
 
   (*env)->CallVoidMethod (env, codec->object, media_codec.start);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to start codec");
     ret = FALSE;
     goto done;
   }
@@ -372,7 +694,7 @@
 }
 
 gboolean
-gst_amc_codec_stop (GstAmcCodec * codec)
+gst_amc_codec_stop (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -383,8 +705,8 @@
 
   (*env)->CallVoidMethod (env, codec->object, media_codec.stop);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to stop codec");
     ret = FALSE;
     goto done;
   }
@@ -395,7 +717,7 @@
 }
 
 gboolean
-gst_amc_codec_flush (GstAmcCodec * codec)
+gst_amc_codec_flush (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -406,8 +728,8 @@
 
   (*env)->CallVoidMethod (env, codec->object, media_codec.flush);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to flush codec");
     ret = FALSE;
     goto done;
   }
@@ -418,7 +740,7 @@
 }
 
 gboolean
-gst_amc_codec_release (GstAmcCodec * codec)
+gst_amc_codec_release (GstAmcCodec * codec, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -429,8 +751,8 @@
 
   (*env)->CallVoidMethod (env, codec->object, media_codec.release);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to release codec");
     ret = FALSE;
     goto done;
   }
@@ -458,7 +780,8 @@
 }
 
 GstAmcBuffer *
-gst_amc_codec_get_output_buffers (GstAmcCodec * codec, gsize * n_buffers)
+gst_amc_codec_get_output_buffers (GstAmcCodec * codec, gsize * n_buffers,
+    GError ** err)
 {
   JNIEnv *env;
   jobject output_buffers = NULL;
@@ -476,15 +799,15 @@
       (*env)->CallObjectMethod (env, codec->object,
       media_codec.get_output_buffers);
   if ((*env)->ExceptionCheck (env) || !output_buffers) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get output buffers");
     goto done;
   }
 
   n_output_buffers = (*env)->GetArrayLength (env, output_buffers);
   if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get output buffers array length");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get output buffers array length");
     goto done;
   }
 
@@ -496,23 +819,23 @@
 
     buffer = (*env)->GetObjectArrayElement (env, output_buffers, i);
     if ((*env)->ExceptionCheck (env) || !buffer) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to get output buffer %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to get output buffer %d", i);
       goto error;
     }
 
     ret[i].object = (*env)->NewGlobalRef (env, buffer);
     (*env)->DeleteLocalRef (env, buffer);
     if (!ret[i].object) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to create global reference %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to create global output buffer reference %d", i);
       goto error;
     }
 
     ret[i].data = (*env)->GetDirectBufferAddress (env, ret[i].object);
     if (!ret[i].data) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to get buffer address %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to get output buffer address %d", i);
       goto error;
     }
     ret[i].size = (*env)->GetDirectBufferCapacity (env, ret[i].object);
@@ -533,7 +856,8 @@
 }
 
 GstAmcBuffer *
-gst_amc_codec_get_input_buffers (GstAmcCodec * codec, gsize * n_buffers)
+gst_amc_codec_get_input_buffers (GstAmcCodec * codec, gsize * n_buffers,
+    GError ** err)
 {
   JNIEnv *env;
   jobject input_buffers = NULL;
@@ -551,15 +875,15 @@
       (*env)->CallObjectMethod (env, codec->object,
       media_codec.get_input_buffers);
   if ((*env)->ExceptionCheck (env) || !input_buffers) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get input buffers");
     goto done;
   }
 
   n_input_buffers = (*env)->GetArrayLength (env, input_buffers);
   if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get input buffers array length");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get input buffers array length");
     goto done;
   }
 
@@ -571,23 +895,23 @@
 
     buffer = (*env)->GetObjectArrayElement (env, input_buffers, i);
     if ((*env)->ExceptionCheck (env) || !buffer) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to get input buffer %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to get input buffer %d", i);
       goto error;
     }
 
     ret[i].object = (*env)->NewGlobalRef (env, buffer);
     (*env)->DeleteLocalRef (env, buffer);
     if (!ret[i].object) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to create global reference %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to create global input buffer reference %d", i);
       goto error;
     }
 
     ret[i].data = (*env)->GetDirectBufferAddress (env, ret[i].object);
     if (!ret[i].data) {
-      (*env)->ExceptionClear (env);
-      GST_ERROR ("Failed to get buffer address %d", i);
+      gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+          "Failed to get input buffer address %d", i);
       goto error;
     }
     ret[i].size = (*env)->GetDirectBufferCapacity (env, ret[i].object);
@@ -608,7 +932,8 @@
 }
 
 gint
-gst_amc_codec_dequeue_input_buffer (GstAmcCodec * codec, gint64 timeoutUs)
+gst_amc_codec_dequeue_input_buffer (GstAmcCodec * codec, gint64 timeoutUs,
+    GError ** err)
 {
   JNIEnv *env;
   gint ret = G_MININT;
@@ -621,8 +946,8 @@
       (*env)->CallIntMethod (env, codec->object,
       media_codec.dequeue_input_buffer, timeoutUs);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to dequeue input buffer");
     ret = G_MININT;
     goto done;
   }
@@ -634,23 +959,23 @@
 
 static gboolean
 gst_amc_codec_fill_buffer_info (JNIEnv * env, jobject buffer_info,
-    GstAmcBufferInfo * info)
+    GstAmcBufferInfo * info, GError ** err)
 {
   g_return_val_if_fail (buffer_info != NULL, FALSE);
 
   info->flags =
       (*env)->GetIntField (env, buffer_info, media_codec_buffer_info.flags);
   if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get buffer info field");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get buffer info flags");
     return FALSE;
   }
 
   info->offset =
       (*env)->GetIntField (env, buffer_info, media_codec_buffer_info.offset);
   if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get buffer info field");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get buffer info offset");
     return FALSE;
   }
 
@@ -658,8 +983,8 @@
       (*env)->GetLongField (env, buffer_info,
       media_codec_buffer_info.presentation_time_us);
   if ((*env)->ExceptionCheck (env)) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get buffer info field");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get buffer info pts");
     return FALSE;
   }
 
@@ -667,7 +992,8 @@
       (*env)->GetIntField (env, buffer_info, media_codec_buffer_info.size);
   if ((*env)->ExceptionCheck (env)) {
     (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get buffer info field");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get buffer info size");
     return FALSE;
   }
 
@@ -676,7 +1002,7 @@
 
 gint
 gst_amc_codec_dequeue_output_buffer (GstAmcCodec * codec,
-    GstAmcBufferInfo * info, gint64 timeoutUs)
+    GstAmcBufferInfo * info, gint64 timeoutUs, GError ** err)
 {
   JNIEnv *env;
   gint ret = G_MININT;
@@ -690,8 +1016,8 @@
       (*env)->NewObject (env, media_codec_buffer_info.klass,
       media_codec_buffer_info.constructor);
   if (!info_o) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create buffer info instance");
     goto done;
   }
 
@@ -699,13 +1025,13 @@
       (*env)->CallIntMethod (env, codec->object,
       media_codec.dequeue_output_buffer, info_o, timeoutUs);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to dequeue output buffer");
     ret = G_MININT;
     goto done;
   }
 
-  if (!gst_amc_codec_fill_buffer_info (env, info_o, info)) {
+  if (!gst_amc_codec_fill_buffer_info (env, info_o, info, err)) {
     ret = G_MININT;
     goto done;
   }
@@ -720,7 +1046,7 @@
 
 gboolean
 gst_amc_codec_queue_input_buffer (GstAmcCodec * codec, gint index,
-    const GstAmcBufferInfo * info)
+    const GstAmcBufferInfo * info, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -733,8 +1059,8 @@
   (*env)->CallVoidMethod (env, codec->object, media_codec.queue_input_buffer,
       index, info->offset, info->size, info->presentation_time_us, info->flags);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to queue input buffer");
     ret = FALSE;
     goto done;
   }
@@ -745,7 +1071,8 @@
 }
 
 gboolean
-gst_amc_codec_release_output_buffer (GstAmcCodec * codec, gint index)
+gst_amc_codec_release_output_buffer (GstAmcCodec * codec, gint index,
+    GError ** err)
 {
   JNIEnv *env;
   gboolean ret = TRUE;
@@ -757,8 +1084,8 @@
   (*env)->CallVoidMethod (env, codec->object, media_codec.release_output_buffer,
       index, JNI_FALSE);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to release output buffer");
     ret = FALSE;
     goto done;
   }
@@ -769,7 +1096,8 @@
 }
 
 GstAmcFormat *
-gst_amc_format_new_audio (const gchar * mime, gint sample_rate, gint channels)
+gst_amc_format_new_audio (const gchar * mime, gint sample_rate, gint channels,
+    GError ** err)
 {
   JNIEnv *env;
   GstAmcFormat *format = NULL;
@@ -781,8 +1109,11 @@
   env = gst_amc_get_jni_env ();
 
   mime_str = (*env)->NewStringUTF (env, mime);
-  if (mime_str == NULL)
+  if (mime_str == NULL) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create Java string");
     goto error;
+  }
 
   format = g_slice_new0 (GstAmcFormat);
 
@@ -790,15 +1121,15 @@
       (*env)->CallStaticObjectMethod (env, media_format.klass,
       media_format.create_audio_format, mime_str, sample_rate, channels);
   if ((*env)->ExceptionCheck (env) || !object) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to create format '%s'", mime);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create format instance '%s'", mime);
     goto error;
   }
 
   format->object = (*env)->NewGlobalRef (env, object);
   if (!format->object) {
-    GST_ERROR ("Failed to create global reference");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create global format reference");
     goto error;
   }
 
@@ -819,7 +1150,8 @@
 }
 
 GstAmcFormat *
-gst_amc_format_new_video (const gchar * mime, gint width, gint height)
+gst_amc_format_new_video (const gchar * mime, gint width, gint height,
+    GError ** err)
 {
   JNIEnv *env;
   GstAmcFormat *format = NULL;
@@ -831,8 +1163,11 @@
   env = gst_amc_get_jni_env ();
 
   mime_str = (*env)->NewStringUTF (env, mime);
-  if (mime_str == NULL)
+  if (mime_str == NULL) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create Java string");
     goto error;
+  }
 
   format = g_slice_new0 (GstAmcFormat);
 
@@ -840,15 +1175,15 @@
       (*env)->CallStaticObjectMethod (env, media_format.klass,
       media_format.create_video_format, mime_str, width, height);
   if ((*env)->ExceptionCheck (env) || !object) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to create format '%s'", mime);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create format instance '%s'", mime);
     goto error;
   }
 
   format->object = (*env)->NewGlobalRef (env, object);
   if (!format->object) {
-    GST_ERROR ("Failed to create global reference");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_INIT, err,
+        "Failed to create global format reference");
     goto error;
   }
 
@@ -881,7 +1216,7 @@
 }
 
 gchar *
-gst_amc_format_to_string (GstAmcFormat * format)
+gst_amc_format_to_string (GstAmcFormat * format, GError ** err)
 {
   JNIEnv *env;
   jstring v_str = NULL;
@@ -895,15 +1230,15 @@
   v_str =
       (*env)->CallObjectMethod (env, format->object, media_format.to_string);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to convert format to string");
     goto done;
   }
 
   v = (*env)->GetStringUTFChars (env, v_str, NULL);
   if (!v) {
-    GST_ERROR ("Failed to convert string to UTF8");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to get UTF8 string");
     goto done;
   }
 
@@ -919,7 +1254,8 @@
 }
 
 gboolean
-gst_amc_format_contains_key (GstAmcFormat * format, const gchar * key)
+gst_amc_format_contains_key (GstAmcFormat * format, const gchar * key,
+    GError ** err)
 {
   JNIEnv *env;
   gboolean ret = FALSE;
@@ -931,15 +1267,18 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   ret =
       (*env)->CallBooleanMethod (env, format->object, media_format.contains_key,
       key_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to check if format contains key '%s'", key);
     goto done;
   }
 
@@ -952,7 +1291,7 @@
 
 gboolean
 gst_amc_format_get_float (GstAmcFormat * format, const gchar * key,
-    gfloat * value)
+    gfloat * value, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = FALSE;
@@ -966,15 +1305,18 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   *value =
       (*env)->CallFloatMethod (env, format->object, media_format.get_float,
       key_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get float key '%s'", key);
     goto done;
   }
   ret = TRUE;
@@ -988,7 +1330,7 @@
 
 void
 gst_amc_format_set_float (GstAmcFormat * format, const gchar * key,
-    gfloat value)
+    gfloat value, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
@@ -999,14 +1341,17 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   (*env)->CallVoidMethod (env, format->object, media_format.set_float, key_str,
       value);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed set float key '%s'", key);
     goto done;
   }
 
@@ -1016,7 +1361,8 @@
 }
 
 gboolean
-gst_amc_format_get_int (GstAmcFormat * format, const gchar * key, gint * value)
+gst_amc_format_get_int (GstAmcFormat * format, const gchar * key, gint * value,
+    GError ** err)
 {
   JNIEnv *env;
   gboolean ret = FALSE;
@@ -1030,15 +1376,18 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   *value =
       (*env)->CallIntMethod (env, format->object, media_format.get_integer,
       key_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get integer key '%s'", key);
     goto done;
   }
   ret = TRUE;
@@ -1052,7 +1401,8 @@
 }
 
 void
-gst_amc_format_set_int (GstAmcFormat * format, const gchar * key, gint value)
+gst_amc_format_set_int (GstAmcFormat * format, const gchar * key, gint value,
+    GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
@@ -1063,14 +1413,17 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   (*env)->CallVoidMethod (env, format->object, media_format.set_integer,
       key_str, value);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed set integer key '%s'", key);
     goto done;
   }
 
@@ -1081,7 +1434,7 @@
 
 gboolean
 gst_amc_format_get_string (GstAmcFormat * format, const gchar * key,
-    gchar ** value)
+    gchar ** value, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = FALSE;
@@ -1097,22 +1450,25 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   v_str =
       (*env)->CallObjectMethod (env, format->object, media_format.get_string,
       key_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get string key '%s'", key);
     goto done;
   }
 
   v = (*env)->GetStringUTFChars (env, v_str, NULL);
   if (!v) {
-    GST_ERROR ("Failed to convert string to UTF8");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get string UTF8 characters");
     goto done;
   }
 
@@ -1133,7 +1489,7 @@
 
 void
 gst_amc_format_set_string (GstAmcFormat * format, const gchar * key,
-    const gchar * value)
+    const gchar * value, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
@@ -1146,18 +1502,24 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   v_str = (*env)->NewStringUTF (env, value);
-  if (!v_str)
+  if (!v_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   (*env)->CallVoidMethod (env, format->object, media_format.set_string, key_str,
       v_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed set string key '%s'", key);
     goto done;
   }
 
@@ -1170,7 +1532,7 @@
 
 gboolean
 gst_amc_format_get_buffer (GstAmcFormat * format, const gchar * key,
-    guint8 ** data, gsize * size)
+    guint8 ** data, gsize * size, GError ** err)
 {
   JNIEnv *env;
   gboolean ret = FALSE;
@@ -1187,21 +1549,24 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   v = (*env)->CallObjectMethod (env, format->object,
       media_format.get_byte_buffer, key_str);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get buffer key '%s'", key);
     goto done;
   }
 
   *data = (*env)->GetDirectBufferAddress (env, v);
   if (!data) {
-    (*env)->ExceptionClear (env);
-    GST_ERROR ("Failed to get buffer address");
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed get buffer address");
     goto done;
   }
   *size = (*env)->GetDirectBufferCapacity (env, v);
@@ -1220,7 +1585,7 @@
 
 void
 gst_amc_format_set_buffer (GstAmcFormat * format, const gchar * key,
-    guint8 * data, gsize size)
+    guint8 * data, gsize size, GError ** err)
 {
   JNIEnv *env;
   jstring key_str = NULL;
@@ -1233,19 +1598,25 @@
   env = gst_amc_get_jni_env ();
 
   key_str = (*env)->NewStringUTF (env, key);
-  if (!key_str)
+  if (!key_str) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed to create Java string");
     goto done;
+  }
 
   /* FIXME: The memory must remain valid until the codec is stopped */
   v = (*env)->NewDirectByteBuffer (env, data, size);
-  if (!v)
+  if (!v) {
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed create Java byte buffer");
     goto done;
+  }
 
   (*env)->CallVoidMethod (env, format->object, media_format.set_byte_buffer,
       key_str, v);
   if ((*env)->ExceptionCheck (env)) {
-    GST_ERROR ("Failed to call Java method");
-    (*env)->ExceptionClear (env);
+    gst_amc_set_error (env, GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, err,
+        "Failed set buffer key '%s'", key);
     goto done;
   }
 
@@ -1270,15 +1641,21 @@
   tmp = (*env)->FindClass (env, "java/lang/String");
   if (!tmp) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get string class");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   java_string.klass = (*env)->NewGlobalRef (env, tmp);
   if (!java_string.klass) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get string class global reference");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   (*env)->DeleteLocalRef (env, tmp);
@@ -1288,23 +1665,32 @@
       (*env)->GetMethodID (env, java_string.klass, "<init>", "([C)V");
   if (!java_string.constructor) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get string methods");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
   tmp = (*env)->FindClass (env, "android/media/MediaCodec");
   if (!tmp) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec class");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   media_codec.klass = (*env)->NewGlobalRef (env, tmp);
   if (!media_codec.klass) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec class global reference");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   (*env)->DeleteLocalRef (env, tmp);
@@ -1359,8 +1745,11 @@
       !media_codec.release_output_buffer ||
       !media_codec.start || !media_codec.stop) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec methods");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
@@ -1374,8 +1763,11 @@
   media_codec_buffer_info.klass = (*env)->NewGlobalRef (env, tmp);
   if (!media_codec_buffer_info.klass) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec buffer info class global reference");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   (*env)->DeleteLocalRef (env, tmp);
@@ -1397,23 +1789,32 @@
       || !media_codec_buffer_info.presentation_time_us
       || !media_codec_buffer_info.size) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get buffer info methods and fields");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
   tmp = (*env)->FindClass (env, "android/media/MediaFormat");
   if (!tmp) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get format class");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   media_format.klass = (*env)->NewGlobalRef (env, tmp);
   if (!media_format.klass) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get format class global reference");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
   (*env)->DeleteLocalRef (env, tmp);
@@ -1462,8 +1863,11 @@
       || !media_format.set_string || !media_format.get_byte_buffer
       || !media_format.set_byte_buffer) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get format methods");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
@@ -1569,8 +1973,11 @@
   codec_list_class = (*env)->FindClass (env, "android/media/MediaCodecList");
   if (!codec_list_class) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec list class");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
@@ -1581,8 +1988,11 @@
       "(I)Landroid/media/MediaCodecInfo;");
   if (!get_codec_count_id || !get_codec_info_at_id) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get codec list method IDs");
+    if ((*env)->ExceptionCheck (env)) {
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
+    }
     goto done;
   }
 
@@ -1590,8 +2000,9 @@
       (*env)->CallStaticIntMethod (env, codec_list_class, get_codec_count_id);
   if ((*env)->ExceptionCheck (env)) {
     ret = FALSE;
-    (*env)->ExceptionClear (env);
     GST_ERROR ("Failed to get number of available codecs");
+    (*env)->ExceptionDescribe (env);
+    (*env)->ExceptionClear (env);
     goto done;
   }
 
@@ -1617,16 +2028,22 @@
         (*env)->CallStaticObjectMethod (env, codec_list_class,
         get_codec_info_at_id, i);
     if ((*env)->ExceptionCheck (env) || !codec_info) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get codec info %d", i);
+      if ((*env)->ExceptionCheck (env)) {
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
+      }
       valid_codec = FALSE;
       goto next_codec;
     }
 
     codec_info_class = (*env)->GetObjectClass (env, codec_info);
     if (!codec_list_class) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get codec info class");
+      if ((*env)->ExceptionCheck (env)) {
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
+      }
       valid_codec = FALSE;
       goto next_codec;
     }
@@ -1644,23 +2061,28 @@
         (*env)->GetMethodID (env, codec_info_class, "isEncoder", "()Z");
     if (!get_capabilities_for_type_id || !get_name_id
         || !get_supported_types_id || !is_encoder_id) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get codec info method IDs");
+      if ((*env)->ExceptionCheck (env)) {
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
+      }
       valid_codec = FALSE;
       goto next_codec;
     }
 
     name = (*env)->CallObjectMethod (env, codec_info, get_name_id);
     if ((*env)->ExceptionCheck (env)) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get codec name");
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
       valid_codec = FALSE;
       goto next_codec;
     }
     name_str = (*env)->GetStringUTFChars (env, name, NULL);
     if ((*env)->ExceptionCheck (env)) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to convert codec name to UTF8");
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
       valid_codec = FALSE;
       goto next_codec;
     }
@@ -1713,8 +2135,9 @@
 
     is_encoder = (*env)->CallBooleanMethod (env, codec_info, is_encoder_id);
     if ((*env)->ExceptionCheck (env)) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to detect if codec is an encoder");
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
       valid_codec = FALSE;
       goto next_codec;
     }
@@ -1723,16 +2146,18 @@
     supported_types =
         (*env)->CallObjectMethod (env, codec_info, get_supported_types_id);
     if ((*env)->ExceptionCheck (env)) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get supported types");
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
       valid_codec = FALSE;
       goto next_codec;
     }
 
     n_supported_types = (*env)->GetArrayLength (env, supported_types);
     if ((*env)->ExceptionCheck (env)) {
-      (*env)->ExceptionClear (env);
       GST_ERROR ("Failed to get supported types array length");
+      (*env)->ExceptionDescribe (env);
+      (*env)->ExceptionClear (env);
       valid_codec = FALSE;
       goto next_codec;
     }
@@ -1765,8 +2190,9 @@
 
       supported_type = (*env)->GetObjectArrayElement (env, supported_types, j);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get %d-th supported type", j);
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1774,8 +2200,9 @@
       supported_type_str =
           (*env)->GetStringUTFChars (env, supported_type, NULL);
       if ((*env)->ExceptionCheck (env) || !supported_type_str) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to convert supported type to UTF8");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1787,16 +2214,18 @@
           (*env)->CallObjectMethod (env, codec_info,
           get_capabilities_for_type_id, supported_type);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get capabilities for supported type");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
 
       capabilities_class = (*env)->GetObjectClass (env, capabilities);
       if (!capabilities_class) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get capabilities class");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1807,8 +2236,9 @@
           (*env)->GetFieldID (env, capabilities_class, "profileLevels",
           "[Landroid/media/MediaCodecInfo$CodecProfileLevel;");
       if (!color_formats_id || !profile_levels_id) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get capabilities field IDs");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1816,16 +2246,18 @@
       color_formats =
           (*env)->GetObjectField (env, capabilities, color_formats_id);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get color formats");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
 
       n_elems = (*env)->GetArrayLength (env, color_formats);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get color formats array length");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1834,20 +2266,14 @@
       color_formats_elems =
           (*env)->GetIntArrayElements (env, color_formats, NULL);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get color format elements");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
 
       for (k = 0; k < n_elems; k++) {
-        if (strcmp (name_str, "OMX.k3.video.decoder.avc") == 0)
-          if (n_elems == 1 && color_formats_elems[k] == COLOR_FormatYCbYCr) {
-            GST_INFO ("On HuaweiMediaPad it reports a wrong COLOR_FormatYCbYCr,"
-                "should be COLOR_TI_FormatYUV420PackedSemiPlanar, fix it.");
-            color_formats_elems[k] = COLOR_TI_FormatYUV420PackedSemiPlanar;
-          }
-
         GST_INFO ("Color format %d: 0x%x", k, color_formats_elems[k]);
         gst_codec_type->color_formats[k] = color_formats_elems[k];
       }
@@ -1871,16 +2297,18 @@
       profile_levels =
           (*env)->GetObjectField (env, capabilities, profile_levels_id);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get profile/levels");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
 
       n_elems = (*env)->GetArrayLength (env, profile_levels);
       if ((*env)->ExceptionCheck (env)) {
-        (*env)->ExceptionClear (env);
         GST_ERROR ("Failed to get profile/levels array length");
+        (*env)->ExceptionDescribe (env);
+        (*env)->ExceptionClear (env);
         valid_codec = FALSE;
         goto next_supported_type;
       }
@@ -1895,16 +2323,18 @@
 
         profile_level = (*env)->GetObjectArrayElement (env, profile_levels, k);
         if ((*env)->ExceptionCheck (env)) {
-          (*env)->ExceptionClear (env);
           GST_ERROR ("Failed to get %d-th profile/level", k);
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
           valid_codec = FALSE;
           goto next_profile_level;
         }
 
         profile_level_class = (*env)->GetObjectClass (env, profile_level);
         if (!profile_level_class) {
-          (*env)->ExceptionClear (env);
           GST_ERROR ("Failed to get profile/level class");
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
           valid_codec = FALSE;
           goto next_profile_level;
         }
@@ -1913,16 +2343,18 @@
         profile_id =
             (*env)->GetFieldID (env, profile_level_class, "profile", "I");
         if (!level_id || !profile_id) {
-          (*env)->ExceptionClear (env);
           GST_ERROR ("Failed to get profile/level field IDs");
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
           valid_codec = FALSE;
           goto next_profile_level;
         }
 
         level = (*env)->GetIntField (env, profile_level, level_id);
         if ((*env)->ExceptionCheck (env)) {
-          (*env)->ExceptionClear (env);
           GST_ERROR ("Failed to get level");
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
           valid_codec = FALSE;
           goto next_profile_level;
         }
@@ -1931,8 +2363,9 @@
 
         profile = (*env)->GetIntField (env, profile_level, profile_id);
         if ((*env)->ExceptionCheck (env)) {
-          (*env)->ExceptionClear (env);
           GST_ERROR ("Failed to get profile");
+          (*env)->ExceptionDescribe (env);
+          (*env)->ExceptionClear (env);
           valid_codec = FALSE;
           goto next_profile_level;
         }
@@ -2127,7 +2560,9 @@
   COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced, GST_VIDEO_FORMAT_NV12}, {
   COLOR_QCOM_FormatYUV420SemiPlanar, GST_VIDEO_FORMAT_NV12}, {
   COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, GST_VIDEO_FORMAT_NV12}, {
-  COLOR_OMX_SEC_FormatNV12Tiled, GST_VIDEO_FORMAT_NV12}
+  COLOR_QCOM_FormatYVU420SemiPlanar32m, GST_VIDEO_FORMAT_NV12}, {
+  COLOR_OMX_SEC_FormatNV12Tiled, GST_VIDEO_FORMAT_NV12}, {
+  COLOR_FormatYCbYCr, GST_VIDEO_FORMAT_YUY2}
 };
 
 static gboolean
@@ -2162,10 +2597,37 @@
 }
 
 GstVideoFormat
-gst_amc_color_format_to_video_format (gint color_format)
+gst_amc_color_format_to_video_format (const GstAmcCodecInfo * codec_info,
+    const gchar * mime, gint color_format)
 {
   gint i;
 
+  if (color_format == COLOR_FormatYCbYCr) {
+    if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0) {
+      GST_INFO
+          ("OMX.k3.video.decoder.avc: COLOR_FormatYCbYCr is actually GST_VIDEO_FORMAT_NV12.");
+      return GST_VIDEO_FORMAT_NV12;
+    }
+
+    /* FIXME COLOR_FormatYCbYCr doesn't work properly for OMX.k3.video.encoder.avc temporarily. */
+    if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) {
+      GST_INFO
+          ("OMX.k3.video.encoder.avc: COLOR_FormatYCbYCr is not supported yet.");
+      return GST_VIDEO_FORMAT_UNKNOWN;
+    }
+
+    /* FIXME COLOR_FormatYCbYCr is not supported in gst_amc_color_format_info_set yet, mask it. */
+    return GST_VIDEO_FORMAT_UNKNOWN;
+  }
+
+  if (color_format == COLOR_FormatYUV420SemiPlanar) {
+    if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) {
+      GST_INFO
+          ("OMX.k3.video.encoder.avc: COLOR_FormatYUV420SemiPlanar is actually GST_VIDEO_FORMAT_NV21.");
+      return GST_VIDEO_FORMAT_NV21;
+    }
+  }
+
   for (i = 0; i < G_N_ELEMENTS (color_format_mapping_table); i++) {
     if (color_format_mapping_table[i].color_format == color_format)
       return color_format_mapping_table[i].video_format;
@@ -2175,18 +2637,457 @@
 }
 
 gint
-gst_amc_video_format_to_color_format (GstVideoFormat video_format)
+gst_amc_video_format_to_color_format (const GstAmcCodecInfo * codec_info,
+    const gchar * mime, GstVideoFormat video_format)
 {
-  gint i;
+  const GstAmcCodecType *codec_type = NULL;
+  gint i, j;
+
+  for (i = 0; i < codec_info->n_supported_types; i++) {
+    if (strcmp (codec_info->supported_types[i].mime, mime) == 0) {
+      codec_type = &codec_info->supported_types[i];
+      break;
+    }
+  }
+
+  if (!codec_type)
+    return -1;
+
+  if (video_format == GST_VIDEO_FORMAT_NV12) {
+    if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0) {
+      GST_INFO
+          ("OMX.k3.video.decoder.avc: GST_VIDEO_FORMAT_NV12 is reported as COLOR_FormatYCbYCr.");
+
+      return COLOR_FormatYCbYCr;
+    }
+  }
+
+  if (video_format == GST_VIDEO_FORMAT_NV21) {
+    if (strcmp (codec_info->name, "OMX.k3.video.encoder.avc") == 0) {
+      GST_INFO
+          ("OMX.k3.video.encoder.avc: GST_VIDEO_FORMAT_NV21 is reported as COLOR_FormatYUV420SemiPlanar.");
+
+      return COLOR_FormatYUV420SemiPlanar;
+    }
+  }
 
   for (i = 0; i < G_N_ELEMENTS (color_format_mapping_table); i++) {
-    if (color_format_mapping_table[i].video_format == video_format)
-      return color_format_mapping_table[i].color_format;
+    if (color_format_mapping_table[i].video_format == video_format) {
+      gint color_format = color_format_mapping_table[i].color_format;
+
+      for (j = 0; j < codec_type->n_color_formats; j++)
+        if (color_format == codec_type->color_formats[j])
+          return color_format;
+    }
   }
 
   return -1;
 }
 
+/*
+ * The format is called QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka.
+ * Which is actually NV12 (interleaved U&V).
+ */
+#define TILE_WIDTH 64
+#define TILE_HEIGHT 32
+#define TILE_SIZE (TILE_WIDTH * TILE_HEIGHT)
+#define TILE_GROUP_SIZE (4 * TILE_SIZE)
+
+/* get frame tile coordinate. XXX: nothing to be understood here, don't try. */
+static size_t
+tile_pos (size_t x, size_t y, size_t w, size_t h)
+{
+  size_t flim = x + (y & ~1) * w;
+
+  if (y & 1) {
+    flim += (x & ~3) + 2;
+  } else if ((h & 1) == 0 || y != (h - 1)) {
+    flim += (x + 2) & ~3;
+  }
+
+  return flim;
+}
+
+gboolean
+gst_amc_color_format_info_set (GstAmcColorFormatInfo * color_format_info,
+    const GstAmcCodecInfo * codec_info, const gchar * mime, gint color_format,
+    gint width, gint height, gint stride, gint slice_height, gint crop_left,
+    gint crop_right, gint crop_top, gint crop_bottom)
+{
+  gint frame_size = 0;
+
+  if (color_format == COLOR_FormatYCbYCr) {
+    if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0)
+      color_format = COLOR_FormatYUV420SemiPlanar;
+  }
+
+  /* Samsung Galaxy S3 seems to report wrong strides.
+   * I.e. BigBuckBunny 854x480 H264 reports a stride of 864 when it is
+   * actually 854, so we use width instead of stride here.
+   * This is obviously bound to break in the future. */
+  if (g_str_has_prefix (codec_info->name, "OMX.SEC.")) {
+    stride = width;
+  }
+
+  if (strcmp (codec_info->name, "OMX.k3.video.decoder.avc") == 0) {
+    stride = width;
+    slice_height = height;
+  }
+
+  if (slice_height == 0) {
+    /* NVidia Tegra 3 on Nexus 7 does not set this */
+    if (g_str_has_prefix (codec_info->name, "OMX.Nvidia."))
+      slice_height = GST_ROUND_UP_32 (height);
+  }
+
+  if (width == 0 || height == 0) {
+    GST_ERROR ("Width or height is 0");
+    return FALSE;
+  }
+
+  switch (color_format) {
+    case COLOR_FormatYUV420Planar:{
+      if (stride == 0 || slice_height == 0) {
+        GST_ERROR ("Stride or slice height is 0");
+        return FALSE;
+      }
+
+      frame_size =
+          stride * slice_height + 2 * (((stride + 1) / 2) * (slice_height +
+              1) / 2);
+      break;
+    }
+    case COLOR_TI_FormatYUV420PackedSemiPlanar:
+    case COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced:{
+      if (stride == 0 || slice_height == 0) {
+        GST_ERROR ("Stride or slice height is 0");
+        return FALSE;
+      }
+
+      frame_size =
+          stride * (slice_height - crop_top / 2) +
+          (GST_ROUND_UP_2 (stride) * ((slice_height + 1) / 2));
+      break;
+    }
+    case COLOR_QCOM_FormatYUV420SemiPlanar:
+    case COLOR_FormatYUV420SemiPlanar:{
+      if (stride == 0 || slice_height == 0) {
+        GST_ERROR ("Stride or slice height is 0");
+        return FALSE;
+      }
+
+      frame_size = stride * slice_height + stride * ((slice_height + 1) / 2);
+      break;
+    }
+    case COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka:{
+      const size_t tile_w = (width - 1) / TILE_WIDTH + 1;
+      const size_t tile_w_align = (tile_w + 1) & ~1;
+      const size_t tile_h_luma = (height - 1) / TILE_HEIGHT + 1;
+      frame_size =
+          tile_pos (tile_w, tile_h_luma, tile_w_align, tile_h_luma) * TILE_SIZE;
+      break;
+    }
+    default:
+      GST_ERROR ("Unsupported color format %d", color_format);
+      return FALSE;
+      break;
+  }
+
+  color_format_info->color_format = color_format;
+  color_format_info->width = width;
+  color_format_info->height = height;
+  color_format_info->stride = stride;
+  color_format_info->slice_height = slice_height;
+  color_format_info->crop_left = crop_left;
+  color_format_info->crop_right = crop_right;
+  color_format_info->crop_top = crop_top;
+  color_format_info->crop_bottom = crop_bottom;
+  color_format_info->frame_size = frame_size;
+
+  return TRUE;
+}
+
+/* The weird handling of cropping, alignment and everything is taken from
+ * platform/frameworks/media/libstagefright/colorconversion/ColorConversion.cpp
+ */
+gboolean
+gst_amc_color_format_copy (GstAmcColorFormatInfo * cinfo,
+    GstAmcBuffer * cbuffer, const GstAmcBufferInfo * cbuffer_info,
+    GstVideoInfo * vinfo, GstBuffer * vbuffer,
+    GstAmcColorFormatCopyDirection direction)
+{
+  gboolean ret = FALSE;
+  guint8 *cptr = NULL, *vptr = NULL;
+  guint8 **src, **dest;
+
+  if (direction == COLOR_FORMAT_COPY_OUT) {
+    src = &cptr;
+    dest = &vptr;
+  } else {
+    src = &vptr;
+    dest = &cptr;
+  }
+
+  /* Same video format */
+  if (cbuffer_info->size == gst_buffer_get_size (vbuffer)) {
+    GstMapInfo minfo;
+
+    GST_DEBUG ("Buffer sizes equal, doing fast copy");
+    gst_buffer_map (vbuffer, &minfo, GST_MAP_WRITE);
+
+    cptr = cbuffer->data + cbuffer_info->offset;
+    vptr = minfo.data;
+    orc_memcpy (*dest, *src, cbuffer_info->size);
+
+    gst_buffer_unmap (vbuffer, &minfo);
+    ret = TRUE;
+    goto done;
+  }
+
+  GST_DEBUG ("Sizes not equal (%d vs %d), doing slow line-by-line copying",
+      cbuffer_info->size, gst_buffer_get_size (vbuffer));
+
+  /* Different video format, try to convert */
+  switch (cinfo->color_format) {
+    case COLOR_FormatYUV420Planar:{
+      GstVideoFrame vframe;
+      gint i, j, height;
+      gint stride, slice_height;
+      gint c_stride, v_stride;
+      gint row_length;
+
+      stride = cinfo->stride;
+      slice_height = cinfo->slice_height;
+      g_assert (stride > 0 && slice_height > 0);
+
+      gst_video_frame_map (&vframe, vinfo, vbuffer, GST_MAP_WRITE);
+
+      for (i = 0; i < 3; i++) {
+        if (i == 0) {
+          c_stride = stride;
+          v_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
+        } else {
+          c_stride = (stride + 1) / 2;
+          v_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
+        }
+
+        cptr = cbuffer->data + cbuffer_info->offset;
+
+        if (i == 0) {
+          cptr += cinfo->crop_top * stride;
+          cptr += cinfo->crop_left;
+          row_length = cinfo->width;
+        } else if (i > 0) {
+          /* skip the Y plane */
+          cptr += slice_height * stride;
+
+          /* crop_top/crop_left divided by two
+           * because one byte of the U/V planes
+           * corresponds to two pixels horizontally/vertically */
+          cptr += cinfo->crop_top / 2 * c_stride;
+          cptr += cinfo->crop_left / 2;
+          row_length = (cinfo->width + 1) / 2;
+        }
+        if (i == 2) {
+          /* skip the U plane */
+          cptr += ((slice_height + 1) / 2) * ((stride + 1) / 2);
+        }
+
+        vptr = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
+        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
+
+        for (j = 0; j < height; j++) {
+          orc_memcpy (*dest, *src, row_length);
+          cptr += c_stride;
+          vptr += v_stride;
+        }
+      }
+      gst_video_frame_unmap (&vframe);
+      ret = TRUE;
+      break;
+    }
+    case COLOR_TI_FormatYUV420PackedSemiPlanar:
+    case COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced:{
+      gint i, j, height;
+      gint c_stride, v_stride;
+      gint row_length;
+      GstVideoFrame vframe;
+
+      /* This should always be set */
+      g_assert (cinfo->stride > 0 && cinfo->slice_height > 0);
+
+      /* FIXME: This does not work for odd widths or heights
+       * but might as well be a bug in the codec */
+      gst_video_frame_map (&vframe, vinfo, vbuffer, GST_MAP_WRITE);
+      for (i = 0; i < 2; i++) {
+        if (i == 0) {
+          c_stride = cinfo->stride;
+          v_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
+        } else {
+          c_stride = GST_ROUND_UP_2 (cinfo->stride);
+          v_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
+        }
+
+        cptr = cbuffer->data + cbuffer_info->offset;
+        if (i == 0) {
+          row_length = cinfo->width;
+        } else if (i == 1) {
+          cptr += (cinfo->slice_height - cinfo->crop_top / 2) * cinfo->stride;
+          row_length = GST_ROUND_UP_2 (cinfo->width);
+        }
+
+        vptr = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
+        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
+
+        for (j = 0; j < height; j++) {
+          orc_memcpy (*dest, *src, row_length);
+          cptr += c_stride;
+          vptr += v_stride;
+        }
+      }
+      gst_video_frame_unmap (&vframe);
+      ret = TRUE;
+      break;
+    }
+    case COLOR_QCOM_FormatYUV420SemiPlanar:
+    case COLOR_FormatYUV420SemiPlanar:{
+      gint i, j, height;
+      gint c_stride, v_stride;
+      gint row_length;
+      GstVideoFrame vframe;
+
+      /* This should always be set */
+      g_assert (cinfo->stride > 0 && cinfo->slice_height > 0);
+
+      gst_video_frame_map (&vframe, vinfo, vbuffer, GST_MAP_WRITE);
+
+      for (i = 0; i < 2; i++) {
+        c_stride = cinfo->stride;
+        v_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
+
+        cptr = cbuffer->data + cbuffer_info->offset;
+        if (i == 0) {
+          cptr += cinfo->crop_top * cinfo->stride;
+          cptr += cinfo->crop_left;
+          row_length = cinfo->width;
+        } else if (i == 1) {
+          cptr += cinfo->slice_height * cinfo->stride;
+          cptr += cinfo->crop_top * cinfo->stride;
+          cptr += cinfo->crop_left;
+          row_length = cinfo->width;
+        }
+
+        vptr = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
+        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
+
+        for (j = 0; j < height; j++) {
+          orc_memcpy (*dest, *src, row_length);
+          cptr += c_stride;
+          vptr += v_stride;
+        }
+      }
+      gst_video_frame_unmap (&vframe);
+      ret = TRUE;
+      break;
+    }
+      /* FIXME: This should be in libgstvideo as MT12 or similar, see v4l2 */
+    case COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka:{
+      GstVideoFrame vframe;
+      gint width = cinfo->width;
+      gint height = cinfo->height;
+      gint v_luma_stride, v_chroma_stride;
+      guint8 *cdata = cbuffer->data + cbuffer_info->offset;
+      guint8 *v_luma, *v_chroma;
+      gint y;
+      const size_t tile_w = (width - 1) / TILE_WIDTH + 1;
+      const size_t tile_w_align = (tile_w + 1) & ~1;
+      const size_t tile_h_luma = (height - 1) / TILE_HEIGHT + 1;
+      const size_t tile_h_chroma = (height / 2 - 1) / TILE_HEIGHT + 1;
+      size_t luma_size = tile_w_align * tile_h_luma * TILE_SIZE;
+
+      gst_video_frame_map (&vframe, vinfo, vbuffer, GST_MAP_WRITE);
+      v_luma = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 0);
+      v_chroma = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 1);
+      v_luma_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 0);
+      v_chroma_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 1);
+
+      if ((luma_size % TILE_GROUP_SIZE) != 0)
+        luma_size = (((luma_size - 1) / TILE_GROUP_SIZE) + 1) * TILE_GROUP_SIZE;
+
+      for (y = 0; y < tile_h_luma; y++) {
+        size_t row_width = width;
+        gint x;
+
+        for (x = 0; x < tile_w; x++) {
+          size_t tile_width = row_width;
+          size_t tile_height = height;
+          gint luma_idx;
+          gint chroma_idx;
+          /* luma source pointer for this tile */
+          uint8_t *c_luma =
+              cdata + tile_pos (x, y, tile_w_align, tile_h_luma) * TILE_SIZE;
+
+          /* chroma source pointer for this tile */
+          uint8_t *c_chroma =
+              cdata + luma_size + tile_pos (x, y / 2, tile_w_align,
+              tile_h_chroma) * TILE_SIZE;
+          if (y & 1)
+            c_chroma += TILE_SIZE / 2;
+
+          /* account for right columns */
+          if (tile_width > TILE_WIDTH)
+            tile_width = TILE_WIDTH;
+
+          /* account for bottom rows */
+          if (tile_height > TILE_HEIGHT)
+            tile_height = TILE_HEIGHT;
+
+          /* vptr luma memory index for this tile */
+          luma_idx = y * TILE_HEIGHT * v_luma_stride + x * TILE_WIDTH;
+
+          /* vptr chroma memory index for this tile */
+          /* XXX: remove divisions */
+          chroma_idx = y * TILE_HEIGHT / 2 * v_chroma_stride + x * TILE_WIDTH;
+
+          tile_height /= 2;     // we copy 2 luma lines at once
+          while (tile_height--) {
+            vptr = v_luma + luma_idx;
+            cptr = c_luma;
+            memcpy (*dest, *src, tile_width);
+            c_luma += TILE_WIDTH;
+            luma_idx += v_luma_stride;
+
+            vptr = v_luma + luma_idx;
+            cptr = c_luma;
+            memcpy (*dest, *src, tile_width);
+            c_luma += TILE_WIDTH;
+            luma_idx += v_luma_stride;
+
+            vptr = v_chroma + chroma_idx;
+            cptr = c_chroma;
+            memcpy (*dest, *src, tile_width);
+            c_chroma += TILE_WIDTH;
+            chroma_idx += v_chroma_stride;
+          }
+          row_width -= TILE_WIDTH;
+        }
+        height -= TILE_HEIGHT;
+      }
+      gst_video_frame_unmap (&vframe);
+      ret = TRUE;
+      break;
+
+    }
+    default:
+      GST_ERROR ("Unsupported color format %d", cinfo->color_format);
+      goto done;
+      break;
+  }
+
+done:
+  return ret;
+}
+
 static const struct
 {
   gint id;
@@ -2746,8 +3647,11 @@
       gchar *type_name, *element_name;
       guint rank;
 
-      if (is_video && !codec_info->is_encoder) {
-        type = gst_amc_video_dec_get_type ();
+      if (is_video) {
+        if (codec_info->is_encoder)
+          type = gst_amc_video_enc_get_type ();
+        else
+          type = gst_amc_video_dec_get_type ();
       } else if (is_audio && !codec_info->is_encoder) {
         type = gst_amc_audio_dec_get_type ();
       } else {
@@ -2833,6 +3737,405 @@
   return TRUE;
 }
 
+void
+gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info,
+    GstCaps ** sink_caps, GstCaps ** src_caps)
+{
+  GstCaps *raw_ret = NULL, *encoded_ret = NULL;
+  gint i;
+
+  if (codec_info->is_encoder) {
+    if (sink_caps)
+      *sink_caps = raw_ret = gst_caps_new_empty ();
+
+    if (src_caps)
+      *src_caps = encoded_ret = gst_caps_new_empty ();
+  } else {
+    if (sink_caps)
+      *sink_caps = encoded_ret = gst_caps_new_empty ();
+
+    if (src_caps)
+      *src_caps = raw_ret = gst_caps_new_empty ();
+  }
+
+  for (i = 0; i < codec_info->n_supported_types; i++) {
+    const GstAmcCodecType *type = &codec_info->supported_types[i];
+    GstStructure *tmp, *tmp2, *tmp3;
+
+    if (g_str_has_prefix (type->mime, "audio/")) {
+      if (raw_ret) {
+        tmp = gst_structure_new ("audio/x-raw",
+            "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+            "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+            "format", G_TYPE_STRING, GST_AUDIO_NE (S16), NULL);
+
+        raw_ret = gst_caps_merge_structure (raw_ret, tmp);
+      }
+
+      if (encoded_ret) {
+        if (strcmp (type->mime, "audio/mpeg") == 0) {
+          tmp = gst_structure_new ("audio/mpeg",
+              "mpegversion", G_TYPE_INT, 1,
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/3gpp") == 0) {
+          tmp = gst_structure_new ("audio/AMR",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/amr-wb") == 0) {
+          tmp = gst_structure_new ("audio/AMR-WB",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/mp4a-latm") == 0) {
+          gint j;
+          gboolean have_profile = FALSE;
+          GValue va = { 0, };
+          GValue v = { 0, };
+
+          g_value_init (&va, GST_TYPE_LIST);
+          g_value_init (&v, G_TYPE_STRING);
+          g_value_set_string (&v, "raw");
+          gst_value_list_append_value (&va, &v);
+          g_value_set_string (&v, "adts");
+          gst_value_list_append_value (&va, &v);
+          g_value_unset (&v);
+
+          tmp = gst_structure_new ("audio/mpeg",
+              "mpegversion", G_TYPE_INT, 4,
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "framed", G_TYPE_BOOLEAN, TRUE, NULL);
+          gst_structure_set_value (tmp, "stream-format", &va);
+          g_value_unset (&va);
+
+          for (j = 0; j < type->n_profile_levels; j++) {
+            const gchar *profile;
+
+            profile =
+                gst_amc_aac_profile_to_string (type->profile_levels[j].profile);
+
+            if (!profile) {
+              GST_ERROR ("Unable to map AAC profile 0x%08x",
+                  type->profile_levels[j].profile);
+              continue;
+            }
+
+            tmp2 = gst_structure_copy (tmp);
+            gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
+            encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2);
+
+            have_profile = TRUE;
+          }
+
+          if (!have_profile) {
+            encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+          } else {
+            gst_structure_free (tmp);
+          }
+        } else if (strcmp (type->mime, "audio/g711-alaw") == 0) {
+          tmp = gst_structure_new ("audio/x-alaw",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/g711-mlaw") == 0) {
+          tmp = gst_structure_new ("audio/x-mulaw",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/vorbis") == 0) {
+          tmp = gst_structure_new ("audio/x-vorbis",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/flac") == 0) {
+          tmp = gst_structure_new ("audio/x-flac",
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "framed", G_TYPE_BOOLEAN, TRUE, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "audio/mpeg-L2") == 0) {
+          tmp = gst_structure_new ("audio/mpeg",
+              "mpegversion", G_TYPE_INT, 1,
+              "layer", G_TYPE_INT, 2,
+              "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else {
+          GST_WARNING ("Unsupported mimetype '%s'", type->mime);
+        }
+      }
+    } else if (g_str_has_prefix (type->mime, "video/")) {
+      if (raw_ret) {
+        gint j;
+
+        for (j = 0; j < type->n_color_formats; j++) {
+          GstVideoFormat format;
+
+          format =
+              gst_amc_color_format_to_video_format (codec_info,
+              type->mime, type->color_formats[j]);
+          if (format == GST_VIDEO_FORMAT_UNKNOWN) {
+            GST_WARNING ("Unknown color format 0x%08x", type->color_formats[j]);
+            continue;
+          }
+
+          tmp = gst_structure_new ("video/x-raw",
+              "format", G_TYPE_STRING, gst_video_format_to_string (format),
+              "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+              "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
+
+          raw_ret = gst_caps_merge_structure (raw_ret, tmp);
+        }
+      }
+
+      if (encoded_ret) {
+        if (strcmp (type->mime, "video/mp4v-es") == 0) {
+          gint j;
+          gboolean have_profile_level = FALSE;
+
+          tmp = gst_structure_new ("video/mpeg",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE,
+              0, 1, G_MAXINT, 1,
+              "mpegversion", G_TYPE_INT, 4,
+              "systemstream", G_TYPE_BOOLEAN, FALSE,
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+
+          if (type->n_profile_levels) {
+            for (j = type->n_profile_levels - 1; j >= 0; j--) {
+              const gchar *profile;
+
+              profile =
+                  gst_amc_mpeg4_profile_to_string (type->profile_levels[j].
+                  profile);
+              if (!profile) {
+                GST_ERROR ("Unable to map MPEG4 profile 0x%08x",
+                    type->profile_levels[j].profile);
+                continue;
+              }
+
+              tmp2 = gst_structure_copy (tmp);
+              gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
+
+              /* Don't put the level restrictions on the sinkpad caps for decoders,
+               * see 2b94641a4 */
+              if (codec_info->is_encoder) {
+                const gchar *level;
+                gint k;
+                GValue va = { 0, };
+                GValue v = { 0, };
+
+                g_value_init (&va, GST_TYPE_LIST);
+                g_value_init (&v, G_TYPE_STRING);
+
+                for (k = 1; k <= type->profile_levels[j].level && k != 0;
+                    k <<= 1) {
+                  level = gst_amc_mpeg4_level_to_string (k);
+                  if (!level)
+                    continue;
+
+                  g_value_set_string (&v, level);
+                  gst_value_list_append_value (&va, &v);
+                  g_value_reset (&v);
+                }
+
+                gst_structure_set_value (tmp2, "level", &va);
+                g_value_unset (&va);
+                g_value_unset (&v);
+              }
+
+              encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2);
+              have_profile_level = TRUE;
+            }
+          }
+
+          if (!have_profile_level) {
+            encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+          } else {
+            gst_structure_free (tmp);
+          }
+
+          tmp = gst_structure_new ("video/x-divx",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE,
+              0, 1, G_MAXINT, 1,
+              "divxversion", GST_TYPE_INT_RANGE, 3, 5,
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "video/3gpp") == 0) {
+          gint j;
+          gboolean have_profile_level = FALSE;
+
+          tmp = gst_structure_new ("video/x-h263",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE,
+              0, 1, G_MAXINT, 1,
+              "parsed", G_TYPE_BOOLEAN, TRUE,
+              "variant", G_TYPE_STRING, "itu", NULL);
+
+          if (type->n_profile_levels) {
+            for (j = type->n_profile_levels - 1; j >= 0; j--) {
+              gint profile;
+
+              profile =
+                  gst_amc_h263_profile_to_gst_id (type->profile_levels[j].
+                  profile);
+
+              if (profile == -1) {
+                GST_ERROR ("Unable to map h263 profile 0x%08x",
+                    type->profile_levels[j].profile);
+                continue;
+              }
+
+              tmp2 = gst_structure_copy (tmp);
+              gst_structure_set (tmp2, "profile", G_TYPE_UINT, profile, NULL);
+
+              if (codec_info->is_encoder) {
+                gint k;
+                gint level;
+                GValue va = { 0, };
+                GValue v = { 0, };
+
+                g_value_init (&va, GST_TYPE_LIST);
+                g_value_init (&v, G_TYPE_UINT);
+
+                for (k = 1; k <= type->profile_levels[j].level && k != 0;
+                    k <<= 1) {
+                  level = gst_amc_h263_level_to_gst_id (k);
+                  if (level == -1)
+                    continue;
+
+                  g_value_set_uint (&v, level);
+                  gst_value_list_append_value (&va, &v);
+                  g_value_reset (&v);
+                }
+
+                gst_structure_set_value (tmp2, "level", &va);
+                g_value_unset (&va);
+                g_value_unset (&v);
+              }
+
+              encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2);
+              have_profile_level = TRUE;
+            }
+          }
+
+          if (!have_profile_level) {
+            encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+          } else {
+            gst_structure_free (tmp);
+          }
+        } else if (strcmp (type->mime, "video/avc") == 0) {
+          gint j;
+          gboolean have_profile_level = FALSE;
+
+          tmp = gst_structure_new ("video/x-h264",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE,
+              0, 1, G_MAXINT, 1,
+              "parsed", G_TYPE_BOOLEAN, TRUE,
+              "stream-format", G_TYPE_STRING, "byte-stream",
+              "alignment", G_TYPE_STRING, "au", NULL);
+
+          if (type->n_profile_levels) {
+            for (j = type->n_profile_levels - 1; j >= 0; j--) {
+              const gchar *profile, *alternative = NULL;
+
+              profile =
+                  gst_amc_avc_profile_to_string (type->profile_levels[j].
+                  profile, &alternative);
+
+              if (!profile) {
+                GST_ERROR ("Unable to map H264 profile 0x%08x",
+                    type->profile_levels[j].profile);
+                continue;
+              }
+
+              tmp2 = gst_structure_copy (tmp);
+              gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
+
+              if (alternative) {
+                tmp3 = gst_structure_copy (tmp);
+                gst_structure_set (tmp3, "profile", G_TYPE_STRING, alternative,
+                    NULL);
+              } else
+                tmp3 = NULL;
+
+              if (codec_info->is_encoder) {
+                const gchar *level;
+                gint k;
+                GValue va = { 0, };
+                GValue v = { 0, };
+
+                g_value_init (&va, GST_TYPE_LIST);
+                g_value_init (&v, G_TYPE_STRING);
+                for (k = 1; k <= type->profile_levels[j].level && k != 0;
+                    k <<= 1) {
+                  level = gst_amc_avc_level_to_string (k);
+                  if (!level)
+                    continue;
+
+                  g_value_set_string (&v, level);
+                  gst_value_list_append_value (&va, &v);
+                  g_value_reset (&v);
+                }
+
+                gst_structure_set_value (tmp2, "level", &va);
+                if (tmp3)
+                  gst_structure_set_value (tmp3, "level", &va);
+
+                g_value_unset (&va);
+                g_value_unset (&v);
+              }
+
+              encoded_ret = gst_caps_merge_structure (encoded_ret, tmp2);
+              if (tmp3)
+                encoded_ret = gst_caps_merge_structure (encoded_ret, tmp3);
+              have_profile_level = TRUE;
+            }
+          }
+
+          if (!have_profile_level) {
+            encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+          } else {
+            gst_structure_free (tmp);
+          }
+        } else if (strcmp (type->mime, "video/x-vnd.on2.vp8") == 0) {
+          tmp = gst_structure_new ("video/x-vp8",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
+
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else if (strcmp (type->mime, "video/mpeg2") == 0) {
+          tmp = gst_structure_new ("video/mpeg",
+              "width", GST_TYPE_INT_RANGE, 16, 4096,
+              "height", GST_TYPE_INT_RANGE, 16, 4096,
+              "framerate", GST_TYPE_FRACTION_RANGE,
+              0, 1, G_MAXINT, 1,
+              "mpegversion", GST_TYPE_INT_RANGE, 1, 2,
+              "systemstream", G_TYPE_BOOLEAN, FALSE,
+              "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+
+          encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
+        } else {
+          GST_WARNING ("Unsupported mimetype '%s'", type->mime);
+        }
+      }
+    }
+  }
+}
+
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
     androidmedia,
diff --git a/sys/androidmedia/gstamc.h b/sys/androidmedia/gstamc.h
index b48a3ee..7fcae1e 100644
--- a/sys/androidmedia/gstamc.h
+++ b/sys/androidmedia/gstamc.h
@@ -34,6 +34,7 @@
 typedef struct _GstAmcBufferInfo GstAmcBufferInfo;
 typedef struct _GstAmcFormat GstAmcFormat;
 typedef struct _GstAmcBuffer GstAmcBuffer;
+typedef struct _GstAmcColorFormatInfo GstAmcColorFormatInfo;
 
 struct _GstAmcCodecType {
   gchar *mime;
@@ -80,47 +81,70 @@
 
 extern GQuark gst_amc_codec_info_quark;
 
-GstAmcCodec * gst_amc_codec_new (const gchar *name);
+GstAmcCodec * gst_amc_codec_new (const gchar *name, GError **err);
 void gst_amc_codec_free (GstAmcCodec * codec);
 
-gboolean gst_amc_codec_configure (GstAmcCodec * codec, GstAmcFormat * format, gint flags);
-GstAmcFormat * gst_amc_codec_get_output_format (GstAmcCodec * codec);
+gboolean gst_amc_codec_configure (GstAmcCodec * codec, GstAmcFormat * format, gint flags, GError **err);
+GstAmcFormat * gst_amc_codec_get_output_format (GstAmcCodec * codec, GError **err);
 
-gboolean gst_amc_codec_start (GstAmcCodec * codec);
-gboolean gst_amc_codec_stop (GstAmcCodec * codec);
-gboolean gst_amc_codec_flush (GstAmcCodec * codec);
-gboolean gst_amc_codec_release (GstAmcCodec * codec);
+gboolean gst_amc_codec_start (GstAmcCodec * codec, GError **err);
+gboolean gst_amc_codec_stop (GstAmcCodec * codec, GError **err);
+gboolean gst_amc_codec_flush (GstAmcCodec * codec, GError **err);
+gboolean gst_amc_codec_release (GstAmcCodec * codec, GError **err);
 
-GstAmcBuffer * gst_amc_codec_get_output_buffers (GstAmcCodec * codec, gsize * n_buffers);
-GstAmcBuffer * gst_amc_codec_get_input_buffers (GstAmcCodec * codec, gsize * n_buffers);
+GstAmcBuffer * gst_amc_codec_get_output_buffers (GstAmcCodec * codec, gsize * n_buffers, GError **err);
+GstAmcBuffer * gst_amc_codec_get_input_buffers (GstAmcCodec * codec, gsize * n_buffers, GError **err);
 void gst_amc_codec_free_buffers (GstAmcBuffer * buffers, gsize n_buffers);
 
-gint gst_amc_codec_dequeue_input_buffer (GstAmcCodec * codec, gint64 timeoutUs);
-gint gst_amc_codec_dequeue_output_buffer (GstAmcCodec * codec, GstAmcBufferInfo *info, gint64 timeoutUs);
+gint gst_amc_codec_dequeue_input_buffer (GstAmcCodec * codec, gint64 timeoutUs, GError **err);
+gint gst_amc_codec_dequeue_output_buffer (GstAmcCodec * codec, GstAmcBufferInfo *info, gint64 timeoutUs, GError **err);
 
-gboolean gst_amc_codec_queue_input_buffer (GstAmcCodec * codec, gint index, const GstAmcBufferInfo *info);
-gboolean gst_amc_codec_release_output_buffer (GstAmcCodec * codec, gint index);
+gboolean gst_amc_codec_queue_input_buffer (GstAmcCodec * codec, gint index, const GstAmcBufferInfo *info, GError **err);
+gboolean gst_amc_codec_release_output_buffer (GstAmcCodec * codec, gint index, GError **err);
 
 
-GstAmcFormat * gst_amc_format_new_audio (const gchar *mime, gint sample_rate, gint channels);
-GstAmcFormat * gst_amc_format_new_video (const gchar *mime, gint width, gint height);
+GstAmcFormat * gst_amc_format_new_audio (const gchar *mime, gint sample_rate, gint channels, GError **err);
+GstAmcFormat * gst_amc_format_new_video (const gchar *mime, gint width, gint height, GError **err);
 void gst_amc_format_free (GstAmcFormat * format);
 
-gchar * gst_amc_format_to_string (GstAmcFormat * format);
+gchar * gst_amc_format_to_string (GstAmcFormat * format, GError **err);
 
-gboolean gst_amc_format_contains_key (GstAmcFormat *format, const gchar *key);
+gboolean gst_amc_format_contains_key (GstAmcFormat *format, const gchar *key, GError **err);
 
-gboolean gst_amc_format_get_float (GstAmcFormat *format, const gchar *key, gfloat *value);
-void gst_amc_format_set_float (GstAmcFormat *format, const gchar *key, gfloat value);
-gboolean gst_amc_format_get_int (GstAmcFormat *format, const gchar *key, gint *value);
-void gst_amc_format_set_int (GstAmcFormat *format, const gchar *key, gint value);
-gboolean gst_amc_format_get_string (GstAmcFormat *format, const gchar *key, gchar **value);
-void gst_amc_format_set_string (GstAmcFormat *format, const gchar *key, const gchar *value);
-gboolean gst_amc_format_get_buffer (GstAmcFormat *format, const gchar *key, guint8 **data, gsize *size);
-void gst_amc_format_set_buffer (GstAmcFormat *format, const gchar *key, guint8 *data, gsize size);
+gboolean gst_amc_format_get_float (GstAmcFormat *format, const gchar *key, gfloat *value, GError **err);
+void gst_amc_format_set_float (GstAmcFormat *format, const gchar *key, gfloat value, GError **err);
+gboolean gst_amc_format_get_int (GstAmcFormat *format, const gchar *key, gint *value, GError **err);
+void gst_amc_format_set_int (GstAmcFormat *format, const gchar *key, gint value, GError **err);
+gboolean gst_amc_format_get_string (GstAmcFormat *format, const gchar *key, gchar **value, GError **err);
+void gst_amc_format_set_string (GstAmcFormat *format, const gchar *key, const gchar *value, GError **err);
+gboolean gst_amc_format_get_buffer (GstAmcFormat *format, const gchar *key, guint8 **data, gsize *size, GError **err);
+void gst_amc_format_set_buffer (GstAmcFormat *format, const gchar *key, guint8 *data, gsize size, GError **err);
 
-GstVideoFormat gst_amc_color_format_to_video_format (gint color_format);
-gint gst_amc_video_format_to_color_format (GstVideoFormat video_format);
+GstVideoFormat gst_amc_color_format_to_video_format (const GstAmcCodecInfo * codec_info, const gchar * mime, gint color_format);
+gint gst_amc_video_format_to_color_format (const GstAmcCodecInfo * codec_info, const gchar * mime, GstVideoFormat video_format);
+
+struct _GstAmcColorFormatInfo {
+  gint color_format;
+  gint width, height, stride, slice_height;
+  gint crop_left, crop_right;
+  gint crop_top, crop_bottom;
+  gint frame_size;
+};
+
+gboolean gst_amc_color_format_info_set (GstAmcColorFormatInfo * color_format_info,
+    const GstAmcCodecInfo * codec_info, const gchar * mime,
+    gint color_format, gint width, gint height, gint stride, gint slice_height,
+    gint crop_left, gint crop_right, gint crop_top, gint crop_bottom);
+
+typedef enum
+{
+  COLOR_FORMAT_COPY_OUT,
+  COLOR_FORMAT_COPY_IN
+} GstAmcColorFormatCopyDirection;
+
+gboolean gst_amc_color_format_copy (
+    GstAmcColorFormatInfo * cinfo, GstAmcBuffer * cbuffer, const GstAmcBufferInfo * cbuffer_info,
+    GstVideoInfo * vinfo, GstBuffer * vbuffer, GstAmcColorFormatCopyDirection direction);
 
 const gchar * gst_amc_avc_profile_to_string (gint profile, const gchar **alternative);
 gint gst_amc_avc_profile_from_string (const gchar *profile);
@@ -139,6 +163,25 @@
 
 gboolean gst_amc_audio_channel_mask_to_positions (guint32 channel_mask, gint channels, GstAudioChannelPosition *pos);
 guint32 gst_amc_audio_channel_mask_from_positions (GstAudioChannelPosition *positions, gint channels);
+void gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info, GstCaps **sink_caps, GstCaps **src_caps);
+
+#define GST_ELEMENT_ERROR_FROM_ERROR(el, err) G_STMT_START { \
+  gchar *__dbg = g_strdup (err->message);                               \
+  GST_WARNING_OBJECT (el, "error: %s", __dbg);                          \
+  gst_element_message_full (GST_ELEMENT(el), GST_MESSAGE_ERROR,         \
+    err->domain, err->code,                                             \
+    NULL, __dbg, __FILE__, GST_FUNCTION, __LINE__);                     \
+  g_clear_error (&err); \
+} G_STMT_END
+
+#define GST_ELEMENT_WARNING_FROM_ERROR(el, err) G_STMT_START { \
+  gchar *__dbg = g_strdup (err->message);                               \
+  GST_WARNING_OBJECT (el, "error: %s", __dbg);                          \
+  gst_element_message_full (GST_ELEMENT(el), GST_MESSAGE_WARNING,       \
+    err->domain, err->code,                                             \
+    NULL, __dbg, __FILE__, GST_FUNCTION, __LINE__);                     \
+  g_clear_error (&err); \
+} G_STMT_END
 
 G_END_DECLS
 
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c
index f8649e8..5174ea9 100644
--- a/sys/androidmedia/gstamcaudiodec.c
+++ b/sys/androidmedia/gstamcaudiodec.c
@@ -106,134 +106,6 @@
   return type;
 }
 
-static GstCaps *
-create_sink_caps (const GstAmcCodecInfo * codec_info)
-{
-  GstCaps *ret;
-  gint i;
-
-  ret = gst_caps_new_empty ();
-
-  for (i = 0; i < codec_info->n_supported_types; i++) {
-    const GstAmcCodecType *type = &codec_info->supported_types[i];
-
-    if (strcmp (type->mime, "audio/mpeg") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/mpeg",
-          "mpegversion", G_TYPE_INT, 1,
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/3gpp") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/AMR",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/amr-wb") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/AMR-WB",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/mp4a-latm") == 0) {
-      gint j;
-      GstStructure *tmp, *tmp2;
-      gboolean have_profile = FALSE;
-      GValue va = { 0, };
-      GValue v = { 0, };
-
-      g_value_init (&va, GST_TYPE_LIST);
-      g_value_init (&v, G_TYPE_STRING);
-      g_value_set_string (&v, "raw");
-      gst_value_list_append_value (&va, &v);
-      g_value_set_string (&v, "adts");
-      gst_value_list_append_value (&va, &v);
-      g_value_unset (&v);
-
-      tmp = gst_structure_new ("audio/mpeg",
-          "mpegversion", G_TYPE_INT, 4,
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "framed", G_TYPE_BOOLEAN, TRUE, NULL);
-      gst_structure_set_value (tmp, "stream-format", &va);
-      g_value_unset (&va);
-
-      for (j = 0; j < type->n_profile_levels; j++) {
-        const gchar *profile;
-
-        profile =
-            gst_amc_aac_profile_to_string (type->profile_levels[j].profile);
-
-        if (!profile) {
-          GST_ERROR ("Unable to map AAC profile 0x%08x",
-              type->profile_levels[j].profile);
-          continue;
-        }
-
-        tmp2 = gst_structure_copy (tmp);
-        gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
-        ret = gst_caps_merge_structure (ret, tmp2);
-
-        have_profile = TRUE;
-      }
-
-      if (!have_profile) {
-        ret = gst_caps_merge_structure (ret, tmp);
-      } else {
-        gst_structure_free (tmp);
-      }
-    } else if (strcmp (type->mime, "audio/g711-alaw") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/x-alaw",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/g711-mlaw") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/x-mulaw",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/vorbis") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/x-vorbis",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/flac") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/x-flac",
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "framed", G_TYPE_BOOLEAN, TRUE, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "audio/mpeg-L2") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("audio/mpeg",
-          "mpegversion", G_TYPE_INT, 1,
-          "layer", G_TYPE_INT, 2,
-          "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else {
-      GST_WARNING ("Unsupported mimetype '%s'", type->mime);
-    }
-  }
-
-  return ret;
-}
-
 static const gchar *
 caps_to_mime (GstCaps * caps)
 {
@@ -277,19 +149,6 @@
   return NULL;
 }
 
-static GstCaps *
-create_src_caps (const GstAmcCodecInfo * codec_info)
-{
-  GstCaps *ret;
-
-  ret = gst_caps_new_simple ("audio/x-raw",
-      "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-      "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-      "format", G_TYPE_STRING, GST_AUDIO_NE (S16), NULL);
-
-  return ret;
-}
-
 static void
 gst_amc_audio_dec_base_init (gpointer g_class)
 {
@@ -297,7 +156,7 @@
   GstAmcAudioDecClass *amcaudiodec_class = GST_AMC_AUDIO_DEC_CLASS (g_class);
   const GstAmcCodecInfo *codec_info;
   GstPadTemplate *templ;
-  GstCaps *caps;
+  GstCaps *sink_caps, *src_caps;
   gchar *longname;
 
   codec_info =
@@ -308,16 +167,16 @@
 
   amcaudiodec_class->codec_info = codec_info;
 
+  gst_amc_codec_info_to_caps (codec_info, &sink_caps, &src_caps);
   /* Add pad templates */
-  caps = create_sink_caps (codec_info);
-  templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps);
+  templ =
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps);
   gst_element_class_add_pad_template (element_class, templ);
-  gst_caps_unref (caps);
+  gst_caps_unref (sink_caps);
 
-  caps = create_src_caps (codec_info);
-  templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps);
+  templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps);
   gst_element_class_add_pad_template (element_class, templ);
-  gst_caps_unref (caps);
+  gst_caps_unref (src_caps);
 
   longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name);
   gst_element_class_set_metadata (element_class,
@@ -366,12 +225,15 @@
 {
   GstAmcAudioDec *self = GST_AMC_AUDIO_DEC (decoder);
   GstAmcAudioDecClass *klass = GST_AMC_AUDIO_DEC_GET_CLASS (self);
+  GError *err = NULL;
 
   GST_DEBUG_OBJECT (self, "Opening decoder");
 
-  self->codec = gst_amc_codec_new (klass->codec_info->name);
-  if (!self->codec)
+  self->codec = gst_amc_codec_new (klass->codec_info->name, &err);
+  if (!self->codec) {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
+  }
   self->started = FALSE;
   self->flushing = TRUE;
 
@@ -387,8 +249,15 @@
 
   GST_DEBUG_OBJECT (self, "Closing decoder");
 
-  if (self->codec)
+  if (self->codec) {
+    GError *err = NULL;
+
+    gst_amc_codec_release (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+
     gst_amc_codec_free (self->codec);
+  }
   self->codec = NULL;
 
   self->started = FALSE;
@@ -415,6 +284,7 @@
 {
   GstAmcAudioDec *self;
   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  GError *err = NULL;
 
   g_return_val_if_fail (GST_IS_AMC_AUDIO_DEC (element),
       GST_STATE_CHANGE_FAILURE);
@@ -432,7 +302,9 @@
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       self->flushing = TRUE;
-      gst_amc_codec_flush (self->codec);
+      gst_amc_codec_flush (self->codec, &err);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       g_mutex_lock (&self->drain_lock);
       self->draining = FALSE;
       g_cond_broadcast (&self->drain_cond);
@@ -472,10 +344,13 @@
   gint rate, channels;
   guint32 channel_mask = 0;
   GstAudioChannelPosition to[64];
+  GError *err = NULL;
 
-  if (!gst_amc_format_get_int (format, "sample-rate", &rate) ||
-      !gst_amc_format_get_int (format, "channel-count", &channels)) {
-    GST_ERROR_OBJECT (self, "Failed to get output format metadata");
+  if (!gst_amc_format_get_int (format, "sample-rate", &rate, &err) ||
+      !gst_amc_format_get_int (format, "channel-count", &channels, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to get output format metadata: %s",
+        err->message);
+    g_clear_error (&err);
     return FALSE;
   }
 
@@ -485,8 +360,9 @@
   }
 
   /* Not always present */
-  if (gst_amc_format_contains_key (format, "channel-mask"))
-    gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask);
+  if (gst_amc_format_contains_key (format, "channel-mask", NULL))
+    gst_amc_format_get_int (format, "channel-mask", (gint *) & channel_mask,
+        NULL);
 
   gst_amc_audio_channel_mask_to_positions (channel_mask, channels,
       self->positions);
@@ -519,6 +395,7 @@
   gboolean is_eos;
   GstAmcBufferInfo buffer_info;
   gint idx;
+  GError *err = NULL;
 
   GST_AUDIO_DECODER_STREAM_LOCK (self);
 
@@ -530,13 +407,17 @@
   GST_AUDIO_DECODER_STREAM_UNLOCK (self);
   /* Wait at most 100ms here, some codecs don't fail dequeueing if
    * the codec is flushing, causing deadlocks during shutdown */
-  idx = gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info, 100000);
+  idx =
+      gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info, 100000,
+      &err);
   GST_AUDIO_DECODER_STREAM_LOCK (self);
   /*} */
 
   if (idx < 0) {
-    if (self->flushing)
+    if (self->flushing) {
+      g_clear_error (&err);
       goto flushing;
+    }
 
     switch (idx) {
       case INFO_OUTPUT_BUFFERS_CHANGED:{
@@ -546,7 +427,7 @@
               self->n_output_buffers);
         self->output_buffers =
             gst_amc_codec_get_output_buffers (self->codec,
-            &self->n_output_buffers);
+            &self->n_output_buffers, &err);
         if (!self->output_buffers)
           goto get_output_buffers_error;
         break;
@@ -557,11 +438,15 @@
 
         GST_DEBUG_OBJECT (self, "Output format has changed");
 
-        format = gst_amc_codec_get_output_format (self->codec);
+        format = gst_amc_codec_get_output_format (self->codec, &err);
         if (!format)
           goto format_error;
 
-        format_string = gst_amc_format_to_string (format);
+        format_string = gst_amc_format_to_string (format, &err);
+        if (err) {
+          gst_amc_format_free (format);
+          goto format_error;
+        }
         GST_DEBUG_OBJECT (self, "Got new output format: %s", format_string);
         g_free (format_string);
 
@@ -576,7 +461,7 @@
               self->n_output_buffers);
         self->output_buffers =
             gst_amc_codec_get_output_buffers (self->codec,
-            &self->n_output_buffers);
+            &self->n_output_buffers, &err);
         if (!self->output_buffers)
           goto get_output_buffers_error;
 
@@ -677,8 +562,13 @@
   }
 
 done:
-  if (!gst_amc_codec_release_output_buffer (self->codec, idx))
+  if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
+    if (self->flushing) {
+      g_clear_error (&err);
+      goto flushing;
+    }
     goto failed_release;
+  }
 
   if (is_eos || flow_ret == GST_FLOW_EOS) {
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
@@ -708,8 +598,7 @@
 
 dequeue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to dequeue output buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -719,8 +608,7 @@
 
 get_output_buffers_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to get output buffers"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -730,8 +618,11 @@
 
 format_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to handle format"));
+    if (err)
+      GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    else
+      GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
+          ("Failed to handle format"));
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -740,8 +631,7 @@
   }
 failed_release:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to release output buffer index %d", idx));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -793,7 +683,10 @@
   {
     GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
         ("Invalid buffer size %u (bfp %d)", buffer_info.size, self->info.bpf));
-    gst_amc_codec_release_output_buffer (self->codec, idx);
+    gst_amc_codec_release_output_buffer (self->codec, idx, &err);
+    if (err && !self->flushing)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    g_clear_error (&err);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -805,7 +698,10 @@
   {
     GST_ELEMENT_ERROR (self, LIBRARY, SETTINGS, (NULL),
         ("Failed to allocate output buffer"));
-    gst_amc_codec_release_output_buffer (self->codec, idx);
+    gst_amc_codec_release_output_buffer (self->codec, idx, &err);
+    if (err && !self->flushing)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    g_clear_error (&err);
     gst_pad_push_event (GST_AUDIO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_AUDIO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -833,13 +729,18 @@
 gst_amc_audio_dec_stop (GstAudioDecoder * decoder)
 {
   GstAmcAudioDec *self;
+  GError *err = NULL;
 
   self = GST_AMC_AUDIO_DEC (decoder);
   GST_DEBUG_OBJECT (self, "Stopping decoder");
   self->flushing = TRUE;
   if (self->started) {
-    gst_amc_codec_flush (self->codec);
-    gst_amc_codec_stop (self->codec);
+    gst_amc_codec_flush (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    gst_amc_codec_stop (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     self->started = FALSE;
     if (self->input_buffers)
       gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
@@ -878,6 +779,7 @@
   gboolean needs_disable = FALSE;
   gchar *format_string;
   gint rate, channels;
+  GError *err = NULL;
 
   self = GST_AMC_AUDIO_DEC (decoder);
 
@@ -933,9 +835,9 @@
     return FALSE;
   }
 
-  format = gst_amc_format_new_audio (mime, rate, channels);
+  format = gst_amc_format_new_audio (mime, rate, channels, &err);
   if (!format) {
-    GST_ERROR_OBJECT (self, "Failed to create audio format");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
@@ -952,7 +854,9 @@
     gst_buffer_map (codec_data, &minfo, GST_MAP_READ);
     data = g_memdup (minfo.data, minfo.size);
     self->codec_datas = g_list_prepend (self->codec_datas, data);
-    gst_amc_format_set_buffer (format, "csd-0", data, minfo.size);
+    gst_amc_format_set_buffer (format, "csd-0", data, minfo.size, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     gst_buffer_unmap (codec_data, &minfo);
   } else if (gst_structure_has_field (s, "streamheader")) {
     const GValue *sh = gst_structure_get_value (s, "streamheader");
@@ -982,36 +886,45 @@
       gst_buffer_map (buf, &minfo, GST_MAP_READ);
       data = g_memdup (minfo.data, minfo.size);
       self->codec_datas = g_list_prepend (self->codec_datas, data);
-      gst_amc_format_set_buffer (format, fname, data, minfo.size);
+      gst_amc_format_set_buffer (format, fname, data, minfo.size, &err);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       gst_buffer_unmap (buf, &minfo);
       g_free (fname);
       j++;
     }
   }
 
-  format_string = gst_amc_format_to_string (format);
-  GST_DEBUG_OBJECT (self, "Configuring codec with format: %s", format_string);
+  format_string = gst_amc_format_to_string (format, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  GST_DEBUG_OBJECT (self, "Configuring codec with format: %s",
+      GST_STR_NULL (format_string));
   g_free (format_string);
 
   self->n_buffers = 0;
-  if (!gst_amc_codec_configure (self->codec, format, 0)) {
+  if (!gst_amc_codec_configure (self->codec, format, 0, &err)) {
     GST_ERROR_OBJECT (self, "Failed to configure codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
   gst_amc_format_free (format);
 
-  if (!gst_amc_codec_start (self->codec)) {
+  if (!gst_amc_codec_start (self->codec, &err)) {
     GST_ERROR_OBJECT (self, "Failed to start codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
   if (self->input_buffers)
     gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
   self->input_buffers =
-      gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers);
+      gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers,
+      &err);
   if (!self->input_buffers) {
     GST_ERROR_OBJECT (self, "Failed to get input buffers");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
@@ -1051,6 +964,7 @@
 gst_amc_audio_dec_flush (GstAudioDecoder * decoder, gboolean hard)
 {
   GstAmcAudioDec *self;
+  GError *err = NULL;
 
   self = GST_AMC_AUDIO_DEC (decoder);
 
@@ -1069,7 +983,9 @@
   GST_PAD_STREAM_LOCK (GST_AUDIO_DECODER_SRC_PAD (self));
   GST_PAD_STREAM_UNLOCK (GST_AUDIO_DECODER_SRC_PAD (self));
   GST_AUDIO_DECODER_STREAM_LOCK (self);
-  gst_amc_codec_flush (self->codec);
+  gst_amc_codec_flush (self->codec, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
   self->flushing = FALSE;
 
   /* Start the srcpad loop again */
@@ -1092,6 +1008,7 @@
   guint offset = 0;
   GstClockTime timestamp, duration, timestamp_offset = 0;
   GstMapInfo minfo;
+  GError *err = NULL;
 
   memset (&minfo, 0, sizeof (minfo));
 
@@ -1140,12 +1057,15 @@
     GST_AUDIO_DECODER_STREAM_UNLOCK (self);
     /* Wait at most 100ms here, some codecs don't fail dequeueing if
      * the codec is flushing, causing deadlocks during shutdown */
-    idx = gst_amc_codec_dequeue_input_buffer (self->codec, 100000);
+    idx = gst_amc_codec_dequeue_input_buffer (self->codec, 100000, &err);
     GST_AUDIO_DECODER_STREAM_LOCK (self);
 
     if (idx < 0) {
-      if (self->flushing)
+      if (self->flushing || self->downstream_flow_ret == GST_FLOW_FLUSHING) {
+        g_clear_error (&err);
         goto flushing;
+      }
+
       switch (idx) {
         case INFO_TRY_AGAIN_LATER:
           GST_DEBUG_OBJECT (self, "Dequeueing input buffer timed out");
@@ -1165,12 +1085,18 @@
     if (idx >= self->n_input_buffers)
       goto invalid_buffer_index;
 
-    if (self->flushing)
+    if (self->flushing) {
+      memset (&buffer_info, 0, sizeof (buffer_info));
+      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, NULL);
       goto flushing;
+    }
 
     if (self->downstream_flow_ret != GST_FLOW_OK) {
       memset (&buffer_info, 0, sizeof (buffer_info));
-      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info);
+      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err);
+      if (err && !self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
       goto downstream_error;
     }
 
@@ -1210,8 +1136,14 @@
         "Queueing buffer %d: size %d time %" G_GINT64_FORMAT " flags 0x%08x",
         idx, buffer_info.size, buffer_info.presentation_time_us,
         buffer_info.flags);
-    if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info))
+    if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info,
+            &err)) {
+      if (self->flushing) {
+        g_clear_error (&err);
+        goto flushing;
+      }
       goto queue_error;
+    }
   }
   gst_buffer_unmap (inbuf, &minfo);
   gst_buffer_unref (inbuf);
@@ -1240,8 +1172,7 @@
   }
 dequeue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to dequeue input buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (inbuf, &minfo);
     if (inbuf)
@@ -1250,8 +1181,7 @@
   }
 queue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to queue input buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (inbuf, &minfo);
     if (inbuf)
@@ -1274,6 +1204,7 @@
 {
   GstFlowReturn ret;
   gint idx;
+  GError *err = NULL;
 
   GST_DEBUG_OBJECT (self, "Draining codec");
   if (!self->started) {
@@ -1295,7 +1226,7 @@
    * class drop the EOS event. We will send it later when
    * the EOS buffer arrives on the output port.
    * Wait at most 0.5s here. */
-  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
+  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000, &err);
   GST_AUDIO_DECODER_STREAM_LOCK (self);
 
   if (idx >= 0 && idx < self->n_input_buffers) {
@@ -1311,14 +1242,20 @@
         gst_util_uint64_scale (self->last_upstream_ts, 1, GST_USECOND);
     buffer_info.flags |= BUFFER_FLAG_END_OF_STREAM;
 
-    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info)) {
+    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
       GST_DEBUG_OBJECT (self, "Waiting until codec is drained");
       g_cond_wait (&self->drain_cond, &self->drain_lock);
       GST_DEBUG_OBJECT (self, "Drained codec");
       ret = GST_FLOW_OK;
     } else {
       GST_ERROR_OBJECT (self, "Failed to queue input buffer");
-      ret = GST_FLOW_ERROR;
+      if (self->flushing) {
+        g_clear_error (&err);
+        ret = GST_FLOW_FLUSHING;
+      } else {
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+        ret = GST_FLOW_ERROR;
+      }
     }
 
     g_mutex_unlock (&self->drain_lock);
@@ -1329,6 +1266,8 @@
     ret = GST_FLOW_ERROR;
   } else {
     GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     ret = GST_FLOW_ERROR;
   }
 
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index 00b237a..dc9a5cd 100644
--- a/sys/androidmedia/gstamcvideodec.c
+++ b/sys/androidmedia/gstamcvideodec.c
@@ -135,179 +135,6 @@
   return type;
 }
 
-static GstCaps *
-create_sink_caps (const GstAmcCodecInfo * codec_info)
-{
-  GstCaps *ret;
-  gint i;
-
-  ret = gst_caps_new_empty ();
-
-  for (i = 0; i < codec_info->n_supported_types; i++) {
-    const GstAmcCodecType *type = &codec_info->supported_types[i];
-
-    if (strcmp (type->mime, "video/mp4v-es") == 0) {
-      gint j;
-      GstStructure *tmp, *tmp2;
-      gboolean have_profile_level = FALSE;
-
-      tmp = gst_structure_new ("video/mpeg",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE,
-          0, 1, G_MAXINT, 1,
-          "mpegversion", G_TYPE_INT, 4,
-          "systemstream", G_TYPE_BOOLEAN, FALSE,
-          "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
-
-      if (type->n_profile_levels) {
-        for (j = type->n_profile_levels - 1; j >= 0; j--) {
-          const gchar *profile;
-
-          profile =
-              gst_amc_mpeg4_profile_to_string (type->profile_levels[j].profile);
-          if (!profile) {
-            GST_ERROR ("Unable to map MPEG4 profile 0x%08x",
-                type->profile_levels[j].profile);
-            continue;
-          }
-
-          tmp2 = gst_structure_copy (tmp);
-          gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
-          ret = gst_caps_merge_structure (ret, tmp2);
-          have_profile_level = TRUE;
-        }
-      }
-
-      if (!have_profile_level) {
-        ret = gst_caps_merge_structure (ret, tmp);
-      } else {
-        gst_structure_free (tmp);
-      }
-
-      tmp = gst_structure_new ("video/x-divx",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE,
-          0, 1, G_MAXINT, 1,
-          "divxversion", GST_TYPE_INT_RANGE, 3, 5,
-          "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "video/3gpp") == 0) {
-      gint j;
-      GstStructure *tmp, *tmp2;
-      gboolean have_profile_level = FALSE;
-
-      tmp = gst_structure_new ("video/x-h263",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE,
-          0, 1, G_MAXINT, 1,
-          "parsed", G_TYPE_BOOLEAN, TRUE,
-          "variant", G_TYPE_STRING, "itu", NULL);
-
-      if (type->n_profile_levels) {
-        for (j = type->n_profile_levels - 1; j >= 0; j--) {
-          gint profile;
-
-          profile =
-              gst_amc_h263_profile_to_gst_id (type->profile_levels[j].profile);
-
-          if (profile == -1) {
-            GST_ERROR ("Unable to map h263 profile 0x%08x",
-                type->profile_levels[j].profile);
-            continue;
-          }
-
-          tmp2 = gst_structure_copy (tmp);
-          gst_structure_set (tmp2, "profile", G_TYPE_UINT, profile, NULL);
-          ret = gst_caps_merge_structure (ret, tmp2);
-          have_profile_level = TRUE;
-        }
-      }
-
-      if (!have_profile_level) {
-        ret = gst_caps_merge_structure (ret, tmp);
-      } else {
-        gst_structure_free (tmp);
-      }
-    } else if (strcmp (type->mime, "video/avc") == 0) {
-      gint j;
-      GstStructure *tmp, *tmp2;
-      gboolean have_profile_level = FALSE;
-
-      tmp = gst_structure_new ("video/x-h264",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE,
-          0, 1, G_MAXINT, 1,
-          "parsed", G_TYPE_BOOLEAN, TRUE,
-          "stream-format", G_TYPE_STRING, "byte-stream",
-          "alignment", G_TYPE_STRING, "au", NULL);
-
-      if (type->n_profile_levels) {
-        for (j = type->n_profile_levels - 1; j >= 0; j--) {
-          const gchar *profile, *alternative = NULL;
-
-          profile =
-              gst_amc_avc_profile_to_string (type->profile_levels[j].profile,
-              &alternative);
-
-          if (!profile) {
-            GST_ERROR ("Unable to map H264 profile 0x%08x",
-                type->profile_levels[j].profile);
-            continue;
-          }
-
-          tmp2 = gst_structure_copy (tmp);
-          gst_structure_set (tmp2, "profile", G_TYPE_STRING, profile, NULL);
-          ret = gst_caps_merge_structure (ret, tmp2);
-
-          if (alternative) {
-            tmp2 = gst_structure_copy (tmp);
-            gst_structure_set (tmp2, "profile", G_TYPE_STRING, alternative,
-                NULL);
-            ret = gst_caps_merge_structure (ret, tmp2);
-          }
-          have_profile_level = TRUE;
-        }
-      }
-
-      if (!have_profile_level) {
-        ret = gst_caps_merge_structure (ret, tmp);
-      } else {
-        gst_structure_free (tmp);
-      }
-    } else if (strcmp (type->mime, "video/x-vnd.on2.vp8") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("video/x-vp8",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else if (strcmp (type->mime, "video/mpeg2") == 0) {
-      GstStructure *tmp;
-
-      tmp = gst_structure_new ("video/mpeg",
-          "width", GST_TYPE_INT_RANGE, 16, 4096,
-          "height", GST_TYPE_INT_RANGE, 16, 4096,
-          "framerate", GST_TYPE_FRACTION_RANGE,
-          0, 1, G_MAXINT, 1,
-          "mpegversion", GST_TYPE_INT_RANGE, 1, 2,
-          "systemstream", G_TYPE_BOOLEAN, FALSE,
-          "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
-
-      ret = gst_caps_merge_structure (ret, tmp);
-    } else {
-      GST_WARNING ("Unsupported mimetype '%s'", type->mime);
-    }
-  }
-
-  return ret;
-}
-
 static const gchar *
 caps_to_mime (GstCaps * caps)
 {
@@ -343,40 +170,6 @@
   return NULL;
 }
 
-static GstCaps *
-create_src_caps (const GstAmcCodecInfo * codec_info)
-{
-  GstCaps *ret;
-  gint i;
-
-  ret = gst_caps_new_empty ();
-
-  for (i = 0; i < codec_info->n_supported_types; i++) {
-    const GstAmcCodecType *type = &codec_info->supported_types[i];
-    gint j;
-
-    for (j = 0; j < type->n_color_formats; j++) {
-      GstVideoFormat format;
-      GstCaps *tmp;
-
-      format = gst_amc_color_format_to_video_format (type->color_formats[j]);
-      if (format == GST_VIDEO_FORMAT_UNKNOWN) {
-        GST_WARNING ("Unknown color format 0x%08x", type->color_formats[j]);
-        continue;
-      }
-
-      tmp = gst_caps_new_simple ("video/x-raw",
-          "format", G_TYPE_STRING, gst_video_format_to_string (format),
-          "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
-          "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
-      ret = gst_caps_merge (ret, tmp);
-    }
-  }
-
-  return ret;
-}
-
 static void
 gst_amc_video_dec_base_init (gpointer g_class)
 {
@@ -384,7 +177,7 @@
   GstAmcVideoDecClass *amcvideodec_class = GST_AMC_VIDEO_DEC_CLASS (g_class);
   const GstAmcCodecInfo *codec_info;
   GstPadTemplate *templ;
-  GstCaps *caps;
+  GstCaps *sink_caps, *src_caps;
   gchar *longname;
 
   codec_info =
@@ -395,16 +188,16 @@
 
   amcvideodec_class->codec_info = codec_info;
 
+  gst_amc_codec_info_to_caps (codec_info, &sink_caps, &src_caps);
   /* Add pad templates */
-  caps = create_sink_caps (codec_info);
-  templ = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps);
+  templ =
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps);
   gst_element_class_add_pad_template (element_class, templ);
-  gst_caps_unref (caps);
+  gst_caps_unref (sink_caps);
 
-  caps = create_src_caps (codec_info);
-  templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, caps);
+  templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps);
   gst_element_class_add_pad_template (element_class, templ);
-  gst_caps_unref (caps);
+  gst_caps_unref (src_caps);
 
   longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name);
   gst_element_class_set_metadata (element_class,
@@ -456,12 +249,15 @@
 {
   GstAmcVideoDec *self = GST_AMC_VIDEO_DEC (decoder);
   GstAmcVideoDecClass *klass = GST_AMC_VIDEO_DEC_GET_CLASS (self);
+  GError *err = NULL;
 
   GST_DEBUG_OBJECT (self, "Opening decoder");
 
-  self->codec = gst_amc_codec_new (klass->codec_info->name);
-  if (!self->codec)
+  self->codec = gst_amc_codec_new (klass->codec_info->name, &err);
+  if (!self->codec) {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
+  }
   self->started = FALSE;
   self->flushing = TRUE;
 
@@ -477,8 +273,15 @@
 
   GST_DEBUG_OBJECT (self, "Closing decoder");
 
-  if (self->codec)
+  if (self->codec) {
+    GError *err = NULL;
+
+    gst_amc_codec_release (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+
     gst_amc_codec_free (self->codec);
+  }
   self->codec = NULL;
 
   self->started = FALSE;
@@ -505,6 +308,7 @@
 {
   GstAmcVideoDec *self;
   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  GError *err = NULL;
 
   g_return_val_if_fail (GST_IS_AMC_VIDEO_DEC (element),
       GST_STATE_CHANGE_FAILURE);
@@ -522,7 +326,9 @@
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       self->flushing = TRUE;
-      gst_amc_codec_flush (self->codec);
+      gst_amc_codec_flush (self->codec, &err);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
       g_mutex_lock (&self->drain_lock);
       self->draining = FALSE;
       g_cond_broadcast (&self->drain_cond);
@@ -648,35 +454,38 @@
 gst_amc_video_dec_set_src_caps (GstAmcVideoDec * self, GstAmcFormat * format)
 {
   GstVideoCodecState *output_state;
+  const gchar *mime;
   gint color_format, width, height;
   gint stride, slice_height;
   gint crop_left, crop_right;
   gint crop_top, crop_bottom;
   GstVideoFormat gst_format;
   GstAmcVideoDecClass *klass = GST_AMC_VIDEO_DEC_GET_CLASS (self);
+  GError *err = NULL;
 
-  if (!gst_amc_format_get_int (format, "color-format", &color_format) ||
-      !gst_amc_format_get_int (format, "width", &width) ||
-      !gst_amc_format_get_int (format, "height", &height)) {
-    GST_ERROR_OBJECT (self, "Failed to get output format metadata");
+  if (!gst_amc_format_get_int (format, "color-format", &color_format, &err) ||
+      !gst_amc_format_get_int (format, "width", &width, &err) ||
+      !gst_amc_format_get_int (format, "height", &height, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to get output format metadata: %s",
+        err->message);
+    g_clear_error (&err);
     return FALSE;
   }
 
-  if (strcmp (klass->codec_info->name, "OMX.k3.video.decoder.avc") == 0 &&
-      color_format == COLOR_FormatYCbYCr)
-    color_format = COLOR_TI_FormatYUV420PackedSemiPlanar;
-
-  if (!gst_amc_format_get_int (format, "stride", &stride) ||
-      !gst_amc_format_get_int (format, "slice-height", &slice_height)) {
-    GST_ERROR_OBJECT (self, "Failed to get stride and slice-height");
+  if (!gst_amc_format_get_int (format, "stride", &stride, &err) ||
+      !gst_amc_format_get_int (format, "slice-height", &slice_height, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to get stride and slice-height: %s",
+        err->message);
+    g_clear_error (&err);
     return FALSE;
   }
 
-  if (!gst_amc_format_get_int (format, "crop-left", &crop_left) ||
-      !gst_amc_format_get_int (format, "crop-right", &crop_right) ||
-      !gst_amc_format_get_int (format, "crop-top", &crop_top) ||
-      !gst_amc_format_get_int (format, "crop-bottom", &crop_bottom)) {
-    GST_ERROR_OBJECT (self, "Failed to get crop rectangle");
+  if (!gst_amc_format_get_int (format, "crop-left", &crop_left, &err) ||
+      !gst_amc_format_get_int (format, "crop-right", &crop_right, &err) ||
+      !gst_amc_format_get_int (format, "crop-top", &crop_top, &err) ||
+      !gst_amc_format_get_int (format, "crop-bottom", &crop_bottom, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to get crop rectangle: %s", err->message);
+    g_clear_error (&err);
     return FALSE;
   }
 
@@ -695,7 +504,16 @@
   if (crop_left)
     width = width - crop_left;
 
-  gst_format = gst_amc_color_format_to_video_format (color_format);
+  mime = caps_to_mime (self->input_state->caps);
+  if (!mime) {
+    GST_ERROR_OBJECT (self, "Failed to convert caps to mime");
+    return FALSE;
+  }
+
+  gst_format =
+      gst_amc_color_format_to_video_format (klass->codec_info, mime,
+      color_format);
+
   if (gst_format == GST_VIDEO_FORMAT_UNKNOWN) {
     GST_ERROR_OBJECT (self, "Unknown color format 0x%08x", color_format);
     return FALSE;
@@ -705,15 +523,22 @@
       gst_format, width, height, self->input_state);
 
   self->format = gst_format;
-  self->color_format = color_format;
-  self->height = height;
-  self->width = width;
-  self->stride = stride;
-  self->slice_height = slice_height;
-  self->crop_left = crop_left;
-  self->crop_right = crop_right;
-  self->crop_top = crop_top;
-  self->crop_bottom = crop_bottom;
+  if (!gst_amc_color_format_info_set (&self->color_format_info,
+          klass->codec_info, mime, color_format, width, height, stride,
+          slice_height, crop_left, crop_right, crop_top, crop_bottom)) {
+    GST_ERROR_OBJECT (self, "Failed to set up GstAmcColorFormatInfo");
+    return FALSE;
+  }
+
+  GST_DEBUG_OBJECT (self,
+      "Color format info: {color_format=%d, width=%d, height=%d, "
+      "stride=%d, slice-height=%d, crop-left=%d, crop-top=%d, "
+      "crop-right=%d, crop-bottom=%d, frame-size=%d}",
+      self->color_format_info.color_format, self->color_format_info.width,
+      self->color_format_info.height, self->color_format_info.stride,
+      self->color_format_info.slice_height, self->color_format_info.crop_left,
+      self->color_format_info.crop_top, self->color_format_info.crop_right,
+      self->color_format_info.crop_bottom, self->color_format_info.frame_size);
 
   gst_video_decoder_negotiate (GST_VIDEO_DECODER (self));
   gst_video_codec_state_unref (output_state);
@@ -722,39 +547,11 @@
   return TRUE;
 }
 
-/*
- * The format is called QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka.
- * Which is actually NV12 (interleaved U&V).
- */
-#define TILE_WIDTH 64
-#define TILE_HEIGHT 32
-#define TILE_SIZE (TILE_WIDTH * TILE_HEIGHT)
-#define TILE_GROUP_SIZE (4 * TILE_SIZE)
-
-/* get frame tile coordinate. XXX: nothing to be understood here, don't try. */
-static size_t
-tile_pos (size_t x, size_t y, size_t w, size_t h)
-{
-  size_t flim = x + (y & ~1) * w;
-
-  if (y & 1) {
-    flim += (x & ~3) + 2;
-  } else if ((h & 1) == 0 || y != (h - 1)) {
-    flim += (x + 2) & ~3;
-  }
-
-  return flim;
-}
-
-/* The weird handling of cropping, alignment and everything is taken from
- * platform/frameworks/media/libstagefright/colorconversion/ColorConversion.cpp
- */
 static gboolean
 gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
     const GstAmcBufferInfo * buffer_info, GstBuffer * outbuf)
 {
-  GstAmcVideoDecClass *klass = GST_AMC_VIDEO_DEC_GET_CLASS (self);
-  GstAmcBuffer *buf = &self->output_buffers[idx];
+  GstAmcBuffer *buf;
   GstVideoCodecState *state =
       gst_video_decoder_get_output_state (GST_VIDEO_DECODER (self));
   GstVideoInfo *info = &state->info;
@@ -765,285 +562,11 @@
         idx, self->n_output_buffers);
     goto done;
   }
+  buf = &self->output_buffers[idx];
 
-  /* Same video format */
-  if (buffer_info->size == gst_buffer_get_size (outbuf)) {
-    GstMapInfo minfo;
-
-    GST_DEBUG_OBJECT (self, "Buffer sizes equal, doing fast copy");
-    gst_buffer_map (outbuf, &minfo, GST_MAP_WRITE);
-    orc_memcpy (minfo.data, buf->data + buffer_info->offset, buffer_info->size);
-    gst_buffer_unmap (outbuf, &minfo);
-    ret = TRUE;
-    goto done;
-  }
-
-  GST_DEBUG_OBJECT (self,
-      "Sizes not equal (%d vs %d), doing slow line-by-line copying",
-      buffer_info->size, gst_buffer_get_size (outbuf));
-
-  /* Different video format, try to convert */
-  switch (self->color_format) {
-    case COLOR_FormatYUV420Planar:{
-      GstVideoFrame vframe;
-      gint i, j, height;
-      guint8 *src, *dest;
-      gint stride, slice_height;
-      gint src_stride, dest_stride;
-      gint row_length;
-
-      stride = self->stride;
-      if (stride == 0) {
-        GST_ERROR_OBJECT (self, "Stride not set");
-        goto done;
-      }
-
-      slice_height = self->slice_height;
-      if (slice_height == 0) {
-        /* NVidia Tegra 3 on Nexus 7 does not set this */
-        if (g_str_has_prefix (klass->codec_info->name, "OMX.Nvidia.")) {
-          slice_height = GST_ROUND_UP_32 (self->height);
-        } else {
-          GST_ERROR_OBJECT (self, "Slice height not set");
-          goto done;
-        }
-      }
-
-      gst_video_frame_map (&vframe, info, outbuf, GST_MAP_WRITE);
-      for (i = 0; i < 3; i++) {
-        if (i == 0) {
-          src_stride = stride;
-          dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
-        } else {
-          src_stride = (stride + 1) / 2;
-          dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
-        }
-
-        src = buf->data + buffer_info->offset;
-
-        if (i == 0) {
-          src += self->crop_top * stride;
-          src += self->crop_left;
-          row_length = self->width;
-        } else if (i > 0) {
-          /* skip the Y plane */
-          src += slice_height * stride;
-
-          /* crop_top/crop_left divided by two
-           * because one byte of the U/V planes
-           * corresponds to two pixels horizontally/vertically */
-          src += self->crop_top / 2 * src_stride;
-          src += self->crop_left / 2;
-          row_length = (self->width + 1) / 2;
-        }
-        if (i == 2) {
-          /* skip the U plane */
-          src += ((slice_height + 1) / 2) * ((stride + 1) / 2);
-        }
-
-        dest = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
-        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
-
-        for (j = 0; j < height; j++) {
-          orc_memcpy (dest, src, row_length);
-          src += src_stride;
-          dest += dest_stride;
-        }
-      }
-      gst_video_frame_unmap (&vframe);
-      ret = TRUE;
-      break;
-    }
-    case COLOR_TI_FormatYUV420PackedSemiPlanar:
-    case COLOR_TI_FormatYUV420PackedSemiPlanarInterlaced:{
-      gint i, j, height;
-      guint8 *src, *dest;
-      gint src_stride, dest_stride;
-      gint row_length;
-      GstVideoFrame vframe;
-
-      /* This should always be set */
-      if (self->stride == 0 || self->slice_height == 0) {
-        GST_ERROR_OBJECT (self, "Stride or slice height not set");
-        goto done;
-      }
-
-      /* FIXME: This does not work for odd widths or heights
-       * but might as well be a bug in the codec */
-      gst_video_frame_map (&vframe, info, outbuf, GST_MAP_WRITE);
-      for (i = 0; i < 2; i++) {
-        if (i == 0) {
-          src_stride = self->stride;
-          dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
-        } else {
-          src_stride = GST_ROUND_UP_2 (self->stride);
-          dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
-        }
-
-        src = buf->data + buffer_info->offset;
-        if (i == 0) {
-          row_length = self->width;
-        } else if (i == 1) {
-          src += (self->slice_height - self->crop_top / 2) * self->stride;
-          row_length = GST_ROUND_UP_2 (self->width);
-        }
-
-        dest = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
-        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
-
-        for (j = 0; j < height; j++) {
-          orc_memcpy (dest, src, row_length);
-          src += src_stride;
-          dest += dest_stride;
-        }
-      }
-      gst_video_frame_unmap (&vframe);
-      ret = TRUE;
-      break;
-    }
-    case COLOR_QCOM_FormatYUV420SemiPlanar:
-    case COLOR_FormatYUV420SemiPlanar:{
-      gint i, j, height;
-      guint8 *src, *dest;
-      gint src_stride, dest_stride, fixed_stride;
-      gint row_length;
-      GstVideoFrame vframe;
-
-      /* This should always be set */
-      if (self->stride == 0 || self->slice_height == 0) {
-        GST_ERROR_OBJECT (self, "Stride or slice height not set");
-        goto done;
-      }
-
-      /* Samsung Galaxy S3 seems to report wrong strides.
-         I.e. BigBuckBunny 854x480 H264 reports a stride of 864 when it is
-         actually 854, so we use width instead of stride here.
-         This is obviously bound to break in the future. */
-      if (g_str_has_prefix (klass->codec_info->name, "OMX.SEC.")) {
-        fixed_stride = self->width;
-      } else {
-        fixed_stride = self->stride;
-      }
-
-      gst_video_frame_map (&vframe, info, outbuf, GST_MAP_WRITE);
-
-      for (i = 0; i < 2; i++) {
-        src_stride = fixed_stride;
-        dest_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, i);
-
-        src = buf->data + buffer_info->offset;
-        if (i == 0) {
-          src += self->crop_top * fixed_stride;
-          src += self->crop_left;
-          row_length = self->width;
-        } else if (i == 1) {
-          src += self->slice_height * fixed_stride;
-          src += self->crop_top * fixed_stride;
-          src += self->crop_left;
-          row_length = self->width;
-        }
-
-        dest = GST_VIDEO_FRAME_COMP_DATA (&vframe, i);
-        height = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, i);
-
-        for (j = 0; j < height; j++) {
-          orc_memcpy (dest, src, row_length);
-          src += src_stride;
-          dest += dest_stride;
-        }
-      }
-      gst_video_frame_unmap (&vframe);
-      ret = TRUE;
-      break;
-    }
-      /* FIXME: This should be in libgstvideo as MT12 or similar, see v4l2 */
-    case COLOR_QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka:{
-      GstVideoFrame vframe;
-      gint width = self->width;
-      gint height = self->height;
-      gint dest_luma_stride, dest_chroma_stride;
-      guint8 *src = buf->data + buffer_info->offset;
-      guint8 *dest_luma, *dest_chroma;
-      gint y;
-      const size_t tile_w = (width - 1) / TILE_WIDTH + 1;
-      const size_t tile_w_align = (tile_w + 1) & ~1;
-      const size_t tile_h_luma = (height - 1) / TILE_HEIGHT + 1;
-      const size_t tile_h_chroma = (height / 2 - 1) / TILE_HEIGHT + 1;
-      size_t luma_size = tile_w_align * tile_h_luma * TILE_SIZE;
-
-      gst_video_frame_map (&vframe, info, outbuf, GST_MAP_WRITE);
-      dest_luma = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 0);
-      dest_chroma = GST_VIDEO_FRAME_PLANE_DATA (&vframe, 1);
-      dest_luma_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 0);
-      dest_chroma_stride = GST_VIDEO_FRAME_COMP_STRIDE (&vframe, 1);
-
-      if ((luma_size % TILE_GROUP_SIZE) != 0)
-        luma_size = (((luma_size - 1) / TILE_GROUP_SIZE) + 1) * TILE_GROUP_SIZE;
-
-      for (y = 0; y < tile_h_luma; y++) {
-        size_t row_width = width;
-        gint x;
-
-        for (x = 0; x < tile_w; x++) {
-          size_t tile_width = row_width;
-          size_t tile_height = height;
-          gint luma_idx;
-          gint chroma_idx;
-          /* luma source pointer for this tile */
-          const uint8_t *src_luma = src
-              + tile_pos (x, y, tile_w_align, tile_h_luma) * TILE_SIZE;
-
-          /* chroma source pointer for this tile */
-          const uint8_t *src_chroma = src + luma_size
-              + tile_pos (x, y / 2, tile_w_align, tile_h_chroma) * TILE_SIZE;
-          if (y & 1)
-            src_chroma += TILE_SIZE / 2;
-
-          /* account for right columns */
-          if (tile_width > TILE_WIDTH)
-            tile_width = TILE_WIDTH;
-
-          /* account for bottom rows */
-          if (tile_height > TILE_HEIGHT)
-            tile_height = TILE_HEIGHT;
-
-          /* dest luma memory index for this tile */
-          luma_idx = y * TILE_HEIGHT * dest_luma_stride + x * TILE_WIDTH;
-
-          /* dest chroma memory index for this tile */
-          /* XXX: remove divisions */
-          chroma_idx =
-              y * TILE_HEIGHT / 2 * dest_chroma_stride + x * TILE_WIDTH;
-
-          tile_height /= 2;     // we copy 2 luma lines at once
-          while (tile_height--) {
-            memcpy (dest_luma + luma_idx, src_luma, tile_width);
-            src_luma += TILE_WIDTH;
-            luma_idx += dest_luma_stride;
-
-            memcpy (dest_luma + luma_idx, src_luma, tile_width);
-            src_luma += TILE_WIDTH;
-            luma_idx += dest_luma_stride;
-
-            memcpy (dest_chroma + chroma_idx, src_chroma, tile_width);
-            src_chroma += TILE_WIDTH;
-            chroma_idx += dest_chroma_stride;
-          }
-          row_width -= TILE_WIDTH;
-        }
-        height -= TILE_HEIGHT;
-      }
-      gst_video_frame_unmap (&vframe);
-      ret = TRUE;
-      break;
-
-    }
-    default:
-      GST_ERROR_OBJECT (self, "Unsupported color format %d",
-          self->color_format);
-      goto done;
-      break;
-  }
+  ret =
+      gst_amc_color_format_copy (&self->color_format_info, buf, buffer_info,
+      info, outbuf, COLOR_FORMAT_COPY_OUT);
 
 done:
   gst_video_codec_state_unref (state);
@@ -1059,6 +582,7 @@
   gboolean is_eos;
   GstAmcBufferInfo buffer_info;
   gint idx;
+  GError *err = NULL;
 
   GST_VIDEO_DECODER_STREAM_LOCK (self);
 
@@ -1070,13 +594,17 @@
   GST_VIDEO_DECODER_STREAM_UNLOCK (self);
   /* Wait at most 100ms here, some codecs don't fail dequeueing if
    * the codec is flushing, causing deadlocks during shutdown */
-  idx = gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info, 100000);
+  idx =
+      gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info, 100000,
+      &err);
   GST_VIDEO_DECODER_STREAM_LOCK (self);
   /*} */
 
   if (idx < 0) {
-    if (self->flushing || self->downstream_flow_ret == GST_FLOW_FLUSHING)
+    if (self->flushing) {
+      g_clear_error (&err);
       goto flushing;
+    }
 
     switch (idx) {
       case INFO_OUTPUT_BUFFERS_CHANGED:{
@@ -1086,7 +614,7 @@
               self->n_output_buffers);
         self->output_buffers =
             gst_amc_codec_get_output_buffers (self->codec,
-            &self->n_output_buffers);
+            &self->n_output_buffers, &err);
         if (!self->output_buffers)
           goto get_output_buffers_error;
         break;
@@ -1097,11 +625,15 @@
 
         GST_DEBUG_OBJECT (self, "Output format has changed");
 
-        format = gst_amc_codec_get_output_format (self->codec);
+        format = gst_amc_codec_get_output_format (self->codec, &err);
         if (!format)
           goto format_error;
 
-        format_string = gst_amc_format_to_string (format);
+        format_string = gst_amc_format_to_string (format, &err);
+        if (!format) {
+          gst_amc_format_free (format);
+          goto format_error;
+        }
         GST_DEBUG_OBJECT (self, "Got new output format: %s", format_string);
         g_free (format_string);
 
@@ -1116,7 +648,7 @@
               self->n_output_buffers);
         self->output_buffers =
             gst_amc_codec_get_output_buffers (self->codec,
-            &self->n_output_buffers);
+            &self->n_output_buffers, &err);
         if (!self->output_buffers)
           goto get_output_buffers_error;
 
@@ -1128,7 +660,7 @@
         goto retry;
         break;
       case G_MININT:
-        GST_ERROR_OBJECT (self, "Failure dequeueing input buffer");
+        GST_ERROR_OBJECT (self, "Failure dequeueing output buffer");
         goto dequeue_error;
         break;
       default:
@@ -1172,9 +704,12 @@
 
     if (!gst_amc_video_dec_fill_buffer (self, idx, &buffer_info, outbuf)) {
       gst_buffer_unref (outbuf);
-      if (!gst_amc_codec_release_output_buffer (self->codec, idx))
+      if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err))
         GST_ERROR_OBJECT (self, "Failed to release output buffer index %d",
             idx);
+      if (err && !self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
       goto invalid_buffer;
     }
 
@@ -1186,9 +721,12 @@
     if ((flow_ret = gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER
                 (self), frame)) != GST_FLOW_OK) {
       GST_ERROR_OBJECT (self, "Failed to allocate buffer");
-      if (!gst_amc_codec_release_output_buffer (self->codec, idx))
+      if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err))
         GST_ERROR_OBJECT (self, "Failed to release output buffer index %d",
             idx);
+      if (err && !self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
       goto flow_error;
     }
 
@@ -1196,9 +734,12 @@
             frame->output_buffer)) {
       gst_buffer_replace (&frame->output_buffer, NULL);
       gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
-      if (!gst_amc_codec_release_output_buffer (self->codec, idx))
+      if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err))
         GST_ERROR_OBJECT (self, "Failed to release output buffer index %d",
             idx);
+      if (err && !self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
       goto invalid_buffer;
     }
 
@@ -1207,8 +748,13 @@
     flow_ret = gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
   }
 
-  if (!gst_amc_codec_release_output_buffer (self->codec, idx))
+  if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
+    if (self->flushing) {
+      g_clear_error (&err);
+      goto flushing;
+    }
     goto failed_release;
+  }
 
   if (is_eos || flow_ret == GST_FLOW_EOS) {
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
@@ -1238,8 +784,7 @@
 
 dequeue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to dequeue output buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -1249,8 +794,7 @@
 
 get_output_buffers_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to get output buffers"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -1260,8 +804,11 @@
 
 format_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to handle format"));
+    if (err)
+      GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    else
+      GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
+          ("Failed to handle format"));
     gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -1270,8 +817,7 @@
   }
 failed_release:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to release output buffer index %d", idx));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (self), gst_event_new_eos ());
     gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
     self->downstream_flow_ret = GST_FLOW_ERROR;
@@ -1340,13 +886,18 @@
 gst_amc_video_dec_stop (GstVideoDecoder * decoder)
 {
   GstAmcVideoDec *self;
+  GError *err = NULL;
 
   self = GST_AMC_VIDEO_DEC (decoder);
   GST_DEBUG_OBJECT (self, "Stopping decoder");
   self->flushing = TRUE;
   if (self->started) {
-    gst_amc_codec_flush (self->codec);
-    gst_amc_codec_stop (self->codec);
+    gst_amc_codec_flush (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    gst_amc_codec_stop (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     self->started = FALSE;
     if (self->input_buffers)
       gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
@@ -1384,6 +935,7 @@
   gchar *format_string;
   guint8 *codec_data = NULL;
   gsize codec_data_size = 0;
+  GError *err = NULL;
 
   self = GST_AMC_VIDEO_DEC (decoder);
 
@@ -1392,8 +944,8 @@
   /* Check if the caps change is a real format change or if only irrelevant
    * parts of the caps have changed or nothing at all.
    */
-  is_format_change |= self->width != state->info.width;
-  is_format_change |= self->height != state->info.height;
+  is_format_change |= self->color_format_info.width != state->info.width;
+  is_format_change |= self->color_format_info.height != state->info.height;
   if (state->codec_data) {
     GstMapInfo cminfo;
 
@@ -1461,39 +1013,51 @@
   }
 
   format =
-      gst_amc_format_new_video (mime, state->info.width, state->info.height);
+      gst_amc_format_new_video (mime, state->info.width, state->info.height,
+      &err);
   if (!format) {
     GST_ERROR_OBJECT (self, "Failed to create video format");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
   /* FIXME: This buffer needs to be valid until the codec is stopped again */
-  if (self->codec_data)
+  if (self->codec_data) {
     gst_amc_format_set_buffer (format, "csd-0", self->codec_data,
-        self->codec_data_size);
+        self->codec_data_size, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  }
 
-  format_string = gst_amc_format_to_string (format);
-  GST_DEBUG_OBJECT (self, "Configuring codec with format: %s", format_string);
+  format_string = gst_amc_format_to_string (format, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  GST_DEBUG_OBJECT (self, "Configuring codec with format: %s",
+      GST_STR_NULL (format_string));
   g_free (format_string);
 
-  if (!gst_amc_codec_configure (self->codec, format, 0)) {
+  if (!gst_amc_codec_configure (self->codec, format, 0, &err)) {
     GST_ERROR_OBJECT (self, "Failed to configure codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
   gst_amc_format_free (format);
 
-  if (!gst_amc_codec_start (self->codec)) {
+  if (!gst_amc_codec_start (self->codec, &err)) {
     GST_ERROR_OBJECT (self, "Failed to start codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
   if (self->input_buffers)
     gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
   self->input_buffers =
-      gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers);
+      gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers,
+      &err);
   if (!self->input_buffers) {
     GST_ERROR_OBJECT (self, "Failed to get input buffers");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     return FALSE;
   }
 
@@ -1514,6 +1078,7 @@
 gst_amc_video_dec_flush (GstVideoDecoder * decoder)
 {
   GstAmcVideoDec *self;
+  GError *err = NULL;
 
   self = GST_AMC_VIDEO_DEC (decoder);
 
@@ -1532,7 +1097,9 @@
   GST_PAD_STREAM_LOCK (GST_VIDEO_DECODER_SRC_PAD (self));
   GST_PAD_STREAM_UNLOCK (GST_VIDEO_DECODER_SRC_PAD (self));
   GST_VIDEO_DECODER_STREAM_LOCK (self);
-  gst_amc_codec_flush (self->codec);
+  gst_amc_codec_flush (self->codec, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
   self->flushing = FALSE;
 
   /* Start the srcpad loop again */
@@ -1558,6 +1125,7 @@
   guint offset = 0;
   GstClockTime timestamp, duration, timestamp_offset = 0;
   GstMapInfo minfo;
+  GError *err = NULL;
 
   memset (&minfo, 0, sizeof (minfo));
 
@@ -1595,12 +1163,15 @@
     GST_VIDEO_DECODER_STREAM_UNLOCK (self);
     /* Wait at most 100ms here, some codecs don't fail dequeueing if
      * the codec is flushing, causing deadlocks during shutdown */
-    idx = gst_amc_codec_dequeue_input_buffer (self->codec, 100000);
+    idx = gst_amc_codec_dequeue_input_buffer (self->codec, 100000, &err);
     GST_VIDEO_DECODER_STREAM_LOCK (self);
 
     if (idx < 0) {
-      if (self->flushing)
+      if (self->flushing || self->downstream_flow_ret == GST_FLOW_FLUSHING) {
+        g_clear_error (&err);
         goto flushing;
+      }
+
       switch (idx) {
         case INFO_TRY_AGAIN_LATER:
           GST_DEBUG_OBJECT (self, "Dequeueing input buffer timed out");
@@ -1620,12 +1191,18 @@
     if (idx >= self->n_input_buffers)
       goto invalid_buffer_index;
 
-    if (self->flushing)
+    if (self->flushing) {
+      memset (&buffer_info, 0, sizeof (buffer_info));
+      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, NULL);
       goto flushing;
+    }
 
     if (self->downstream_flow_ret != GST_FLOW_OK) {
       memset (&buffer_info, 0, sizeof (buffer_info));
-      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info);
+      gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err);
+      if (err && !self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
       goto downstream_error;
     }
 
@@ -1669,8 +1246,14 @@
         "Queueing buffer %d: size %d time %" G_GINT64_FORMAT " flags 0x%08x",
         idx, buffer_info.size, buffer_info.presentation_time_us,
         buffer_info.flags);
-    if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info))
+    if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info,
+            &err)) {
+      if (self->flushing) {
+        g_clear_error (&err);
+        goto flushing;
+      }
       goto queue_error;
+    }
   }
 
   gst_buffer_unmap (frame->input_buffer, &minfo);
@@ -1698,8 +1281,7 @@
   }
 dequeue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to dequeue input buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (frame->input_buffer, &minfo);
     gst_video_codec_frame_unref (frame);
@@ -1707,8 +1289,7 @@
   }
 queue_error:
   {
-    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
-        ("Failed to queue input buffer"));
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
     if (minfo.data)
       gst_buffer_unmap (frame->input_buffer, &minfo);
     gst_video_codec_frame_unref (frame);
@@ -1739,6 +1320,7 @@
 {
   GstFlowReturn ret;
   gint idx;
+  GError *err = NULL;
 
   GST_DEBUG_OBJECT (self, "Draining codec");
   if (!self->started) {
@@ -1762,7 +1344,7 @@
    * class drop the EOS event. We will send it later when
    * the EOS buffer arrives on the output port.
    * Wait at most 0.5s here. */
-  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
+  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000, &err);
   GST_VIDEO_DECODER_STREAM_LOCK (self);
 
   if (idx >= 0 && idx < self->n_input_buffers) {
@@ -1778,14 +1360,20 @@
         gst_util_uint64_scale (self->last_upstream_ts, 1, GST_USECOND);
     buffer_info.flags |= BUFFER_FLAG_END_OF_STREAM;
 
-    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info)) {
+    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
       GST_DEBUG_OBJECT (self, "Waiting until codec is drained");
       g_cond_wait (&self->drain_cond, &self->drain_lock);
       GST_DEBUG_OBJECT (self, "Drained codec");
       ret = GST_FLOW_OK;
     } else {
       GST_ERROR_OBJECT (self, "Failed to queue input buffer");
-      ret = GST_FLOW_ERROR;
+      if (self->flushing) {
+        g_clear_error (&err);
+        ret = GST_FLOW_FLUSHING;
+      } else {
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+        ret = GST_FLOW_ERROR;
+      }
     }
 
     g_mutex_unlock (&self->drain_lock);
@@ -1796,6 +1384,8 @@
     ret = GST_FLOW_ERROR;
   } else {
     GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
     ret = GST_FLOW_ERROR;
   }
 
diff --git a/sys/androidmedia/gstamcvideodec.h b/sys/androidmedia/gstamcvideodec.h
index 3353dc6..e5efcae 100644
--- a/sys/androidmedia/gstamcvideodec.h
+++ b/sys/androidmedia/gstamcvideodec.h
@@ -59,10 +59,7 @@
 
   /* Output format of the codec */
   GstVideoFormat format;
-  gint color_format;
-  gint width, height, stride, slice_height;
-  gint crop_left, crop_right;
-  gint crop_top, crop_bottom;
+  GstAmcColorFormatInfo color_format_info;
 
   guint8 *codec_data;
   gsize codec_data_size;
diff --git a/sys/androidmedia/gstamcvideoenc.c b/sys/androidmedia/gstamcvideoenc.c
new file mode 100644
index 0000000..b85a4e2
--- /dev/null
+++ b/sys/androidmedia/gstamcvideoenc.c
@@ -0,0 +1,1710 @@
+/*
+ * Initially based on gst-plugins-bad/sys/androidmedia/gstamcvideodec.c
+ *
+ * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
+ *
+ * Copyright (C) 2012, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * Copyright (C) 2013, Lemote Ltd.
+ *   Author: Chen Jie <chenj@lemote.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+#include <string.h>
+
+#ifdef HAVE_ORC
+#include <orc/orc.h>
+#else
+#define orc_memcpy memcpy
+#endif
+
+#include "gstamcvideoenc.h"
+#include "gstamc-constants.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_amc_video_enc_debug_category);
+#define GST_CAT_DEFAULT gst_amc_video_enc_debug_category
+
+typedef struct _BufferIdentification BufferIdentification;
+struct _BufferIdentification
+{
+  guint64 timestamp;
+};
+
+static BufferIdentification *
+buffer_identification_new (GstClockTime timestamp)
+{
+  BufferIdentification *id = g_slice_new (BufferIdentification);
+
+  id->timestamp = timestamp;
+
+  return id;
+}
+
+static void
+buffer_identification_free (BufferIdentification * id)
+{
+  g_slice_free (BufferIdentification, id);
+}
+
+/* prototypes */
+static void gst_amc_video_enc_finalize (GObject * object);
+
+static GstStateChangeReturn
+gst_amc_video_enc_change_state (GstElement * element,
+    GstStateChange transition);
+
+static gboolean gst_amc_video_enc_open (GstVideoEncoder * encoder);
+static gboolean gst_amc_video_enc_close (GstVideoEncoder * encoder);
+static gboolean gst_amc_video_enc_start (GstVideoEncoder * encoder);
+static gboolean gst_amc_video_enc_stop (GstVideoEncoder * encoder);
+static gboolean gst_amc_video_enc_set_format (GstVideoEncoder * encoder,
+    GstVideoCodecState * state);
+static gboolean gst_amc_video_enc_flush (GstVideoEncoder * encoder);
+static GstFlowReturn gst_amc_video_enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame);
+static GstFlowReturn gst_amc_video_enc_finish (GstVideoEncoder * encoder);
+
+static GstFlowReturn gst_amc_video_enc_drain (GstAmcVideoEnc * self);
+
+#define BIT_RATE_DEFAULT (2 * 1024 * 1024)
+#define I_FRAME_INTERVAL_DEFAULT 0
+enum
+{
+  PROP_0,
+  PROP_BIT_RATE,
+  PROP_I_FRAME_INTERVAL
+};
+
+/* class initialization */
+
+static void gst_amc_video_enc_class_init (GstAmcVideoEncClass * klass);
+static void gst_amc_video_enc_init (GstAmcVideoEnc * self);
+static void gst_amc_video_enc_base_init (gpointer g_class);
+
+static GstVideoEncoderClass *parent_class = NULL;
+
+GType
+gst_amc_video_enc_get_type (void)
+{
+  static volatile gsize type = 0;
+
+  if (g_once_init_enter (&type)) {
+    GType _type;
+    static const GTypeInfo info = {
+      sizeof (GstAmcVideoEncClass),
+      gst_amc_video_enc_base_init,
+      NULL,
+      (GClassInitFunc) gst_amc_video_enc_class_init,
+      NULL,
+      NULL,
+      sizeof (GstAmcVideoEnc),
+      0,
+      (GInstanceInitFunc) gst_amc_video_enc_init,
+      NULL
+    };
+
+    _type = g_type_register_static (GST_TYPE_VIDEO_ENCODER, "GstAmcVideoEnc",
+        &info, 0);
+
+    GST_DEBUG_CATEGORY_INIT (gst_amc_video_enc_debug_category, "amcvideoenc", 0,
+        "Android MediaCodec video encoder");
+
+    g_once_init_leave (&type, _type);
+  }
+  return type;
+}
+
+static GstAmcFormat *
+create_amc_format (GstAmcVideoEnc * encoder, GstVideoCodecState * input_state,
+    GstCaps * src_caps)
+{
+  GstAmcVideoEncClass *klass;
+  GstStructure *s;
+  const gchar *name;
+  const gchar *mime = NULL;
+  const gchar *profile_string = NULL;
+  const gchar *level_string = NULL;
+  struct
+  {
+    const gchar *key;
+    gint id;
+  } amc_profile = {
+  NULL, -1};
+  struct
+  {
+    const gchar *key;
+    gint id;
+  } amc_level = {
+  NULL, -1};
+  gint color_format;
+  gint stride, slice_height;
+  GstAmcFormat *format = NULL;
+  GstVideoInfo *info = &input_state->info;
+  GError *err = NULL;
+
+  klass = GST_AMC_VIDEO_ENC_GET_CLASS (encoder);
+  s = gst_caps_get_structure (src_caps, 0);
+  if (!s)
+    return NULL;
+
+  name = gst_structure_get_name (s);
+  profile_string = gst_structure_get_string (s, "profile");
+  level_string = gst_structure_get_string (s, "level");
+
+  if (strcmp (name, "video/mpeg") == 0) {
+    gint mpegversion;
+
+    if (!gst_structure_get_int (s, "mpegversion", &mpegversion))
+      return NULL;
+
+    if (mpegversion == 4) {
+      mime = "video/mp4v-es";
+
+      if (profile_string) {
+        amc_profile.key = "profile";    /* named profile ? */
+        amc_profile.id = gst_amc_avc_mpeg4_profile_from_string (profile_string);
+      }
+
+      if (level_string) {
+        amc_level.key = "level";        /* named level ? */
+        amc_level.id = gst_amc_mpeg4_level_from_string (level_string);
+      }
+    } else if ( /* mpegversion == 1 || */ mpegversion == 2)
+      mime = "video/mpeg2";
+  } else if (strcmp (name, "video/x-h263") == 0) {
+    mime = "video/3gpp";
+  } else if (strcmp (name, "video/x-h264") == 0) {
+    mime = "video/avc";
+
+    if (profile_string) {
+      amc_profile.key = "profile";      /* named profile ? */
+      amc_profile.id = gst_amc_avc_profile_from_string (profile_string);
+    }
+
+    if (level_string) {
+      amc_level.key = "level";  /* named level ? */
+      amc_level.id = gst_amc_avc_level_from_string (level_string);
+    }
+  } else if (strcmp (name, "video/x-vp8") == 0) {
+    mime = "video/x-vnd.on2.vp8";
+  } else {
+    GST_ERROR_OBJECT (encoder, "Failed to convert caps(%s/...) to any mime",
+        name);
+    return NULL;
+  }
+
+  format = gst_amc_format_new_video (mime, info->width, info->height, &err);
+  if (!format) {
+    GST_ERROR_OBJECT (encoder, "Failed to create a \"%s,%dx%d\" MediaFormat",
+        mime, info->width, info->height);
+    GST_ELEMENT_ERROR_FROM_ERROR (encoder, err);
+    return NULL;
+  }
+
+  color_format =
+      gst_amc_video_format_to_color_format (klass->codec_info,
+      mime, info->finfo->format);
+  if (color_format == -1)
+    goto video_format_failed_to_convert;
+
+  gst_amc_format_set_int (format, "bitrate", encoder->bitrate, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+  gst_amc_format_set_int (format, "color-format", color_format, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+  stride = GST_ROUND_UP_4 (info->width);        /* safe (?) */
+  gst_amc_format_set_int (format, "stride", stride, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+  slice_height = info->height;
+  gst_amc_format_set_int (format, "slice-height", slice_height, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+
+  if (profile_string) {
+    if (amc_profile.id == -1)
+      goto unsupported_profile;
+
+    /* FIXME: Set to any value in AVCProfile* leads to
+     * codec configuration fail */
+    /* gst_amc_format_set_int (format, amc_profile.key, 0x40); */
+  }
+
+  if (level_string) {
+    if (amc_level.id == -1)
+      goto unsupported_level;
+
+    /* gst_amc_format_set_int (format, amc_level.key, amc_level.id); */
+  }
+
+  if (encoder->i_frame_int)
+    gst_amc_format_set_int (format, "i-frame-interval", encoder->i_frame_int,
+        &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+
+  if (info->fps_d)
+    gst_amc_format_set_float (format, "frame-rate",
+        ((gfloat) info->fps_n) / info->fps_d, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (encoder, err);
+
+  encoder->format = info->finfo->format;
+  if (!gst_amc_color_format_info_set (&encoder->color_format_info,
+          klass->codec_info, mime, color_format, info->width, info->height,
+          stride, slice_height, 0, 0, 0, 0))
+    goto color_format_info_failed_to_set;
+
+  GST_DEBUG_OBJECT (encoder,
+      "Color format info: {color_format=%d, width=%d, height=%d, "
+      "stride=%d, slice-height=%d, crop-left=%d, crop-top=%d, "
+      "crop-right=%d, crop-bottom=%d, frame-size=%d}",
+      encoder->color_format_info.color_format, encoder->color_format_info.width,
+      encoder->color_format_info.height, encoder->color_format_info.stride,
+      encoder->color_format_info.slice_height,
+      encoder->color_format_info.crop_left, encoder->color_format_info.crop_top,
+      encoder->color_format_info.crop_right,
+      encoder->color_format_info.crop_bottom,
+      encoder->color_format_info.frame_size);
+
+  return format;
+
+video_format_failed_to_convert:
+  GST_ERROR_OBJECT (encoder, "Failed to convert video format");
+  gst_amc_format_free (format);
+  return NULL;
+
+color_format_info_failed_to_set:
+  GST_ERROR_OBJECT (encoder, "Failed to set up GstAmcColorFormatInfo");
+  gst_amc_format_free (format);
+  return NULL;
+
+unsupported_profile:
+  GST_ERROR_OBJECT (encoder, "Unsupport profile '%s'", profile_string);
+  gst_amc_format_free (format);
+  return NULL;
+
+unsupported_level:
+  GST_ERROR_OBJECT (encoder, "Unsupport level '%s'", level_string);
+  gst_amc_format_free (format);
+  return NULL;
+}
+
+static GstCaps *
+caps_from_amc_format (GstAmcFormat * amc_format)
+{
+  GstCaps *caps = NULL;
+  gchar *mime = NULL;
+  gint width, height;
+  gint amc_profile, amc_level;
+  gfloat frame_rate = 0.0;
+  gint fraction_n, fraction_d;
+  GError *err = NULL;
+
+  if (!gst_amc_format_get_string (amc_format, "mime", &mime, &err)) {
+    GST_ERROR ("Failed to get 'mime': %s", err->message);
+    g_clear_error (&err);
+    return NULL;
+  }
+
+  if (!gst_amc_format_get_int (amc_format, "width", &width, &err) ||
+      !gst_amc_format_get_int (amc_format, "height", &height, &err)) {
+    GST_ERROR ("Failed to get size: %s", err->message);
+    g_clear_error (&err);
+
+    g_free (mime);
+    return NULL;
+  }
+
+  gst_amc_format_get_float (amc_format, "frame-rate", &frame_rate, NULL);
+  gst_util_double_to_fraction (frame_rate, &fraction_n, &fraction_d);
+
+  if (strcmp (mime, "video/mp4v-es") == 0) {
+    const gchar *profile_string, *level_string;
+
+    caps =
+        gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4,
+        "systemstream", G_TYPE_BOOLEAN, FALSE,
+        "parsed", G_TYPE_BOOLEAN, TRUE, NULL);
+
+    if (gst_amc_format_get_int (amc_format, "profile", &amc_profile, NULL)) {
+      profile_string = gst_amc_mpeg4_profile_to_string (amc_profile);
+      if (!profile_string)
+        goto unsupported_profile;
+
+      gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_string,
+          NULL);
+    }
+
+    if (gst_amc_format_get_int (amc_format, "level", &amc_level, NULL)) {
+      level_string = gst_amc_mpeg4_level_to_string (amc_profile);
+      if (!level_string)
+        goto unsupported_level;
+
+      gst_caps_set_simple (caps, "level", G_TYPE_STRING, level_string, NULL);
+    }
+
+  } else if (strcmp (mime, "video/mpeg2") == 0) {
+    caps = gst_caps_new_simple ("video/mpeg", "mpegversion", 2, NULL);
+  } else if (strcmp (mime, "video/3gpp") == 0) {
+    caps = gst_caps_new_empty_simple ("video/x-h263");
+  } else if (strcmp (mime, "video/avc") == 0) {
+    const gchar *profile_string, *level_string;
+
+    caps =
+        gst_caps_new_simple ("video/x-h264", "parsed", G_TYPE_BOOLEAN, TRUE,
+        "stream-format", G_TYPE_STRING, "byte-stream",
+        "alignment", G_TYPE_STRING, "au", NULL);
+
+    if (gst_amc_format_get_int (amc_format, "profile", &amc_profile, NULL)) {
+      profile_string = gst_amc_avc_profile_to_string (amc_profile, NULL);
+      if (!profile_string)
+        goto unsupported_profile;
+
+      gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_string,
+          NULL);
+    }
+
+    if (gst_amc_format_get_int (amc_format, "level", &amc_level, NULL)) {
+      level_string = gst_amc_avc_level_to_string (amc_profile);
+      if (!level_string)
+        goto unsupported_level;
+
+      gst_caps_set_simple (caps, "level", G_TYPE_STRING, level_string, NULL);
+    }
+  } else if (strcmp (mime, "video/x-vnd.on2.vp8") == 0) {
+    caps = gst_caps_new_empty_simple ("video/x-vp8");
+  }
+
+  gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
+      "height", G_TYPE_INT, height,
+      "framerate", GST_TYPE_FRACTION, fraction_n, fraction_d, NULL);
+
+  g_free (mime);
+  return caps;
+
+unsupported_profile:
+  GST_ERROR ("Unsupport amc profile id %d", amc_profile);
+  g_free (mime);
+  gst_object_unref (caps);
+
+  return NULL;
+
+unsupported_level:
+  GST_ERROR ("Unsupport amc level id %d", amc_level);
+  g_free (mime);
+  gst_object_unref (caps);
+
+  return NULL;
+}
+
+static void
+gst_amc_video_enc_base_init (gpointer g_class)
+{
+  GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+  GstAmcVideoEncClass *videoenc_class = GST_AMC_VIDEO_ENC_CLASS (g_class);
+  const GstAmcCodecInfo *codec_info;
+  GstPadTemplate *templ;
+  GstCaps *sink_caps, *src_caps;
+  gchar *longname;
+
+  codec_info =
+      g_type_get_qdata (G_TYPE_FROM_CLASS (g_class), gst_amc_codec_info_quark);
+  /* This happens for the base class and abstract subclasses */
+  if (!codec_info)
+    return;
+
+  videoenc_class->codec_info = codec_info;
+
+  gst_amc_codec_info_to_caps (codec_info, &sink_caps, &src_caps);
+  /* Add pad templates */
+  templ =
+      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, sink_caps);
+  gst_element_class_add_pad_template (element_class, templ);
+  gst_caps_unref (sink_caps);
+
+  templ = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps);
+  gst_element_class_add_pad_template (element_class, templ);
+  gst_caps_unref (src_caps);
+
+  longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name);
+  gst_element_class_set_metadata (element_class,
+      codec_info->name,
+      "Codec/Encoder/Video",
+      longname, "Sebastian Dröge <sebastian.droege@collabora.co.uk>");
+  g_free (longname);
+}
+
+static void
+gst_amc_video_enc_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec)
+{
+  GstAmcVideoEnc *encoder;
+  GstState state;
+
+  encoder = GST_AMC_VIDEO_ENC (object);
+
+  GST_OBJECT_LOCK (encoder);
+
+  state = GST_STATE (encoder);
+  if (state != GST_STATE_READY && state != GST_STATE_NULL)
+    goto wrong_state;
+
+  switch (prop_id) {
+    case PROP_BIT_RATE:
+      encoder->bitrate = g_value_get_uint (value);
+      break;
+    case PROP_I_FRAME_INTERVAL:
+      encoder->i_frame_int = g_value_get_uint (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+  GST_OBJECT_UNLOCK (encoder);
+  return;
+
+  /* ERROR */
+wrong_state:
+  {
+    GST_WARNING_OBJECT (encoder, "setting property in wrong state");
+    GST_OBJECT_UNLOCK (encoder);
+  }
+}
+
+static void
+gst_amc_video_enc_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec)
+{
+  GstAmcVideoEnc *encoder;
+
+  encoder = GST_AMC_VIDEO_ENC (object);
+
+  GST_OBJECT_LOCK (encoder);
+  switch (prop_id) {
+    case PROP_BIT_RATE:
+      g_value_set_uint (value, encoder->bitrate);
+      break;
+    case PROP_I_FRAME_INTERVAL:
+      g_value_set_uint (value, encoder->i_frame_int);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+  GST_OBJECT_UNLOCK (encoder);
+}
+
+
+static void
+gst_amc_video_enc_class_init (GstAmcVideoEncClass * klass)
+{
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+  GstVideoEncoderClass *videoenc_class = GST_VIDEO_ENCODER_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->set_property = gst_amc_video_enc_set_property;
+  gobject_class->get_property = gst_amc_video_enc_get_property;
+  gobject_class->finalize = gst_amc_video_enc_finalize;
+
+  element_class->change_state =
+      GST_DEBUG_FUNCPTR (gst_amc_video_enc_change_state);
+
+  videoenc_class->start = GST_DEBUG_FUNCPTR (gst_amc_video_enc_start);
+  videoenc_class->stop = GST_DEBUG_FUNCPTR (gst_amc_video_enc_stop);
+  videoenc_class->open = GST_DEBUG_FUNCPTR (gst_amc_video_enc_open);
+  videoenc_class->close = GST_DEBUG_FUNCPTR (gst_amc_video_enc_close);
+  videoenc_class->flush = GST_DEBUG_FUNCPTR (gst_amc_video_enc_flush);
+  videoenc_class->set_format = GST_DEBUG_FUNCPTR (gst_amc_video_enc_set_format);
+  videoenc_class->handle_frame =
+      GST_DEBUG_FUNCPTR (gst_amc_video_enc_handle_frame);
+  videoenc_class->finish = GST_DEBUG_FUNCPTR (gst_amc_video_enc_finish);
+
+  g_object_class_install_property (gobject_class, PROP_BIT_RATE,
+      g_param_spec_uint ("bitrate", "Bitrate", "Bitrate in bit/sec", 1,
+          G_MAXINT, BIT_RATE_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class, PROP_I_FRAME_INTERVAL,
+      g_param_spec_uint ("i-frame-interval", "I-frame interval",
+          "The frequency of I frames expressed in seconds between I frames (0 for automatic)",
+          0, G_MAXINT, I_FRAME_INTERVAL_DEFAULT,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+static void
+gst_amc_video_enc_init (GstAmcVideoEnc * self)
+{
+  g_mutex_init (&self->drain_lock);
+  g_cond_init (&self->drain_cond);
+
+  self->bitrate = BIT_RATE_DEFAULT;
+  self->i_frame_int = I_FRAME_INTERVAL_DEFAULT;
+}
+
+static gboolean
+gst_amc_video_enc_open (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self = GST_AMC_VIDEO_ENC (encoder);
+  GstAmcVideoEncClass *klass = GST_AMC_VIDEO_ENC_GET_CLASS (self);
+  GError *err = NULL;
+
+  GST_DEBUG_OBJECT (self, "Opening encoder");
+
+  self->codec = gst_amc_codec_new (klass->codec_info->name, &err);
+  if (!self->codec) {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    return FALSE;
+  }
+  self->started = FALSE;
+  self->flushing = TRUE;
+
+  GST_DEBUG_OBJECT (self, "Opened encoder");
+
+  return TRUE;
+}
+
+static gboolean
+gst_amc_video_enc_close (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self = GST_AMC_VIDEO_ENC (encoder);
+
+  GST_DEBUG_OBJECT (self, "Closing encoder");
+
+  if (self->codec) {
+    GError *err = NULL;
+
+    gst_amc_codec_release (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+
+    gst_amc_codec_free (self->codec);
+  }
+  self->codec = NULL;
+
+  self->started = FALSE;
+  self->flushing = TRUE;
+
+  GST_DEBUG_OBJECT (self, "Closed encoder");
+
+  return TRUE;
+}
+
+static void
+gst_amc_video_enc_finalize (GObject * object)
+{
+  GstAmcVideoEnc *self = GST_AMC_VIDEO_ENC (object);
+
+  g_mutex_clear (&self->drain_lock);
+  g_cond_clear (&self->drain_cond);
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static GstStateChangeReturn
+gst_amc_video_enc_change_state (GstElement * element, GstStateChange transition)
+{
+  GstAmcVideoEnc *self;
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+  GError *err = NULL;
+
+  g_return_val_if_fail (GST_IS_AMC_VIDEO_ENC (element),
+      GST_STATE_CHANGE_FAILURE);
+  self = GST_AMC_VIDEO_ENC (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      break;
+    case GST_STATE_CHANGE_READY_TO_PAUSED:
+      self->downstream_flow_ret = GST_FLOW_OK;
+      self->draining = FALSE;
+      self->started = FALSE;
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      self->flushing = TRUE;
+      gst_amc_codec_flush (self->codec, &err);
+      if (err)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_mutex_lock (&self->drain_lock);
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+      g_mutex_unlock (&self->drain_lock);
+      break;
+    default:
+      break;
+  }
+
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  if (ret == GST_STATE_CHANGE_FAILURE)
+    return ret;
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+      break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      self->downstream_flow_ret = GST_FLOW_FLUSHING;
+      self->started = FALSE;
+      break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      break;
+    default:
+      break;
+  }
+
+  return ret;
+}
+
+#define MAX_FRAME_DIST_TIME  (5 * GST_SECOND)
+#define MAX_FRAME_DIST_FRAMES (100)
+
+static GstVideoCodecFrame *
+_find_nearest_frame (GstAmcVideoEnc * self, GstClockTime reference_timestamp)
+{
+  GList *l, *best_l = NULL;
+  GList *finish_frames = NULL;
+  GstVideoCodecFrame *best = NULL;
+  guint64 best_timestamp = 0;
+  guint64 best_diff = G_MAXUINT64;
+  BufferIdentification *best_id = NULL;
+  GList *frames;
+
+  frames = gst_video_encoder_get_frames (GST_VIDEO_ENCODER (self));
+
+  for (l = frames; l; l = l->next) {
+    GstVideoCodecFrame *tmp = l->data;
+    BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
+    guint64 timestamp, diff;
+
+    /* This happens for frames that were just added but
+     * which were not passed to the component yet. Ignore
+     * them here!
+     */
+    if (!id)
+      continue;
+
+    timestamp = id->timestamp;
+
+    if (timestamp > reference_timestamp)
+      diff = timestamp - reference_timestamp;
+    else
+      diff = reference_timestamp - timestamp;
+
+    if (best == NULL || diff < best_diff) {
+      best = tmp;
+      best_timestamp = timestamp;
+      best_diff = diff;
+      best_l = l;
+      best_id = id;
+
+      /* For frames without timestamp we simply take the first frame */
+      if ((reference_timestamp == 0 && timestamp == 0) || diff == 0)
+        break;
+    }
+  }
+
+  if (best_id) {
+    for (l = frames; l && l != best_l; l = l->next) {
+      GstVideoCodecFrame *tmp = l->data;
+      BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
+      guint64 diff_time, diff_frames;
+
+      if (id->timestamp > best_timestamp)
+        break;
+
+      if (id->timestamp == 0 || best_timestamp == 0)
+        diff_time = 0;
+      else
+        diff_time = best_timestamp - id->timestamp;
+      diff_frames = best->system_frame_number - tmp->system_frame_number;
+
+      if (diff_time > MAX_FRAME_DIST_TIME
+          || diff_frames > MAX_FRAME_DIST_FRAMES) {
+        finish_frames =
+            g_list_prepend (finish_frames, gst_video_codec_frame_ref (tmp));
+      }
+    }
+  }
+
+  if (finish_frames) {
+    g_warning ("%s: Too old frames, bug in encoder -- please file a bug",
+        GST_ELEMENT_NAME (self));
+    for (l = finish_frames; l; l = l->next) {
+      gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (self), l->data);
+    }
+  }
+
+  if (best)
+    gst_video_codec_frame_ref (best);
+
+  g_list_foreach (frames, (GFunc) gst_video_codec_frame_unref, NULL);
+  g_list_free (frames);
+
+  return best;
+}
+
+static gboolean
+gst_amc_video_enc_set_src_caps (GstAmcVideoEnc * self, GstAmcFormat * format)
+{
+  GstCaps *caps;
+  GstVideoCodecState *output_state;
+
+  caps = caps_from_amc_format (format);
+  if (!caps) {
+    GST_ERROR_OBJECT (self, "Failed to create output caps");
+    return FALSE;
+  }
+
+  /* It may not be proper to reference self->input_state here,
+   * because MediaCodec is an async model -- input_state may change multiple times,
+   * the passed-in MediaFormat may not be the one matched to the current input_state.
+   *
+   * Though, currently, the final src caps only calculate
+   * width/height/pixel-aspect-ratio/framerate/codec_data from self->input_state.
+   *
+   * If input width/height/codec_data change(is_format_change), it will restart
+   * MediaCodec, which means in these cases, self->input_state is matched.
+   */
+  output_state = gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (self),
+      caps, self->input_state);
+  gst_video_codec_state_unref (output_state);
+
+  if (!gst_video_encoder_negotiate (GST_VIDEO_ENCODER (self)))
+    return FALSE;
+
+  return TRUE;
+}
+
+/* The weird handling of cropping, alignment and everything is taken from
+ * platform/frameworks/media/libstagefright/colorconversion/ColorConversion.cpp
+ */
+static gboolean
+gst_amc_video_enc_fill_buffer (GstAmcVideoEnc * self, GstBuffer * inbuf,
+    GstAmcBuffer * outbuf, const GstAmcBufferInfo * buffer_info)
+{
+  GstVideoCodecState *input_state = self->input_state;
+  /* The fill_buffer runs in the same thread as set_format?
+   * then we can use state->info safely */
+  GstVideoInfo *info = &input_state->info;
+
+  if (buffer_info->size < self->color_format_info.frame_size)
+    return FALSE;
+
+  return gst_amc_color_format_copy (&self->color_format_info, outbuf,
+      buffer_info, info, inbuf, COLOR_FORMAT_COPY_IN);
+}
+
+static GstFlowReturn
+gst_amc_video_enc_handle_output_frame (GstAmcVideoEnc * self,
+    GstAmcBuffer * buf, const GstAmcBufferInfo * buffer_info,
+    GstVideoCodecFrame * frame)
+{
+  GstFlowReturn flow_ret = GST_FLOW_OK;
+  GstVideoEncoder *encoder = GST_VIDEO_ENCODER_CAST (self);
+
+  /* The BUFFER_FLAG_CODEC_CONFIG logic is borrowed from
+   * gst-omx. see *_handle_output_frame in
+   * gstomxvideoenc.c and gstomxh264enc.c */
+  if ((buffer_info->flags & BUFFER_FLAG_CODEC_CONFIG)
+      && buffer_info->size > 0) {
+    GstStructure *s;
+    GstVideoCodecState *state;
+
+    state = gst_video_encoder_get_output_state (encoder);
+    s = gst_caps_get_structure (state->caps, 0);
+    if (!strcmp (gst_structure_get_name (s), "video/x-h264")) {
+      gst_video_codec_state_unref (state);
+
+      if (buffer_info->size > 4 &&
+          GST_READ_UINT32_BE (buf->data + buffer_info->offset) == 0x00000001) {
+        GList *l = NULL;
+        GstBuffer *hdrs;
+
+        GST_DEBUG_OBJECT (self, "got codecconfig in byte-stream format");
+
+        hdrs = gst_buffer_new_and_alloc (buffer_info->size);
+        gst_buffer_fill (hdrs, 0, buf->data + buffer_info->offset,
+            buffer_info->size);
+
+        l = g_list_append (l, hdrs);
+        gst_video_encoder_set_headers (encoder, l);
+      }
+    } else {
+      GstBuffer *codec_data;
+
+      GST_DEBUG_OBJECT (self, "Handling codec data");
+
+      codec_data = gst_buffer_new_and_alloc (buffer_info->size);
+      gst_buffer_fill (codec_data, 0, buf->data + buffer_info->offset,
+          buffer_info->size);
+      state->codec_data = codec_data;
+      gst_video_codec_state_unref (state);
+
+      if (!gst_video_encoder_negotiate (encoder)) {
+        gst_video_codec_frame_unref (frame);
+        return GST_FLOW_NOT_NEGOTIATED;
+      }
+
+      return GST_FLOW_OK;
+    }
+  }
+
+  if (buffer_info->size > 0) {
+    GstBuffer *out_buf;
+    GstPad *srcpad;
+
+    srcpad = GST_VIDEO_ENCODER_SRC_PAD (encoder);
+    out_buf =
+        gst_video_encoder_allocate_output_buffer (encoder, buffer_info->size);
+    gst_buffer_fill (out_buf, 0, buf->data + buffer_info->offset,
+        buffer_info->size);
+
+    GST_BUFFER_PTS (out_buf) =
+        gst_util_uint64_scale (buffer_info->presentation_time_us, GST_USECOND,
+        1);
+
+    if (frame) {
+      frame->output_buffer = out_buf;
+      flow_ret = gst_video_encoder_finish_frame (encoder, frame);
+    } else {
+      /* This sometimes happens at EOS or if the input is not properly framed,
+       * let's handle it gracefully by allocating a new buffer for the current
+       * caps and filling it
+       */
+
+      GST_ERROR_OBJECT (self, "No corresponding frame found");
+      flow_ret = gst_pad_push (srcpad, out_buf);
+    }
+  } else if (frame) {
+    flow_ret = gst_video_encoder_finish_frame (encoder, frame);
+  }
+
+  return flow_ret;
+}
+
+static void
+gst_amc_video_enc_loop (GstAmcVideoEnc * self)
+{
+  GstVideoCodecFrame *frame;
+  GstFlowReturn flow_ret = GST_FLOW_OK;
+  gboolean is_eos;
+  GstAmcBufferInfo buffer_info;
+  GstAmcBuffer *buf;
+  gint idx;
+  GError *err = NULL;
+
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+
+retry:
+  GST_DEBUG_OBJECT (self, "Waiting for available output buffer");
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+  /* Wait at most 100ms here, some codecs don't fail dequeueing if
+   * the codec is flushing, causing deadlocks during shutdown */
+  idx =
+      gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info, 100000,
+      &err);
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+  /*} */
+
+  if (idx < 0 || self->amc_format) {
+    if (self->flushing) {
+      g_clear_error (&err);
+      goto flushing;
+    }
+
+    /* The comments from https://android.googlesource.com/platform/cts/+/android-4.3_r3.1/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java
+     * line 539 says INFO_OUTPUT_FORMAT_CHANGED is not expected for an encoder
+     */
+    if (self->amc_format || idx == INFO_OUTPUT_FORMAT_CHANGED) {
+      GstAmcFormat *format;
+      gchar *format_string;
+
+      GST_DEBUG_OBJECT (self, "Output format has changed");
+
+      format = (idx == INFO_OUTPUT_FORMAT_CHANGED) ?
+          gst_amc_codec_get_output_format (self->codec,
+          &err) : self->amc_format;
+      if (err) {
+        format = self->amc_format;
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      }
+
+      if (self->amc_format) {
+        if (format != self->amc_format)
+          gst_amc_format_free (self->amc_format);
+        self->amc_format = NULL;
+      }
+
+      if (!format)
+        goto format_error;
+
+      format_string = gst_amc_format_to_string (format, &err);
+      if (err) {
+        gst_amc_format_free (format);
+        goto format_error;
+      }
+      GST_DEBUG_OBJECT (self, "Got new output format: %s", format_string);
+      g_free (format_string);
+
+      if (!gst_amc_video_enc_set_src_caps (self, format)) {
+        gst_amc_format_free (format);
+        goto format_error;
+      }
+
+      gst_amc_format_free (format);
+
+      if (self->output_buffers)
+        gst_amc_codec_free_buffers (self->output_buffers,
+            self->n_output_buffers);
+      self->output_buffers =
+          gst_amc_codec_get_output_buffers (self->codec,
+          &self->n_output_buffers, &err);
+      if (!self->output_buffers)
+        goto get_output_buffers_error;
+
+      if (idx >= 0)
+        goto process_buffer;
+
+      goto retry;
+    }
+
+    switch (idx) {
+      case INFO_OUTPUT_BUFFERS_CHANGED:{
+        GST_DEBUG_OBJECT (self, "Output buffers have changed");
+        if (self->output_buffers)
+          gst_amc_codec_free_buffers (self->output_buffers,
+              self->n_output_buffers);
+        self->output_buffers =
+            gst_amc_codec_get_output_buffers (self->codec,
+            &self->n_output_buffers, &err);
+        if (!self->output_buffers)
+          goto get_output_buffers_error;
+        break;
+      }
+      case INFO_TRY_AGAIN_LATER:
+        GST_DEBUG_OBJECT (self, "Dequeueing output buffer timed out");
+        goto retry;
+        break;
+      case G_MININT:
+        GST_ERROR_OBJECT (self, "Failure dequeueing input buffer");
+        goto dequeue_error;
+        break;
+      default:
+        g_assert_not_reached ();
+        break;
+    }
+
+    goto retry;
+  }
+
+process_buffer:
+  GST_DEBUG_OBJECT (self,
+      "Got output buffer at index %d: size %d time %" G_GINT64_FORMAT
+      " flags 0x%08x", idx, buffer_info.size, buffer_info.presentation_time_us,
+      buffer_info.flags);
+
+  frame =
+      _find_nearest_frame (self,
+      gst_util_uint64_scale (buffer_info.presentation_time_us, GST_USECOND, 1));
+
+  is_eos = ! !(buffer_info.flags & BUFFER_FLAG_END_OF_STREAM);
+
+  if (idx >= self->n_output_buffers) {
+    GST_ERROR_OBJECT (self, "Invalid output buffer index %d of %d",
+        idx, self->n_output_buffers);
+
+    goto invalid_buffer;
+  }
+  buf = &self->output_buffers[idx];
+
+  flow_ret =
+      gst_amc_video_enc_handle_output_frame (self, buf, &buffer_info, frame);
+
+  if (!gst_amc_codec_release_output_buffer (self->codec, idx, &err)) {
+    if (self->flushing) {
+      g_clear_error (&err);
+      goto flushing;
+    }
+    goto failed_release;
+  }
+
+  if (is_eos || flow_ret == GST_FLOW_EOS) {
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    if (self->draining) {
+      GST_DEBUG_OBJECT (self, "Drained");
+      self->draining = FALSE;
+      g_cond_broadcast (&self->drain_cond);
+    } else if (flow_ret == GST_FLOW_OK) {
+      GST_DEBUG_OBJECT (self, "Component signalled EOS");
+      flow_ret = GST_FLOW_EOS;
+    }
+    g_mutex_unlock (&self->drain_lock);
+    GST_VIDEO_ENCODER_STREAM_LOCK (self);
+  } else {
+    GST_DEBUG_OBJECT (self, "Finished frame: %s", gst_flow_get_name (flow_ret));
+  }
+
+  self->downstream_flow_ret = flow_ret;
+
+  if (flow_ret != GST_FLOW_OK)
+    goto flow_error;
+
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+
+  return;
+
+dequeue_error:
+  {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self), gst_event_new_eos ());
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_ERROR;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+
+get_output_buffers_error:
+  {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self), gst_event_new_eos ());
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_ERROR;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+
+format_error:
+  {
+    if (err)
+      GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    else
+      GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
+          ("Failed to handle format"));
+    gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self), gst_event_new_eos ());
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_ERROR;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+failed_release:
+  {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self), gst_event_new_eos ());
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_ERROR;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+flushing:
+  {
+    GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_FLUSHING;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+
+flow_error:
+  {
+    if (flow_ret == GST_FLOW_EOS) {
+      GST_DEBUG_OBJECT (self, "EOS");
+      gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self),
+          gst_event_new_eos ());
+      gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    } else if (flow_ret == GST_FLOW_NOT_LINKED || flow_ret < GST_FLOW_EOS) {
+      GST_ELEMENT_ERROR (self, STREAM, FAILED,
+          ("Internal data stream error."), ("stream stopped, reason %s",
+              gst_flow_get_name (flow_ret)));
+      gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self),
+          gst_event_new_eos ());
+      gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    }
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+
+invalid_buffer:
+  {
+    GST_ELEMENT_ERROR (self, LIBRARY, SETTINGS, (NULL),
+        ("Invalid sized input buffer"));
+    gst_pad_push_event (GST_VIDEO_ENCODER_SRC_PAD (self), gst_event_new_eos ());
+    gst_pad_pause_task (GST_VIDEO_ENCODER_SRC_PAD (self));
+    self->downstream_flow_ret = GST_FLOW_NOT_NEGOTIATED;
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    return;
+  }
+}
+
+static gboolean
+gst_amc_video_enc_start (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+  self->last_upstream_ts = 0;
+  self->eos = FALSE;
+  self->downstream_flow_ret = GST_FLOW_OK;
+  self->started = FALSE;
+  self->flushing = TRUE;
+
+  return TRUE;
+}
+
+static gboolean
+gst_amc_video_enc_stop (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self;
+  GError *err = NULL;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+  GST_DEBUG_OBJECT (self, "Stopping encoder");
+  self->flushing = TRUE;
+  if (self->started) {
+    gst_amc_codec_flush (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    gst_amc_codec_stop (self->codec, &err);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    self->started = FALSE;
+    if (self->input_buffers)
+      gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
+    self->input_buffers = NULL;
+    if (self->output_buffers)
+      gst_amc_codec_free_buffers (self->output_buffers, self->n_output_buffers);
+    self->output_buffers = NULL;
+  }
+  gst_pad_stop_task (GST_VIDEO_ENCODER_SRC_PAD (encoder));
+
+  self->downstream_flow_ret = GST_FLOW_FLUSHING;
+  self->eos = FALSE;
+  g_mutex_lock (&self->drain_lock);
+  self->draining = FALSE;
+  g_cond_broadcast (&self->drain_cond);
+  g_mutex_unlock (&self->drain_lock);
+  if (self->input_state)
+    gst_video_codec_state_unref (self->input_state);
+  self->input_state = NULL;
+
+  if (self->amc_format) {
+    gst_amc_format_free (self->amc_format);
+    self->amc_format = NULL;
+  }
+
+  GST_DEBUG_OBJECT (self, "Stopped encoder");
+  return TRUE;
+}
+
+static gboolean
+gst_amc_video_enc_set_format (GstVideoEncoder * encoder,
+    GstVideoCodecState * state)
+{
+  GstAmcVideoEnc *self;
+  GstAmcFormat *format = NULL;
+  GstCaps *allowed_caps = NULL;
+  gboolean is_format_change = FALSE;
+  gboolean needs_disable = FALSE;
+  gchar *format_string;
+  gboolean r = FALSE;
+  GError *err = NULL;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+
+  GST_DEBUG_OBJECT (self, "Setting new caps %" GST_PTR_FORMAT, state->caps);
+
+  /* Check if the caps change is a real format change or if only irrelevant
+   * parts of the caps have changed or nothing at all.
+   */
+  is_format_change |= self->color_format_info.width != state->info.width;
+  is_format_change |= self->color_format_info.height != state->info.height;
+  needs_disable = self->started;
+
+  /* If the component is not started and a real format change happens
+   * we have to restart the component. If no real format change
+   * happened we can just exit here.
+   */
+  if (needs_disable && !is_format_change) {
+
+    /* Framerate or something minor changed */
+    if (self->input_state)
+      gst_video_codec_state_unref (self->input_state);
+    self->input_state = gst_video_codec_state_ref (state);
+    GST_DEBUG_OBJECT (self,
+        "Already running and caps did not change the format");
+    return TRUE;
+  }
+
+  if (needs_disable && is_format_change) {
+    gst_amc_video_enc_drain (self);
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    gst_amc_video_enc_stop (GST_VIDEO_ENCODER (self));
+    GST_VIDEO_ENCODER_STREAM_LOCK (self);
+    gst_amc_video_enc_close (GST_VIDEO_ENCODER (self));
+    if (!gst_amc_video_enc_open (GST_VIDEO_ENCODER (self))) {
+      GST_ERROR_OBJECT (self, "Failed to open codec again");
+      return FALSE;
+    }
+
+    if (!gst_amc_video_enc_start (GST_VIDEO_ENCODER (self))) {
+      GST_ERROR_OBJECT (self, "Failed to start codec again");
+    }
+  }
+  /* srcpad task is not running at this point */
+  if (self->input_state)
+    gst_video_codec_state_unref (self->input_state);
+  self->input_state = NULL;
+
+  GST_DEBUG_OBJECT (self, "picking an output format ...");
+  allowed_caps = gst_pad_get_allowed_caps (GST_VIDEO_ENCODER_SRC_PAD (encoder));
+  if (!allowed_caps) {
+    GST_DEBUG_OBJECT (self, "... but no peer, using template caps");
+    /* we need to copy because get_allowed_caps returns a ref, and
+     * get_pad_template_caps doesn't */
+    allowed_caps =
+        gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_ENCODER_SRC_PAD
+            (encoder)));
+  }
+  GST_DEBUG_OBJECT (self, "chose caps %" GST_PTR_FORMAT, allowed_caps);
+  allowed_caps = gst_caps_truncate (allowed_caps);
+
+  format = create_amc_format (self, state, allowed_caps);
+  if (!format)
+    goto quit;
+
+  format_string = gst_amc_format_to_string (format, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  GST_DEBUG_OBJECT (self, "Configuring codec with format: %s",
+      GST_STR_NULL (format_string));
+  g_free (format_string);
+
+  if (!gst_amc_codec_configure (self->codec, format, 1, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to configure codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    goto quit;
+  }
+
+  if (!gst_amc_codec_start (self->codec, &err)) {
+    GST_ERROR_OBJECT (self, "Failed to start codec");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    goto quit;
+  }
+
+  if (self->input_buffers)
+    gst_amc_codec_free_buffers (self->input_buffers, self->n_input_buffers);
+  self->input_buffers =
+      gst_amc_codec_get_input_buffers (self->codec, &self->n_input_buffers,
+      &err);
+  if (!self->input_buffers) {
+    GST_ERROR_OBJECT (self, "Failed to get input buffers");
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    goto quit;
+  }
+
+  self->amc_format = format;
+  format = NULL;
+
+  self->input_state = gst_video_codec_state_ref (state);
+
+  self->started = TRUE;
+
+  /* Start the srcpad loop again */
+  self->flushing = FALSE;
+  self->downstream_flow_ret = GST_FLOW_OK;
+  gst_pad_start_task (GST_VIDEO_ENCODER_SRC_PAD (self),
+      (GstTaskFunction) gst_amc_video_enc_loop, encoder, NULL);
+
+  r = TRUE;
+
+quit:
+  if (allowed_caps)
+    gst_object_unref (allowed_caps);
+
+  if (format)
+    gst_amc_format_free (format);
+
+  return r;
+}
+
+static gboolean
+gst_amc_video_enc_flush (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self;
+  GError *err = NULL;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+
+  GST_DEBUG_OBJECT (self, "Flushing encoder");
+
+  if (!self->started) {
+    GST_DEBUG_OBJECT (self, "Codec not started yet");
+    return TRUE;
+  }
+
+  self->flushing = TRUE;
+  gst_amc_codec_flush (self->codec, &err);
+  if (err)
+    GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+
+  /* Wait until the srcpad loop is finished,
+   * unlock GST_VIDEO_ENCODER_STREAM_LOCK to prevent deadlocks
+   * caused by using this lock from inside the loop function */
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+  GST_PAD_STREAM_LOCK (GST_VIDEO_ENCODER_SRC_PAD (self));
+  GST_PAD_STREAM_UNLOCK (GST_VIDEO_ENCODER_SRC_PAD (self));
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+  self->flushing = FALSE;
+
+  /* Start the srcpad loop again */
+  self->last_upstream_ts = 0;
+  self->eos = FALSE;
+  self->downstream_flow_ret = GST_FLOW_OK;
+  gst_pad_start_task (GST_VIDEO_ENCODER_SRC_PAD (self),
+      (GstTaskFunction) gst_amc_video_enc_loop, encoder, NULL);
+
+  GST_DEBUG_OBJECT (self, "Flush encoder");
+
+  return TRUE;
+}
+
+static GstFlowReturn
+gst_amc_video_enc_handle_frame (GstVideoEncoder * encoder,
+    GstVideoCodecFrame * frame)
+{
+  GstAmcVideoEnc *self;
+  gint idx;
+  GstAmcBuffer *buf;
+  GstAmcBufferInfo buffer_info;
+  GstClockTime timestamp, duration, timestamp_offset = 0;
+  BufferIdentification *id;
+  GError *err = NULL;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+
+  GST_DEBUG_OBJECT (self, "Handling frame");
+
+  if (!self->started) {
+    GST_ERROR_OBJECT (self, "Codec not started yet");
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_NOT_NEGOTIATED;
+  }
+
+  if (self->eos) {
+    GST_WARNING_OBJECT (self, "Got frame after EOS");
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_EOS;
+  }
+
+  if (self->flushing)
+    goto flushing;
+
+  if (self->downstream_flow_ret != GST_FLOW_OK)
+    goto downstream_error;
+
+  timestamp = frame->pts;
+  duration = frame->duration;
+
+again:
+  /* Make sure to release the base class stream lock, otherwise
+   * _loop() can't call _finish_frame() and we might block forever
+   * because no input buffers are released */
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+  /* Wait at most 100ms here, some codecs don't fail dequeueing if
+   * the codec is flushing, causing deadlocks during shutdown */
+  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 100000, &err);
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+
+  if (idx < 0) {
+    if (self->flushing || self->downstream_flow_ret == GST_FLOW_FLUSHING) {
+      g_clear_error (&err);
+      goto flushing;
+    }
+
+    switch (idx) {
+      case INFO_TRY_AGAIN_LATER:
+        GST_DEBUG_OBJECT (self, "Dequeueing input buffer timed out");
+        goto again;             /* next try */
+        break;
+      case G_MININT:
+        GST_ERROR_OBJECT (self, "Failed to dequeue input buffer");
+        goto dequeue_error;
+      default:
+        g_assert_not_reached ();
+        break;
+    }
+
+    goto again;
+  }
+
+  if (idx >= self->n_input_buffers)
+    goto invalid_buffer_index;
+
+  if (self->flushing) {
+    memset (&buffer_info, 0, sizeof (buffer_info));
+    gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, NULL);
+    goto flushing;
+  }
+
+  if (self->downstream_flow_ret != GST_FLOW_OK) {
+    memset (&buffer_info, 0, sizeof (buffer_info));
+    gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err);
+    if (err && !self->flushing)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    g_clear_error (&err);
+    goto downstream_error;
+  }
+
+  /* Now handle the frame */
+
+  /* Copy the buffer content in chunks of size as requested
+   * by the port */
+  buf = &self->input_buffers[idx];
+
+  memset (&buffer_info, 0, sizeof (buffer_info));
+  buffer_info.offset = 0;
+  buffer_info.size = MIN (self->color_format_info.frame_size, buf->size);
+
+  if (!gst_amc_video_enc_fill_buffer (self, frame->input_buffer, buf,
+          &buffer_info)) {
+    memset (&buffer_info, 0, sizeof (buffer_info));
+    gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err);
+    if (err && !self->flushing)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    g_clear_error (&err);
+    goto buffer_fill_error;
+  }
+
+  if (timestamp != GST_CLOCK_TIME_NONE) {
+    buffer_info.presentation_time_us =
+        gst_util_uint64_scale (timestamp + timestamp_offset, 1, GST_USECOND);
+    self->last_upstream_ts = timestamp + timestamp_offset;
+  }
+  if (duration != GST_CLOCK_TIME_NONE)
+    self->last_upstream_ts += duration;
+
+  id = buffer_identification_new (timestamp + timestamp_offset);
+  if (GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame))
+    buffer_info.flags |= BUFFER_FLAG_SYNC_FRAME;
+  gst_video_codec_frame_set_user_data (frame, id,
+      (GDestroyNotify) buffer_identification_free);
+
+  GST_DEBUG_OBJECT (self,
+      "Queueing buffer %d: size %d time %" G_GINT64_FORMAT " flags 0x%08x",
+      idx, buffer_info.size, buffer_info.presentation_time_us,
+      buffer_info.flags);
+  if (!gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
+    if (self->flushing) {
+      g_clear_error (&err);
+      goto flushing;
+    }
+    goto queue_error;
+  }
+
+  gst_video_codec_frame_unref (frame);
+
+  return self->downstream_flow_ret;
+
+downstream_error:
+  {
+    GST_ERROR_OBJECT (self, "Downstream returned %s",
+        gst_flow_get_name (self->downstream_flow_ret));
+
+    gst_video_codec_frame_unref (frame);
+    return self->downstream_flow_ret;
+  }
+invalid_buffer_index:
+  {
+    GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL),
+        ("Invalid input buffer index %d of %d", idx, self->n_input_buffers));
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+buffer_fill_error:
+  {
+    GST_ELEMENT_ERROR (self, RESOURCE, WRITE, (NULL),
+        ("Failed to write input into the amc buffer(write %dB to a %dB buffer)",
+            self->color_format_info.frame_size, buf->size));
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+dequeue_error:
+  {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+queue_error:
+  {
+    GST_ELEMENT_ERROR_FROM_ERROR (self, err);
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_ERROR;
+  }
+flushing:
+  {
+    GST_DEBUG_OBJECT (self, "Flushing -- returning FLUSHING");
+    gst_video_codec_frame_unref (frame);
+    return GST_FLOW_FLUSHING;
+  }
+}
+
+static GstFlowReturn
+gst_amc_video_enc_finish (GstVideoEncoder * encoder)
+{
+  GstAmcVideoEnc *self;
+  gint idx;
+  GError *err = NULL;
+
+  self = GST_AMC_VIDEO_ENC (encoder);
+  GST_DEBUG_OBJECT (self, "Sending EOS to the component");
+
+  /* Don't send EOS buffer twice, this doesn't work */
+  if (self->eos) {
+    GST_DEBUG_OBJECT (self, "Component is already EOS");
+    return GST_VIDEO_ENCODER_FLOW_DROPPED;
+  }
+  self->eos = TRUE;
+
+  /* Make sure to release the base class stream lock, otherwise
+   * _loop() can't call _finish_frame() and we might block forever
+   * because no input buffers are released */
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+  /* Send an EOS buffer to the component and let the base
+   * class drop the EOS event. We will send it later when
+   * the EOS buffer arrives on the output port.
+   * Wait at most 0.5s here. */
+  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000, &err);
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+
+  if (idx >= 0 && idx < self->n_input_buffers) {
+    GstAmcBufferInfo buffer_info;
+
+    memset (&buffer_info, 0, sizeof (buffer_info));
+    buffer_info.size = 0;
+    buffer_info.presentation_time_us =
+        gst_util_uint64_scale (self->last_upstream_ts, 1, GST_USECOND);
+    buffer_info.flags |= BUFFER_FLAG_END_OF_STREAM;
+
+    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
+      GST_DEBUG_OBJECT (self, "Sent EOS to the codec");
+    } else {
+      GST_ERROR_OBJECT (self, "Failed to send EOS to the codec");
+      if (!self->flushing)
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+      g_clear_error (&err);
+    }
+  } else if (idx >= self->n_input_buffers) {
+    GST_ERROR_OBJECT (self, "Invalid input buffer index %d of %d",
+        idx, self->n_input_buffers);
+  } else {
+    GST_ERROR_OBJECT (self, "Failed to dequeue input buffer for EOS: %d", idx);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+  }
+
+  return GST_VIDEO_ENCODER_FLOW_DROPPED;
+}
+
+static GstFlowReturn
+gst_amc_video_enc_drain (GstAmcVideoEnc * self)
+{
+  GstFlowReturn ret;
+  gint idx;
+  GError *err = NULL;
+
+  GST_DEBUG_OBJECT (self, "Draining codec");
+  if (!self->started) {
+    GST_DEBUG_OBJECT (self, "Codec not started yet");
+    return GST_FLOW_OK;
+  }
+
+  /* Don't send EOS buffer twice, this doesn't work */
+  if (self->eos) {
+    GST_DEBUG_OBJECT (self, "Codec is EOS already");
+    return GST_FLOW_OK;
+  }
+
+  /* Make sure to release the base class stream lock, otherwise
+   * _loop() can't call _finish_frame() and we might block forever
+   * because no input buffers are released */
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+  /* Send an EOS buffer to the component and let the base
+   * class drop the EOS event. We will send it later when
+   * the EOS buffer arrives on the output port.
+   * Wait at most 0.5s here. */
+  idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000, &err);
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+
+  if (idx >= 0 && idx < self->n_input_buffers) {
+    GstAmcBufferInfo buffer_info;
+
+    GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+    g_mutex_lock (&self->drain_lock);
+    self->draining = TRUE;
+
+    memset (&buffer_info, 0, sizeof (buffer_info));
+    buffer_info.size = 0;
+    buffer_info.presentation_time_us =
+        gst_util_uint64_scale (self->last_upstream_ts, 1, GST_USECOND);
+    buffer_info.flags |= BUFFER_FLAG_END_OF_STREAM;
+
+    if (gst_amc_codec_queue_input_buffer (self->codec, idx, &buffer_info, &err)) {
+      GST_DEBUG_OBJECT (self, "Waiting until codec is drained");
+      g_cond_wait (&self->drain_cond, &self->drain_lock);
+      GST_DEBUG_OBJECT (self, "Drained codec");
+      ret = GST_FLOW_OK;
+    } else {
+      GST_ERROR_OBJECT (self, "Failed to queue input buffer");
+      if (self->flushing) {
+        g_clear_error (&err);
+        ret = GST_FLOW_FLUSHING;
+      } else {
+        GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+        ret = GST_FLOW_ERROR;
+      }
+    }
+
+    g_mutex_unlock (&self->drain_lock);
+    GST_VIDEO_ENCODER_STREAM_LOCK (self);
+  } else if (idx >= self->n_input_buffers) {
+    GST_ERROR_OBJECT (self, "Invalid input buffer index %d of %d",
+        idx, self->n_input_buffers);
+    ret = GST_FLOW_ERROR;
+  } else {
+    GST_ERROR_OBJECT (self, "Failed to acquire buffer for EOS: %d", idx);
+    if (err)
+      GST_ELEMENT_WARNING_FROM_ERROR (self, err);
+    ret = GST_FLOW_ERROR;
+  }
+
+  return ret;
+}
diff --git a/sys/androidmedia/gstamcvideoenc.h b/sys/androidmedia/gstamcvideoenc.h
new file mode 100644
index 0000000..8373ce3
--- /dev/null
+++ b/sys/androidmedia/gstamcvideoenc.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2012, Collabora Ltd.
+ *   Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * Copyright (C) 2013, Lemote Ltd.
+ *   Author: Chen Jie <chenj@lemote.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ */
+
+#ifndef __GST_AMC_VIDEO_ENC_H__
+#define __GST_AMC_VIDEO_ENC_H__
+
+#include <gst/gst.h>
+
+#include <gst/video/gstvideoencoder.h>
+
+#include "gstamc.h"
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_AMC_VIDEO_ENC \
+  (gst_amc_video_enc_get_type())
+#define GST_AMC_VIDEO_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AMC_VIDEO_ENC,GstAmcVideoEnc))
+#define GST_AMC_VIDEO_ENC_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AMC_VIDEO_ENC,GstAmcVideoEncClass))
+#define GST_AMC_VIDEO_ENC_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AMC_VIDEO_ENC,GstAmcVideoEncClass))
+#define GST_IS_AMC_VIDEO_ENC(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AMC_VIDEO_ENC))
+#define GST_IS_AMC_VIDEO_ENC_CLASS(obj) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AMC_VIDEO_ENC))
+typedef struct _GstAmcVideoEnc GstAmcVideoEnc;
+typedef struct _GstAmcVideoEncClass GstAmcVideoEncClass;
+
+struct _GstAmcVideoEnc
+{
+  GstVideoEncoder parent;
+
+  /* < private > */
+  GstAmcCodec *codec;
+  GstAmcBuffer *input_buffers, *output_buffers;
+  gsize n_input_buffers, n_output_buffers;
+  GstAmcFormat *amc_format;
+
+  GstVideoCodecState *input_state;
+
+  /* Input format of the codec */
+  GstVideoFormat format;
+  GstAmcColorFormatInfo color_format_info;
+
+  guint bitrate;
+  guint i_frame_int;
+
+  /* TRUE if the component is configured and saw
+   * the first buffer */
+  gboolean started;
+  gboolean flushing;
+
+  GstClockTime last_upstream_ts;
+
+  /* Draining state */
+  GMutex drain_lock;
+  GCond drain_cond;
+  /* TRUE if EOS buffers shouldn't be forwarded */
+  gboolean draining;
+
+  /* TRUE if upstream is EOS */
+  gboolean eos;
+
+  GstFlowReturn downstream_flow_ret;
+};
+
+struct _GstAmcVideoEncClass
+{
+  GstVideoEncoderClass parent_class;
+
+  const GstAmcCodecInfo *codec_info;
+};
+
+GType gst_amc_video_enc_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GST_AMC_VIDEO_ENC_H__ */
diff --git a/sys/applemedia-nonpublic/Makefile.in b/sys/applemedia-nonpublic/Makefile.in
index afc897f..93bbf07 100644
--- a/sys/applemedia-nonpublic/Makefile.in
+++ b/sys/applemedia-nonpublic/Makefile.in
@@ -386,6 +386,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -472,6 +474,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -763,6 +766,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstapplemedia_nonpublic.la
 libgstapplemedia_nonpublic_la_SOURCES = plugin.m bufferfactory.m \
 	corevideobuffer.c coremediabuffer.c cvapi.c cmapi.c \
diff --git a/sys/applemedia/Makefile.in b/sys/applemedia/Makefile.in
index 25e6442..dfafb45 100644
--- a/sys/applemedia/Makefile.in
+++ b/sys/applemedia/Makefile.in
@@ -405,6 +405,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -491,6 +493,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -782,6 +785,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstapplemedia.la
 libgstapplemedia_la_SOURCES = plugin.m vtutil.c corevideobuffer.c \
 	coremediabuffer.c coremediactx.c vtapi.c atdec.c dynapi.c \
diff --git a/sys/avc/Makefile.in b/sys/avc/Makefile.in
index deac649..26e5db2 100644
--- a/sys/avc/Makefile.in
+++ b/sys/avc/Makefile.in
@@ -345,6 +345,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -431,6 +433,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -722,6 +725,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstavc.la
 libgstavc_la_SOURCES = gstavcplugin.cpp gstavcsrc.cpp
 libgstavc_la_CPPFLAGS = \
diff --git a/sys/bluez/Makefile.in b/sys/bluez/Makefile.in
index 48f3b34..c648847 100644
--- a/sys/bluez/Makefile.in
+++ b/sys/bluez/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstbluez.la
 libgstbluez_la_SOURCES = \
 	bluez-plugin.c \
diff --git a/sys/d3dvideosink/Makefile.in b/sys/d3dvideosink/Makefile.in
index 4821897..9d057a9 100644
--- a/sys/d3dvideosink/Makefile.in
+++ b/sys/d3dvideosink/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstd3dvideosink.la
 libgstd3dvideosink_la_SOURCES = d3dvideosink.c d3dhelpers.c
 libgstd3dvideosink_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(DIRECT3D_CFLAGS) $(DIRECTX_CFLAGS) \
diff --git a/sys/decklink/Makefile.in b/sys/decklink/Makefile.in
index 4d3946b..8ae5876 100644
--- a/sys/decklink/Makefile.in
+++ b/sys/decklink/Makefile.in
@@ -363,6 +363,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -449,6 +451,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -740,6 +743,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdecklink.la
 libgstdecklink_la_CPPFLAGS = \
 	$(GST_PLUGINS_BAD_CFLAGS) \
diff --git a/sys/directdraw/Makefile.in b/sys/directdraw/Makefile.in
index dabbe06..d24dae7 100644
--- a/sys/directdraw/Makefile.in
+++ b/sys/directdraw/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdirectdrawsink.la
 libgstdirectdrawsink_la_SOURCES = gstdirectdrawsink.c gstdirectdrawplugin.c
 libgstdirectdrawsink_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/directsound/Makefile.in b/sys/directsound/Makefile.in
index b1054e2..23acdce 100644
--- a/sys/directsound/Makefile.in
+++ b/sys/directsound/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdirectsoundsrc.la
 libgstdirectsoundsrc_la_SOURCES = gstdirectsoundsrc.c gstdirectsoundplugin.c
 libgstdirectsoundsrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/dshowdecwrapper/Makefile.in b/sys/dshowdecwrapper/Makefile.in
index ffc1116..3422062 100644
--- a/sys/dshowdecwrapper/Makefile.in
+++ b/sys/dshowdecwrapper/Makefile.in
@@ -350,6 +350,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -436,6 +438,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -727,6 +730,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdshowdecwrapper.la
 libgstdshowdecwrapper_la_SOURCES = gstdshowaudiodec.cpp gstdshowdecwrapper.cpp \
 								   gstdshowvideodec.cpp gstdshowutil.cpp \
diff --git a/sys/dshowsrcwrapper/Makefile.in b/sys/dshowsrcwrapper/Makefile.in
index eab1b6e..420335d 100644
--- a/sys/dshowsrcwrapper/Makefile.in
+++ b/sys/dshowsrcwrapper/Makefile.in
@@ -261,6 +261,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -347,6 +349,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -638,6 +641,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
   gstdshowaudiosrc.cpp \
   gstdshowaudiosrc.h \
diff --git a/sys/dshowvideosink/Makefile.in b/sys/dshowvideosink/Makefile.in
index 7faede2..d316091 100644
--- a/sys/dshowvideosink/Makefile.in
+++ b/sys/dshowvideosink/Makefile.in
@@ -261,6 +261,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -347,6 +349,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -638,6 +641,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
 			 dshowvideofakesrc.cpp \
 			 dshowvideofakesrc.h \
diff --git a/sys/dvb/Makefile.in b/sys/dvb/Makefile.in
index 019f400..434d987 100644
--- a/sys/dvb/Makefile.in
+++ b/sys/dvb/Makefile.in
@@ -353,6 +353,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -439,6 +441,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -730,6 +733,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstdvb.la
 libgstdvb_la_SOURCES = \
 	gstdvb.c \
diff --git a/sys/dvb/camconditionalaccess.c b/sys/dvb/camconditionalaccess.c
index 50d6568..c09a6b7 100644
--- a/sys/dvb/camconditionalaccess.c
+++ b/sys/dvb/camconditionalaccess.c
@@ -137,7 +137,7 @@
 send_conditional_access_enquiry (CamConditionalAccess * cas,
     CamSLSession * session)
 {
-  GST_DEBUG ("sending application cas enquiry");
+  GST_DEBUG ("sending application CAS enquiry");
   return send_simple (cas, session, TAG_CONDITIONAL_ACCESS_INFO_ENQUIRY);
 }
 
diff --git a/sys/dvb/camdevice.c b/sys/dvb/camdevice.c
index 0d90853..0952bcf 100644
--- a/sys/dvb/camdevice.c
+++ b/sys/dvb/camdevice.c
@@ -110,11 +110,11 @@
   g_return_val_if_fail (device->state == CAM_DEVICE_STATE_CLOSED, FALSE);
   g_return_val_if_fail (filename != NULL, FALSE);
 
-  GST_INFO ("opening ca device %s", filename);
+  GST_INFO ("opening CA device %s", filename);
 
   ret = open (filename, O_RDWR);
   if (ret == -1) {
-    GST_ERROR ("can't open ca device: %s", strerror (errno));
+    GST_ERROR ("can't open CA device: %s", g_strerror (errno));
     return FALSE;
   }
 
@@ -130,7 +130,7 @@
     /* get the capabilities of the CA */
     ret = ioctl (device->fd, CA_GET_CAP, &ca_caps);
     if (ret == -1) {
-      GST_ERROR ("CA_GET_CAP ioctl failed: %s", strerror (errno));
+      GST_ERROR ("CA_GET_CAP ioctl failed: %s", g_strerror (errno));
       reset_state (device);
       return FALSE;
     }
@@ -193,7 +193,7 @@
   g_return_if_fail (device != NULL);
   g_return_if_fail (device->state == CAM_DEVICE_STATE_OPEN);
 
-  GST_INFO ("closing ca device %s", device->filename);
+  GST_INFO ("closing CA device %s", device->filename);
   reset_state (device);
 }
 
diff --git a/sys/dvb/camswclient.c b/sys/dvb/camswclient.c
index 9eade78..12f54e3 100644
--- a/sys/dvb/camswclient.c
+++ b/sys/dvb/camswclient.c
@@ -84,7 +84,7 @@
 
   GST_INFO ("connecting to softcam socket: %s", sock_path);
   if ((client->sock = socket (PF_UNIX, SOCK_STREAM, 0)) < 0) {
-    GST_ERROR ("Failed to create a socket, error : %s", strerror (errno));
+    GST_ERROR ("Failed to create a socket, error: %s", g_strerror (errno));
     return FALSE;
   }
   ret =
@@ -92,7 +92,7 @@
       sizeof (struct sockaddr_un));
   if (ret != 0) {
     GST_ERROR ("error opening softcam socket %s, error: %s",
-        sock_path, strerror (errno));
+        sock_path, g_strerror (errno));
 
     return FALSE;
   }
@@ -141,7 +141,8 @@
   cam_write_length_field (&buffer[3], ca_pmt_size);
 
   if (write (client->sock, buffer, buffer_size) == -1) {
-    GST_WARNING ("write failed when sending pmt with errno: %d", errno);
+    GST_WARNING ("write failed when sending PMT with error: %s (%d)",
+        g_strerror (errno), errno);
   }
 
   g_free (ca_pmt);
diff --git a/sys/dvb/dvbbasebin.c b/sys/dvb/dvbbasebin.c
index e1565ef..7da3f62 100644
--- a/sys/dvb/dvbbasebin.c
+++ b/sys/dvb/dvbbasebin.c
@@ -49,6 +49,9 @@
 enum
 {
   /* FILL ME */
+  SIGNAL_TUNING_START,
+  SIGNAL_TUNING_DONE,
+  SIGNAL_TUNING_FAIL,
   LAST_SIGNAL
 };
 
@@ -71,6 +74,7 @@
   PROP_INVERSION,
   PROP_PROGRAM_NUMBERS,
   PROP_STATS_REPORTING_INTERVAL,
+  PROP_TUNING_TIMEOUT,
   PROP_DELSYS,
   PROP_PILOT,
   PROP_ROLLOFF,
@@ -129,6 +133,11 @@
 
 static void dvb_base_bin_program_destroy (gpointer data);
 
+/* Proxy callbacks for dvbsrc signals */
+static void tuning_start_signal_cb (GObject * object, DvbBaseBin * dvbbasebin);
+static void tuning_done_signal_cb (GObject * object, DvbBaseBin * dvbbasebin);
+static void tuning_fail_signal_cb (GObject * object, DvbBaseBin * dvbbasebin);
+
 #define dvb_base_bin_parent_class parent_class
 G_DEFINE_TYPE_EXTENDED (DvbBaseBin, dvb_base_bin, GST_TYPE_BIN,
     0,
@@ -200,9 +209,27 @@
       GINT_TO_POINTER (program_number));
 }
 
-/*
-static guint signals [LAST_SIGNAL] = { 0 };
-*/
+
+static guint dvb_base_bin_signals[LAST_SIGNAL] = { 0 };
+
+static void
+tuning_start_signal_cb (GObject * object, DvbBaseBin * dvbbasebin)
+{
+  g_signal_emit (dvbbasebin, dvb_base_bin_signals[SIGNAL_TUNING_START], 0);
+}
+
+static void
+tuning_done_signal_cb (GObject * object, DvbBaseBin * dvbbasebin)
+{
+  g_signal_emit (dvbbasebin, dvb_base_bin_signals[SIGNAL_TUNING_DONE], 0);
+}
+
+static void
+tuning_fail_signal_cb (GObject * object, DvbBaseBin * dvbbasebin)
+{
+  g_signal_emit (dvbbasebin, dvb_base_bin_signals[SIGNAL_TUNING_FAIL], 0);
+}
+
 
 static void
 dvb_base_bin_class_init (DvbBaseBinClass * klass)
@@ -234,6 +261,7 @@
     {PROP_HIERARCHY, "hierarchy"},
     {PROP_INVERSION, "inversion"},
     {PROP_STATS_REPORTING_INTERVAL, "stats-reporting-interval"},
+    {PROP_TUNING_TIMEOUT, "tuning-timeout"},
     {PROP_DELSYS, "delsys"},
     {PROP_PILOT, "pilot"},
     {PROP_ROLLOFF, "rolloff"},
@@ -294,6 +322,13 @@
             g_param_spec_get_nick (pspec), g_param_spec_get_blurb (pspec),
             src_pspec->minimum, src_pspec->maximum, src_pspec->default_value,
             pspec->flags);
+      } else if (param_type == G_TYPE_PARAM_UINT64) {
+        GParamSpecUInt64 *src_pspec = G_PARAM_SPEC_UINT64 (pspec);
+
+        our_pspec = g_param_spec_uint64 (g_param_spec_get_name (pspec),
+            g_param_spec_get_nick (pspec), g_param_spec_get_blurb (pspec),
+            src_pspec->minimum, src_pspec->maximum, src_pspec->default_value,
+            pspec->flags);
       } else if (param_type == G_TYPE_PARAM_STRING) {
         GParamSpecString *src_pspec = G_PARAM_SPEC_STRING (pspec);
 
@@ -325,6 +360,35 @@
       g_param_spec_string ("program-numbers",
           "Program Numbers",
           "Colon separated list of programs", "", G_PARAM_READWRITE));
+  /**
+   * DvbBaseBin::tuning-start:
+   * @dvbbasebin: the element on which the signal is emitted
+   *
+   * Signal emited when the element first attempts to tune the
+   * frontend tunner to a given frequency.
+   */
+  dvb_base_bin_signals[SIGNAL_TUNING_START] =
+      g_signal_new ("tuning-start", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+  /**
+   * DvbBaseBin::tuning-done:
+   * @dvbbasebin: the element on which the signal is emitted
+   *
+   * Signal emited when the tunner has successfully got a lock on a signal.
+   */
+  dvb_base_bin_signals[SIGNAL_TUNING_DONE] =
+      g_signal_new ("tuning-done", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+  /**
+   * DvbBaseBin::tuning-fail:
+   * @dvbbasebin: the element on which the signal is emitted
+   *
+   * Signal emited when the tunner failed to get a lock on the
+   * signal.
+   */
+  dvb_base_bin_signals[SIGNAL_TUNING_FAIL] =
+      g_signal_new ("tuning-fail", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
 
 }
 
@@ -361,9 +425,21 @@
   gst_element_link_many (dvbbasebin->dvbsrc,
       dvbbasebin->buffer_queue, dvbbasebin->tsparse, NULL);
 
+  /* Proxy dvbsrc signals */
+  g_signal_connect (dvbbasebin->dvbsrc, "tuning-start",
+      G_CALLBACK (tuning_start_signal_cb), dvbbasebin);
+  g_signal_connect (dvbbasebin->dvbsrc, "tuning-done",
+      G_CALLBACK (tuning_done_signal_cb), dvbbasebin);
+  g_signal_connect (dvbbasebin->dvbsrc, "tuning-fail",
+      G_CALLBACK (tuning_fail_signal_cb), dvbbasebin);
+
   /* Expose tsparse source pad */
-  pad = gst_element_get_static_pad (dvbbasebin->tsparse, "src");
-  ghost = gst_ghost_pad_new ("src", pad);
+  if (dvbbasebin->tsparse != NULL) {
+    pad = gst_element_get_static_pad (dvbbasebin->tsparse, "src");
+    ghost = gst_ghost_pad_new ("src", pad);
+  } else {
+    ghost = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
+  }
   gst_element_add_pad (GST_ELEMENT (dvbbasebin), ghost);
 
   dvbbasebin->programs = g_hash_table_new_full (g_direct_hash, g_direct_equal,
@@ -402,7 +478,8 @@
     /* remove mpegtsparse BEFORE dvbsrc, since the mpegtsparse::pad-removed
      * signal handler uses dvbsrc */
     dvb_base_bin_reset (dvbbasebin);
-    gst_bin_remove (GST_BIN (dvbbasebin), dvbbasebin->tsparse);
+    if (dvbbasebin->tsparse != NULL)
+      gst_bin_remove (GST_BIN (dvbbasebin), dvbbasebin->tsparse);
     gst_bin_remove (GST_BIN (dvbbasebin), dvbbasebin->dvbsrc);
     gst_bin_remove (GST_BIN (dvbbasebin), dvbbasebin->buffer_queue);
     dvbbasebin->disposed = TRUE;
@@ -478,6 +555,7 @@
     case PROP_HIERARCHY:
     case PROP_INVERSION:
     case PROP_STATS_REPORTING_INTERVAL:
+    case PROP_TUNING_TIMEOUT:
     case PROP_DELSYS:
     case PROP_PILOT:
     case PROP_ROLLOFF:
@@ -516,6 +594,7 @@
     case PROP_HIERARCHY:
     case PROP_INVERSION:
     case PROP_STATS_REPORTING_INTERVAL:
+    case PROP_TUNING_TIMEOUT:
     case PROP_DELSYS:
     case PROP_PILOT:
     case PROP_ROLLOFF:
@@ -535,16 +614,20 @@
 dvb_base_bin_request_new_pad (GstElement * element,
     GstPadTemplate * templ, const gchar * name, const GstCaps * caps)
 {
+  DvbBaseBin *dvbbasebin = GST_DVB_BASE_BIN (element);
   GstPad *pad;
   GstPad *ghost;
   gchar *pad_name;
 
-  GST_DEBUG ("New pad requested %s", name);
+  GST_DEBUG_OBJECT (dvbbasebin, "New pad requested %s", GST_STR_NULL (name));
+
+  if (dvbbasebin->tsparse == NULL)
+    return NULL;
 
   if (name == NULL)
     name = GST_PAD_TEMPLATE_NAME_TEMPLATE (templ);
 
-  pad = gst_element_get_request_pad (GST_DVB_BASE_BIN (element)->tsparse, name);
+  pad = gst_element_get_request_pad (dvbbasebin->tsparse, name);
   if (pad == NULL)
     return NULL;
 
@@ -634,6 +717,19 @@
   GstStateChangeReturn ret;
 
   dvbbasebin = GST_DVB_BASE_BIN (element);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_NULL_TO_READY:
+      if (dvbbasebin->tsparse == NULL) {
+        GST_ELEMENT_ERROR (dvbbasebin, CORE, MISSING_PLUGIN, (NULL),
+            ("No 'tsparse' element, check your GStreamer installation."));
+        return GST_STATE_CHANGE_FAILURE;
+      }
+      break;
+    default:
+      break;
+  }
+
   ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
 
   switch (transition) {
@@ -817,7 +913,7 @@
   dvbbasebin = GST_DVB_BASE_BIN (bin);
 
   /* note: message->src might be a GstPad, so use element cast w/o typecheck */
-  if (GST_ELEMENT_CAST (message->src) == GST_ELEMENT (dvbbasebin->tsparse)) {
+  if (GST_ELEMENT_CAST (message->src) == dvbbasebin->tsparse) {
     GstMpegTsSection *section = gst_message_parse_mpegts_section (message);
 
     if (section) {
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index 027281b..f8829d2 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -1,6 +1,8 @@
 /* GStreamer DVB source
  * Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali
  *                                         dot org>
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *     @Author: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -99,16 +101,6 @@
 #define HAVE_V5_MINOR(minor) ((DVB_API_VERSION > 5) || \
 			      (DVB_API_VERSION_MINOR >= (minor)))
 
-/* NO_STREAM_ID_FILTER introduced in minor 8 */
-#ifndef NO_STREAM_ID_FILTER
-#define NO_STREAM_ID_FILTER    (~0U)
-#endif
-
-/* DTV_STREAM_ID introduced in minor 8 (redefine) */
-#ifndef DTV_STREAM_ID
-#define DTV_STREAM_ID DTV_ISDBS_TS_ID
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -133,6 +125,21 @@
 
 #include <gst/gst-i18n-plugin.h>
 
+/* Before 5.6 we map A to AC */
+#if !HAVE_V5_MINOR(6)
+#define SYS_DVBC_ANNEX_A SYS_DVBC_ANNEX_AC
+#endif
+
+/* NO_STREAM_ID_FILTER introduced in minor 8 */
+#ifndef NO_STREAM_ID_FILTER
+#define NO_STREAM_ID_FILTER    (~0U)
+#endif
+
+/* DTV_STREAM_ID introduced in minor 8 (redefine) */
+#ifndef DTV_STREAM_ID
+#define DTV_STREAM_ID DTV_ISDBS_TS_ID
+#endif
+
 GST_DEBUG_CATEGORY_STATIC (gstdvbsrc_debug);
 #define GST_CAT_DEFAULT (gstdvbsrc_debug)
 
@@ -142,6 +149,15 @@
 
 #define NUM_DTV_PROPS 16
 
+/* Signals */
+enum
+{
+  SIGNAL_TUNING_START,
+  SIGNAL_TUNING_DONE,
+  SIGNAL_TUNING_FAIL,
+  LAST_SIGNAL
+};
+
 /* Arguments */
 enum
 {
@@ -164,6 +180,7 @@
   ARG_DVBSRC_INVERSION,
   ARG_DVBSRC_STATS_REPORTING_INTERVAL,
   ARG_DVBSRC_TIMEOUT,
+  ARG_DVBSRC_TUNING_TIMEOUT,
   ARG_DVBSRC_DVB_BUFFER_SIZE,
   ARG_DVBSRC_DELSYS,
   ARG_DVBSRC_PILOT,
@@ -190,7 +207,8 @@
 #define DEFAULT_INVERSION INVERSION_ON
 #define DEFAULT_STATS_REPORTING_INTERVAL 100
 #define DEFAULT_TIMEOUT 1000000 /* 1 second */
-#define DEFAULT_DVB_BUFFER_SIZE (10*188*1024)   /* Default is the same as the kernel default */
+#define DEFAULT_TUNING_TIMEOUT 10 * GST_SECOND  /* 10 seconds */
+#define DEFAULT_DVB_BUFFER_SIZE (10*188*1024)   /* kernel default is 8192 */
 #define DEFAULT_BUFFER_SIZE 8192        /* not a property */
 #define DEFAULT_DELSYS SYS_UNDEFINED
 #define DEFAULT_PILOT PILOT_AUTO
@@ -377,7 +395,9 @@
     {SYS_DAB, "DAB", "dab"},
     {SYS_DVBT2, "DVB-T2", "dvb-t2"},
     {SYS_TURBO, "TURBO", "turbo"},
+#if HAVE_V5_MINOR(6)
     {SYS_DVBC_ANNEX_C, "DVB-C-C", "dvb-c-c"},
+#endif
     {0, NULL, NULL},
   };
 
@@ -446,10 +466,14 @@
 static gboolean gst_dvbsrc_get_size (GstBaseSrc * src, guint64 * size);
 
 static gboolean gst_dvbsrc_tune (GstDvbSrc * object);
+static gboolean gst_dvbsrc_set_fe_params (GstDvbSrc * object,
+    struct dtv_properties *props);
+static gboolean gst_dvbsrc_tune_fe (GstDvbSrc * object);
+
 static void gst_dvbsrc_set_pes_filters (GstDvbSrc * object);
 static void gst_dvbsrc_unset_pes_filters (GstDvbSrc * object);
-
-static gboolean gst_dvbsrc_frontend_status (GstDvbSrc * object);
+static inline int gst_dvbsrc_retry_ioctl (int fd, unsigned long req,
+    void *data);
 
 static GstStaticPadTemplate ts_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
@@ -470,6 +494,8 @@
 #define gst_dvbsrc_parent_class parent_class
 G_DEFINE_TYPE (GstDvbSrc, gst_dvbsrc, GST_TYPE_PUSH_SRC);
 
+static guint gst_dvbsrc_signals[LAST_SIGNAL] = { 0 };
+
 /* initialize the plugin's class */
 static void
 gst_dvbsrc_class_init (GstDvbSrcClass * klass)
@@ -614,6 +640,11 @@
           "Post a message after timeout microseconds (0 = disabled)", 0,
           G_MAXUINT64, DEFAULT_TIMEOUT, G_PARAM_READWRITE));
 
+  g_object_class_install_property (gobject_class, ARG_DVBSRC_TUNING_TIMEOUT,
+      g_param_spec_uint64 ("tuning-timeout", "Tuning Timeout",
+          "Milliseconds to wait before giving up tuning/locking on a signal", 0,
+          G_MAXUINT64, DEFAULT_TUNING_TIMEOUT, G_PARAM_READWRITE));
+
   g_object_class_install_property (gobject_class,
       ARG_DVBSRC_DVB_BUFFER_SIZE,
       g_param_spec_uint ("dvb-buffer-size",
@@ -637,6 +668,37 @@
       g_param_spec_int ("stream-id", "stream-id",
           "Stream ID (-1 disabled, DVB-T2 and DVB-S2 max 255, ISDB max 65535)",
           -1, 65535, DEFAULT_STREAM_ID, G_PARAM_READWRITE));
+
+  /**
+   * GstDvbSrc::tuning-start:
+   * @gstdvbsrc: the element on which the signal is emitted
+   *
+   * Signal emited when the element first attempts to tune the
+   * frontend tunner to a given frequency.
+   */
+  gst_dvbsrc_signals[SIGNAL_TUNING_START] =
+      g_signal_new ("tuning-start", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+  /**
+   * GstDvbSrc::tuning-done:
+   * @gstdvbsrc: the element on which the signal is emitted
+   *
+   * Signal emited when the tunner has successfully got a lock on a signal.
+   */
+  gst_dvbsrc_signals[SIGNAL_TUNING_DONE] =
+      g_signal_new ("tuning-done", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+  /**
+   * GstDvbSrc::tuning-fail:
+   * @gstdvbsrc: the element on which the signal is emitted
+   *
+   * Signal emited when the tunner failed to get a lock on the
+   * signal.
+   */
+  gst_dvbsrc_signals[SIGNAL_TUNING_FAIL] =
+      g_signal_new ("tuning-fail", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+
 }
 
 /* initialize the new element
@@ -650,6 +712,8 @@
   int i = 0;
 
   GST_INFO_OBJECT (object, "gst_dvbsrc_init");
+  GST_DEBUG_OBJECT (object, "Kernel DVB API version %d.%d", DVB_API_VERSION,
+      DVB_API_VERSION_MINOR);
 
   /* We are a live source */
   gst_base_src_set_live (GST_BASE_SRC (object), TRUE);
@@ -671,6 +735,7 @@
   object->frontend_number = DEFAULT_FRONTEND;
   object->diseqc_src = DEFAULT_DISEQC_SRC;
   object->send_diseqc = (DEFAULT_DISEQC_SRC != -1);
+  object->tone = SEC_TONE_OFF;
   /* object->pol = DVB_POL_H; *//* set via G_PARAM_CONSTRUCT */
   object->sym_rate = DEFAULT_SYMBOL_RATE;
   object->bandwidth = DEFAULT_BANDWIDTH;
@@ -689,6 +754,30 @@
 
   g_mutex_init (&object->tune_mutex);
   object->timeout = DEFAULT_TIMEOUT;
+  object->tuning_timeout = DEFAULT_TUNING_TIMEOUT;
+}
+
+/**
+ * This loop should be safe enough considering:
+ *
+ * 1.- EINTR suggest the next ioctl might succeed
+ * 2.- It's highly unlikely you will end up spining
+ *     before your entire system goes nuts due to
+ *     the massive number of interrupts.
+ *
+ * We don't check for EAGAIN here cause we are opening
+ * the frontend in blocking mode.
+ */
+static inline int
+gst_dvbsrc_retry_ioctl (int fd, unsigned long req, void *data)
+{
+  int ret;
+
+  do
+    ret = ioctl (fd, req, data);
+  while (ret == -1 && errno == EINTR);
+
+  return ret;
 }
 
 static void
@@ -854,6 +943,9 @@
     case ARG_DVBSRC_TIMEOUT:
       object->timeout = g_value_get_uint64 (value);
       break;
+    case ARG_DVBSRC_TUNING_TIMEOUT:
+      object->tuning_timeout = g_value_get_uint64 (value);
+      break;
     case ARG_DVBSRC_DVB_BUFFER_SIZE:
       object->dvb_buffer_size = g_value_get_uint (value);
       break;
@@ -951,6 +1043,9 @@
     case ARG_DVBSRC_TIMEOUT:
       g_value_set_uint64 (value, object->timeout);
       break;
+    case ARG_DVBSRC_TUNING_TIMEOUT:
+      g_value_set_uint64 (value, object->tuning_timeout);
+      break;
     case ARG_DVBSRC_DVB_BUFFER_SIZE:
       g_value_set_uint (value, object->dvb_buffer_size);
       break;
@@ -993,7 +1088,7 @@
     if (prop->u.buffer.data[i] == delsys)
       return TRUE;
   }
-
+  GST_LOG ("Adapter does not suport delsys: %d", delsys);
   return FALSE;
 }
 
@@ -1070,84 +1165,122 @@
       "auto-transmission-mode", G_TYPE_BOOLEAN,
       fe_info.caps & FE_CAN_TRANSMISSION_MODE_AUTO, "auto-guard-interval",
       G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_GUARD_INTERVAL_AUTO,
-      "auto-hierarchy", G_TYPE_BOOLEAN, fe_info.caps % FE_CAN_HIERARCHY_AUTO,
+      "auto-hierarchy", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_HIERARCHY_AUTO,
       "auto-fec", G_TYPE_BOOLEAN, fe_info.caps & FE_CAN_FEC_AUTO, NULL);
 
   /* Capability delivery systems */
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_A))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_A)) {
     gst_structure_set (adapter_structure, "dvb-c-a", G_TYPE_STRING,
         "DVB-C ANNEX A", NULL);
+    object->best_guess_delsys = SYS_DVBC_ANNEX_A;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_B))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_B)) {
     gst_structure_set (adapter_structure, "dvb-c-b", G_TYPE_STRING,
         "DVB-C ANNEX C", NULL);
+    object->best_guess_delsys = SYS_DVBC_ANNEX_B;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBT))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBT)) {
     gst_structure_set (adapter_structure, "dvb-t", G_TYPE_STRING, "DVB-T",
         NULL);
+    object->best_guess_delsys = SYS_DVBT;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DSS))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DSS)) {
     gst_structure_set (adapter_structure, "dss", G_TYPE_STRING, "DSS", NULL);
+    object->best_guess_delsys = SYS_DSS;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBS))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBS)) {
     gst_structure_set (adapter_structure, "dvb-s", G_TYPE_STRING, "DVB-S",
         NULL);
+    object->best_guess_delsys = SYS_DVBS;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBS2))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBS2)) {
     gst_structure_set (adapter_structure, "dvb-s2", G_TYPE_STRING, "DVB-S2",
         NULL);
+    object->best_guess_delsys = SYS_DVBS2;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBH))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBH)) {
     gst_structure_set (adapter_structure, "dvb-h", G_TYPE_STRING, "DVB-H",
         NULL);
+    object->best_guess_delsys = SYS_DVBH;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBT))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBT)) {
     gst_structure_set (adapter_structure, "isdb-t", G_TYPE_STRING, "ISDB-T",
         NULL);
+    object->best_guess_delsys = SYS_ISDBT;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBS))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBS)) {
     gst_structure_set (adapter_structure, "isdb-s", G_TYPE_STRING, "ISDB-S",
         NULL);
+    object->best_guess_delsys = SYS_ISDBS;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBC))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ISDBC)) {
     gst_structure_set (adapter_structure, "isdb-c", G_TYPE_STRING, "ISDB-C",
         NULL);
+    object->best_guess_delsys = SYS_ISDBC;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ATSC))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ATSC)) {
     gst_structure_set (adapter_structure, "atsc", G_TYPE_STRING, "ATSC", NULL);
+    object->best_guess_delsys = SYS_ATSC;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ATSCMH))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_ATSCMH)) {
     gst_structure_set (adapter_structure, "atsc-mh", G_TYPE_STRING, "ATSC-MH",
         NULL);
-
+    object->best_guess_delsys = SYS_ATSCMH;
+  }
 #if HAVE_V5_MINOR(7)
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DTMB))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DTMB)) {
     gst_structure_set (adapter_structure, "dtmb", G_TYPE_STRING, "DTMB", NULL);
+    object->best_guess_delsys = SYS_DTMB;
+  }
 #endif
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_CMMB))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_CMMB)) {
     gst_structure_set (adapter_structure, "cmmb", G_TYPE_STRING, "CMMB", NULL);
+    object->best_guess_delsys = SYS_CMMB;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DAB))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DAB)) {
     gst_structure_set (adapter_structure, "dab", G_TYPE_STRING, "DAB", NULL);
+    object->best_guess_delsys = SYS_DAB;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBT2))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBT2)) {
     gst_structure_set (adapter_structure, "dvb-t2", G_TYPE_STRING, "DVB-T2",
         NULL);
+    object->best_guess_delsys = SYS_DVBT2;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_TURBO))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_TURBO)) {
     gst_structure_set (adapter_structure, "turbo", G_TYPE_STRING, "TURBO",
         NULL);
+    object->best_guess_delsys = SYS_TURBO;
+  }
 
-  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_C))
+  if (gst_dvbsrc_check_delsys (&dvb_prop[0], SYS_DVBC_ANNEX_C)) {
     gst_structure_set (adapter_structure, "dvb-c-c", G_TYPE_STRING,
         "DVB-C ANNEX C", NULL);
+    object->best_guess_delsys = SYS_DVBC_ANNEX_C;
+  }
 
   GST_INFO_OBJECT (object, "DVB card: %s ", adapter_name);
+  GST_TRACE_OBJECT (object, "%s description: %" GST_PTR_FORMAT, adapter_name,
+      adapter_structure);
   gst_element_post_message (GST_ELEMENT_CAST (object), gst_message_new_element
       (GST_OBJECT (object), adapter_structure));
   g_free (frontend_dev);
   g_free (adapter_name);
+
   return TRUE;
 }
 
@@ -1365,11 +1498,6 @@
   gst_dvbsrc_open_frontend (src, TRUE);
   if (!gst_dvbsrc_tune (src)) {
     GST_ERROR_OBJECT (src, "Not able to lock on to the dvb channel");
-    close (src->fd_frontend);
-    return FALSE;
-  }
-  if (!gst_dvbsrc_frontend_status (src)) {
-    /* unset filters also */
     gst_dvbsrc_unset_pes_filters (src);
     close (src->fd_frontend);
     return FALSE;
@@ -1469,42 +1597,6 @@
   gst_element_post_message (GST_ELEMENT (src), message);
 }
 
-static gboolean
-gst_dvbsrc_frontend_status (GstDvbSrc * object)
-{
-  fe_status_t status = 0;
-  gint i;
-
-  GST_INFO_OBJECT (object, "gst_dvbsrc_frontend_status");
-
-  if (object->fd_frontend < 0) {
-    GST_ERROR_OBJECT (object,
-        "Trying to get frontend status from not opened device!");
-    return FALSE;
-  } else
-    GST_INFO_OBJECT (object, "fd-frontend: %d", object->fd_frontend);
-
-  for (i = 0; i < 15; i++) {
-    g_usleep (1000000);
-    GST_INFO_OBJECT (object, ".");
-    if (ioctl (object->fd_frontend, FE_READ_STATUS, &status) == -1) {
-      GST_ERROR_OBJECT (object, "Failed reading frontend status.");
-      return FALSE;
-    }
-    gst_dvbsrc_output_frontend_stats (object);
-    if (status & FE_HAS_LOCK) {
-      break;
-    }
-  }
-
-  if (!(status & FE_HAS_LOCK)) {
-    GST_INFO_OBJECT (object,
-        "Not able to lock to the signal on the given frequency.");
-    return FALSE;
-  } else
-    return TRUE;
-}
-
 struct diseqc_cmd
 {
   struct dvb_diseqc_master_cmd cmd;
@@ -1586,186 +1678,263 @@
 }
 
 static gboolean
-gst_dvbsrc_tune (GstDvbSrc * object)
+gst_dvbsrc_tune_fe (GstDvbSrc * object)
 {
+  GstPoll *poll_set;
+  GstPollFD fe_fd;
+  fe_status_t status;
   struct dtv_properties props;
   struct dtv_property dvb_prop[NUM_DTV_PROPS];
-  fe_sec_voltage_t voltage;
-  fe_status_t status;
-  int n;
-  int i;
-  int j;
-  unsigned int freq = object->freq;
-  unsigned int sym_rate = object->sym_rate * 1000;
-  int inversion = object->inversion;
+  GstClockTimeDiff elapsed_time, timeout_step = 500 * GST_MSECOND;
+  GstClockTime start;
 
-  /* found in mail archive on linuxtv.org
-   * What works well for us is:
-   * - first establish a TS feed (i.e. tune the frontend and check for success)
-   * - then set filters (PES/sections)
-   * - then tell the MPEG decoder to start
-   * - before tuning: first stop the MPEG decoder, then stop all filters  
-   */
-  GST_INFO_OBJECT (object, "gst_dvbsrc_tune");
+  GST_DEBUG_OBJECT (object, "Starting the frontend tuning process");
 
   if (object->fd_frontend < 0) {
-    /* frontend not opened yet, tune later */
     GST_INFO_OBJECT (object, "Frontend not open: tuning later");
     return FALSE;
   }
 
-  GST_DEBUG_OBJECT (object, "api version %d.%d", DVB_API_VERSION,
-      DVB_API_VERSION_MINOR);
-
   GST_DEBUG_OBJECT (object, "check delivery systems");
 
   dvb_prop[0].cmd = DTV_ENUM_DELSYS;
   props.num = 1;
   props.props = dvb_prop;
 
-  if (ioctl (object->fd_frontend, FE_GET_PROPERTY, &props) < 0) {
+  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_GET_PROPERTY, &props)) {
     GST_WARNING_OBJECT (object, "Error enumerating delsys: %s",
         g_strerror (errno));
 
     return FALSE;
   }
 
-  if (!gst_dvbsrc_check_delsys (&dvb_prop[0], object->delsys))
+  /* If theres no delivery system set yet. Choose the
+   * last from the list of frontend supported ones */
+  if (object->delsys == SYS_UNDEFINED) {
+    object->delsys = object->best_guess_delsys;
+  } else if (!gst_dvbsrc_check_delsys (&dvb_prop[0], object->delsys)) {
+    GST_WARNING_OBJECT (object, "Delsys fail %u", object->delsys);
     return FALSE;
+  }
 
   gst_dvbsrc_unset_pes_filters (object);
-  for (j = 0; j < 5; j++) {
-    memset (dvb_prop, 0, sizeof (dvb_prop));
-    dvb_prop[0].cmd = DTV_CLEAR;
-    props.num = 1;
-    props.props = dvb_prop;
-    if (ioctl (object->fd_frontend, FE_SET_PROPERTY, &props) < 0) {
-      GST_WARNING_OBJECT (object, "Error resetting tuner: %s",
-          g_strerror (errno));
-    }
-    /* First three entries are reserved */
-    n = 3;
-    switch (object->delsys) {
-      case SYS_DVBS:
-      case SYS_DVBS2:
-      case SYS_TURBO:
-        object->tone = SEC_TONE_OFF;
-        if (freq > 2200000) {
-          /* this must be an absolute frequency */
-          if (freq < SLOF) {
-            freq -= LOF1;
-          } else {
-            freq -= LOF2;
-            object->tone = SEC_TONE_ON;
-          }
-        }
 
-        inversion = INVERSION_AUTO;
-        set_prop (dvb_prop, &n, DTV_SYMBOL_RATE, sym_rate);
-        set_prop (dvb_prop, &n, DTV_INNER_FEC, object->code_rate_hp);
+  gst_poll_fd_init (&fe_fd);
+  fe_fd.fd = object->fd_frontend;
+  poll_set = gst_poll_new (TRUE);
 
-        GST_INFO_OBJECT (object,
-            "Tuning DVB-S/DVB-S2/Turbo to L-Band:%u, Pol:%d, srate=%u, 22kHz=%s",
-            freq, object->pol, sym_rate,
-            object->tone == SEC_TONE_ON ? "on" : "off");
-
-        if (object->pol == DVB_POL_H)
-          voltage = SEC_VOLTAGE_18;
-        else
-          voltage = SEC_VOLTAGE_13;
-
-        if (object->diseqc_src == -1 || object->send_diseqc == FALSE) {
-          set_prop (dvb_prop, &n, DTV_VOLTAGE, voltage);
-
-          /* DTV_TONE not yet implemented
-           * set_prop (fe_props_array, &n, DTV_TONE, object->tone) */
-        } else {
-          GST_DEBUG_OBJECT (object, "Sending DISEqC");
-          diseqc (object->fd_frontend, object->diseqc_src, voltage,
-              object->tone);
-          /* Once diseqc source is set, do not set it again until
-           * app decides to change it
-           * object->send_diseqc = FALSE; */
-        }
-
-        if ((object->delsys == SYS_DVBS2) || (object->delsys == SYS_TURBO))
-          set_prop (dvb_prop, &n, DTV_MODULATION, object->modulation);
-
-        if (object->delsys == SYS_DVBS2) {
-          set_prop (dvb_prop, &n, DTV_PILOT, object->pilot);
-          set_prop (dvb_prop, &n, DTV_ROLLOFF, object->rolloff);
-          set_prop (dvb_prop, &n, DTV_STREAM_ID, object->stream_id);
-        }
-        break;
-      case SYS_DVBT:
-      case SYS_DVBT2:
-        set_prop (dvb_prop, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
-        set_prop (dvb_prop, &n, DTV_CODE_RATE_HP, object->code_rate_hp);
-        set_prop (dvb_prop, &n, DTV_CODE_RATE_LP, object->code_rate_lp);
-        set_prop (dvb_prop, &n, DTV_MODULATION, object->modulation);
-        set_prop (dvb_prop, &n, DTV_TRANSMISSION_MODE,
-            object->transmission_mode);
-        set_prop (dvb_prop, &n, DTV_GUARD_INTERVAL, object->guard_interval);
-        set_prop (dvb_prop, &n, DTV_HIERARCHY, object->hierarchy_information);
-        if (object->delsys == SYS_DVBT2) {
-          set_prop (dvb_prop, &n, DTV_STREAM_ID, object->stream_id);
-        }
-
-        GST_INFO_OBJECT (object, "Tuning DVB-T/DVB_T2 to %d Hz", freq);
-        break;
-      case SYS_DVBC_ANNEX_A:
-      case SYS_DVBC_ANNEX_B:
-      case SYS_DVBC_ANNEX_C:
-        GST_INFO_OBJECT (object, "Tuning DVB-C/ClearCable to %d, srate=%d",
-            freq, sym_rate);
-
-        set_prop (dvb_prop, &n, DTV_MODULATION, object->modulation);
-        if (object->delsys != SYS_DVBC_ANNEX_B) {
-          set_prop (dvb_prop, &n, DTV_INNER_FEC, object->code_rate_hp);
-          set_prop (dvb_prop, &n, DTV_SYMBOL_RATE, sym_rate);
-        }
-        break;
-      case SYS_ATSC:
-        GST_INFO_OBJECT (object, "Tuning ATSC to %d", freq);
-
-        set_prop (dvb_prop, &n, DTV_MODULATION, object->modulation);
-        break;
-      default:
-        GST_ERROR_OBJECT (object, "Unknown frontend type %u", object->delsys);
-        return FALSE;
-    }
-    g_usleep (100000);
-    /* now tune the frontend */
-    set_prop (dvb_prop, &n, DTV_TUNE, 0);
-    props.num = n;
-    props.props = dvb_prop;
-    /* set first three entries */
-    n = 0;
-    set_prop (dvb_prop, &n, DTV_DELIVERY_SYSTEM, object->delsys);
-    set_prop (dvb_prop, &n, DTV_FREQUENCY, freq);
-    set_prop (dvb_prop, &n, DTV_INVERSION, inversion);
-
-    GST_DEBUG_OBJECT (object, "Setting %d properties", props.num);
-    if (ioctl (object->fd_frontend, FE_SET_PROPERTY, &props) < 0) {
-      GST_WARNING_OBJECT (object, "Error tuning channel: %s",
-          g_strerror (errno));
-    }
-    for (i = 0; i < 50; i++) {
-      g_usleep (100000);
-      if (ioctl (object->fd_frontend, FE_READ_STATUS, &status) == -1) {
-        perror ("FE_READ_STATUS");
-        break;
-      }
-      GST_LOG_OBJECT (object, "status == 0x%02x", status);
-      if (status & FE_HAS_LOCK)
-        break;
-    }
-    if (status & FE_HAS_LOCK)
-      break;
+  if (!gst_poll_add_fd (poll_set, &fe_fd)) {
+    GST_WARNING_OBJECT (object, "Could not add frontend fd to poll set");
+    goto fail;
   }
-  if (!(status & FE_HAS_LOCK))
+
+  gst_poll_fd_ctl_read (poll_set, &fe_fd, TRUE);
+
+  memset (dvb_prop, 0, sizeof (dvb_prop));
+  dvb_prop[0].cmd = DTV_CLEAR;
+
+  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_SET_PROPERTY, &props)) {
+    GST_WARNING_OBJECT (object, "Error resetting tuner: %s",
+        g_strerror (errno));
+  }
+
+  memset (dvb_prop, 0, sizeof (dvb_prop));
+  if (!gst_dvbsrc_set_fe_params (object, &props)) {
+    GST_WARNING_OBJECT (object, "Could not set frontend params");
+    goto fail;
+  }
+
+  GST_DEBUG_OBJECT (object, "Setting %d properties", props.num);
+  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_SET_PROPERTY, &props)) {
+    GST_WARNING_OBJECT (object, "Error tuning channel: %s (%d)",
+        g_strerror (errno), errno);
+    goto fail;
+  }
+
+  g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_START], 0);
+
+  if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_READ_STATUS, &status)) {
+    GST_WARNING_OBJECT (object, "Failed querying frontend for tuning status:"
+        " %s (%d)", g_strerror (errno), errno);
+    goto fail_with_signal;
+  }
+
+  /* signal locking loop */
+  elapsed_time = 0;
+  start = gst_util_get_timestamp ();
+
+  while (!(status & FE_HAS_LOCK) && elapsed_time <= object->tuning_timeout) {
+    if (gst_poll_wait (poll_set, timeout_step) == -1)
+      goto fail_with_signal;
+    if (gst_dvbsrc_retry_ioctl (object->fd_frontend, FE_READ_STATUS, &status)) {
+      GST_WARNING_OBJECT (object, "Failed querying frontend for tuning status"
+          " %s (%d)", g_strerror (errno), errno);
+      goto fail_with_signal;
+    }
+    gst_dvbsrc_output_frontend_stats (object);
+    /* keep retrying forever if tuning_timeout = 0 */
+    if (object->tuning_timeout)
+      elapsed_time = GST_CLOCK_DIFF (start, gst_util_get_timestamp ());
+    GST_LOG_OBJECT (object,
+        "Tuning. Time elapsed %" G_GUINT64_FORMAT " Limit %" G_GUINT64_FORMAT,
+        elapsed_time, object->tuning_timeout);
+  }
+
+  if (!(status & FE_HAS_LOCK)) {
+    GST_WARNING_OBJECT (object,
+        "Unable to lock on signal at desired frequency");
+    goto fail_with_signal;
+  }
+
+  GST_LOG_OBJECT (object, "status == 0x%02x", status);
+
+  g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_DONE], 0);
+  GST_DEBUG_OBJECT (object, "Successfully set frontend tuning params");
+
+  gst_poll_free (poll_set);
+  return TRUE;
+
+fail_with_signal:
+  g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_FAIL], 0);
+fail:
+  GST_WARNING_OBJECT (object, "Could not tune to desired frequency");
+  gst_poll_free (poll_set);
+  return FALSE;
+}
+
+static gboolean
+gst_dvbsrc_set_fe_params (GstDvbSrc * object, struct dtv_properties *props)
+{
+  fe_sec_voltage_t voltage;
+  unsigned int freq = object->freq;
+  unsigned int sym_rate = object->sym_rate * 1000;
+  int inversion = object->inversion;
+  int n;
+
+  /* first 3 entries are reserved */
+  n = 3;
+
+  switch (object->delsys) {
+    case SYS_DVBS:
+    case SYS_DVBS2:
+    case SYS_TURBO:
+      if (freq > 2200000) {
+        /* this must be an absolute frequency */
+        if (freq < SLOF) {
+          freq -= LOF1;
+          object->tone = SEC_TONE_OFF;
+        } else {
+          freq -= LOF2;
+          object->tone = SEC_TONE_ON;
+        }
+      }
+
+      inversion = INVERSION_AUTO;
+      set_prop (props->props, &n, DTV_SYMBOL_RATE, sym_rate);
+      set_prop (props->props, &n, DTV_INNER_FEC, object->code_rate_hp);
+
+      GST_INFO_OBJECT (object,
+          "Tuning DVB-S/DVB-S2/Turbo to L-Band:%u, Pol:%d, srate=%u, 22kHz=%s",
+          freq, object->pol, sym_rate,
+          object->tone == SEC_TONE_ON ? "on" : "off");
+
+      if (object->pol == DVB_POL_H)
+        voltage = SEC_VOLTAGE_18;
+      else
+        voltage = SEC_VOLTAGE_13;
+
+      if (object->diseqc_src == -1 || object->send_diseqc == FALSE) {
+        set_prop (props->props, &n, DTV_VOLTAGE, voltage);
+
+        /* DTV_TONE not yet implemented
+         * set_prop (fe_props_array, &n, DTV_TONE, object->tone) */
+        if (ioctl (object->fd_frontend, FE_SET_TONE, object->tone) < 0) {
+          GST_WARNING_OBJECT (object, "Could'nt set tone: %s",
+              g_strerror (errno));
+        }
+      } else {
+        GST_DEBUG_OBJECT (object, "Sending DISEqC");
+        diseqc (object->fd_frontend, object->diseqc_src, voltage, object->tone);
+        /* Once diseqc source is set, do not set it again until
+         * app decides to change it
+         * object->send_diseqc = FALSE; */
+      }
+
+      if ((object->delsys == SYS_DVBS2) || (object->delsys == SYS_TURBO))
+        set_prop (props->props, &n, DTV_MODULATION, object->modulation);
+
+      if (object->delsys == SYS_DVBS2) {
+        set_prop (props->props, &n, DTV_PILOT, object->pilot);
+        set_prop (props->props, &n, DTV_ROLLOFF, object->rolloff);
+        set_prop (props->props, &n, DTV_STREAM_ID, object->stream_id);
+      }
+      break;
+    case SYS_DVBT:
+    case SYS_DVBT2:
+      set_prop (props->props, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
+      set_prop (props->props, &n, DTV_CODE_RATE_HP, object->code_rate_hp);
+      set_prop (props->props, &n, DTV_CODE_RATE_LP, object->code_rate_lp);
+      set_prop (props->props, &n, DTV_MODULATION, object->modulation);
+      set_prop (props->props, &n, DTV_TRANSMISSION_MODE,
+          object->transmission_mode);
+      set_prop (props->props, &n, DTV_GUARD_INTERVAL, object->guard_interval);
+      set_prop (props->props, &n, DTV_HIERARCHY, object->hierarchy_information);
+      if (object->delsys == SYS_DVBT2) {
+        set_prop (props->props, &n, DTV_STREAM_ID, object->stream_id);
+      }
+
+      GST_INFO_OBJECT (object, "Tuning DVB-T/DVB_T2 to %d Hz", freq);
+      break;
+    case SYS_DVBC_ANNEX_A:
+    case SYS_DVBC_ANNEX_B:
+#if HAVE_V5_MINOR(6)
+    case SYS_DVBC_ANNEX_C:
+#endif
+      GST_INFO_OBJECT (object, "Tuning DVB-C/ClearCable to %d, srate=%d",
+          freq, sym_rate);
+
+      set_prop (props->props, &n, DTV_MODULATION, object->modulation);
+      if (object->delsys != SYS_DVBC_ANNEX_B) {
+        set_prop (props->props, &n, DTV_INNER_FEC, object->code_rate_hp);
+        set_prop (props->props, &n, DTV_SYMBOL_RATE, sym_rate);
+      }
+      break;
+    case SYS_ATSC:
+      GST_INFO_OBJECT (object, "Tuning ATSC to %d", freq);
+
+      set_prop (props->props, &n, DTV_MODULATION, object->modulation);
+      break;
+    default:
+      GST_ERROR_OBJECT (object, "Unknown frontend type %u", object->delsys);
+      return FALSE;
+  }
+
+  set_prop (props->props, &n, DTV_TUNE, 0);
+  props->num = n;
+  /* set first three entries */
+  n = 0;
+  set_prop (props->props, &n, DTV_DELIVERY_SYSTEM, object->delsys);
+  set_prop (props->props, &n, DTV_FREQUENCY, freq);
+  set_prop (props->props, &n, DTV_INVERSION, inversion);
+
+  return TRUE;
+}
+
+static gboolean
+gst_dvbsrc_tune (GstDvbSrc * object)
+{
+  /* found in mail archive on linuxtv.org
+   * What works well for us is:
+   * - first establish a TS feed (i.e. tune the frontend and check for success)
+   * - then set filters (PES/sections)
+   * - then tell the MPEG decoder to start
+   * - before tuning: first stop the MPEG decoder, then stop all filters
+   */
+  if (!gst_dvbsrc_tune_fe (object)) {
+    GST_WARNING_OBJECT (object, "Unable to tune frontend");
     return FALSE;
-  /* set pid filters */
+  }
+
   gst_dvbsrc_set_pes_filters (object);
 
   return TRUE;
@@ -1805,7 +1974,8 @@
     fd = &object->fd_filters[i];
     pid = object->pids[i];
 
-    close (*fd);
+    if (*fd >= 0)
+      close (*fd);
     if ((*fd = open (demux_dev, O_RDWR)) < 0) {
       GST_ERROR_OBJECT (object, "Error opening demuxer: %s (%s)",
           g_strerror (errno), demux_dev);
diff --git a/sys/dvb/gstdvbsrc.h b/sys/dvb/gstdvbsrc.h
index dbd5b2a..f2f9fca 100644
--- a/sys/dvb/gstdvbsrc.h
+++ b/sys/dvb/gstdvbsrc.h
@@ -45,6 +45,7 @@
   gboolean need_tune;
 
   guchar delsys;
+  guchar best_guess_delsys;
 
   int adapter_number;           /* the device directory with the sub-devices */
   int frontend_number;
@@ -74,6 +75,7 @@
   int rolloff;
   int stream_id;
   guint64 timeout;
+  guint64 tuning_timeout;
 
   GstDvbSrcPol pol;
   guint stats_interval;
diff --git a/sys/dvb/parsechannels.c b/sys/dvb/parsechannels.c
index 4a29af7..0b1d506 100644
--- a/sys/dvb/parsechannels.c
+++ b/sys/dvb/parsechannels.c
@@ -35,6 +35,8 @@
 
 #include "parsechannels.h"
 
+#include <linux/dvb/frontend.h>
+
 GST_DEBUG_CATEGORY_EXTERN (dvb_base_bin_debug);
 #define GST_CAT_DEFAULT dvb_base_bin_debug
 
@@ -226,6 +228,8 @@
   if (strcmp (type, "terrestrial") == 0) {
     gchar *val;
 
+    g_object_set (dvbbasebin, "delsys", SYS_DVBT, NULL);
+
     val = g_hash_table_lookup (params, "inversion");
     if (strcmp (val, "INVERSION_OFF") == 0)
       g_object_set (dvbbasebin, "inversion", 0, NULL);
@@ -342,6 +346,8 @@
 
     ret = TRUE;
 
+    g_object_set (dvbbasebin, "delsys", SYS_DVBS, NULL);
+
     val = g_hash_table_lookup (params, "polarity");
     if (val)
       g_object_set (dvbbasebin, "polarity", val, NULL);
@@ -360,6 +366,8 @@
   } else if (strcmp (type, "cable") == 0) {
     gchar *val;
 
+    g_object_set (dvbbasebin, "delsys", SYS_DVBC_ANNEX_A, NULL);
+
     ret = TRUE;
     val = g_hash_table_lookup (params, "symbol-rate");
     if (val)
@@ -412,6 +420,8 @@
 
     ret = TRUE;
 
+    g_object_set (dvbbasebin, "delsys", SYS_ATSC, NULL);
+
     val = g_hash_table_lookup (params, "modulation");
     if (strcmp (val, "QAM_64") == 0)
       g_object_set (dvbbasebin, "modulation", 3, NULL);
diff --git a/sys/fbdev/Makefile.in b/sys/fbdev/Makefile.in
index ef8a3c7..e39bb23 100644
--- a/sys/fbdev/Makefile.in
+++ b/sys/fbdev/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstfbdevsink.la
 libgstfbdevsink_la_SOURCES = gstfbdevsink.c
 libgstfbdevsink_la_CFLAGS = \
diff --git a/sys/linsys/Makefile.in b/sys/linsys/Makefile.in
index 7447c0f..c30d504 100644
--- a/sys/linsys/Makefile.in
+++ b/sys/linsys/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstlinsys.la
 libgstlinsys_la_SOURCES = \
 	gstlinsyssdisink.c \
diff --git a/sys/opensles/Makefile.in b/sys/opensles/Makefile.in
index 6934a51..3a4d7c0 100644
--- a/sys/opensles/Makefile.in
+++ b/sys/opensles/Makefile.in
@@ -347,6 +347,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -433,6 +435,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -724,6 +727,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstopensles.la
 libgstopensles_la_SOURCES = openslesringbuffer.c \
                             openslessink.c       \
diff --git a/sys/osxvideo/Makefile.in b/sys/osxvideo/Makefile.in
index 7f55baa..212b4c1 100644
--- a/sys/osxvideo/Makefile.in
+++ b/sys/osxvideo/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstosxvideosrc.la
 libgstosxvideosrc_la_SOURCES = osxvideoplugin.c osxvideosrc.c
 libgstosxvideosrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/sys/pvr2d/Makefile.in b/sys/pvr2d/Makefile.in
index 5055d49..915b0d9 100644
--- a/sys/pvr2d/Makefile.in
+++ b/sys/pvr2d/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstpvr.la
 libgstpvr_la_SOURCES = \
 	gstpvr.c \
diff --git a/sys/qtwrapper/Makefile.in b/sys/qtwrapper/Makefile.in
index 60c02bc..61dc63f 100644
--- a/sys/qtwrapper/Makefile.in
+++ b/sys/qtwrapper/Makefile.in
@@ -349,6 +349,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -435,6 +437,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -726,6 +729,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstqtwrapper.la
 
 # sources used to compile this plug-in
diff --git a/sys/shm/Makefile.in b/sys/shm/Makefile.in
index 6abe505..b56ceb3 100644
--- a/sys/shm/Makefile.in
+++ b/sys/shm/Makefile.in
@@ -346,6 +346,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -432,6 +434,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -723,6 +726,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstshm.la
 libgstshm_la_SOURCES = shmpipe.c shmalloc.c gstshm.c gstshmsrc.c gstshmsink.c
 libgstshm_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) -DSHM_PIPE_USE_GLIB
diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c
index 0dba027..bb700ca 100644
--- a/sys/shm/gstshmsink.c
+++ b/sys/shm/gstshmsink.c
@@ -258,7 +258,7 @@
   /* allocate more to compensate for alignment */
   maxsize += align;
 
-  block = sp_writer_alloc_block (self->sink->pipe, size);
+  block = sp_writer_alloc_block (self->sink->pipe, maxsize);
   if (block) {
     GstShmSinkMemory *mymem;
     gsize aoffset, padding;
diff --git a/sys/uvch264/Makefile.in b/sys/uvch264/Makefile.in
index 258c4b1..41a8600 100644
--- a/sys/uvch264/Makefile.in
+++ b/sys/uvch264/Makefile.in
@@ -350,6 +350,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -436,6 +438,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -727,6 +730,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstuvch264.la
 libgstuvch264_la_SOURCES = gstuvch264.c \
 			   gstuvch264_mjpgdemux.c \
diff --git a/sys/vcd/Makefile.in b/sys/vcd/Makefile.in
index 3b4ca35..6015c5b 100644
--- a/sys/vcd/Makefile.in
+++ b/sys/vcd/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvcdsrc.la
 libgstvcdsrc_la_SOURCES = vcdsrc.c
 libgstvcdsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) 
diff --git a/sys/vdpau/Makefile.in b/sys/vdpau/Makefile.in
index b005045..bce5818 100644
--- a/sys/vdpau/Makefile.in
+++ b/sys/vdpau/Makefile.in
@@ -352,6 +352,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -438,6 +440,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -729,6 +732,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstvdpau.la
 libgstvdpau_la_SOURCES = \
 	gstvdpau.c \
diff --git a/sys/wasapi/Makefile.in b/sys/wasapi/Makefile.in
index d8622ab..880d6ef 100644
--- a/sys/wasapi/Makefile.in
+++ b/sys/wasapi/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwasapi.la
 libgstwasapi_la_SOURCES = gstwasapi.c \
 	gstwasapisrc.c \
diff --git a/sys/wininet/Makefile.in b/sys/wininet/Makefile.in
index fc7f88e..d42bfce 100644
--- a/sys/wininet/Makefile.in
+++ b/sys/wininet/Makefile.in
@@ -344,6 +344,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -430,6 +432,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -721,6 +724,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwininet.la
 libgstwininet_la_SOURCES = gstwininetsrc.c
 libgstwininet_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS)
diff --git a/sys/winks/Makefile.in b/sys/winks/Makefile.in
index 900e255..6186357 100644
--- a/sys/winks/Makefile.in
+++ b/sys/winks/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwinks.la
 libgstwinks_la_SOURCES = gstksclock.c \
 	gstksvideodevice.c \
diff --git a/sys/winscreencap/Makefile.in b/sys/winscreencap/Makefile.in
index eef16a3..6d0ee75 100644
--- a/sys/winscreencap/Makefile.in
+++ b/sys/winscreencap/Makefile.in
@@ -348,6 +348,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -434,6 +436,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -725,6 +728,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 plugin_LTLIBRARIES = libgstwinscreencap.la
 libgstwinscreencap_la_SOURCES = gstdx9screencapsrc.c  gstgdiscreencapsrc.c  gstwinscreencap.c
 libgstwinscreencap_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d580923..7c3fa66 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -317,6 +317,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -403,6 +405,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -694,6 +697,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @HAVE_GST_CHECK_FALSE@SUBDIRS_CHECK = 
 @HAVE_GST_CHECK_TRUE@SUBDIRS_CHECK = check
 @BUILD_EXAMPLES_FALSE@SUBDIRS_EXAMPLES = 
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index e7b77ed..90677f7 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -125,7 +125,7 @@
 endif
 
 if HAVE_ORC
-check_orc = orc/bayer orc/audiomixer
+check_orc = orc/bayer orc/audiomixer orc/compositor
 else
 check_orc =
 endif
@@ -227,6 +227,7 @@
 	elements/dataurisrc \
 	elements/gdppay \
 	elements/gdpdepay \
+ 	elements/compositor \
 	$(check_jifmux) \
 	elements/jpegparse \
 	elements/h263parse \
@@ -244,6 +245,7 @@
 	libs/mpegts \
 	libs/h264parser \
 	libs/vp8parser \
+	libs/aggregator \
 	$(check_uvch264) \
 	libs/vc1parser \
 	$(check_schro) \
@@ -455,6 +457,29 @@
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
 
+libs_aggregator_LDADD = \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
+
+libs_aggregator_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+elements_compositor_LDADD = $(LDADD)  $(GST_BASE_LIBS)
+elements_compositor_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+
+orc_compositor_CFLAGS = $(ORC_CFLAGS)
+orc_compositor_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_compositor_SOURCES = orc/compositor.c
+orc_videobox_CFLAGS = $(ORC_CFLAGS)
+
+orc/compositor.c: $(top_srcdir)/gst/compositor/compositororc.orc
+	$(MKDIR_P) orc/
+	$(ORCC) --test -o $@ $<
+
+
 distclean-local-orc:
 	rm -rf orc
 
diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in
index 11156ad..5e3dd35 100644
--- a/tests/check/Makefile.in
+++ b/tests/check/Makefile.in
@@ -97,16 +97,17 @@
 	elements/baseaudiovisualizer$(EXEEXT) \
 	elements/camerabin$(EXEEXT) elements/dataurisrc$(EXEEXT) \
 	elements/gdppay$(EXEEXT) elements/gdpdepay$(EXEEXT) \
-	$(am__EXEEXT_15) elements/jpegparse$(EXEEXT) \
-	elements/h263parse$(EXEEXT) elements/h264parse$(EXEEXT) \
-	elements/mpegtsmux$(EXEEXT) elements/mpegvideoparse$(EXEEXT) \
+	elements/compositor$(EXEEXT) $(am__EXEEXT_15) \
+	elements/jpegparse$(EXEEXT) elements/h263parse$(EXEEXT) \
+	elements/h264parse$(EXEEXT) elements/mpegtsmux$(EXEEXT) \
+	elements/mpegvideoparse$(EXEEXT) \
 	elements/mpeg4videoparse$(EXEEXT) $(am__EXEEXT_16) \
 	elements/mxfdemux$(EXEEXT) elements/mxfmux$(EXEEXT) \
 	elements/id3mux$(EXEEXT) pipelines/mxf$(EXEEXT) \
 	$(am__EXEEXT_17) libs/mpegvideoparser$(EXEEXT) \
 	libs/mpegts$(EXEEXT) libs/h264parser$(EXEEXT) \
-	libs/vp8parser$(EXEEXT) $(am__EXEEXT_18) \
-	libs/vc1parser$(EXEEXT) $(am__EXEEXT_19) \
+	libs/vp8parser$(EXEEXT) libs/aggregator$(EXEEXT) \
+	$(am__EXEEXT_18) libs/vc1parser$(EXEEXT) $(am__EXEEXT_19) \
 	elements/viewfinderbin$(EXEEXT) $(am__EXEEXT_20) \
 	$(am__EXEEXT_21) libs/insertbin$(EXEEXT) $(am__EXEEXT_22)
 subdir = tests/check
@@ -187,7 +188,7 @@
 @USE_SCHRO_TRUE@am__EXEEXT_19 = elements/schroenc$(EXEEXT)
 @USE_ZBAR_TRUE@am__EXEEXT_20 = elements/zbar$(EXEEXT)
 @HAVE_ORC_TRUE@am__EXEEXT_21 = orc/bayer$(EXEEXT) \
-@HAVE_ORC_TRUE@	orc/audiomixer$(EXEEXT)
+@HAVE_ORC_TRUE@	orc/audiomixer$(EXEEXT) orc/compositor$(EXEEXT)
 @USE_GL_TRUE@am__EXEEXT_22 = libs/gstglcontext$(EXEEXT) \
 @USE_GL_TRUE@	libs/gstglmemory$(EXEEXT) \
 @USE_GL_TRUE@	libs/gstglupload$(EXEEXT)
@@ -251,6 +252,15 @@
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(elements_camerabin_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
+elements_compositor_SOURCES = elements/compositor.c
+elements_compositor_OBJECTS =  \
+	elements/elements_compositor-compositor.$(OBJEXT)
+elements_compositor_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	$(am__DEPENDENCIES_1)
+elements_compositor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(elements_compositor_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 elements_curlfilesink_SOURCES = elements/curlfilesink.c
 elements_curlfilesink_OBJECTS = elements/curlfilesink.$(OBJEXT)
 elements_curlfilesink_LDADD = $(LDADD)
@@ -446,6 +456,15 @@
 generic_states_OBJECTS = generic/states.$(OBJEXT)
 generic_states_LDADD = $(LDADD)
 generic_states_DEPENDENCIES = $(am__DEPENDENCIES_1)
+libs_aggregator_SOURCES = libs/aggregator.c
+libs_aggregator_OBJECTS = libs/libs_aggregator-aggregator.$(OBJEXT)
+libs_aggregator_DEPENDENCIES = $(top_builddir)/gst-libs/gst/base/libgstbadbase-@GST_API_VERSION@.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+libs_aggregator_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libs_aggregator_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
 libs_gstglcontext_SOURCES = libs/gstglcontext.c
 libs_gstglcontext_OBJECTS =  \
 	libs/libs_gstglcontext-gstglcontext.$(OBJEXT)
@@ -546,6 +565,14 @@
 orc_bayer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(orc_bayer_CFLAGS) \
 	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+nodist_orc_compositor_OBJECTS =  \
+	orc/orc_compositor-compositor.$(OBJEXT)
+orc_compositor_OBJECTS = $(nodist_orc_compositor_OBJECTS)
+orc_compositor_DEPENDENCIES = $(am__DEPENDENCIES_1)
+orc_compositor_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(orc_compositor_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
 pipelines_colorspace_SOURCES = pipelines/colorspace.c
 pipelines_colorspace_OBJECTS = pipelines/colorspace.$(OBJEXT)
 pipelines_colorspace_LDADD = $(LDADD)
@@ -605,12 +632,12 @@
 	elements/asfmux.c elements/assrender.c elements/audiomixer.c \
 	elements/autoconvert.c elements/autovideoconvert.c \
 	$(elements_baseaudiovisualizer_SOURCES) \
-	$(elements_camerabin_SOURCES) elements/curlfilesink.c \
-	elements/curlftpsink.c elements/curlhttpsink.c \
-	elements/curlsftpsink.c elements/curlsmtpsink.c \
-	elements/dataurisrc.c elements/faac.c elements/faad.c \
-	elements/gdpdepay.c elements/gdppay.c elements/h263parse.c \
-	elements/h264parse.c elements/id3mux.c \
+	$(elements_camerabin_SOURCES) elements/compositor.c \
+	elements/curlfilesink.c elements/curlftpsink.c \
+	elements/curlhttpsink.c elements/curlsftpsink.c \
+	elements/curlsmtpsink.c elements/dataurisrc.c elements/faac.c \
+	elements/faad.c elements/gdpdepay.c elements/gdppay.c \
+	elements/h263parse.c elements/h264parse.c elements/id3mux.c \
 	$(elements_jifmux_SOURCES) elements/jpegparse.c \
 	elements/kate.c elements/mpeg2enc.c elements/mpeg4videoparse.c \
 	elements/mpegtsmux.c elements/mpegvideoparse.c \
@@ -620,21 +647,22 @@
 	elements/timidity.c elements/uvch264demux.c \
 	elements/viewfinderbin.c elements/voaacenc.c \
 	elements/voamrwbenc.c elements/zbar.c generic/states.c \
-	libs/gstglcontext.c libs/gstglmemory.c libs/gstglupload.c \
-	libs/h264parser.c libs/insertbin.c libs/mpegts.c \
-	libs/mpegvideoparser.c libs/vc1parser.c libs/vp8parser.c \
-	orc/audiomixer.c orc/bayer.c pipelines/colorspace.c \
+	libs/aggregator.c libs/gstglcontext.c libs/gstglmemory.c \
+	libs/gstglupload.c libs/h264parser.c libs/insertbin.c \
+	libs/mpegts.c libs/mpegvideoparser.c libs/vc1parser.c \
+	libs/vp8parser.c orc/audiomixer.c orc/bayer.c \
+	$(nodist_orc_compositor_SOURCES) pipelines/colorspace.c \
 	pipelines/mimic.c pipelines/mxf.c pipelines/streamheader.c
 DIST_SOURCES = $(libparser_la_SOURCES) elements/aiffparse.c \
 	elements/asfmux.c elements/assrender.c elements/audiomixer.c \
 	elements/autoconvert.c elements/autovideoconvert.c \
 	$(elements_baseaudiovisualizer_SOURCES) \
-	$(elements_camerabin_SOURCES) elements/curlfilesink.c \
-	elements/curlftpsink.c elements/curlhttpsink.c \
-	elements/curlsftpsink.c elements/curlsmtpsink.c \
-	elements/dataurisrc.c elements/faac.c elements/faad.c \
-	elements/gdpdepay.c elements/gdppay.c elements/h263parse.c \
-	elements/h264parse.c elements/id3mux.c \
+	$(elements_camerabin_SOURCES) elements/compositor.c \
+	elements/curlfilesink.c elements/curlftpsink.c \
+	elements/curlhttpsink.c elements/curlsftpsink.c \
+	elements/curlsmtpsink.c elements/dataurisrc.c elements/faac.c \
+	elements/faad.c elements/gdpdepay.c elements/gdppay.c \
+	elements/h263parse.c elements/h264parse.c elements/id3mux.c \
 	$(elements_jifmux_SOURCES) elements/jpegparse.c \
 	elements/kate.c elements/mpeg2enc.c elements/mpeg4videoparse.c \
 	elements/mpegtsmux.c elements/mpegvideoparse.c \
@@ -644,11 +672,12 @@
 	elements/timidity.c elements/uvch264demux.c \
 	elements/viewfinderbin.c elements/voaacenc.c \
 	elements/voamrwbenc.c elements/zbar.c generic/states.c \
-	libs/gstglcontext.c libs/gstglmemory.c libs/gstglupload.c \
-	libs/h264parser.c libs/insertbin.c libs/mpegts.c \
-	libs/mpegvideoparser.c libs/vc1parser.c libs/vp8parser.c \
-	orc/audiomixer.c orc/bayer.c pipelines/colorspace.c \
-	pipelines/mimic.c pipelines/mxf.c pipelines/streamheader.c
+	libs/aggregator.c libs/gstglcontext.c libs/gstglmemory.c \
+	libs/gstglupload.c libs/h264parser.c libs/insertbin.c \
+	libs/mpegts.c libs/mpegvideoparser.c libs/vc1parser.c \
+	libs/vp8parser.c orc/audiomixer.c orc/bayer.c \
+	pipelines/colorspace.c pipelines/mimic.c pipelines/mxf.c \
+	pipelines/streamheader.c
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -995,6 +1024,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -1081,6 +1112,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -1372,6 +1404,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 
 # inspect every plugin feature
 GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION)
@@ -1429,7 +1462,7 @@
 @USE_MIMIC_FALSE@check_mimic = 
 @USE_MIMIC_TRUE@check_mimic = pipelines/mimic
 @HAVE_ORC_FALSE@check_orc = 
-@HAVE_ORC_TRUE@check_orc = orc/bayer orc/audiomixer
+@HAVE_ORC_TRUE@check_orc = orc/bayer orc/audiomixer orc/compositor
 @USE_ZBAR_FALSE@check_zbar = 
 @USE_ZBAR_TRUE@check_zbar = elements/zbar
 @USE_OPUS_FALSE@check_opus = 
@@ -1653,6 +1686,22 @@
 	$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
 	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
 
+libs_aggregator_LDADD = \
+	$(top_builddir)/gst-libs/gst/base/libgstbadbase-@GST_API_VERSION@.la \
+	$(GST_PLUGINS_BASE_LIBS) \
+	$(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
+
+libs_aggregator_CFLAGS = \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+	-DGST_USE_UNSTABLE_API \
+	$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
+
+elements_compositor_LDADD = $(LDADD)  $(GST_BASE_LIBS)
+elements_compositor_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
+orc_compositor_CFLAGS = $(ORC_CFLAGS)
+orc_compositor_LDADD = $(ORC_LIBS) -lorc-test-0.4
+nodist_orc_compositor_SOURCES = orc/compositor.c
+orc_videobox_CFLAGS = $(ORC_CFLAGS)
 all: all-am
 
 .SUFFIXES:
@@ -1776,6 +1825,12 @@
 elements/camerabin$(EXEEXT): $(elements_camerabin_OBJECTS) $(elements_camerabin_DEPENDENCIES) $(EXTRA_elements_camerabin_DEPENDENCIES) elements/$(am__dirstamp)
 	@rm -f elements/camerabin$(EXEEXT)
 	$(AM_V_CCLD)$(elements_camerabin_LINK) $(elements_camerabin_OBJECTS) $(elements_camerabin_LDADD) $(LIBS)
+elements/elements_compositor-compositor.$(OBJEXT):  \
+	elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp)
+
+elements/compositor$(EXEEXT): $(elements_compositor_OBJECTS) $(elements_compositor_DEPENDENCIES) $(EXTRA_elements_compositor_DEPENDENCIES) elements/$(am__dirstamp)
+	@rm -f elements/compositor$(EXEEXT)
+	$(AM_V_CCLD)$(elements_compositor_LINK) $(elements_compositor_OBJECTS) $(elements_compositor_LDADD) $(LIBS)
 elements/curlfilesink.$(OBJEXT): elements/$(am__dirstamp) \
 	elements/$(DEPDIR)/$(am__dirstamp)
 
@@ -2004,6 +2059,12 @@
 libs/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) libs/$(DEPDIR)
 	@: > libs/$(DEPDIR)/$(am__dirstamp)
+libs/libs_aggregator-aggregator.$(OBJEXT): libs/$(am__dirstamp) \
+	libs/$(DEPDIR)/$(am__dirstamp)
+
+libs/aggregator$(EXEEXT): $(libs_aggregator_OBJECTS) $(libs_aggregator_DEPENDENCIES) $(EXTRA_libs_aggregator_DEPENDENCIES) libs/$(am__dirstamp)
+	@rm -f libs/aggregator$(EXEEXT)
+	$(AM_V_CCLD)$(libs_aggregator_LINK) $(libs_aggregator_OBJECTS) $(libs_aggregator_LDADD) $(LIBS)
 libs/libs_gstglcontext-gstglcontext.$(OBJEXT): libs/$(am__dirstamp) \
 	libs/$(DEPDIR)/$(am__dirstamp)
 
@@ -2076,6 +2137,12 @@
 orc/bayer$(EXEEXT): $(orc_bayer_OBJECTS) $(orc_bayer_DEPENDENCIES) $(EXTRA_orc_bayer_DEPENDENCIES) orc/$(am__dirstamp)
 	@rm -f orc/bayer$(EXEEXT)
 	$(AM_V_CCLD)$(orc_bayer_LINK) $(orc_bayer_OBJECTS) $(orc_bayer_LDADD) $(LIBS)
+orc/orc_compositor-compositor.$(OBJEXT): orc/$(am__dirstamp) \
+	orc/$(DEPDIR)/$(am__dirstamp)
+
+orc/compositor$(EXEEXT): $(orc_compositor_OBJECTS) $(orc_compositor_DEPENDENCIES) $(EXTRA_orc_compositor_DEPENDENCIES) orc/$(am__dirstamp)
+	@rm -f orc/compositor$(EXEEXT)
+	$(AM_V_CCLD)$(orc_compositor_LINK) $(orc_compositor_OBJECTS) $(orc_compositor_LDADD) $(LIBS)
 pipelines/$(am__dirstamp):
 	@$(MKDIR_P) pipelines
 	@: > pipelines/$(am__dirstamp)
@@ -2133,6 +2200,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_audiomixer-audiomixer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_baseaudiovisualizer-baseaudiovisualizer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_camerabin-camerabin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_compositor-compositor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_faac-faac.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_faad-faad.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_gdpdepay-gdpdepay.Po@am__quote@
@@ -2164,6 +2232,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/voamrwbenc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/zbar.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@generic/$(DEPDIR)/states.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libs_aggregator-aggregator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libs_gstglcontext-gstglcontext.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libs_gstglmemory-gstglmemory.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libs_gstglupload-gstglupload.Po@am__quote@
@@ -2175,6 +2244,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libs_vp8parser-vp8parser.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@orc/$(DEPDIR)/orc_audiomixer-audiomixer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@orc/$(DEPDIR)/orc_bayer-bayer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@orc/$(DEPDIR)/orc_compositor-compositor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@pipelines/$(DEPDIR)/colorspace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@pipelines/$(DEPDIR)/mimic.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@pipelines/$(DEPDIR)/mxf.Po@am__quote@
@@ -2267,6 +2337,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_camerabin_CFLAGS) $(CFLAGS) -c -o elements/elements_camerabin-camerabin.obj `if test -f 'elements/camerabin.c'; then $(CYGPATH_W) 'elements/camerabin.c'; else $(CYGPATH_W) '$(srcdir)/elements/camerabin.c'; fi`
 
+elements/elements_compositor-compositor.o: elements/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_compositor_CFLAGS) $(CFLAGS) -MT elements/elements_compositor-compositor.o -MD -MP -MF elements/$(DEPDIR)/elements_compositor-compositor.Tpo -c -o elements/elements_compositor-compositor.o `test -f 'elements/compositor.c' || echo '$(srcdir)/'`elements/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_compositor-compositor.Tpo elements/$(DEPDIR)/elements_compositor-compositor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/compositor.c' object='elements/elements_compositor-compositor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_compositor_CFLAGS) $(CFLAGS) -c -o elements/elements_compositor-compositor.o `test -f 'elements/compositor.c' || echo '$(srcdir)/'`elements/compositor.c
+
+elements/elements_compositor-compositor.obj: elements/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_compositor_CFLAGS) $(CFLAGS) -MT elements/elements_compositor-compositor.obj -MD -MP -MF elements/$(DEPDIR)/elements_compositor-compositor.Tpo -c -o elements/elements_compositor-compositor.obj `if test -f 'elements/compositor.c'; then $(CYGPATH_W) 'elements/compositor.c'; else $(CYGPATH_W) '$(srcdir)/elements/compositor.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_compositor-compositor.Tpo elements/$(DEPDIR)/elements_compositor-compositor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='elements/compositor.c' object='elements/elements_compositor-compositor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_compositor_CFLAGS) $(CFLAGS) -c -o elements/elements_compositor-compositor.obj `if test -f 'elements/compositor.c'; then $(CYGPATH_W) 'elements/compositor.c'; else $(CYGPATH_W) '$(srcdir)/elements/compositor.c'; fi`
+
 elements/elements_faac-faac.o: elements/faac.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_faac_CFLAGS) $(CFLAGS) -MT elements/elements_faac-faac.o -MD -MP -MF elements/$(DEPDIR)/elements_faac-faac.Tpo -c -o elements/elements_faac-faac.o `test -f 'elements/faac.c' || echo '$(srcdir)/'`elements/faac.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_faac-faac.Tpo elements/$(DEPDIR)/elements_faac-faac.Po
@@ -2421,6 +2505,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_voaacenc_CFLAGS) $(CFLAGS) -c -o elements/elements_voaacenc-voaacenc.obj `if test -f 'elements/voaacenc.c'; then $(CYGPATH_W) 'elements/voaacenc.c'; else $(CYGPATH_W) '$(srcdir)/elements/voaacenc.c'; fi`
 
+libs/libs_aggregator-aggregator.o: libs/aggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_aggregator_CFLAGS) $(CFLAGS) -MT libs/libs_aggregator-aggregator.o -MD -MP -MF libs/$(DEPDIR)/libs_aggregator-aggregator.Tpo -c -o libs/libs_aggregator-aggregator.o `test -f 'libs/aggregator.c' || echo '$(srcdir)/'`libs/aggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libs/$(DEPDIR)/libs_aggregator-aggregator.Tpo libs/$(DEPDIR)/libs_aggregator-aggregator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libs/aggregator.c' object='libs/libs_aggregator-aggregator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_aggregator_CFLAGS) $(CFLAGS) -c -o libs/libs_aggregator-aggregator.o `test -f 'libs/aggregator.c' || echo '$(srcdir)/'`libs/aggregator.c
+
+libs/libs_aggregator-aggregator.obj: libs/aggregator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_aggregator_CFLAGS) $(CFLAGS) -MT libs/libs_aggregator-aggregator.obj -MD -MP -MF libs/$(DEPDIR)/libs_aggregator-aggregator.Tpo -c -o libs/libs_aggregator-aggregator.obj `if test -f 'libs/aggregator.c'; then $(CYGPATH_W) 'libs/aggregator.c'; else $(CYGPATH_W) '$(srcdir)/libs/aggregator.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libs/$(DEPDIR)/libs_aggregator-aggregator.Tpo libs/$(DEPDIR)/libs_aggregator-aggregator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libs/aggregator.c' object='libs/libs_aggregator-aggregator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_aggregator_CFLAGS) $(CFLAGS) -c -o libs/libs_aggregator-aggregator.obj `if test -f 'libs/aggregator.c'; then $(CYGPATH_W) 'libs/aggregator.c'; else $(CYGPATH_W) '$(srcdir)/libs/aggregator.c'; fi`
+
 libs/libs_gstglcontext-gstglcontext.o: libs/gstglcontext.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_gstglcontext_CFLAGS) $(CFLAGS) -MT libs/libs_gstglcontext-gstglcontext.o -MD -MP -MF libs/$(DEPDIR)/libs_gstglcontext-gstglcontext.Tpo -c -o libs/libs_gstglcontext-gstglcontext.o `test -f 'libs/gstglcontext.c' || echo '$(srcdir)/'`libs/gstglcontext.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libs/$(DEPDIR)/libs_gstglcontext-gstglcontext.Tpo libs/$(DEPDIR)/libs_gstglcontext-gstglcontext.Po
@@ -2575,6 +2673,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_bayer_CFLAGS) $(CFLAGS) -c -o orc/orc_bayer-bayer.obj `if test -f 'orc/bayer.c'; then $(CYGPATH_W) 'orc/bayer.c'; else $(CYGPATH_W) '$(srcdir)/orc/bayer.c'; fi`
 
+orc/orc_compositor-compositor.o: orc/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_compositor_CFLAGS) $(CFLAGS) -MT orc/orc_compositor-compositor.o -MD -MP -MF orc/$(DEPDIR)/orc_compositor-compositor.Tpo -c -o orc/orc_compositor-compositor.o `test -f 'orc/compositor.c' || echo '$(srcdir)/'`orc/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) orc/$(DEPDIR)/orc_compositor-compositor.Tpo orc/$(DEPDIR)/orc_compositor-compositor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='orc/compositor.c' object='orc/orc_compositor-compositor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_compositor_CFLAGS) $(CFLAGS) -c -o orc/orc_compositor-compositor.o `test -f 'orc/compositor.c' || echo '$(srcdir)/'`orc/compositor.c
+
+orc/orc_compositor-compositor.obj: orc/compositor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_compositor_CFLAGS) $(CFLAGS) -MT orc/orc_compositor-compositor.obj -MD -MP -MF orc/$(DEPDIR)/orc_compositor-compositor.Tpo -c -o orc/orc_compositor-compositor.obj `if test -f 'orc/compositor.c'; then $(CYGPATH_W) 'orc/compositor.c'; else $(CYGPATH_W) '$(srcdir)/orc/compositor.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) orc/$(DEPDIR)/orc_compositor-compositor.Tpo orc/$(DEPDIR)/orc_compositor-compositor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='orc/compositor.c' object='orc/orc_compositor-compositor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(orc_compositor_CFLAGS) $(CFLAGS) -c -o orc/orc_compositor-compositor.obj `if test -f 'orc/compositor.c'; then $(CYGPATH_W) 'orc/compositor.c'; else $(CYGPATH_W) '$(srcdir)/orc/compositor.c'; fi`
+
 pipelines/pipelines_streamheader-streamheader.o: pipelines/streamheader.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pipelines_streamheader_CFLAGS) $(CFLAGS) -MT pipelines/pipelines_streamheader-streamheader.o -MD -MP -MF pipelines/$(DEPDIR)/pipelines_streamheader-streamheader.Tpo -c -o pipelines/pipelines_streamheader-streamheader.o `test -f 'pipelines/streamheader.c' || echo '$(srcdir)/'`pipelines/streamheader.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pipelines/$(DEPDIR)/pipelines_streamheader-streamheader.Tpo pipelines/$(DEPDIR)/pipelines_streamheader-streamheader.Po
@@ -2989,6 +3101,13 @@
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+elements/compositor.log: elements/compositor$(EXEEXT)
+	@p='elements/compositor$(EXEEXT)'; \
+	b='elements/compositor'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 elements/jifmux.log: elements/jifmux$(EXEEXT)
 	@p='elements/jifmux$(EXEEXT)'; \
 	b='elements/jifmux'; \
@@ -3108,6 +3227,13 @@
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+libs/aggregator.log: libs/aggregator$(EXEEXT)
+	@p='libs/aggregator$(EXEEXT)'; \
+	b='libs/aggregator'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 elements/uvch264demux.log: elements/uvch264demux$(EXEEXT)
 	@p='elements/uvch264demux$(EXEEXT)'; \
 	b='elements/uvch264demux'; \
@@ -3157,6 +3283,13 @@
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+orc/compositor.log: orc/compositor$(EXEEXT)
+	@p='orc/compositor$(EXEEXT)'; \
+	b='orc/compositor'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 libs/insertbin.log: libs/insertbin$(EXEEXT)
 	@p='libs/insertbin$(EXEEXT)'; \
 	b='libs/insertbin'; \
@@ -3626,6 +3759,10 @@
 	$(MKDIR_P) orc
 	$(ORCC) --test -o $@ $<
 
+orc/compositor.c: $(top_srcdir)/gst/compositor/compositororc.orc
+	$(MKDIR_P) orc/
+	$(ORCC) --test -o $@ $<
+
 distclean-local-orc:
 	rm -rf orc
 
diff --git a/tests/check/elements/compositor.c b/tests/check/elements/compositor.c
new file mode 100644
index 0000000..20b1c39
--- /dev/null
+++ b/tests/check/elements/compositor.c
@@ -0,0 +1,1071 @@
+/* GStreamer
+ *
+ * unit test for compositor
+ *
+ * Copyright (C) <2005> Thomas Vander Stichele <thomas at apestaart dot org>
+ * Copyright (C) <2013> Thibault Saunier <thibault.saunier@collabora.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
+
+#ifdef HAVE_VALGRIND
+# include <valgrind/valgrind.h>
+#endif
+
+#include <unistd.h>
+
+#include <gst/check/gstcheck.h>
+#include <gst/check/gstconsistencychecker.h>
+#include <gst/base/gstbasesrc.h>
+
+#define VIDEO_CAPS_STRING               \
+    "video/x-raw, "                 \
+    "width = (int) 320, "               \
+    "height = (int) 240, "              \
+    "framerate = (fraction) 25/1 , "    \
+    "format = (string) I420"
+
+static GMainLoop *main_loop;
+
+/* make sure downstream gets a CAPS event before buffers are sent */
+GST_START_TEST (test_caps)
+{
+  GstElement *pipeline, *src, *compositor, *sink;
+  GstStateChangeReturn state_res;
+  GstCaps *caps;
+  GstPad *pad;
+
+  /* build pipeline */
+  pipeline = gst_pipeline_new ("pipeline");
+
+  src = gst_element_factory_make ("videotestsrc", "src1");
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (pipeline), src, compositor, sink, NULL);
+
+  fail_unless (gst_element_link_many (src, compositor, sink, NULL));
+
+  /* prepare playing */
+  state_res = gst_element_set_state (pipeline, GST_STATE_PAUSED);
+  fail_unless_equals_int (state_res, GST_STATE_CHANGE_ASYNC);
+
+  /* wait for preroll */
+  state_res = gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+  fail_unless_equals_int (state_res, GST_STATE_CHANGE_SUCCESS);
+
+  /* check caps on fakesink */
+  pad = gst_element_get_static_pad (sink, "sink");
+  caps = gst_pad_get_current_caps (pad);
+  fail_unless (caps != NULL);
+  gst_caps_unref (caps);
+  gst_object_unref (pad);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static void
+message_received (GstBus * bus, GstMessage * message, GstPipeline * bin)
+{
+  GST_INFO ("bus message from \"%" GST_PTR_FORMAT "\": %" GST_PTR_FORMAT,
+      GST_MESSAGE_SRC (message), message);
+
+  switch (message->type) {
+    case GST_MESSAGE_EOS:
+      g_main_loop_quit (main_loop);
+      break;
+    case GST_MESSAGE_WARNING:{
+      GError *gerror;
+      gchar *debug;
+
+      gst_message_parse_warning (message, &gerror, &debug);
+      gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+      g_error_free (gerror);
+      g_free (debug);
+      break;
+    }
+    case GST_MESSAGE_ERROR:{
+      GError *gerror;
+      gchar *debug;
+
+      gst_message_parse_error (message, &gerror, &debug);
+      gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+      g_error_free (gerror);
+      g_free (debug);
+      g_main_loop_quit (main_loop);
+      break;
+    }
+    default:
+      break;
+  }
+}
+
+
+static GstFormat format = GST_FORMAT_UNDEFINED;
+static gint64 position = -1;
+
+static void
+test_event_message_received (GstBus * bus, GstMessage * message,
+    GstPipeline * bin)
+{
+  GST_INFO ("bus message from \"%" GST_PTR_FORMAT "\": %" GST_PTR_FORMAT,
+      GST_MESSAGE_SRC (message), message);
+
+  switch (message->type) {
+    case GST_MESSAGE_SEGMENT_DONE:
+      gst_message_parse_segment_done (message, &format, &position);
+      GST_INFO ("received segment_done : %" G_GINT64_FORMAT, position);
+      g_main_loop_quit (main_loop);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+}
+
+
+GST_START_TEST (test_event)
+{
+  GstElement *bin, *src1, *src2, *compositor, *sink;
+  GstBus *bus;
+  GstEvent *seek_event;
+  GstStateChangeReturn state_res;
+  gboolean res;
+  GstPad *srcpad, *sinkpad;
+  GstStreamConsistency *chk_1, *chk_2, *chk_3;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src1, src2, compositor, sink, NULL);
+
+  res = gst_element_link (src1, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (src2, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  srcpad = gst_element_get_static_pad (compositor, "src");
+  chk_3 = gst_consistency_checker_new (srcpad);
+  gst_object_unref (srcpad);
+
+  /* create consistency checkers for the pads */
+  srcpad = gst_element_get_static_pad (src1, "src");
+  chk_1 = gst_consistency_checker_new (srcpad);
+  sinkpad = gst_pad_get_peer (srcpad);
+  gst_consistency_checker_add_pad (chk_3, sinkpad);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  srcpad = gst_element_get_static_pad (src2, "src");
+  chk_2 = gst_consistency_checker_new (srcpad);
+  sinkpad = gst_pad_get_peer (srcpad);
+  gst_consistency_checker_add_pad (chk_3, sinkpad);
+  gst_object_unref (sinkpad);
+  gst_object_unref (srcpad);
+
+  seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
+      GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
+      GST_SEEK_TYPE_SET, (GstClockTime) 0,
+      GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND);
+
+  format = GST_FORMAT_UNDEFINED;
+  position = -1;
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done",
+      (GCallback) test_event_message_received, bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  GST_INFO ("starting test");
+
+  /* prepare playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* wait for completion */
+  state_res = gst_element_get_state (bin, NULL, NULL, GST_CLOCK_TIME_NONE);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  res = gst_element_send_event (bin, seek_event);
+  fail_unless (res == TRUE, NULL);
+
+  /* run pipeline */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  GST_INFO ("running main loop");
+  g_main_loop_run (main_loop);
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  ck_assert_int_eq (position, 2 * GST_SECOND);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_consistency_checker_free (chk_1);
+  gst_consistency_checker_free (chk_2);
+  gst_consistency_checker_free (chk_3);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+static guint play_count = 0;
+static GstEvent *play_seek_event = NULL;
+
+static void
+test_play_twice_message_received (GstBus * bus, GstMessage * message,
+    GstPipeline * bin)
+{
+  gboolean res;
+  GstStateChangeReturn state_res;
+
+  GST_INFO ("bus message from \"%" GST_PTR_FORMAT "\": %" GST_PTR_FORMAT,
+      GST_MESSAGE_SRC (message), message);
+
+  switch (message->type) {
+    case GST_MESSAGE_SEGMENT_DONE:
+      play_count++;
+      if (play_count == 1) {
+        state_res = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY);
+        ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+        /* prepare playing again */
+        state_res = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
+        ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+        /* wait for completion */
+        state_res =
+            gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+            GST_CLOCK_TIME_NONE);
+        ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+        res = gst_element_send_event (GST_ELEMENT (bin),
+            gst_event_ref (play_seek_event));
+        fail_unless (res == TRUE, NULL);
+
+        state_res =
+            gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
+        ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+      } else {
+        g_main_loop_quit (main_loop);
+      }
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+  }
+}
+
+
+GST_START_TEST (test_play_twice)
+{
+  GstElement *bin, *src1, *src2, *compositor, *sink;
+  GstBus *bus;
+  gboolean res;
+  GstStateChangeReturn state_res;
+  GstPad *srcpad;
+  GstStreamConsistency *consist;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src1, src2, compositor, sink, NULL);
+
+  res = gst_element_link (src1, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (src2, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  srcpad = gst_element_get_static_pad (compositor, "src");
+  consist = gst_consistency_checker_new (srcpad);
+  gst_object_unref (srcpad);
+
+  play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
+      GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
+      GST_SEEK_TYPE_SET, (GstClockTime) 0,
+      GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND);
+
+  play_count = 0;
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done",
+      (GCallback) test_play_twice_message_received, bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  GST_INFO ("starting test");
+
+  /* prepare playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* wait for completion */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
+  fail_unless (res == TRUE, NULL);
+
+  GST_INFO ("seeked");
+
+  /* run pipeline */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  g_main_loop_run (main_loop);
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  ck_assert_int_eq (play_count, 2);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_consistency_checker_free (consist);
+  gst_event_ref (play_seek_event);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_play_twice_then_add_and_play_again)
+{
+  GstElement *bin, *src1, *src2, *src3, *compositor, *sink;
+  GstBus *bus;
+  gboolean res;
+  GstStateChangeReturn state_res;
+  gint i;
+  GstPad *srcpad;
+  GstStreamConsistency *consist;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src1, src2, compositor, sink, NULL);
+
+  srcpad = gst_element_get_static_pad (compositor, "src");
+  consist = gst_consistency_checker_new (srcpad);
+  gst_object_unref (srcpad);
+
+  res = gst_element_link (src1, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (src2, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  play_seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
+      GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
+      GST_SEEK_TYPE_SET, (GstClockTime) 0,
+      GST_SEEK_TYPE_SET, (GstClockTime) 2 * GST_SECOND);
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done",
+      (GCallback) test_play_twice_message_received, bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  /* run it twice */
+  for (i = 0; i < 2; i++) {
+    play_count = 0;
+
+    GST_INFO ("starting test-loop %d", i);
+
+    /* prepare playing */
+    state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+    ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+    /* wait for completion */
+    state_res =
+        gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+        GST_CLOCK_TIME_NONE);
+    ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+    res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
+    fail_unless (res == TRUE, NULL);
+
+    GST_INFO ("seeked");
+
+    /* run pipeline */
+    state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+    ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+    g_main_loop_run (main_loop);
+
+    state_res = gst_element_set_state (bin, GST_STATE_READY);
+    ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+    ck_assert_int_eq (play_count, 2);
+
+    /* plug another source */
+    if (i == 0) {
+      src3 = gst_element_factory_make ("videotestsrc", "src3");
+      gst_bin_add (GST_BIN (bin), src3);
+
+      res = gst_element_link (src3, compositor);
+      fail_unless (res == TRUE, NULL);
+    }
+
+    gst_consistency_checker_reset (consist);
+  }
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_event_ref (play_seek_event);
+  gst_consistency_checker_free (consist);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+/* check if adding pads work as expected */
+GST_START_TEST (test_add_pad)
+{
+  GstElement *bin, *src1, *src2, *compositor, *sink;
+  GstBus *bus;
+  GstPad *srcpad;
+  gboolean res;
+  GstStateChangeReturn state_res;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  g_object_set (src1, "num-buffers", 4, NULL);
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  /* one buffer less, we connect with 1 buffer of delay */
+  g_object_set (src2, "num-buffers", 3, NULL);
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src1, compositor, sink, NULL);
+
+  res = gst_element_link (src1, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  srcpad = gst_element_get_static_pad (compositor, "src");
+  gst_object_unref (srcpad);
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done", (GCallback) message_received,
+      bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  GST_INFO ("starting test");
+
+  /* prepare playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* wait for completion */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* add other element */
+  gst_bin_add_many (GST_BIN (bin), src2, NULL);
+
+  /* now link the second element */
+  res = gst_element_link (src2, compositor);
+  fail_unless (res == TRUE, NULL);
+
+  /* set to PAUSED as well */
+  state_res = gst_element_set_state (src2, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* now play all */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  g_main_loop_run (main_loop);
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+/* check if removing pads work as expected */
+GST_START_TEST (test_remove_pad)
+{
+  GstElement *bin, *src, *compositor, *sink;
+  GstBus *bus;
+  GstPad *pad, *srcpad;
+  gboolean res;
+  GstStateChangeReturn state_res;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src = gst_element_factory_make ("videotestsrc", "src");
+  g_object_set (src, "num-buffers", 4, NULL);
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src, compositor, sink, NULL);
+
+  res = gst_element_link (src, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  /* create an unconnected sinkpad in compositor */
+  pad = gst_element_get_request_pad (compositor, "sink_%u");
+  fail_if (pad == NULL, NULL);
+
+  srcpad = gst_element_get_static_pad (compositor, "src");
+  gst_object_unref (srcpad);
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done", (GCallback) message_received,
+      bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  GST_INFO ("starting test");
+
+  /* prepare playing, this will not preroll as compositor is waiting
+   * on the unconnected sinkpad. */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* wait for completion for one second, will return ASYNC */
+  state_res = gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_SECOND);
+  ck_assert_int_eq (state_res, GST_STATE_CHANGE_ASYNC);
+
+  /* get rid of the pad now, compositor should stop waiting on it and
+   * continue the preroll */
+  gst_element_release_request_pad (compositor, pad);
+  gst_object_unref (pad);
+
+  /* wait for completion, should work now */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* now play all */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  g_main_loop_run (main_loop);
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (G_OBJECT (bus));
+  gst_object_unref (G_OBJECT (bin));
+}
+
+GST_END_TEST;
+
+
+static GstBuffer *handoff_buffer = NULL;
+
+static gboolean
+_quit (GMainLoop * ml)
+{
+  g_main_loop_quit (ml);
+
+  return G_SOURCE_REMOVE;
+}
+
+static void
+handoff_buffer_cb (GstElement * fakesink, GstBuffer * buffer, GstPad * pad,
+    gpointer user_data)
+{
+  GST_DEBUG ("got buffer %p", buffer);
+  gst_buffer_replace (&handoff_buffer, buffer);
+
+  if (main_loop)
+    g_idle_add ((GSourceFunc) _quit, main_loop);
+}
+
+/* check if clipping works as expected */
+GST_START_TEST (test_clip)
+{
+  GstSegment segment;
+  GstElement *bin, *compositor, *sink;
+  GstBus *bus;
+  GstPad *sinkpad;
+  gboolean res;
+  GstStateChangeReturn state_res;
+  GstFlowReturn ret;
+  GstEvent *event;
+  GstBuffer *buffer;
+  GstCaps *caps;
+  GMainLoop *local_mainloop;
+
+  GST_INFO ("preparing test");
+
+  local_mainloop = g_main_loop_new (NULL, FALSE);
+  main_loop = NULL;
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  /* just an compositor and a fakesink */
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", (GCallback) handoff_buffer_cb, NULL);
+  gst_bin_add_many (GST_BIN (bin), compositor, sink, NULL);
+
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  /* set to playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* create an unconnected sinkpad in compositor, should also automatically activate
+   * the pad */
+  sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+  fail_if (sinkpad == NULL, NULL);
+
+  gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
+
+  caps = gst_caps_from_string (VIDEO_CAPS_STRING);
+
+  gst_pad_set_caps (sinkpad, caps);
+  gst_caps_unref (caps);
+
+  /* send segment to compositor */
+  gst_segment_init (&segment, GST_FORMAT_TIME);
+  segment.start = GST_SECOND;
+  segment.stop = 2 * GST_SECOND;
+  segment.time = 0;
+  event = gst_event_new_segment (&segment);
+  gst_pad_send_event (sinkpad, event);
+
+  /* should be clipped and ok */
+  buffer = gst_buffer_new_and_alloc (115200);
+  GST_BUFFER_TIMESTAMP (buffer) = 0;
+  GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
+  GST_DEBUG ("pushing buffer %p", buffer);
+  ret = gst_pad_chain (sinkpad, buffer);
+  ck_assert_int_eq (ret, GST_FLOW_OK);
+  fail_unless (handoff_buffer == NULL);
+
+  /* should be partially clipped */
+  buffer = gst_buffer_new_and_alloc (115200);
+  GST_BUFFER_TIMESTAMP (buffer) = 900 * GST_MSECOND;
+  GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
+  GST_DEBUG ("pushing buffer %p", buffer);
+
+  main_loop = local_mainloop;
+  ret = gst_pad_chain (sinkpad, buffer);
+  ck_assert_int_eq (ret, GST_FLOW_OK);
+  g_main_loop_run (main_loop);
+  gst_buffer_replace (&handoff_buffer, NULL);
+
+  /* should not be clipped */
+  buffer = gst_buffer_new_and_alloc (115200);
+  GST_BUFFER_TIMESTAMP (buffer) = 1 * GST_SECOND;
+  GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
+  GST_DEBUG ("pushing buffer %p", buffer);
+  ret = gst_pad_chain (sinkpad, buffer);
+  g_main_loop_run (main_loop);
+  main_loop = NULL;
+  ck_assert_int_eq (ret, GST_FLOW_OK);
+  fail_unless (handoff_buffer != NULL);
+  gst_buffer_replace (&handoff_buffer, NULL);
+
+  /* should be clipped and ok */
+  buffer = gst_buffer_new_and_alloc (115200);
+  GST_BUFFER_TIMESTAMP (buffer) = 2 * GST_SECOND;
+  GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
+  GST_DEBUG ("pushing buffer %p", buffer);
+  ret = gst_pad_chain (sinkpad, buffer);
+  ck_assert_int_eq (ret, GST_FLOW_OK);
+  fail_unless (handoff_buffer == NULL);
+
+  gst_object_unref (sinkpad);
+  gst_element_set_state (bin, GST_STATE_NULL);
+  g_main_loop_unref (local_mainloop);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_duration_is_max)
+{
+  GstElement *bin, *src[3], *compositor, *sink;
+  GstStateChangeReturn state_res;
+  GstFormat format = GST_FORMAT_TIME;
+  gboolean res;
+  gint64 duration;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+
+  /* 3 sources, an compositor and a fakesink */
+  src[0] = gst_element_factory_make ("videotestsrc", NULL);
+  src[1] = gst_element_factory_make ("videotestsrc", NULL);
+  src[2] = gst_element_factory_make ("videotestsrc", NULL);
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src[0], src[1], src[2], compositor, sink,
+      NULL);
+
+  gst_element_link (src[0], compositor);
+  gst_element_link (src[1], compositor);
+  gst_element_link (src[2], compositor);
+  gst_element_link (compositor, sink);
+
+  /* irks, duration is reset on basesrc */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  /* set durations on src */
+  GST_BASE_SRC (src[0])->segment.duration = 1000;
+  GST_BASE_SRC (src[1])->segment.duration = 3000;
+  GST_BASE_SRC (src[2])->segment.duration = 2000;
+
+  /* set to playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  /* wait for completion */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  res = gst_element_query_duration (GST_ELEMENT (bin), format, &duration);
+  fail_unless (res, NULL);
+
+  ck_assert_int_eq (duration, 3000);
+
+  gst_element_set_state (bin, GST_STATE_NULL);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_duration_unknown_overrides)
+{
+  GstElement *bin, *src[3], *compositor, *sink;
+  GstStateChangeReturn state_res;
+  GstFormat format = GST_FORMAT_TIME;
+  gboolean res;
+  gint64 duration;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+
+  /* 3 sources, an compositor and a fakesink */
+  src[0] = gst_element_factory_make ("videotestsrc", NULL);
+  src[1] = gst_element_factory_make ("videotestsrc", NULL);
+  src[2] = gst_element_factory_make ("videotestsrc", NULL);
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src[0], src[1], src[2], compositor, sink,
+      NULL);
+
+  gst_element_link (src[0], compositor);
+  gst_element_link (src[1], compositor);
+  gst_element_link (src[2], compositor);
+  gst_element_link (compositor, sink);
+
+  /* irks, duration is reset on basesrc */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  /* set durations on src */
+  GST_BASE_SRC (src[0])->segment.duration = GST_CLOCK_TIME_NONE;
+  GST_BASE_SRC (src[1])->segment.duration = 3000;
+  GST_BASE_SRC (src[2])->segment.duration = 2000;
+
+  /* set to playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  /* wait for completion */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  fail_unless (state_res != GST_STATE_CHANGE_FAILURE, NULL);
+
+  res = gst_element_query_duration (GST_ELEMENT (bin), format, &duration);
+  fail_unless (res, NULL);
+
+  ck_assert_int_eq (duration, GST_CLOCK_TIME_NONE);
+
+  gst_element_set_state (bin, GST_STATE_NULL);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+
+static gboolean looped = FALSE;
+
+static void
+loop_segment_done (GstBus * bus, GstMessage * message, GstElement * bin)
+{
+  GST_INFO ("bus message from \"%" GST_PTR_FORMAT "\": %" GST_PTR_FORMAT,
+      GST_MESSAGE_SRC (message), message);
+
+  if (looped) {
+    g_main_loop_quit (main_loop);
+  } else {
+    GstEvent *seek_event;
+    gboolean res;
+
+    seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
+        GST_SEEK_FLAG_SEGMENT,
+        GST_SEEK_TYPE_SET, (GstClockTime) 0,
+        GST_SEEK_TYPE_SET, (GstClockTime) 1 * GST_SECOND);
+
+    res = gst_element_send_event (bin, seek_event);
+    fail_unless (res == TRUE, NULL);
+    looped = TRUE;
+  }
+}
+
+GST_START_TEST (test_loop)
+{
+  GstElement *bin, *src1, *src2, *compositor, *sink;
+  GstBus *bus;
+  GstEvent *seek_event;
+  GstStateChangeReturn state_res;
+  gboolean res;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  bin = gst_pipeline_new ("pipeline");
+  bus = gst_element_get_bus (bin);
+  gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
+
+  src1 = gst_element_factory_make ("videotestsrc", "src1");
+  src2 = gst_element_factory_make ("videotestsrc", "src2");
+  compositor = gst_element_factory_make ("compositor", "compositor");
+  sink = gst_element_factory_make ("fakesink", "sink");
+  gst_bin_add_many (GST_BIN (bin), src1, src2, compositor, sink, NULL);
+
+  res = gst_element_link (src1, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (src2, compositor);
+  fail_unless (res == TRUE, NULL);
+  res = gst_element_link (compositor, sink);
+  fail_unless (res == TRUE, NULL);
+
+  seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
+      GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,
+      GST_SEEK_TYPE_SET, (GstClockTime) 0, GST_SEEK_TYPE_SET,
+      (GstClockTime) 2 * GST_SECOND);
+
+  main_loop = g_main_loop_new (NULL, FALSE);
+  g_signal_connect (bus, "message::segment-done",
+      (GCallback) loop_segment_done, bin);
+  g_signal_connect (bus, "message::error", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::warning", (GCallback) message_received, bin);
+  g_signal_connect (bus, "message::eos", (GCallback) message_received, bin);
+
+  GST_INFO ("starting test");
+
+  /* prepare playing */
+  state_res = gst_element_set_state (bin, GST_STATE_PAUSED);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  /* wait for completion */
+  state_res =
+      gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+      GST_CLOCK_TIME_NONE);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  res = gst_element_send_event (bin, seek_event);
+  fail_unless (res == TRUE, NULL);
+
+  /* run pipeline */
+  state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
+  ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
+
+  GST_INFO ("running main loop");
+  g_main_loop_run (main_loop);
+
+  state_res = gst_element_set_state (bin, GST_STATE_NULL);
+
+  /* cleanup */
+  g_main_loop_unref (main_loop);
+  gst_bus_remove_signal_watch (bus);
+  gst_object_unref (bus);
+  gst_object_unref (bin);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_flush_start_flush_stop)
+{
+  GstPadTemplate *sink_template;
+  GstPad *sinkpad1, *sinkpad2, *compositor_src;
+  GstElement *compositor;
+
+  GST_INFO ("preparing test");
+
+  /* build pipeline */
+  compositor = gst_element_factory_make ("compositor", "compositor");
+
+  sink_template =
+      gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (compositor),
+      "sink_%u");
+  fail_unless (GST_IS_PAD_TEMPLATE (sink_template));
+  sinkpad1 = gst_element_request_pad (compositor, sink_template, NULL, NULL);
+  sinkpad2 = gst_element_request_pad (compositor, sink_template, NULL, NULL);
+  gst_object_unref (sinkpad2);
+
+  gst_element_set_state (compositor, GST_STATE_PLAYING);
+  fail_unless (gst_element_get_state (compositor, NULL, NULL,
+          GST_CLOCK_TIME_NONE) == GST_STATE_CHANGE_SUCCESS);
+
+  compositor_src = gst_element_get_static_pad (compositor, "src");
+  fail_if (GST_PAD_IS_FLUSHING (compositor_src));
+  gst_pad_send_event (sinkpad1, gst_event_new_flush_start ());
+  fail_if (GST_PAD_IS_FLUSHING (compositor_src));
+  fail_unless (GST_PAD_IS_FLUSHING (sinkpad1));
+  gst_pad_send_event (sinkpad1, gst_event_new_flush_stop (TRUE));
+  fail_if (GST_PAD_IS_FLUSHING (compositor_src));
+  fail_if (GST_PAD_IS_FLUSHING (sinkpad1));
+  gst_object_unref (compositor_src);
+
+  /* cleanup */
+  gst_element_set_state (compositor, GST_STATE_NULL);
+  gst_object_unref (compositor);
+}
+
+GST_END_TEST;
+
+
+static Suite *
+compositor_suite (void)
+{
+  Suite *s = suite_create ("compositor");
+  TCase *tc_chain = tcase_create ("general");
+
+  suite_add_tcase (s, tc_chain);
+  tcase_add_test (tc_chain, test_caps);
+  tcase_add_test (tc_chain, test_event);
+  tcase_add_test (tc_chain, test_play_twice);
+  tcase_add_test (tc_chain, test_play_twice_then_add_and_play_again);
+  tcase_add_test (tc_chain, test_add_pad);
+  tcase_add_test (tc_chain, test_remove_pad);
+  tcase_add_test (tc_chain, test_clip);
+  tcase_add_test (tc_chain, test_duration_is_max);
+  tcase_add_test (tc_chain, test_duration_unknown_overrides);
+  tcase_add_test (tc_chain, test_loop);
+  tcase_add_test (tc_chain, test_flush_start_flush_stop);
+
+  /* Use a longer timeout */
+#ifdef HAVE_VALGRIND
+  if (RUNNING_ON_VALGRIND) {
+    tcase_set_timeout (tc_chain, 5 * 60);
+  } else
+#endif
+  {
+    /* this is shorter than the default 60 seconds?! (tpm) */
+    /* tcase_set_timeout (tc_chain, 6); */
+  }
+
+  return s;
+}
+
+GST_CHECK_MAIN (compositor);
diff --git a/tests/check/elements/shm.c b/tests/check/elements/shm.c
index 741ff01..f67e9ee 100644
--- a/tests/check/elements/shm.c
+++ b/tests/check/elements/shm.c
@@ -143,6 +143,8 @@
 
   g_object_get (sink, "shm-size", &size, NULL);
 
+  size -= params.align | gst_memory_alignment;
+
   /* alloc buffer of max size, this way, it will block forever it a copy
    * is made inside shmsink*/
   buf = gst_buffer_new_allocate (alloc, size, &params);
diff --git a/tests/check/libs/aggregator.c b/tests/check/libs/aggregator.c
new file mode 100644
index 0000000..c0b0bdb
--- /dev/null
+++ b/tests/check/libs/aggregator.c
@@ -0,0 +1,1017 @@
+/*
+ * aggregator.c - GstAggregator testsuite
+ * Copyright (C) 2006 Alessandro Decina <alessandro.d@gmail.com>
+ * Copyright (C) 2014 Mathieu Duponchelle <mathieu.duponchelle@oencreed.com>
+ * Copyright (C) 2014 Thibault Saunier <tsaunier@opencreed.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
+
+#include <gst/check/gstcheck.h>
+#include <gst/base/gstaggregator.h>
+
+/* dummy aggregator based element */
+
+#define GST_TYPE_TEST_AGGREGATOR            (gst_test_aggregator_get_type ())
+#define GST_TEST_AGGREGATOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TEST_AGGREGATOR, GstTestAggregator))
+#define GST_TEST_AGGREGATOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TEST_AGGREGATOR, GstTestAggregatorClass))
+#define GST_TEST_AGGREGATOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TEST_AGGREGATOR, GstTestAggregatorClass))
+
+#define fail_error_message(msg)     \
+  G_STMT_START {        \
+    GError *error;        \
+    gst_message_parse_error(msg, &error, NULL);       \
+    fail_unless(FALSE, "Error Message from %s : %s",      \
+    GST_OBJECT_NAME (GST_MESSAGE_SRC(msg)), error->message); \
+    g_error_free (error);           \
+  } G_STMT_END;
+
+typedef struct _GstTestAggregator GstTestAggregator;
+typedef struct _GstTestAggregatorClass GstTestAggregatorClass;
+
+static GType gst_test_aggregator_get_type (void);
+
+#define BUFFER_DURATION 100000000       /* 10 frames per second */
+
+struct _GstTestAggregator
+{
+  GstAggregator parent;
+
+  guint64 timestamp;
+};
+
+struct _GstTestAggregatorClass
+{
+  GstAggregatorClass parent_class;
+};
+
+static GstFlowReturn
+gst_test_aggregator_aggregate (GstAggregator * aggregator)
+{
+  GstIterator *iter;
+  gboolean all_eos = TRUE;
+  GstTestAggregator *testagg;
+  GstBuffer *buf;
+
+  gboolean done_iterating = FALSE;
+
+  testagg = GST_TEST_AGGREGATOR (aggregator);
+
+  iter = gst_element_iterate_sink_pads (GST_ELEMENT (testagg));
+  while (!done_iterating) {
+    GstBuffer *buffer;
+    GValue value = { 0, };
+    GstAggregatorPad *pad;
+
+    switch (gst_iterator_next (iter, &value)) {
+      case GST_ITERATOR_OK:
+        pad = g_value_get_object (&value);
+
+        if (pad->eos == FALSE)
+          all_eos = FALSE;
+        buffer = gst_aggregator_pad_steal_buffer (pad);
+        gst_buffer_replace (&buffer, NULL);
+
+        g_value_reset (&value);
+        break;
+      case GST_ITERATOR_RESYNC:
+        gst_iterator_resync (iter);
+        break;
+      case GST_ITERATOR_ERROR:
+        GST_WARNING_OBJECT (testagg, "Sinkpads iteration error");
+        done_iterating = TRUE;
+        break;
+      case GST_ITERATOR_DONE:
+        done_iterating = TRUE;
+        break;
+    }
+  }
+  gst_iterator_free (iter);
+
+  if (all_eos == TRUE) {
+    GST_ERROR_OBJECT (testagg, "no data available, must be EOS");
+    gst_pad_push_event (aggregator->srcpad, gst_event_new_eos ());
+    return GST_FLOW_EOS;
+  }
+
+  buf = gst_buffer_new ();
+  GST_BUFFER_TIMESTAMP (buf) = testagg->timestamp;
+  GST_BUFFER_DURATION (buf) = BUFFER_DURATION;
+  testagg->timestamp += BUFFER_DURATION;
+
+  gst_aggregator_finish_buffer (aggregator, buf);
+
+  /* We just check finish_frame return FLOW_OK */
+  return GST_FLOW_OK;
+}
+
+#define gst_test_aggregator_parent_class parent_class
+G_DEFINE_TYPE (GstTestAggregator, gst_test_aggregator, GST_TYPE_AGGREGATOR);
+
+static void
+gst_test_aggregator_class_init (GstTestAggregatorClass * klass)
+{
+  GstElementClass *gstelement_class = (GstElementClass *) klass;
+  GstAggregatorClass *base_aggregator_class = (GstAggregatorClass *) klass;
+
+  static GstStaticPadTemplate _src_template =
+      GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
+      GST_STATIC_CAPS_ANY);
+
+  static GstStaticPadTemplate _sink_template =
+      GST_STATIC_PAD_TEMPLATE ("sink_%u", GST_PAD_SINK, GST_PAD_REQUEST,
+      GST_STATIC_CAPS_ANY);
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&_src_template));
+
+  gst_element_class_add_pad_template (gstelement_class,
+      gst_static_pad_template_get (&_sink_template));
+
+  gst_element_class_set_static_metadata (gstelement_class, "Aggregator",
+      "Testing", "Combine N buffers", "Stefan Sauer <ensonic@users.sf.net>");
+
+  base_aggregator_class->aggregate =
+      GST_DEBUG_FUNCPTR (gst_test_aggregator_aggregate);
+}
+
+static void
+gst_test_aggregator_init (GstTestAggregator * self)
+{
+  GstAggregator *agg = GST_AGGREGATOR (self);
+  gst_segment_init (&agg->segment, GST_FORMAT_BYTES);
+  self->timestamp = 0;
+}
+
+static gboolean
+gst_test_aggregator_plugin_init (GstPlugin * plugin)
+{
+  return gst_element_register (plugin, "testaggregator", GST_RANK_NONE,
+      GST_TYPE_TEST_AGGREGATOR);
+}
+
+static gboolean
+gst_test_aggregator_plugin_register (void)
+{
+  return gst_plugin_register_static (GST_VERSION_MAJOR,
+      GST_VERSION_MINOR,
+      "testaggregator",
+      "Combine buffers",
+      gst_test_aggregator_plugin_init,
+      VERSION, GST_LICENSE, PACKAGE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
+}
+
+typedef struct
+{
+  GstEvent *event;
+  GstBuffer *buffer;
+  GstElement *aggregator;
+  GstPad *sinkpad, *srcpad;
+  GstFlowReturn expected_result;
+
+  /*                       ------------------
+   * -----------   --------|--              |
+   * | srcpad | -- | sinkpad |  aggregator  |
+   * -----------   --------|--              |
+   *                       ------------------
+   *  This is for 1 Chain, we can have several
+   */
+} ChainData;
+
+typedef struct
+{
+  GMainLoop *ml;
+  GstPad *srcpad,               /* srcpad of the GstAggregator */
+   *sinkpad;                    /* fake sinkpad to which GstAggregator.srcpad is linked */
+  guint timeout_id;
+  GstElement *aggregator;
+
+  /* -----------------|
+   * |             ----------    -----------
+   * | aggregator  | srcpad | -- | sinkpad |
+   * |             ----------    -----------
+   * -----------------|
+   */
+
+  gint flush_start_events, flush_stop_events;
+} TestData;
+
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
+    GST_PAD_SRC,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
+    GST_PAD_SINK,
+    GST_PAD_ALWAYS,
+    GST_STATIC_CAPS_ANY);
+
+static gpointer
+push_buffer (gpointer user_data)
+{
+  GstFlowReturn flow;
+  GstCaps *caps;
+  ChainData *chain_data = (ChainData *) user_data;
+  GstSegment segment;
+
+  gst_pad_push_event (chain_data->srcpad, gst_event_new_stream_start ("test"));
+
+  caps = gst_caps_new_empty_simple ("foo/x-bar");
+  gst_pad_push_event (chain_data->srcpad, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
+
+  gst_segment_init (&segment, GST_FORMAT_TIME);
+  gst_pad_push_event (chain_data->srcpad, gst_event_new_segment (&segment));
+
+  GST_DEBUG ("Pushing buffer on pad: %s:%s",
+      GST_DEBUG_PAD_NAME (chain_data->sinkpad));
+  flow = gst_pad_push (chain_data->srcpad, chain_data->buffer);
+  fail_unless (flow == chain_data->expected_result,
+      "got flow %s instead of %s on %s:%s", gst_flow_get_name (flow),
+      gst_flow_get_name (chain_data->expected_result),
+      GST_DEBUG_PAD_NAME (chain_data->sinkpad));
+  chain_data->buffer = NULL;
+
+  return NULL;
+}
+
+static gpointer
+push_event (gpointer user_data)
+{
+  ChainData *chain_data = (ChainData *) user_data;
+
+  GST_ERROR_OBJECT (chain_data->srcpad, "Pushing event: %"
+      GST_PTR_FORMAT, chain_data->event);
+  fail_unless (gst_pad_push_event (chain_data->srcpad,
+          chain_data->event) == TRUE);
+
+  return NULL;
+}
+
+static gboolean
+_aggregate_timeout (GMainLoop * ml)
+{
+  g_main_loop_quit (ml);
+
+  fail_unless ("No buffer found on aggregator.srcpad -> TIMEOUT" == NULL);
+
+  return FALSE;
+}
+
+static gboolean
+_quit (GMainLoop * ml)
+{
+  GST_DEBUG ("QUITING ML");
+  g_main_loop_quit (ml);
+
+  return G_SOURCE_REMOVE;
+}
+
+static GstPadProbeReturn
+_aggregated_cb (GstPad * pad, GstPadProbeInfo * info, GMainLoop * ml)
+{
+  GST_DEBUG ("SHould quit ML");
+  g_idle_add ((GSourceFunc) _quit, ml);
+
+  return GST_PAD_PROBE_REMOVE;
+}
+
+static GstPadProbeReturn
+downstream_probe_cb (GstPad * pad, GstPadProbeInfo * info, TestData * test)
+{
+  GST_DEBUG ("PROBING ");
+  if (info->type & GST_PAD_PROBE_TYPE_EVENT_FLUSH) {
+    if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) ==
+        GST_EVENT_FLUSH_START) {
+
+      g_atomic_int_inc (&test->flush_start_events);
+      GST_DEBUG ("==========> FLUSH: %i", test->flush_start_events);
+    } else if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) ==
+        GST_EVENT_FLUSH_STOP)
+      g_atomic_int_inc (&test->flush_stop_events);
+  }
+
+  return GST_PAD_PROBE_DROP;
+}
+
+/*
+ * Not thread safe, will create a new ChainData which contains
+ * an activated src pad linked to a requested sink pad of @agg, and
+ * a newly allocated buffer ready to be pushed. Caller needs to
+ * clear with _chain_data_clear after.
+ */
+static void
+_chain_data_init (ChainData * data, GstElement * agg)
+{
+  static gint num_src_pads = 0;
+  gchar *pad_name = g_strdup_printf ("src%d", num_src_pads);
+
+  num_src_pads += 1;
+
+  data->srcpad = gst_pad_new_from_static_template (&srctemplate, pad_name);
+  g_free (pad_name);
+  gst_pad_set_active (data->srcpad, TRUE);
+  data->aggregator = agg;
+  data->buffer = gst_buffer_new ();
+  data->sinkpad = gst_element_get_request_pad (agg, "sink_%u");
+  fail_unless (GST_IS_PAD (data->sinkpad));
+  fail_unless (gst_pad_link (data->srcpad, data->sinkpad) == GST_PAD_LINK_OK);
+}
+
+static void
+_chain_data_clear (ChainData * data)
+{
+  if (data->buffer)
+    gst_buffer_unref (data->buffer);
+  if (data->srcpad)
+    gst_object_unref (data->srcpad);
+  if (data->sinkpad)
+    gst_object_unref (data->sinkpad);
+}
+
+static void
+_test_data_init (TestData * test, gboolean needs_flushing)
+{
+  test->aggregator = gst_element_factory_make ("testaggregator", NULL);
+  gst_element_set_state (test->aggregator, GST_STATE_PLAYING);
+  test->ml = g_main_loop_new (NULL, TRUE);
+  test->srcpad = GST_AGGREGATOR (test->aggregator)->srcpad;
+
+  GST_DEBUG ("Srcpad: %p", test->srcpad);
+
+  if (needs_flushing) {
+    static gint num_sink_pads = 0;
+    gchar *pad_name = g_strdup_printf ("sink%d", num_sink_pads);
+
+    num_sink_pads += 1;
+    test->sinkpad = gst_pad_new_from_static_template (&sinktemplate, pad_name);
+    g_free (pad_name);
+    fail_unless (gst_pad_link (test->srcpad, test->sinkpad) == GST_PAD_LINK_OK);
+    gst_pad_add_probe (test->srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM |
+        GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM |
+        GST_PAD_PROBE_TYPE_EVENT_FLUSH,
+        (GstPadProbeCallback) downstream_probe_cb, test, NULL);
+  } else {
+    gst_pad_add_probe (test->srcpad, GST_PAD_PROBE_TYPE_BUFFER,
+        (GstPadProbeCallback) _aggregated_cb, test->ml, NULL);
+  }
+
+
+  test->timeout_id =
+      g_timeout_add (1000, (GSourceFunc) _aggregate_timeout, test->ml);
+}
+
+static void
+_test_data_clear (TestData * test)
+{
+  gst_element_set_state (test->aggregator, GST_STATE_NULL);
+  gst_object_unref (test->aggregator);
+
+  g_main_loop_unref (test->ml);
+}
+
+GST_START_TEST (test_aggregate)
+{
+  GThread *thread1, *thread2;
+
+  ChainData data1 = { 0, };
+  ChainData data2 = { 0, };
+  TestData test = { 0, };
+
+  _test_data_init (&test, FALSE);
+  _chain_data_init (&data1, test.aggregator);
+  _chain_data_init (&data2, test.aggregator);
+
+  thread1 = g_thread_try_new ("gst-check", push_buffer, &data1, NULL);
+  thread2 = g_thread_try_new ("gst-check", push_buffer, &data2, NULL);
+
+  g_main_loop_run (test.ml);
+  g_source_remove (test.timeout_id);
+
+
+  /* these will return immediately as when the data is popped the threads are
+   * unlocked and will terminate */
+  g_thread_join (thread1);
+  g_thread_join (thread2);
+
+  _chain_data_clear (&data1);
+  _chain_data_clear (&data2);
+  _test_data_clear (&test);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_aggregate_eos)
+{
+  GThread *thread1, *thread2;
+
+  ChainData data1 = { 0, };
+  ChainData data2 = { 0, };
+  TestData test = { 0, };
+
+  _test_data_init (&test, FALSE);
+  _chain_data_init (&data1, test.aggregator);
+  _chain_data_init (&data2, test.aggregator);
+
+  data2.event = gst_event_new_eos ();
+
+  thread1 = g_thread_try_new ("gst-check", push_buffer, &data1, NULL);
+  thread2 = g_thread_try_new ("gst-check", push_event, &data2, NULL);
+
+  g_main_loop_run (test.ml);
+  g_source_remove (test.timeout_id);
+
+  /* these will return immediately as when the data is popped the threads are
+   * unlocked and will terminate */
+  g_thread_join (thread1);
+  g_thread_join (thread2);
+
+  _chain_data_clear (&data1);
+  _chain_data_clear (&data2);
+  _test_data_clear (&test);
+}
+
+GST_END_TEST;
+
+#define NUM_BUFFERS 3
+static void
+handoff (GstElement * fakesink, GstBuffer * buf, GstPad * pad, guint * count)
+{
+  *count = *count + 1;
+  GST_DEBUG ("HANDOFF: %i", *count);
+}
+
+/* Test a linear pipeline using aggregator */
+GST_START_TEST (test_linear_pipeline)
+{
+  GstBus *bus;
+  GstMessage *msg;
+  GstElement *pipeline, *src, *agg, *sink;
+
+  gint count = 0;
+
+  pipeline = gst_pipeline_new ("pipeline");
+  src = gst_check_setup_element ("fakesrc");
+  g_object_set (src, "num-buffers", NUM_BUFFERS, "sizetype", 2, "sizemax", 4,
+      NULL);
+  agg = gst_check_setup_element ("testaggregator");
+  sink = gst_check_setup_element ("fakesink");
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", (GCallback) handoff, &count);
+
+  fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), agg));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+  fail_unless (gst_element_link (src, agg));
+  fail_unless (gst_element_link (agg, sink));
+
+  bus = gst_element_get_bus (pipeline);
+  fail_if (bus == NULL);
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+  fail_if (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_EOS);
+  gst_message_unref (msg);
+
+  fail_unless_equals_int (count, NUM_BUFFERS);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_two_src_pipeline)
+{
+  GstBus *bus;
+  GstMessage *msg;
+  GstElement *pipeline, *src, *src1, *agg, *sink;
+
+  gint count = 0;
+
+  pipeline = gst_pipeline_new ("pipeline");
+  src = gst_element_factory_make ("fakesrc", NULL);
+  g_object_set (src, "num-buffers", NUM_BUFFERS, "sizetype", 2, "sizemax", 4,
+      NULL);
+
+  src1 = gst_element_factory_make ("fakesrc", NULL);
+  g_object_set (src1, "num-buffers", NUM_BUFFERS + 1, "sizetype", 2, "sizemax",
+      4, NULL);
+
+  agg = gst_check_setup_element ("testaggregator");
+  sink = gst_check_setup_element ("fakesink");
+  g_object_set (sink, "signal-handoffs", TRUE, NULL);
+  g_signal_connect (sink, "handoff", (GCallback) handoff, &count);
+
+  fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), src1));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), agg));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+  fail_unless (gst_element_link (src, agg));
+  fail_unless (gst_element_link (src1, agg));
+  fail_unless (gst_element_link (agg, sink));
+
+  bus = gst_element_get_bus (pipeline);
+  fail_if (bus == NULL);
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+  msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+  fail_if (GST_MESSAGE_TYPE (msg) != GST_MESSAGE_EOS);
+  gst_message_unref (msg);
+
+  fail_unless_equals_int (count, NUM_BUFFERS + 1);
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_flushing_seek)
+{
+  GstEvent *event;
+  GThread *thread1, *thread2;
+
+  ChainData data1 = { 0, };
+  ChainData data2 = { 0, };
+  TestData test = { 0, };
+
+  _test_data_init (&test, TRUE);
+
+  /* Queue a buffer in agg:sink_1. Then do a flushing seek and check that the
+   * new flushing seek logic is triggered. On the first FLUSH_START call the
+   * buffers queued in collectpads should get flushed. Only one FLUSH_START and
+   * one FLUSH_STOP should be forwarded downstream.
+   */
+  _chain_data_init (&data1, test.aggregator);
+  _chain_data_init (&data2, test.aggregator);
+  GST_BUFFER_TIMESTAMP (data2.buffer) = 0;
+
+  gst_segment_init (&GST_AGGREGATOR (test.aggregator)->segment,
+      GST_FORMAT_TIME);
+  /* now do a successful flushing seek */
+  event = gst_event_new_seek (1, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
+      GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 10 * GST_SECOND);
+  fail_unless (gst_pad_send_event (test.srcpad, event));
+
+  /* flushing starts once one of the upstream elements sends the first
+   * FLUSH_START */
+  fail_unless_equals_int (test.flush_start_events, 0);
+  fail_unless_equals_int (test.flush_stop_events, 0);
+
+  /* flush ogg:sink_0. This flushs collectpads, calls ::flush() and sends
+   * FLUSH_START downstream */
+  GST_DEBUG ("Flushing: %s:%s", GST_DEBUG_PAD_NAME (data2.sinkpad));
+  fail_unless (gst_pad_push_event (data2.srcpad, gst_event_new_flush_start ()));
+
+  /* expect this buffer to be flushed */
+  data2.expected_result = GST_FLOW_FLUSHING;
+  thread2 = g_thread_try_new ("gst-check", push_buffer, &data2, NULL);
+
+  fail_unless (gst_pad_push_event (data1.srcpad, gst_event_new_flush_start ()));
+  fail_unless_equals_int (test.flush_start_events, 1);
+  fail_unless_equals_int (test.flush_stop_events, 0);
+
+  /* the first FLUSH_STOP is not forwarded downstream */
+  fail_unless (gst_pad_push_event (data1.srcpad,
+          gst_event_new_flush_stop (TRUE)));
+  fail_unless_equals_int (test.flush_start_events, 1);
+  fail_unless_equals_int (test.flush_stop_events, 0);
+
+  /* at this point even the other pad agg:sink_1 should be flushing so thread2
+   * should have stopped */
+  g_thread_join (thread2);
+
+  /* push a buffer on agg:sink_0 to trigger one collect after flushing to verify
+   * that flushing completes once all the pads have been flushed */
+  thread1 = g_thread_try_new ("gst-check", push_buffer, &data1, NULL);
+
+  /* flush agg:sink_1 as well. This completes the flushing seek so a FLUSH_STOP is
+   * sent downstream */
+  gst_pad_push_event (data2.srcpad, gst_event_new_flush_stop (TRUE));
+
+  /* and the last FLUSH_STOP is forwarded downstream */
+  fail_unless_equals_int (test.flush_start_events, 1);
+
+  /*  Check collected */
+  gst_pad_add_probe (test.srcpad, GST_PAD_PROBE_TYPE_BUFFER,
+      (GstPadProbeCallback) _aggregated_cb, test.ml, NULL);
+
+  data2.event = gst_event_new_eos ();
+  thread2 = g_thread_try_new ("gst-check", push_event, &data2, NULL);
+
+  g_main_loop_run (test.ml);
+  g_source_remove (test.timeout_id);
+
+  fail_unless_equals_int (test.flush_stop_events, 1);
+
+  /* these will return immediately as at this point the threads have been
+   * unlocked and are finished */
+  g_thread_join (thread1);
+  g_thread_join (thread2);
+
+  _test_data_clear (&test);
+
+}
+
+GST_END_TEST;
+
+static void
+infinite_seek (guint num_srcs, guint num_seeks)
+{
+  GstBus *bus;
+  GstMessage *message;
+  GstElement *pipeline, *src, *agg, *sink;
+
+  gint count = 0, i;
+  gboolean seek_res, carry_on = TRUE;
+
+  gst_init (NULL, NULL);
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  agg = gst_check_setup_element ("testaggregator");
+  sink = gst_check_setup_element ("fakesink");
+
+  fail_unless (gst_bin_add (GST_BIN (pipeline), agg));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+  fail_unless (gst_element_link (agg, sink));
+
+  for (i = 0; i < num_srcs; i++) {
+    src = gst_element_factory_make ("fakesrc", NULL);
+    g_object_set (src, "sizetype", 2, "sizemax", 4, NULL);
+    fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+    fail_unless (gst_element_link (src, agg));
+  }
+
+  bus = gst_element_get_bus (pipeline);
+  fail_if (bus == NULL);
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  while (count < num_seeks && carry_on) {
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, GST_SECOND / 10);
+    if (message) {
+      switch (GST_MESSAGE_TYPE (message)) {
+        case GST_MESSAGE_EOS:
+        {
+          /* we should check if we really finished here */
+          GST_WARNING ("Got an EOS");
+          carry_on = FALSE;
+          break;
+        }
+        case GST_MESSAGE_STATE_CHANGED:
+        {
+          GstState new;
+
+          if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
+            gst_message_parse_state_changed (message, NULL, &new, NULL);
+
+            if (new != GST_STATE_PLAYING)
+              break;
+
+            GST_INFO ("Seeking (num: %i)", count);
+            seek_res =
+                gst_element_seek_simple (sink, GST_FORMAT_BYTES,
+                GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, 0);
+            GST_INFO ("seek result is : %d", seek_res);
+            fail_unless (seek_res != 0);
+            count++;
+          }
+
+          break;
+        }
+        case GST_MESSAGE_ERROR:
+          GST_ERROR ("Error on the bus: %" GST_PTR_FORMAT, message);
+          carry_on = FALSE;
+          fail_error_message (message);
+          break;
+        default:
+          break;
+      }
+      gst_message_unref (message);
+    }
+  }
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_START_TEST (test_infinite_seek)
+{
+  infinite_seek (2, 500);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_infinite_seek_50_src)
+{
+  infinite_seek (50, 100);
+}
+
+GST_END_TEST;
+
+typedef struct
+{
+  GstElement *agg, *src, *pipeline;
+  GCond *cond;
+  GMutex *lock;
+} RemoveElementData;
+
+static GstPadProbeReturn
+pad_probe_cb (GstPad * pad, GstPadProbeInfo * info, RemoveElementData * data)
+{
+  GstPad *peer;
+
+  GST_INFO_OBJECT (pad, "Removing pad");
+
+  peer = gst_pad_get_peer (pad);
+  gst_pad_unlink (pad, peer);
+  gst_element_release_request_pad (data->agg, peer);
+  fail_unless (gst_bin_remove (GST_BIN (data->pipeline), data->src));
+
+  g_mutex_lock (data->lock);
+  g_cond_broadcast (data->cond);
+  g_mutex_unlock (data->lock);
+
+  return GST_PAD_PROBE_OK;
+}
+
+GST_START_TEST (test_add_remove)
+{
+  /* Used to notify that we removed the pad from  */
+  GCond cond;
+  GMutex lock;
+
+  GstBus *bus;
+  GstState state;
+  GstMessage *message;
+  gboolean carry_on = TRUE;
+  guint num_iterations = 100;
+
+  GstPad *pad;
+  GstElement *pipeline, *src, *src1 = NULL, *agg, *sink;
+
+  gint count = 0;
+
+  gst_init (NULL, NULL);
+  g_mutex_init (&lock);
+  g_cond_init (&cond);
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  agg = gst_check_setup_element ("testaggregator");
+  sink = gst_check_setup_element ("fakesink");
+
+  fail_unless (gst_bin_add (GST_BIN (pipeline), agg));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+  fail_unless (gst_element_link (agg, sink));
+
+  bus = gst_element_get_bus (pipeline);
+  while (count < num_iterations) {
+
+    src = gst_element_factory_make ("fakesrc", NULL);
+    g_object_set (src, "num-buffers", 100000, "sizetype", 2, "sizemax", 4,
+        NULL);
+    gst_element_set_locked_state (src, TRUE);
+    fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+    fail_unless (gst_element_link (src, agg));
+    gst_element_set_locked_state (src, FALSE);
+    fail_unless (gst_element_sync_state_with_parent (src));
+
+    if (count == 0)
+      gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+    /* Now make sure the seek happend */
+    carry_on = TRUE;
+    do {
+      message = gst_bus_timed_pop (bus, -1);
+      switch (GST_MESSAGE_TYPE (message)) {
+        case GST_MESSAGE_EOS:
+        {
+          /* we should check if we really finished here */
+          GST_WARNING ("Got an EOS");
+          carry_on = FALSE;
+          break;
+        }
+        case GST_MESSAGE_STATE_CHANGED:
+        {
+          if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
+            gst_message_parse_state_changed (message, NULL, &state, NULL);
+
+            if (state == GST_STATE_PLAYING) {
+              RemoveElementData data;
+
+              carry_on = FALSE;
+              if (count == 0) {
+                GST_DEBUG ("First run, not removing any element yet");
+
+                break;
+              }
+
+              data.src = gst_object_ref (src1);
+              data.agg = agg;
+              data.lock = &lock;
+              data.cond = &cond;
+              data.pipeline = pipeline;
+              pad = gst_element_get_static_pad (data.src, "src");
+
+              g_mutex_lock (&lock);
+              gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
+                  (GstPadProbeCallback) pad_probe_cb, &data, NULL);
+              GST_INFO ("Waiting for %" GST_PTR_FORMAT " %s", pad,
+                  gst_element_state_get_name (GST_STATE (data.src)));
+              g_cond_wait (&cond, &lock);
+              g_mutex_unlock (&lock);
+
+              /*  We can not set state from the streaming thread so we
+               *  need to make sure that the source has been removed
+               *  before setting its state to NULL */
+              gst_element_set_state (data.src, GST_STATE_NULL);
+
+              gst_object_unref (data.src);
+            }
+          }
+
+          break;
+        }
+        case GST_MESSAGE_ERROR:
+        {
+          GST_ERROR ("Error on the bus: %" GST_PTR_FORMAT, message);
+          carry_on = FALSE;
+          fail_error_message (message);
+          break;
+        }
+        default:
+          break;
+      }
+
+      gst_message_unref (message);
+    } while (carry_on);
+
+    GST_INFO ("Seeking");
+    fail_unless (gst_element_seek_simple (pipeline, GST_FORMAT_BYTES,
+            GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, 0));
+
+    count++;
+    src1 = src;
+  }
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+GST_START_TEST (test_change_state_intensive)
+{
+  GstBus *bus;
+  GstMessage *message;
+  GstElement *pipeline, *src, *agg, *sink;
+
+  gint i, state_i = 0, num_srcs = 3;
+  gboolean carry_on = TRUE, ready = FALSE;
+  GstStateChangeReturn state_return;
+  GstState wanted_state, wanted_states[] = {
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PAUSED, GST_STATE_READY,
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PAUSED, GST_STATE_READY,
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PAUSED, GST_STATE_READY,
+    GST_STATE_PAUSED, GST_STATE_READY, GST_STATE_PAUSED, GST_STATE_READY,
+    GST_STATE_PAUSED, GST_STATE_READY, GST_STATE_PAUSED, GST_STATE_NULL,
+    GST_STATE_PAUSED, GST_STATE_NULL, GST_STATE_PAUSED, GST_STATE_NULL,
+    GST_STATE_PAUSED, GST_STATE_NULL, GST_STATE_PAUSED, GST_STATE_NULL,
+    GST_STATE_PAUSED, GST_STATE_NULL, GST_STATE_PLAYING, GST_STATE_NULL,
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PLAYING, GST_STATE_NULL,
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PLAYING, GST_STATE_NULL,
+    GST_STATE_PLAYING, GST_STATE_NULL, GST_STATE_PLAYING, GST_STATE_NULL,
+  };
+
+  gst_init (NULL, NULL);
+
+  pipeline = gst_pipeline_new ("pipeline");
+
+  agg = gst_check_setup_element ("testaggregator");
+  sink = gst_check_setup_element ("fakesink");
+
+  fail_unless (gst_bin_add (GST_BIN (pipeline), agg));
+  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
+  fail_unless (gst_element_link (agg, sink));
+
+  for (i = 0; i < num_srcs; i++) {
+    src = gst_element_factory_make ("fakesrc", NULL);
+    g_object_set (src, "sizetype", 2, "sizemax", 4, NULL);
+    fail_unless (gst_bin_add (GST_BIN (pipeline), src));
+    fail_unless (gst_element_link (src, agg));
+  }
+
+  bus = gst_element_get_bus (pipeline);
+  fail_if (bus == NULL);
+
+  wanted_state = wanted_states[state_i++];
+  state_return = gst_element_set_state (pipeline, wanted_state);
+
+  while (state_i < G_N_ELEMENTS (wanted_states) && carry_on) {
+    if (state_return == GST_STATE_CHANGE_SUCCESS && ready) {
+      wanted_state = wanted_states[state_i++];
+      fail_unless (gst_element_set_state (pipeline, wanted_state),
+          GST_STATE_CHANGE_SUCCESS);
+      GST_INFO ("Wanted state: %s", gst_element_state_get_name (wanted_state));
+    }
+
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, GST_SECOND / 10);
+    if (message) {
+      switch (GST_MESSAGE_TYPE (message)) {
+        case GST_MESSAGE_EOS:
+        {
+          /* we should check if we really finished here */
+          GST_WARNING ("Got an EOS");
+          carry_on = FALSE;
+          break;
+        }
+        case GST_MESSAGE_STATE_CHANGED:
+        {
+          GstState new;
+
+          if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
+            gst_message_parse_state_changed (message, NULL, &new, NULL);
+
+            if (new != wanted_state) {
+              ready = FALSE;
+              break;
+            }
+
+            GST_DEBUG ("State %s reached",
+                gst_element_state_get_name (wanted_state));
+            wanted_state = wanted_states[state_i++];
+            GST_DEBUG ("Wanted state: %s",
+                gst_element_state_get_name (wanted_state));
+            state_return = gst_element_set_state (pipeline, wanted_state);
+            fail_unless (state_return == GST_STATE_CHANGE_SUCCESS ||
+                state_return == GST_STATE_CHANGE_ASYNC);
+            ready = TRUE;
+          }
+
+          break;
+        }
+        case GST_MESSAGE_ERROR:
+          GST_ERROR ("Error on the bus: %" GST_PTR_FORMAT, message);
+          carry_on = FALSE;
+          break;
+        default:
+          break;
+      }
+      gst_message_unref (message);
+    }
+  }
+
+  gst_element_set_state (pipeline, GST_STATE_NULL);
+  gst_object_unref (bus);
+  gst_object_unref (pipeline);
+}
+
+GST_END_TEST;
+
+static Suite *
+gst_aggregator_suite (void)
+{
+  Suite *suite;
+  TCase *general;
+
+  gst_test_aggregator_plugin_register ();
+
+  suite = suite_create ("GstAggregator");
+
+  general = tcase_create ("general");
+  suite_add_tcase (suite, general);
+  tcase_add_test (general, test_aggregate);
+  tcase_add_test (general, test_aggregate_eos);
+  tcase_add_test (general, test_flushing_seek);
+  tcase_add_test (general, test_infinite_seek);
+  tcase_add_test (general, test_infinite_seek_50_src);
+  tcase_add_test (general, test_linear_pipeline);
+  tcase_add_test (general, test_two_src_pipeline);
+  tcase_add_test (general, test_add_remove);
+  tcase_add_test (general, test_change_state_intensive);
+
+  return suite;
+}
+
+GST_CHECK_MAIN (gst_aggregator);
diff --git a/tests/check/libs/gstglupload.c b/tests/check/libs/gstglupload.c
index 66f0339..5c014a4 100644
--- a/tests/check/libs/gstglupload.c
+++ b/tests/check/libs/gstglupload.c
@@ -233,12 +233,9 @@
 
   gst_video_info_set_format (&in_info, GST_VIDEO_FORMAT_RGBA, WIDTH, HEIGHT);
 
-  gst_gl_context_gen_texture (context, &tex_id, GST_VIDEO_FORMAT_RGBA, WIDTH,
-      HEIGHT);
-
   gst_gl_upload_set_format (upload, &in_info);
 
-  res = gst_gl_upload_perform_with_data (upload, tex_id, data);
+  res = gst_gl_upload_perform_with_data (upload, &tex_id, data);
   fail_if (res == FALSE, "Failed to upload buffer: %s\n",
       gst_gl_context_get_error ());
 
@@ -251,8 +248,6 @@
         context);
     i++;
   }
-
-  gst_gl_context_del_texture (context, &tex_id);
 }
 
 GST_END_TEST;
@@ -301,6 +296,7 @@
   GstVideoInfo in_info;
   GstVideoGLTextureUploadMeta *gl_upload_meta;
   guint tex_ids[] = { 0, 0, 0, 0 };
+  GstGLUploadMeta *upload_meta;
   gboolean res;
   gint i = 0;
 
@@ -315,10 +311,13 @@
   gst_gl_context_gen_texture (context, &tex_ids[0], GST_VIDEO_FORMAT_RGBA,
       WIDTH, HEIGHT);
 
+  upload_meta = gst_gl_upload_meta_new (context);
+  gst_gl_upload_meta_set_format (upload_meta, &in_info);
+
   gst_gl_upload_set_format (upload, &in_info);
   gst_buffer_add_video_meta_full (buffer, 0, GST_VIDEO_FORMAT_RGBA, WIDTH,
       HEIGHT, 1, in_info.offset, in_info.stride);
-  gst_gl_upload_add_video_gl_texture_upload_meta (upload, buffer);
+  gst_gl_upload_meta_add_to_buffer (upload_meta, buffer);
 
   gl_upload_meta = gst_buffer_get_video_gl_texture_upload_meta (buffer);
   fail_if (gl_upload_meta == NULL, "Failed to add GstVideoGLTextureUploadMeta"
@@ -337,6 +336,7 @@
     i++;
   }
 
+  gst_object_unref (upload_meta);
   gst_gl_context_del_texture (context, &tex_ids[0]);
 }
 
diff --git a/tests/check/libs/mpegts.c b/tests/check/libs/mpegts.c
index 9a652b3..e1bedff 100644
--- a/tests/check/libs/mpegts.c
+++ b/tests/check/libs/mpegts.c
@@ -62,6 +62,12 @@
   0xe5, 0x02, 0xd9
 };
 
+static const guint8 stt_data_check[] = {
+  0xcd, 0xf0, 0x11, 0x00, 0x00, 0xc1, 0x00,
+  0x00, 0x00, 0x23, 0xb4, 0xe6, 0x5C, 0x0c,
+  0xc0, 0x00, 0xc4, 0x86, 0x56, 0xa5
+};
+
 GST_START_TEST (test_mpegts_pat)
 {
   GstMpegTsPatProgram *program;
@@ -381,6 +387,41 @@
 
 GST_END_TEST;
 
+GST_START_TEST (test_mpegts_atsc_stt)
+{
+  const GstMpegTsAtscSTT *stt;
+  GstMpegTsSection *section;
+  guint8 *data;
+  GstDateTime *dt;
+
+  data = g_memdup (stt_data_check, 20);
+
+  section = gst_mpegts_section_new (0x1ffb, data, 20);
+  stt = gst_mpegts_section_get_atsc_stt (section);
+  fail_if (stt == NULL);
+
+  fail_unless (stt->protocol_version == 0);
+  fail_unless (stt->system_time == 0x23b4e65c);
+  fail_unless (stt->gps_utc_offset == 12);
+  fail_unless (stt->ds_status == 1);
+  fail_unless (stt->ds_dayofmonth == 0);
+  fail_unless (stt->ds_hour == 0);
+
+  dt = gst_mpegts_atsc_stt_get_datetime_utc ((GstMpegTsAtscSTT *) stt);
+  fail_unless (gst_date_time_get_day (dt) == 30);
+  fail_unless (gst_date_time_get_month (dt) == 12);
+  fail_unless (gst_date_time_get_year (dt) == 1998);
+  fail_unless (gst_date_time_get_hour (dt) == 13);
+  fail_unless (gst_date_time_get_minute (dt) == 0);
+  fail_unless (gst_date_time_get_second (dt) == 0);
+
+  gst_date_time_unref (dt);
+  gst_mpegts_section_unref (section);
+}
+
+GST_END_TEST;
+
+
 static const guint8 registration_descriptor[] = {
   0x05, 0x04, 0x48, 0x44, 0x4d, 0x56
 };
@@ -514,6 +555,7 @@
   tcase_add_test (tc_chain, test_mpegts_pmt);
   tcase_add_test (tc_chain, test_mpegts_nit);
   tcase_add_test (tc_chain, test_mpegts_sdt);
+  tcase_add_test (tc_chain, test_mpegts_atsc_stt);
   tcase_add_test (tc_chain, test_mpegts_descriptors);
   tcase_add_test (tc_chain, test_mpegts_dvb_descriptors);
 
diff --git a/tests/examples/Makefile.in b/tests/examples/Makefile.in
index 44899cb..9ab53f3 100644
--- a/tests/examples/Makefile.in
+++ b/tests/examples/Makefile.in
@@ -323,6 +323,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -409,6 +411,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -700,6 +703,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @USE_UVCH264_FALSE@UVCH264_DIR = 
 @USE_UVCH264_TRUE@UVCH264_DIR = uvch264
 @HAVE_GTK_FALSE@GTK_EXAMPLES = 
diff --git a/tests/examples/camerabin2/Makefile.in b/tests/examples/camerabin2/Makefile.in
index 89ff81d..e42ae73 100644
--- a/tests/examples/camerabin2/Makefile.in
+++ b/tests/examples/camerabin2/Makefile.in
@@ -333,6 +333,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -419,6 +421,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -710,6 +713,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 GST_CAMERABIN_UI_FILES = gst-camera2.ui
 AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\"
 @HAVE_GTK_FALSE@GST_CAMERABIN_GTK_EXAMPLES = 
diff --git a/tests/examples/directfb/Makefile.in b/tests/examples/directfb/Makefile.in
index 22b64bd..f24e769 100644
--- a/tests/examples/directfb/Makefile.in
+++ b/tests/examples/directfb/Makefile.in
@@ -312,6 +312,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -398,6 +400,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -689,6 +692,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 gstdfb_SOURCES = gstdfb.c
 gstdfb_CFLAGS = $(GST_CFLAGS) $(DIRECTFB_CFLAGS)
 gstdfb_LDFLAGS = $(GST_LIBS) $(DIRECTFB_LIBS) $(LIBM)
diff --git a/tests/examples/gl/Makefile.in b/tests/examples/gl/Makefile.in
index f871ca4..629440c 100644
--- a/tests/examples/gl/Makefile.in
+++ b/tests/examples/gl/Makefile.in
@@ -322,6 +322,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -408,6 +410,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -699,6 +702,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \
 	$(am__append_4) $(am__append_5)
 DIST_SUBDIRS = cocoa generic qt clutter sdl gtk
diff --git a/tests/examples/gl/clutter/Makefile.am b/tests/examples/gl/clutter/Makefile.am
index 51576b3..cb8796c 100644
--- a/tests/examples/gl/clutter/Makefile.am
+++ b/tests/examples/gl/clutter/Makefile.am
@@ -7,7 +7,8 @@
 
 cluttershare_SOURCES = cluttershare.c
 
-cluttershare_CFLAGS=$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+cluttershare_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
     $(GST_CFLAGS) $(GL_CFLAGS) $(CLUTTER_CFLAGS)
 cluttershare_LDADD=$(CLUTTER_LIBS) $(GST_PLUGINS_BASE_LIBS) \
     $(GST_LIBS) $(GL_LIBS) \
@@ -24,7 +25,8 @@
 
 clutteractor_SOURCES = clutteractor.c
 
-clutteractor_CFLAGS=$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+clutteractor_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(CLUTTER_CFLAGS) \
 	$(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
 clutteractor_LDADD=$(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
@@ -33,7 +35,8 @@
 
 clutteractortee_SOURCES = clutteractortee.c
 
-clutteractortee_CFLAGS=$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+clutteractortee_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(CLUTTER_CFLAGS) \
 	$(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
 clutteractortee_LDADD=$(CLUTTER_LIBS) $(CLUTTER_GLX_LIBS) $(CLUTTER_X11_LIBS) \
diff --git a/tests/examples/gl/clutter/Makefile.in b/tests/examples/gl/clutter/Makefile.in
index 869378d..7f26fa4 100644
--- a/tests/examples/gl/clutter/Makefile.in
+++ b/tests/examples/gl/clutter/Makefile.in
@@ -355,6 +355,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -441,6 +443,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -732,8 +735,10 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @HAVE_CLUTTER_TRUE@cluttershare_SOURCES = cluttershare.c
-@HAVE_CLUTTER_TRUE@cluttershare_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
+@HAVE_CLUTTER_TRUE@cluttershare_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+@HAVE_CLUTTER_TRUE@    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
 @HAVE_CLUTTER_TRUE@    $(GST_CFLAGS) $(GL_CFLAGS) $(CLUTTER_CFLAGS)
 
 @HAVE_CLUTTER_TRUE@cluttershare_LDADD = $(CLUTTER_LIBS) $(GST_PLUGINS_BASE_LIBS) \
@@ -741,7 +746,8 @@
 @HAVE_CLUTTER_TRUE@    -lgstvideo-$(GST_API_VERSION) $(top_builddir)/gst-libs/gst/gl/libgstgl-@GST_API_VERSION@.la
 
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractor_SOURCES = clutteractor.c
-@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractor_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractor_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@	$(GL_CFLAGS) $(CLUTTER_CFLAGS) \
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@	$(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
 
@@ -750,7 +756,8 @@
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@	$(GL_LIBS) $(XCOMPOSITE_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractortee_SOURCES = clutteractortee.c
-@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractortee_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@clutteractortee_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+@HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@    $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@	$(GL_CFLAGS) $(CLUTTER_CFLAGS) \
 @HAVE_CLUTTER_GLX_TRUE@@HAVE_CLUTTER_X11_TRUE@@HAVE_XCOMPOSITE_TRUE@	$(CLUTTER_GLX_CFLAGS) $(CLUTTER_X11_CFLAGS) $(XCOMPOSITE_CFLAGS)
 
diff --git a/tests/examples/gl/cocoa/Makefile.am b/tests/examples/gl/cocoa/Makefile.am
index c13ec52..91349c0 100755
--- a/tests/examples/gl/cocoa/Makefile.am
+++ b/tests/examples/gl/cocoa/Makefile.am
@@ -4,9 +4,10 @@
 
 cocoa_videooverlay_SOURCES = cocoa-videooverlay.m
 
-cocoa_videooverlay_OBJCFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+cocoa_videooverlay_OBJCFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) ${GL_OBJCFLAGS}
-cocoa_videooverlay_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+cocoa_videooverlay_LDADD=$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 cocoa_videooverlay_LIBTOOLFLAGS = --tag=OBJC
diff --git a/tests/examples/gl/cocoa/Makefile.in b/tests/examples/gl/cocoa/Makefile.in
index 831fe8c..429a837 100644
--- a/tests/examples/gl/cocoa/Makefile.in
+++ b/tests/examples/gl/cocoa/Makefile.in
@@ -318,6 +318,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -404,6 +406,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -695,11 +698,13 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_SOURCES = cocoa-videooverlay.m
-@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_OBJCFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_OBJCFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+@HAVE_WINDOW_COCOA_TRUE@    $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 @HAVE_WINDOW_COCOA_TRUE@	$(GL_CFLAGS) ${GL_OBJCFLAGS}
 
-@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+@HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 @HAVE_WINDOW_COCOA_TRUE@	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 @HAVE_WINDOW_COCOA_TRUE@cocoa_videooverlay_LIBTOOLFLAGS = --tag=OBJC
diff --git a/tests/examples/gl/generic/Makefile.in b/tests/examples/gl/generic/Makefile.in
index 8af78fe..129f814 100644
--- a/tests/examples/gl/generic/Makefile.in
+++ b/tests/examples/gl/generic/Makefile.in
@@ -318,6 +318,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -404,6 +406,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -695,6 +698,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = cube cubeyuv doublecube recordgraphic
 all: all-recursive
 
diff --git a/tests/examples/gl/generic/cube/Makefile.am b/tests/examples/gl/generic/cube/Makefile.am
index 41a5e2c..b6bd60b 100644
--- a/tests/examples/gl/generic/cube/Makefile.am
+++ b/tests/examples/gl/generic/cube/Makefile.am
@@ -3,6 +3,7 @@
 
 cube_SOURCES = main.cpp
 
-cube_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cube_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+cube_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+cube_LDADD=$(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/cube/Makefile.in b/tests/examples/gl/generic/cube/Makefile.in
index 2b649f3..7ee25dc 100644
--- a/tests/examples/gl/generic/cube/Makefile.in
+++ b/tests/examples/gl/generic/cube/Makefile.in
@@ -313,6 +313,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -399,6 +401,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -690,9 +693,12 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 cube_SOURCES = main.cpp
-cube_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cube_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+cube_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+
+cube_LDADD = $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/examples/gl/generic/cube/main.cpp b/tests/examples/gl/generic/cube/main.cpp
index e7ebaae..23c81ec 100644
--- a/tests/examples/gl/generic/cube/main.cpp
+++ b/tests/examples/gl/generic/cube/main.cpp
@@ -65,17 +65,19 @@
 }
 
 //client reshape callback
-static void reshapeCallback (GLuint width, GLuint height, gpointer data)
+static gboolean reshapeCallback (void *gl_sink, GLuint width, GLuint height, gpointer data)
 {
     glViewport(0, 0, width, height);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100);
     glMatrixMode(GL_MODELVIEW);
+
+    return TRUE;
 }
 
 //client draw callback
-static gboolean drawCallback (GLuint texture, GLuint width, GLuint height, gpointer data)
+static gboolean drawCallback (void * gl_sink, GLuint texture, GLuint width, GLuint height, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -116,35 +118,35 @@
 
     glBegin(GL_QUADS);
 	      // Front Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      // Back Face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
 	      // Top Face
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
 	      // Bottom Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      // Right face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
 	      // Left Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
     xrot+=0.3f;
@@ -200,9 +202,8 @@
 
     /* configure elements */
     g_object_set(G_OBJECT(videosrc), "num-buffers", 400, NULL);
-    g_object_set(G_OBJECT(glimagesink), "client-reshape-callback", reshapeCallback, NULL);
-    g_object_set(G_OBJECT(glimagesink), "client-draw-callback", drawCallback, NULL);
-    g_object_set(G_OBJECT(glimagesink), "client-data", NULL, NULL);
+    g_signal_connect(G_OBJECT(glimagesink), "client-reshape", G_CALLBACK (reshapeCallback), NULL);
+    g_signal_connect(G_OBJECT(glimagesink), "client-draw", G_CALLBACK (drawCallback), NULL);
 
     /* add elements */
     gst_bin_add_many (GST_BIN (pipeline), videosrc, glimagesink, NULL);
diff --git a/tests/examples/gl/generic/cubeyuv/Makefile.am b/tests/examples/gl/generic/cubeyuv/Makefile.am
index 0fe4fcd..289cbd3 100644
--- a/tests/examples/gl/generic/cubeyuv/Makefile.am
+++ b/tests/examples/gl/generic/cubeyuv/Makefile.am
@@ -3,6 +3,7 @@
 
 cubeyuv_SOURCES = main.cpp
 
-cubeyuv_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cubeyuv_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+cubeyuv_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+cubeyuv_LDADD=$(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/cubeyuv/Makefile.in b/tests/examples/gl/generic/cubeyuv/Makefile.in
index cb9a6e6..afaea9b 100644
--- a/tests/examples/gl/generic/cubeyuv/Makefile.in
+++ b/tests/examples/gl/generic/cubeyuv/Makefile.in
@@ -313,6 +313,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -399,6 +401,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -690,9 +693,12 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 cubeyuv_SOURCES = main.cpp
-cubeyuv_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-cubeyuv_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+cubeyuv_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+
+cubeyuv_LDADD = $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/examples/gl/generic/cubeyuv/main.cpp b/tests/examples/gl/generic/cubeyuv/main.cpp
index 1796447..0d585a7 100644
--- a/tests/examples/gl/generic/cubeyuv/main.cpp
+++ b/tests/examples/gl/generic/cubeyuv/main.cpp
@@ -87,18 +87,20 @@
 
 
 //client reshape callback
-static void reshapeCallback (GLuint width, GLuint height)
+static gboolean reshapeCallback (void * gl_sink, GLuint width, GLuint height, gpointer data)
 {
     glViewport(0, 0, width, height);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100);
     glMatrixMode(GL_MODELVIEW);
+
+    return TRUE;
 }
 
 
 //client draw callback
-static gboolean drawCallback (GLuint texture, GLuint width, GLuint height)
+static gboolean drawCallback (void * gl_sink, GLuint texture, GLuint width, GLuint height, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -139,35 +141,35 @@
 
     glBegin(GL_QUADS);
 	      // Front Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      // Back Face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
 	      // Top Face
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
 	      // Bottom Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      // Right face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
 	      // Left Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
 	xrot+=0.03f;
@@ -264,8 +266,8 @@
     g_object_set(G_OBJECT(videosrc), "location", video_location.c_str(), NULL);
     g_signal_connect(identity, "handoff", G_CALLBACK(identityCallback), textoverlay) ;
     g_object_set(G_OBJECT(textoverlay), "font_desc", "Ahafoni CLM Bold 30", NULL);
-    g_object_set(G_OBJECT(glimagesink), "client-reshape-callback", reshapeCallback, NULL);
-    g_object_set(G_OBJECT(glimagesink), "client-draw-callback", drawCallback, NULL);
+    g_signal_connect(G_OBJECT(glimagesink), "client-reshape", G_CALLBACK (reshapeCallback), NULL);
+    g_signal_connect(G_OBJECT(glimagesink), "client-draw", G_CALLBACK (drawCallback), NULL);
 
     /* add elements */
     gst_bin_add_many (GST_BIN (pipeline), videosrc, decodebin, identity,
diff --git a/tests/examples/gl/generic/doublecube/Makefile.am b/tests/examples/gl/generic/doublecube/Makefile.am
index 7a9184b..3f220de 100644
--- a/tests/examples/gl/generic/doublecube/Makefile.am
+++ b/tests/examples/gl/generic/doublecube/Makefile.am
@@ -3,6 +3,7 @@
 
 doublecube_SOURCES = main.cpp
 
-doublecube_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-doublecube_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+doublecube_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+doublecube_LDADD=$(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/doublecube/Makefile.in b/tests/examples/gl/generic/doublecube/Makefile.in
index c2453ea..f6548ab 100644
--- a/tests/examples/gl/generic/doublecube/Makefile.in
+++ b/tests/examples/gl/generic/doublecube/Makefile.in
@@ -313,6 +313,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -399,6 +401,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -690,9 +693,12 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 doublecube_SOURCES = main.cpp
-doublecube_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-doublecube_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_LIBS) $(GL_LIBS)
+doublecube_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+
+doublecube_LDADD = $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/examples/gl/generic/doublecube/main.cpp b/tests/examples/gl/generic/doublecube/main.cpp
index 4ff6338..4e0a421 100644
--- a/tests/examples/gl/generic/doublecube/main.cpp
+++ b/tests/examples/gl/generic/doublecube/main.cpp
@@ -89,18 +89,20 @@
 
 
 //client reshape callback
-static void reshapeCallback (GLuint width, GLuint height)
+static gboolean reshapeCallback (void *gl_sink, GLuint width, GLuint height)
 {
     glViewport(0, 0, width, height);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100);
     glMatrixMode(GL_MODELVIEW);
+
+    return TRUE;
 }
 
 
 //client draw callback
-static gboolean drawCallback (GLuint texture, GLuint width, GLuint height)
+static gboolean drawCallback (void * gl_sink, GLuint texture, GLuint width, GLuint height)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -141,35 +143,35 @@
 
     glBegin(GL_QUADS);
 	      // Front Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      // Back Face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
 	      // Top Face
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
 	      // Bottom Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      // Right face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
 	      // Left Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
     xrot+=0.03f;
@@ -281,8 +283,8 @@
     g_object_set(G_OBJECT(videosrc), "num-buffers", 1000, NULL);
     g_object_set(G_OBJECT(videosrc), "location", video_location.c_str(), NULL);
     g_object_set(G_OBJECT(textoverlay), "font_desc", "Ahafoni CLM Bold 30", NULL);
-    g_object_set(G_OBJECT(glimagesink0), "client-reshape-callback", reshapeCallback, NULL);
-    g_object_set(G_OBJECT(glimagesink0), "client-draw-callback", drawCallback, NULL);
+    g_signal_connect(G_OBJECT(glimagesink0), "client-reshape", G_CALLBACK (reshapeCallback), NULL);
+    g_signal_connect(G_OBJECT(glimagesink0), "client-draw", G_CALLBACK (drawCallback), NULL);
 
     /* add elements */
     gst_bin_add_many (GST_BIN (pipeline), videosrc, decodebin, videoconvert, textoverlay, tee, 
diff --git a/tests/examples/gl/generic/recordgraphic/Makefile.am b/tests/examples/gl/generic/recordgraphic/Makefile.am
index 4ee21ac..6a25c28 100644
--- a/tests/examples/gl/generic/recordgraphic/Makefile.am
+++ b/tests/examples/gl/generic/recordgraphic/Makefile.am
@@ -3,6 +3,7 @@
 
 recordgraphic_SOURCES = main.cpp
 
-recordgraphic_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-recordgraphic_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_LIBS) $(GL_LIBS)
+recordgraphic_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+recordgraphic_LDADD=$(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_LIBS) $(GL_LIBS)
 
diff --git a/tests/examples/gl/generic/recordgraphic/Makefile.in b/tests/examples/gl/generic/recordgraphic/Makefile.in
index 1d2d550..9676208 100644
--- a/tests/examples/gl/generic/recordgraphic/Makefile.in
+++ b/tests/examples/gl/generic/recordgraphic/Makefile.in
@@ -315,6 +315,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -401,6 +403,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -692,9 +695,12 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 recordgraphic_SOURCES = main.cpp
-recordgraphic_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(GL_CFLAGS)
-recordgraphic_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_LIBS) $(GL_LIBS)
+recordgraphic_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_CXXFLAGS) $(GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
+
+recordgraphic_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_API_VERSION@ $(GST_LIBS) $(GL_LIBS)
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/examples/gl/generic/recordgraphic/main.cpp b/tests/examples/gl/generic/recordgraphic/main.cpp
index 7771ac2..d457a9c 100644
--- a/tests/examples/gl/generic/recordgraphic/main.cpp
+++ b/tests/examples/gl/generic/recordgraphic/main.cpp
@@ -65,19 +65,8 @@
     return TRUE;
 }
 
-//client reshape callback
-static void reshapeCallback (GLuint width, GLuint height)
-{
-    glViewport(0, 0, width, height);
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100);
-    glMatrixMode(GL_MODELVIEW);
-}
-
-
 //client draw callback
-static gboolean drawCallback (GLuint width, GLuint height, GLuint texture, gpointer data)
+static gboolean drawCallback (void *filter, GLuint width, GLuint height, GLuint texture, gpointer data)
 {
     static GLfloat	xrot = 0;
     static GLfloat	yrot = 0;
@@ -119,43 +108,43 @@
     //cube
     glBegin(GL_QUADS);
 	      // Front Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      // Back Face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
 	      // Top Face
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
 	      // Bottom Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f, -1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width,(gfloat)height); glVertex3f(-1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
 	      // Right face
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f( 1.0f,  1.0f, -1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f( 1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f,  1.0f);
 	      // Left Face
-	      glTexCoord2f((gfloat)width, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+	      glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
 	      glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f,  1.0f);
-	      glTexCoord2f(0.0f, (gfloat)height); glVertex3f(-1.0f,  1.0f,  1.0f);
-	      glTexCoord2f((gfloat)width, (gfloat)height); glVertex3f(-1.0f,  1.0f, -1.0f);
+	      glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,  1.0f,  1.0f);
+	      glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,  1.0f, -1.0f);
     glEnd();
 
     xrot+=0.3f;
     yrot+=0.2f;
     zrot+=0.4f;
 
-    //return TRUE causes a postRedisplay
-    return FALSE;
+    //return TRUE because we dealt with the texture
+    return TRUE;
 }
 
 
@@ -215,9 +204,7 @@
 
     /* configure elements */
     g_object_set(G_OBJECT(videosrc), "num-buffers", 400, NULL);
-    g_object_set(G_OBJECT(glfilterapp), "client-reshape-callback", reshapeCallback, NULL);
-    g_object_set(G_OBJECT(glfilterapp), "client-draw-callback", drawCallback, NULL);
-    g_object_set(G_OBJECT(glfilterapp), "client-data", NULL, NULL);
+    g_signal_connect(G_OBJECT(glfilterapp), "client-draw", G_CALLBACK (drawCallback), NULL);
     g_object_set(G_OBJECT(filesink), "location", "record.avi", NULL);
 
     /* add elements */
diff --git a/tests/examples/gl/gtk/Makefile.am b/tests/examples/gl/gtk/Makefile.am
index 2821b4e..a41566b 100644
--- a/tests/examples/gl/gtk/Makefile.am
+++ b/tests/examples/gl/gtk/Makefile.am
@@ -4,7 +4,8 @@
 noinst_LTLIBRARIES = libgstgtkhelper.la
 
 libgstgtkhelper_la_SOURCES = gstgtk.c gstgtk.h
-libgstgtkhelper_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK3_CFLAGS)
+libgstgtkhelper_la_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK3_CFLAGS)
 
 if HAVE_WINDOW_COCOA
 libgstgtkhelper_la_CFLAGS += -x objective-c
diff --git a/tests/examples/gl/gtk/Makefile.in b/tests/examples/gl/gtk/Makefile.in
index 00a45a1..5dfc7d2 100644
--- a/tests/examples/gl/gtk/Makefile.in
+++ b/tests/examples/gl/gtk/Makefile.in
@@ -355,6 +355,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -441,6 +443,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -732,10 +735,12 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 SUBDIRS = . gtkvideooverlay filternovideooverlay filtervideooverlay fxtest switchvideooverlay
 noinst_LTLIBRARIES = libgstgtkhelper.la
 libgstgtkhelper_la_SOURCES = gstgtk.c gstgtk.h
-libgstgtkhelper_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
+libgstgtkhelper_la_CFLAGS = -I$(top_srcdir)/gst-libs \
+	-I$(top_builddir)/gst-libs $(GST_PLUGINS_BAD_CFLAGS) \
 	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(GTK3_CFLAGS) \
 	$(am__append_1)
 all: all-recursive
diff --git a/tests/examples/gl/gtk/filternovideooverlay/Makefile.in b/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
index 5071dfc..efa7055 100644
--- a/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/filternovideooverlay/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,6 +696,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 filternovideooverlay_SOURCES = main.cpp
 filternovideooverlay_CXXFLAGS = \
 	-I$(top_srcdir)/gst-libs \
diff --git a/tests/examples/gl/gtk/filtervideooverlay/Makefile.am b/tests/examples/gl/gtk/filtervideooverlay/Makefile.am
index 4d7f129..2bf658b 100644
--- a/tests/examples/gl/gtk/filtervideooverlay/Makefile.am
+++ b/tests/examples/gl/gtk/filtervideooverlay/Makefile.am
@@ -2,9 +2,10 @@
 
 filtervideooverlay_SOURCES = main.cpp
 
-filtervideooverlay_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+filtervideooverlay_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 filtervideooverlay_LDADD=../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
diff --git a/tests/examples/gl/gtk/filtervideooverlay/Makefile.in b/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
index 73ec025..9b609fb 100644
--- a/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/filtervideooverlay/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,12 +696,14 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 filtervideooverlay_SOURCES = main.cpp
-filtervideooverlay_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+filtervideooverlay_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+    $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
 filtervideooverlay_LDADD = ../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 all: all-am
diff --git a/tests/examples/gl/gtk/fxtest/Makefile.am b/tests/examples/gl/gtk/fxtest/Makefile.am
index c5e5d1a..de052af 100644
--- a/tests/examples/gl/gtk/fxtest/Makefile.am
+++ b/tests/examples/gl/gtk/fxtest/Makefile.am
@@ -3,16 +3,18 @@
 
 fxtest_SOURCES = fxtest.c
 
-fxtest_CFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+fxtest_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 fxtest_LDADD=../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)  \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)  \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 pixbufdrop_SOURCES = pixbufdrop.c
 
-pixbufdrop_CFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+pixbufdrop_CFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 pixbufdrop_LDADD=../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
diff --git a/tests/examples/gl/gtk/fxtest/Makefile.in b/tests/examples/gl/gtk/fxtest/Makefile.in
index b65883a..4aa94de 100644
--- a/tests/examples/gl/gtk/fxtest/Makefile.in
+++ b/tests/examples/gl/gtk/fxtest/Makefile.in
@@ -323,6 +323,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -409,6 +411,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -700,20 +703,23 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 fxtest_SOURCES = fxtest.c
-fxtest_CFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+fxtest_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
 fxtest_LDADD = ../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)  \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS)  \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 pixbufdrop_SOURCES = pixbufdrop.c
-pixbufdrop_CFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
+pixbufdrop_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
 pixbufdrop_LDADD = ../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 all: all-am
diff --git a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.am b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.am
index c9dba8a..bab0e5b 100644
--- a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.am
+++ b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.am
@@ -2,9 +2,10 @@
 
 gtkvideooverlay_SOURCES = main.cpp
 
-gtkvideooverlay_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+gtkvideooverlay_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 gtkvideooverlay_LDADD=../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
diff --git a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
index fae1449..19a98ac 100644
--- a/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/gtkvideooverlay/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,12 +696,14 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 gtkvideooverlay_SOURCES = main.cpp
-gtkvideooverlay_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+gtkvideooverlay_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
 gtkvideooverlay_LDADD = ../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 all: all-am
diff --git a/tests/examples/gl/gtk/switchvideooverlay/Makefile.am b/tests/examples/gl/gtk/switchvideooverlay/Makefile.am
index 12e25e7..dbe007c 100644
--- a/tests/examples/gl/gtk/switchvideooverlay/Makefile.am
+++ b/tests/examples/gl/gtk/switchvideooverlay/Makefile.am
@@ -2,9 +2,10 @@
 
 switchvideooverlay_SOURCES = main.cpp
 
-switchvideooverlay_CXXFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+switchvideooverlay_CXXFLAGS=-I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 switchvideooverlay_LDADD=../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
diff --git a/tests/examples/gl/gtk/switchvideooverlay/Makefile.in b/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
index 3f282d9..a4b491d 100644
--- a/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
+++ b/tests/examples/gl/gtk/switchvideooverlay/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,12 +696,14 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 switchvideooverlay_SOURCES = main.cpp
-switchvideooverlay_CXXFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
+switchvideooverlay_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
+	$(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) \
 	$(GL_CFLAGS) $(GTK3_CFLAGS)
 
 switchvideooverlay_LDADD = ../libgstgtkhelper.la \
-	$(GTK3_LIBS) $(GST_PLUGINS_GL_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
+	$(GTK3_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) \
 	$(GL_LIBS) -lgstvideo-$(GST_API_VERSION)
 
 all: all-am
diff --git a/tests/examples/gl/qt/Makefile.in b/tests/examples/gl/qt/Makefile.in
index 65b756c..4c3d899 100644
--- a/tests/examples/gl/qt/Makefile.in
+++ b/tests/examples/gl/qt/Makefile.in
@@ -258,6 +258,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -344,6 +346,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -635,6 +638,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/examples/gl/sdl/Makefile.am b/tests/examples/gl/sdl/Makefile.am
index c0cd838..12b51a6 100644
--- a/tests/examples/gl/sdl/Makefile.am
+++ b/tests/examples/gl/sdl/Makefile.am
@@ -7,12 +7,11 @@
 
 sdlshare_SOURCES = sdlshare.c
 
-sdlshare_CFLAGS=$(GST_PLUGINS_GL_CFLAGS) $(GST_VIDEO_CFLAGS) $(GST_CFLAGS) \
+sdlshare_CFLAGS=$(GST_PLUGINS_BASE_CFLAGS)$(GST_CFLAGS) \
     $(GL_CFLAGS) $(SDL_CFLAGS) \
 	-I$(top_srcdir)/gst-libs \
 	-I$(top_builddir)/gst-libs
-sdlshare_LDADD=$(GST_PLUGINS_GL_LIBS) $(GST_VIDEO_LIBS) $(GST_LIBS) \
-    $(GL_LIBS) $(SDL_LIBS) \
+sdlshare_LDADD= $(GST_LIBS) $(GL_LIBS) $(SDL_LIBS) \
 	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
 	-lgstvideo-$(GST_API_VERSION)
 
diff --git a/tests/examples/gl/sdl/Makefile.in b/tests/examples/gl/sdl/Makefile.in
index 99686e6..bd430d0 100644
--- a/tests/examples/gl/sdl/Makefile.in
+++ b/tests/examples/gl/sdl/Makefile.in
@@ -135,7 +135,6 @@
 am__DEPENDENCIES_1 =
 @HAVE_SDL_TRUE@sdlshare_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 @HAVE_SDL_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-@HAVE_SDL_TRUE@	$(am__DEPENDENCIES_1) \
 @HAVE_SDL_TRUE@	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -321,6 +320,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -407,6 +408,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -698,14 +700,14 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @HAVE_SDL_TRUE@sdlshare_SOURCES = sdlshare.c
-@HAVE_SDL_TRUE@sdlshare_CFLAGS = $(GST_PLUGINS_GL_CFLAGS) $(GST_VIDEO_CFLAGS) $(GST_CFLAGS) \
+@HAVE_SDL_TRUE@sdlshare_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS)$(GST_CFLAGS) \
 @HAVE_SDL_TRUE@    $(GL_CFLAGS) $(SDL_CFLAGS) \
 @HAVE_SDL_TRUE@	-I$(top_srcdir)/gst-libs \
 @HAVE_SDL_TRUE@	-I$(top_builddir)/gst-libs
 
-@HAVE_SDL_TRUE@sdlshare_LDADD = $(GST_PLUGINS_GL_LIBS) $(GST_VIDEO_LIBS) $(GST_LIBS) \
-@HAVE_SDL_TRUE@    $(GL_LIBS) $(SDL_LIBS) \
+@HAVE_SDL_TRUE@sdlshare_LDADD = $(GST_LIBS) $(GL_LIBS) $(SDL_LIBS) \
 @HAVE_SDL_TRUE@	$(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \
 @HAVE_SDL_TRUE@	-lgstvideo-$(GST_API_VERSION)
 
diff --git a/tests/examples/mpegts/Makefile.in b/tests/examples/mpegts/Makefile.in
index 00f7436..5d3d7e9 100644
--- a/tests/examples/mpegts/Makefile.in
+++ b/tests/examples/mpegts/Makefile.in
@@ -312,6 +312,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -398,6 +400,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -689,6 +692,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 tsparser_SOURCES = ts-parser.c
 tsparser_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
 tsparser_LDFLAGS = $(GST_LIBS)
diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c
index 978d431..86c53ee 100644
--- a/tests/examples/mpegts/ts-parser.c
+++ b/tests/examples/mpegts/ts-parser.c
@@ -62,21 +62,22 @@
 }
 
 static void
-dump_memory_content (GstMpegTsDescriptor * desc, guint spacing)
+dump_memory_bytes (guint8 * data, guint len, guint spacing)
 {
   gsize off = 0;
 
-  while (off < desc->length) {
+  while (off < len) {
     gchar buf[128];
 
     /* gst_info_dump_mem_line will process 16 bytes at most */
-    gst_info_dump_mem_line (buf, sizeof (buf), desc->data, off + 2,
-        desc->length - off);
-    g_printf ("%*s  %s\n", spacing, "", buf);
+    gst_info_dump_mem_line (buf, sizeof (buf), data, off, len - off);
+    g_printf ("%*s   %s\n", spacing, "", buf);
     off += 16;
   }
 }
 
+#define dump_memory_content(desc, spacing) dump_memory_bytes((desc)->data + 2, (desc)->length, spacing)
+
 static const gchar *
 descriptor_name (gint val)
 {
@@ -149,10 +150,70 @@
   if (gst_mpegts_descriptor_parse_cable_delivery_system (desc, &res)) {
     g_printf ("%*s Cable Delivery Descriptor\n", spacing, "");
     g_printf ("%*s   Frequency   : %d Hz\n", spacing, "", res.frequency);
-    g_printf ("%*s   Outer FEC   : %d\n", spacing, "", res.outer_fec);
-    g_printf ("%*s   modulation  : %d\n", spacing, "", res.modulation);
+    g_printf ("%*s   Outer FEC   : %d (%s)\n", spacing, "", res.outer_fec,
+        enum_name (GST_TYPE_MPEG_TS_CABLE_OUTER_FEC_SCHEME, res.outer_fec));
+    g_printf ("%*s   modulation  : %d (%s)\n", spacing, "", res.modulation,
+        enum_name (GST_TYPE_MPEG_TS_MODULATION_TYPE, res.modulation));
     g_printf ("%*s   Symbol rate : %d sym/s\n", spacing, "", res.symbol_rate);
-    g_printf ("%*s   Inner FEC   : %d\n", spacing, "", res.fec_inner);
+    g_printf ("%*s   Inner FEC   : %d (%s)\n", spacing, "", res.fec_inner,
+        enum_name (GST_TYPE_MPEG_TS_DVB_CODE_RATE, res.fec_inner));
+  }
+}
+
+static void
+dump_terrestrial_delivery (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GstMpegTsTerrestrialDeliverySystemDescriptor res;
+
+  if (gst_mpegts_descriptor_parse_terrestrial_delivery_system (desc, &res)) {
+    g_printf ("%*s Terrestrial Delivery Descriptor\n", spacing, "");
+    g_printf ("%*s   Frequency         : %d Hz\n", spacing, "", res.frequency);
+    g_printf ("%*s   Bandwidth         : %d Hz\n", spacing, "", res.bandwidth);
+    g_printf ("%*s   Priority          : %s\n", spacing, "",
+        res.priority ? "TRUE" : "FALSE");
+    g_printf ("%*s   Time slicing      : %s\n", spacing, "",
+        res.time_slicing ? "TRUE" : "FALSE");
+    g_printf ("%*s   MPE FEC           : %s\n", spacing, "",
+        res.mpe_fec ? "TRUE" : "FALSE");
+    g_printf ("%*s   Constellation     : %d (%s)\n", spacing, "",
+        res.constellation, enum_name (GST_TYPE_MPEG_TS_MODULATION_TYPE,
+            res.constellation));
+    g_printf ("%*s   Hierarchy         : %d (%s)\n", spacing, "", res.hierarchy,
+        enum_name (GST_TYPE_MPEG_TS_TERRESTRIAL_HIERARCHY, res.hierarchy));
+    g_printf ("%*s   Code Rate HP      : %d (%s)\n", spacing, "",
+        res.code_rate_hp, enum_name (GST_TYPE_MPEG_TS_DVB_CODE_RATE,
+            res.code_rate_hp));
+    g_printf ("%*s   Code Rate LP      : %d (%s)\n", spacing, "",
+        res.code_rate_lp, enum_name (GST_TYPE_MPEG_TS_DVB_CODE_RATE,
+            res.code_rate_lp));
+    g_printf ("%*s   Guard Interval    : %d (%s)\n", spacing, "",
+        res.guard_interval,
+        enum_name (GST_TYPE_MPEG_TS_TERRESTRIAL_GUARD_INTERVAL,
+            res.guard_interval));
+    g_printf ("%*s   Transmission Mode : %d (%s)\n", spacing, "",
+        res.transmission_mode,
+        enum_name (GST_TYPE_MPEG_TS_TERRESTRIAL_TRANSMISSION_MODE,
+            res.transmission_mode));
+    g_printf ("%*s   Other Frequency   : %s\n", spacing, "",
+        res.other_frequency ? "TRUE" : "FALSE");
+  }
+}
+
+static void
+dump_dvb_service_list (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *res;
+
+  if (gst_mpegts_descriptor_parse_dvb_service_list (desc, &res)) {
+    guint i;
+    g_printf ("%*s DVB Service List Descriptor\n", spacing, "");
+    for (i = 0; i < res->len; i++) {
+      GstMpegTsDVBServiceListItem *item = g_ptr_array_index (res, i);
+      g_printf ("%*s   Service #%d, id:0x%04x, type:0x%x (%s)\n",
+          spacing, "", i, item->service_id, item->type,
+          enum_name (GST_TYPE_MPEG_TS_DVB_SERVICE_TYPE, item->type));
+    }
+    g_ptr_array_unref (res);
   }
 }
 
@@ -174,6 +235,220 @@
 }
 
 static void
+dump_multiligual_network_name (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *items;
+  if (gst_mpegts_descriptor_parse_dvb_multilingual_network_name (desc, &items)) {
+    guint i;
+    for (i = 0; i < items->len; i++) {
+      GstMpegTsDvbMultilingualNetworkNameItem *item =
+          g_ptr_array_index (items, i);
+      g_printf ("%*s item : %u\n", spacing, "", i);
+      g_printf ("%*s   language_code : %s\n", spacing, "", item->language_code);
+      g_printf ("%*s   network_name  : %s\n", spacing, "", item->network_name);
+    }
+    g_ptr_array_unref (items);
+  }
+}
+
+static void
+dump_multiligual_bouquet_name (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *items;
+  if (gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name (desc, &items)) {
+    guint i;
+    for (i = 0; i < items->len; i++) {
+      GstMpegTsDvbMultilingualBouquetNameItem *item =
+          g_ptr_array_index (items, i);
+      g_printf ("%*s item : %u\n", spacing, "", i);
+      g_printf ("%*s   language_code : %s\n", spacing, "", item->language_code);
+      g_printf ("%*s   bouguet_name  : %s\n", spacing, "", item->bouquet_name);
+    }
+    g_ptr_array_unref (items);
+  }
+}
+
+static void
+dump_multiligual_service_name (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *items;
+  if (gst_mpegts_descriptor_parse_dvb_multilingual_service_name (desc, &items)) {
+    guint i;
+    for (i = 0; i < items->len; i++) {
+      GstMpegTsDvbMultilingualServiceNameItem *item =
+          g_ptr_array_index (items, i);
+      g_printf ("%*s item : %u\n", spacing, "", i);
+      g_printf ("%*s   language_code : %s\n", spacing, "", item->language_code);
+      g_printf ("%*s   service_name  : %s\n", spacing, "", item->service_name);
+      g_printf ("%*s   provider_name : %s\n", spacing, "", item->provider_name);
+    }
+    g_ptr_array_unref (items);
+  }
+}
+
+static void
+dump_multiligual_component (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *items;
+  guint8 tag;
+  if (gst_mpegts_descriptor_parse_dvb_multilingual_component (desc, &tag,
+          &items)) {
+    guint8 i;
+    g_printf ("%*s component_tag : 0x%02x\n", spacing, "", tag);
+    for (i = 0; i < items->len; i++) {
+      GstMpegTsDvbMultilingualComponentItem *item =
+          g_ptr_array_index (items, i);
+      g_printf ("%*s   item : %u\n", spacing, "", i);
+      g_printf ("%*s     language_code : %s\n", spacing, "",
+          item->language_code);
+      g_printf ("%*s     description   : %s\n", spacing, "", item->description);
+    }
+    g_ptr_array_unref (items);
+  }
+}
+
+static void
+dump_linkage (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GstMpegTsDVBLinkageDescriptor res;
+
+  res.private_data_length = 0;
+  res.private_data_bytes = NULL;
+
+  if (gst_mpegts_descriptor_parse_dvb_linkage (desc, &res)) {
+    g_printf ("%*s Linkage Descriptor : 0x%02x (%s)\n", spacing, "",
+        res.linkage_type, enum_name (GST_TYPE_MPEG_TS_DVB_LINKAGE_TYPE,
+            res.linkage_type));
+
+    g_printf ("%*s   Transport Stream ID : 0x%04x\n", spacing, "",
+        res.transport_stream_id);
+    g_printf ("%*s   Original Network ID : 0x%04x\n", spacing, "",
+        res.original_network_id);
+    g_printf ("%*s   Service ID          : 0x%04x\n", spacing, "",
+        res.service_id);
+
+    switch (res.linkage_type) {
+      case GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER:
+      {
+        GstMpegTsDVBLinkageMobileHandOver *linkage =
+            (GstMpegTsDVBLinkageMobileHandOver *) res.linkage_data;
+        g_printf ("%*s   hand_over_type    : 0x%02x (%s)\n", spacing,
+            "", linkage->hand_over_type,
+            enum_name (GST_TYPE_MPEG_TS_DVB_LINKAGE_HAND_OVER_TYPE,
+                linkage->hand_over_type));
+        g_printf ("%*s   origin_type       : %s\n", spacing, "",
+            linkage->origin_type ? "SDT" : "NIT");
+        g_printf ("%*s   network_id        : 0x%04x\n", spacing, "",
+            linkage->network_id);
+        g_printf ("%*s   initial_service_id: 0x%04x\n", spacing, "",
+            linkage->initial_service_id);
+        break;
+      }
+      case GST_MPEGTS_DVB_LINKAGE_EVENT:
+      {
+        GstMpegTsDVBLinkageEvent *linkage =
+            (GstMpegTsDVBLinkageEvent *) res.linkage_data;
+        g_printf ("%*s   target_event_id   : 0x%04x\n", spacing, "",
+            linkage->target_event_id);
+        g_printf ("%*s   target_listed     : %s\n", spacing, "",
+            linkage->target_listed ? "TRUE" : "FALSE");
+        g_printf ("%*s   event_simulcast   : %s\n", spacing, "",
+            linkage->event_simulcast ? "TRUE" : "FALSE");
+        break;
+      }
+      case GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT:
+      {
+        guint i;
+        GPtrArray *items = (GPtrArray *) res.linkage_data;
+
+        for (i = 0; i < items->len; i++) {
+          GstMpegTsDVBLinkageExtendedEvent *linkage =
+              g_ptr_array_index (items, i);
+          g_printf ("%*s   target_event_id   : 0x%04x\n", spacing, "",
+              linkage->target_event_id);
+          g_printf ("%*s   target_listed     : %s\n", spacing, "",
+              linkage->target_listed ? "TRUE" : "FALSE");
+          g_printf ("%*s   event_simulcast   : %s\n", spacing, "",
+              linkage->event_simulcast ? "TRUE" : "FALSE");
+          g_printf ("%*s   link_type         : 0x%01x\n", spacing, "",
+              linkage->link_type);
+          g_printf ("%*s   target_id_type    : 0x%01x\n", spacing, "",
+              linkage->target_id_type);
+          g_printf ("%*s   original_network_id_flag : %s\n", spacing, "",
+              linkage->original_network_id_flag ? "TRUE" : "FALSE");
+          g_printf ("%*s   service_id_flag   : %s\n", spacing, "",
+              linkage->service_id_flag ? "TRUE" : "FALSE");
+          if (linkage->target_id_type == 3) {
+            g_printf ("%*s   user_defined_id   : 0x%02x\n", spacing, "",
+                linkage->user_defined_id);
+          } else {
+            if (linkage->target_id_type == 1)
+              g_printf ("%*s   target_transport_stream_id : 0x%04x\n",
+                  spacing, "", linkage->target_transport_stream_id);
+            if (linkage->original_network_id_flag)
+              g_printf ("%*s   target_original_network_id : 0x%04x\n",
+                  spacing, "", linkage->target_original_network_id);
+            if (linkage->service_id_flag)
+              g_printf ("%*s   target_service_id          : 0x%04x\n",
+                  spacing, "", linkage->target_service_id);
+          }
+        }
+        break;
+      }
+      default:
+        break;
+    }
+    if (res.private_data_length > 0) {
+      dump_memory_bytes (res.private_data_bytes, res.private_data_length,
+          spacing + 2);
+      g_free ((gpointer) res.private_data_bytes);
+    }
+  }
+}
+
+static void
+dump_component (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GstMpegTsComponentDescriptor res;
+
+  res.text = NULL;
+
+  if (gst_mpegts_descriptor_parse_dvb_component (desc, &res)) {
+    g_printf ("%*s stream_content : 0x%02x (%s)\n", spacing, "",
+        res.stream_content,
+        enum_name (GST_TYPE_MPEG_TS_COMPONENT_STREAM_CONTENT,
+            res.stream_content));
+    g_printf ("%*s component_type : 0x%02x\n", spacing, "", res.component_type);
+    g_printf ("%*s component_tag  : 0x%02x\n", spacing, "", res.component_tag);
+    g_printf ("%*s language_code  : %s\n", spacing, "", res.language_code);
+    g_printf ("%*s text           : %s\n", spacing, "",
+        res.text ? res.text : "NULL");
+  }
+}
+
+static void
+dump_content (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GPtrArray *contents;
+  guint i;
+
+  if (gst_mpegts_descriptor_parse_dvb_content (desc, &contents)) {
+    for (i = 0; i < contents->len; i++) {
+      GstMpegTsContent *item = g_ptr_array_index (contents, i);
+      g_printf ("%*s content nibble 1 : 0x%01x (%s)\n", spacing, "",
+          item->content_nibble_1,
+          enum_name (GST_TYPE_MPEG_TS_CONTENT_NIBBLE_HI,
+              item->content_nibble_1));
+      g_printf ("%*s content nibble 2 : 0x%01x\n", spacing, "",
+          item->content_nibble_2);
+      g_printf ("%*s user_byte        : 0x%02x\n", spacing, "",
+          item->user_byte);
+    }
+    g_ptr_array_unref (contents);
+  }
+}
+
+static void
 dump_iso_639_language (GstMpegTsDescriptor * desc, guint spacing)
 {
   guint i;
@@ -189,6 +464,25 @@
   }
 }
 
+static void
+dump_dvb_extended_event (GstMpegTsDescriptor * desc, guint spacing)
+{
+  GstMpegTsExtendedEventDescriptor res;
+
+  if (gst_mpegts_descriptor_parse_dvb_extended_event (desc, &res)) {
+    guint i;
+    g_printf ("%*s DVB Extended Event\n", spacing, "");
+    g_printf ("%*s   descriptor_number:%d, last_descriptor_number:%d\n",
+        spacing, "", res.descriptor_number, res.last_descriptor_number);
+    g_printf ("%*s   language_code:%s\n", spacing, "", res.language_code);
+    g_printf ("%*s   text : %s\n", spacing, "", res.text);
+    for (i = 0; i < res.items->len; i++) {
+      GstMpegTsExtendedEventItem *item = g_ptr_array_index (res.items, i);
+      g_printf ("%*s     #%d [description:item]  %s : %s\n",
+          spacing, "", i, item->item_description, item->item);
+    }
+  }
+}
 
 static void
 dump_descriptors (GPtrArray * descriptors, guint spacing)
@@ -221,9 +515,27 @@
         }
         break;
       }
+      case GST_MTS_DESC_DVB_SERVICE_LIST:
+      {
+        dump_dvb_service_list (desc, spacing + 2);
+        break;
+      }
       case GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM:
         dump_cable_delivery_descriptor (desc, spacing + 2);
         break;
+      case GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM:
+        dump_terrestrial_delivery (desc, spacing + 2);
+        break;
+      case GST_MTS_DESC_DVB_BOUQUET_NAME:
+      {
+        gchar *bouquet_name;
+        if (gst_mpegts_descriptor_parse_dvb_bouquet_name (desc, &bouquet_name)) {
+          g_printf ("%*s   Bouquet Name Descriptor, bouquet_name:%s\n", spacing,
+              "", bouquet_name);
+          g_free (bouquet_name);
+        }
+        break;
+      }
       case GST_MTS_DESC_DTG_LOGICAL_CHANNEL:
         dump_logical_channel_descriptor (desc, spacing + 2);
         break;
@@ -245,6 +557,96 @@
         }
         break;
       }
+      case GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME:
+      {
+        dump_multiligual_bouquet_name (desc, spacing + 2);
+        break;
+      }
+      case GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME:
+      {
+        dump_multiligual_network_name (desc, spacing + 2);
+        break;
+      }
+      case GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME:
+      {
+        dump_multiligual_service_name (desc, spacing + 2);
+        break;
+      }
+      case GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT:
+      {
+        dump_multiligual_component (desc, spacing + 2);
+        break;
+      }
+      case GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER:
+      {
+        if (!DUMP_DESCRIPTORS)
+          dump_memory_content (desc, spacing + 2);
+        break;
+      }
+      case GST_MTS_DESC_DVB_FREQUENCY_LIST:
+      {
+        gboolean offset;
+        GArray *list;
+        if (gst_mpegts_descriptor_parse_dvb_frequency_list (desc, &offset,
+                &list)) {
+          guint j;
+          for (j = 0; j < list->len; j++) {
+            guint32 freq = g_array_index (list, guint32, j);
+            g_printf ("%*s   Frequency : %u %s\n", spacing, "", freq,
+                offset ? "kHz" : "Hz");
+          }
+          g_array_unref (list);
+        }
+        break;
+      }
+      case GST_MTS_DESC_DVB_LINKAGE:
+        dump_linkage (desc, spacing + 2);
+        break;
+      case GST_MTS_DESC_DVB_COMPONENT:
+        dump_component (desc, spacing + 2);
+        break;
+      case GST_MTS_DESC_DVB_STREAM_IDENTIFIER:
+      {
+        guint8 tag;
+        if (gst_mpegts_descriptor_parse_dvb_stream_identifier (desc, &tag)) {
+          g_printf ("%*s   Component Tag : 0x%02x\n", spacing, "", tag);
+        }
+        break;
+      }
+      case GST_MTS_DESC_DVB_CA_IDENTIFIER:
+      {
+        GArray *list;
+        guint j;
+        guint16 ca_id;
+        if (gst_mpegts_descriptor_parse_dvb_ca_identifier (desc, &list)) {
+          for (j = 0; j < list->len; j++) {
+            ca_id = g_array_index (list, guint16, j);
+            g_printf ("%*s   CA Identifier : 0x%04x\n", spacing, "", ca_id);
+          }
+          g_array_unref (list);
+        }
+        break;
+      }
+      case GST_MTS_DESC_DVB_CONTENT:
+        dump_content (desc, spacing + 2);
+        break;
+      case GST_MTS_DESC_DVB_PARENTAL_RATING:
+      {
+        GPtrArray *ratings;
+        guint j;
+
+        if (gst_mpegts_descriptor_parse_dvb_parental_rating (desc, &ratings)) {
+          for (j = 0; j < ratings->len; j++) {
+            GstMpegTsDVBParentalRatingItem *item =
+                g_ptr_array_index (ratings, j);
+            g_printf ("%*s   country_code : %s\n", spacing, "",
+                item->country_code);
+            g_printf ("%*s   rating age   : %d\n", spacing, "", item->rating);
+          }
+          g_ptr_array_unref (ratings);
+        }
+        break;
+      }
       case GST_MTS_DESC_ISO_639_LANGUAGE:
         dump_iso_639_language (desc, spacing + 2);
         break;
@@ -263,17 +665,22 @@
         }
       }
         break;
+      case GST_MTS_DESC_DVB_EXTENDED_EVENT:
+      {
+        dump_dvb_extended_event (desc, spacing + 2);
+        break;
+      }
       case GST_MTS_DESC_DVB_SUBTITLING:
       {
         gchar lang[4];
         guint8 type;
         guint16 composition;
         guint16 ancillary;
-        guint i;
+        guint j;
 
-        for (i = 0;
-            gst_mpegts_descriptor_parse_dvb_subtitling_idx (desc, i, &lang,
-                &type, &composition, &ancillary); i++) {
+        for (j = 0;
+            gst_mpegts_descriptor_parse_dvb_subtitling_idx (desc, j, &lang,
+                &type, &composition, &ancillary); j++) {
           g_printf ("%*s   Subtitling, language_code:%s\n", spacing, "", lang);
           g_printf ("%*s      type                : %u\n", spacing, "", type);
           g_printf ("%*s      composition page id : %u\n", spacing, "",
@@ -288,11 +695,11 @@
         GstMpegTsDVBTeletextType type;
         gchar lang[4];
         guint8 magazine, page_number;
-        guint i;
+        guint j;
 
-        for (i = 0;
-            gst_mpegts_descriptor_parse_dvb_teletext_idx (desc, i, &lang, &type,
-                &magazine, &page_number); i++) {
+        for (j = 0;
+            gst_mpegts_descriptor_parse_dvb_teletext_idx (desc, j, &lang, &type,
+                &magazine, &page_number); j++) {
           g_printf ("%*s   Teletext, type:0x%02x (%s)\n", spacing, "", type,
               enum_name (GST_TYPE_MPEG_TS_DVB_TELETEXT_TYPE, type));
           g_printf ("%*s      language    : %s\n", spacing, "", lang);
@@ -387,6 +794,102 @@
 }
 
 static void
+dump_atsc_mult_string (GPtrArray * mstrings, guint spacing)
+{
+  guint i;
+
+  for (i = 0; i < mstrings->len; i++) {
+    GstMpegTsAtscMultString *mstring = g_ptr_array_index (mstrings, i);
+    gint j, n;
+
+    n = mstring->segments->len;
+
+    g_printf ("%*s [multstring entry (%d) iso_639 langcode: %s]\n", spacing, "",
+        i, mstring->iso_639_langcode);
+    g_printf ("%*s   segments:%d\n", spacing, "", n);
+    for (j = 0; j < n; j++) {
+      GstMpegTsAtscStringSegment *segment =
+          g_ptr_array_index (mstring->segments, j);
+
+      g_printf ("%*s    Compression:0x%x\n", spacing, "",
+          segment->compression_type);
+      g_printf ("%*s    Mode:0x%x\n", spacing, "", segment->mode);
+      g_printf ("%*s    Len:%u\n", spacing, "", segment->compressed_data_size);
+      g_printf ("%*s    %s\n", spacing, "",
+          gst_mpegts_atsc_string_segment_get_string (segment));
+    }
+  }
+}
+
+static void
+dump_atsc_eit (GstMpegTsSection * section)
+{
+  const GstMpegTsAtscEIT *eit = gst_mpegts_section_get_atsc_eit (section);
+  guint i, len;
+
+  g_assert (eit);
+
+  g_printf ("     event_id            : 0x%04x\n", eit->source_id);
+  g_printf ("     protocol_version    : %u\n", eit->protocol_version);
+
+  len = eit->events->len;
+  g_printf ("     %d Event(s):\n", len);
+  for (i = 0; i < len; i++) {
+    GstMpegTsAtscEITEvent *event = g_ptr_array_index (eit->events, i);
+
+    g_printf ("     %d)\n", i);
+    g_printf ("       event_id: 0x%04x\n", event->event_id);
+    g_printf ("       start_time: %u\n", event->start_time);
+    g_printf ("       etm_location: 0x%x\n", event->etm_location);
+    g_printf ("       length_in_seconds: %u\n", event->length_in_seconds);
+    g_printf ("       Title(s):\n");
+    dump_atsc_mult_string (event->titles, 9);
+    dump_descriptors (event->descriptors, 9);
+  }
+}
+
+static void
+dump_ett (GstMpegTsSection * section)
+{
+  const GstMpegTsAtscETT *ett = gst_mpegts_section_get_atsc_ett (section);
+  guint len;
+
+  g_assert (ett);
+
+  g_printf ("     ett_table_id_ext    : 0x%04x\n", ett->ett_table_id_extension);
+  g_printf ("     protocol_version    : 0x%04x\n", ett->protocol_version);
+  g_printf ("     etm_id              : 0x%04x\n", ett->etm_id);
+
+  len = ett->messages->len;
+  g_printf ("     %d Messages(s):\n", len);
+  dump_atsc_mult_string (ett->messages, 9);
+}
+
+static void
+dump_stt (GstMpegTsSection * section)
+{
+  const GstMpegTsAtscSTT *stt = gst_mpegts_section_get_atsc_stt (section);
+  GstDateTime *dt;
+  gchar *dt_str = NULL;
+
+  g_assert (stt);
+
+  dt = gst_mpegts_atsc_stt_get_datetime_utc ((GstMpegTsAtscSTT *) stt);
+  if (dt)
+    dt_str = gst_date_time_to_iso8601_string (dt);
+
+  g_printf ("     protocol_version    : 0x%04x\n", stt->protocol_version);
+  g_printf ("     system_time         : 0x%08x\n", stt->system_time);
+  g_printf ("     gps_utc_offset      : %d\n", stt->gps_utc_offset);
+  g_printf ("     daylight saving     : %d day:%d hour:%d\n", stt->ds_status,
+      stt->ds_dayofmonth, stt->ds_hour);
+  g_printf ("     utc datetime        : %s", dt_str);
+
+  g_free (dt_str);
+  gst_date_time_unref (dt);
+}
+
+static void
 dump_nit (GstMpegTsSection * section)
 {
   const GstMpegTsNIT *nit = gst_mpegts_section_get_nit (section);
@@ -486,6 +989,69 @@
 }
 
 static void
+dump_mgt (GstMpegTsSection * section)
+{
+  const GstMpegTsAtscMGT *mgt = gst_mpegts_section_get_atsc_mgt (section);
+  gint i;
+
+  g_printf ("     protocol_version    : %u\n", mgt->protocol_version);
+  g_printf ("     tables number       : %d\n", mgt->tables->len);
+  for (i = 0; i < mgt->tables->len; i++) {
+    GstMpegTsAtscMGTTable *table = g_ptr_array_index (mgt->tables, i);
+    g_printf ("     table %d)\n", i);
+    g_printf ("       table_type    : %u\n", table->table_type);
+    g_printf ("       pid           : 0x%x\n", table->pid);
+    g_printf ("       version_number: %u\n", table->version_number);
+    g_printf ("       number_bytes  : %u\n", table->number_bytes);
+    dump_descriptors (table->descriptors, 9);
+  }
+  dump_descriptors (mgt->descriptors, 7);
+}
+
+static void
+dump_vct (GstMpegTsSection * section)
+{
+  const GstMpegTsAtscVCT *vct;
+  gint i;
+
+  if (GST_MPEGTS_SECTION_TYPE (section) == GST_MPEGTS_SECTION_ATSC_CVCT) {
+    vct = gst_mpegts_section_get_atsc_cvct (section);
+  } else {
+    /* GST_MPEGTS_SECTION_ATSC_TVCT */
+    vct = gst_mpegts_section_get_atsc_tvct (section);
+  }
+
+  g_assert (vct);
+
+  g_printf ("     transport_stream_id : 0x%04x\n", vct->transport_stream_id);
+  g_printf ("     protocol_version    : %u\n", vct->protocol_version);
+  g_printf ("     %d Sources:\n", vct->sources->len);
+  for (i = 0; i < vct->sources->len; i++) {
+    GstMpegTsAtscVCTSource *source = g_ptr_array_index (vct->sources, i);
+    g_print ("       short_name: %s\n", source->short_name);
+    g_print ("       major_channel_number: %u, minor_channel_number: %u\n",
+        source->major_channel_number, source->minor_channel_number);
+    g_print ("       modulation_mode: %u\n", source->modulation_mode);
+    g_print ("       carrier_frequency: %u\n", source->carrier_frequency);
+    g_print ("       channel_tsid: %u\n", source->channel_TSID);
+    g_print ("       program_number: %u\n", source->program_number);
+    g_print ("       ETM_location: %u\n", source->ETM_location);
+    g_print ("       access_controlled: %u\n", source->access_controlled);
+    g_print ("       hidden: %u\n", source->hidden);
+    if (section->table_id == GST_MPEGTS_SECTION_ATSC_CVCT) {
+      g_print ("       path_select: %u\n", source->path_select);
+      g_print ("       out_of_band: %u\n", source->out_of_band);
+    }
+    g_print ("       hide_guide: %u\n", source->hide_guide);
+    g_print ("       service_type: %u\n", source->service_type);
+    g_print ("       source_id: %u\n", source->source_id);
+
+    dump_descriptors (source->descriptors, 9);
+  }
+  dump_descriptors (vct->descriptors, 7);
+}
+
+static void
 dump_section (GstMpegTsSection * section)
 {
   switch (GST_MPEGTS_SECTION_TYPE (section)) {
@@ -513,6 +1079,22 @@
     case GST_MPEGTS_SECTION_EIT:
       dump_eit (section);
       break;
+    case GST_MPEGTS_SECTION_ATSC_MGT:
+      dump_mgt (section);
+      break;
+    case GST_MPEGTS_SECTION_ATSC_CVCT:
+    case GST_MPEGTS_SECTION_ATSC_TVCT:
+      dump_vct (section);
+      break;
+    case GST_MPEGTS_SECTION_ATSC_EIT:
+      dump_atsc_eit (section);
+      break;
+    case GST_MPEGTS_SECTION_ATSC_ETT:
+      dump_ett (section);
+      break;
+    case GST_MPEGTS_SECTION_ATSC_STT:
+      dump_stt (section);
+      break;
     default:
       g_printf ("     Unknown section type\n");
       break;
@@ -596,6 +1178,16 @@
   g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_DVB_TABLE_ID);
   g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_ATSC_TABLE_ID);
   g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_SCTE_TABLE_ID);
+  g_type_class_ref (GST_TYPE_MPEG_TS_MODULATION_TYPE);
+  g_type_class_ref (GST_TYPE_MPEG_TS_DVB_CODE_RATE);
+  g_type_class_ref (GST_TYPE_MPEG_TS_CABLE_OUTER_FEC_SCHEME);
+  g_type_class_ref (GST_TYPE_MPEG_TS_TERRESTRIAL_TRANSMISSION_MODE);
+  g_type_class_ref (GST_TYPE_MPEG_TS_TERRESTRIAL_GUARD_INTERVAL);
+  g_type_class_ref (GST_TYPE_MPEG_TS_TERRESTRIAL_HIERARCHY);
+  g_type_class_ref (GST_TYPE_MPEG_TS_DVB_LINKAGE_TYPE);
+  g_type_class_ref (GST_TYPE_MPEG_TS_DVB_LINKAGE_HAND_OVER_TYPE);
+  g_type_class_ref (GST_TYPE_MPEG_TS_COMPONENT_STREAM_CONTENT);
+  g_type_class_ref (GST_TYPE_MPEG_TS_CONTENT_NIBBLE_HI);
 
   mainloop = g_main_loop_new (NULL, FALSE);
 
diff --git a/tests/examples/mxf/Makefile.in b/tests/examples/mxf/Makefile.in
index b444294..f2130c8 100644
--- a/tests/examples/mxf/Makefile.in
+++ b/tests/examples/mxf/Makefile.in
@@ -316,6 +316,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -402,6 +404,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -693,6 +696,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 mxfdemux_structure_SOURCES = mxfdemux-structure.c
 mxfdemux_structure_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) 
 mxfdemux_structure_LDFLAGS = $(GST_LIBS) $(GTK_LIBS)
diff --git a/tests/examples/opencv/Makefile.in b/tests/examples/opencv/Makefile.in
index ea233d1..34b06f5 100644
--- a/tests/examples/opencv/Makefile.in
+++ b/tests/examples/opencv/Makefile.in
@@ -328,6 +328,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -414,6 +416,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -705,6 +708,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 gstmotioncells_dynamic_test_SOURCES = \
 	gstmotioncells_dynamic_test.c	\
 	gst_element_print_properties.c
diff --git a/tests/examples/uvch264/Makefile.in b/tests/examples/uvch264/Makefile.in
index 9ae2941..3c3140b 100644
--- a/tests/examples/uvch264/Makefile.in
+++ b/tests/examples/uvch264/Makefile.in
@@ -320,6 +320,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -406,6 +408,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -697,6 +700,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 TEST_UVCH264_GLADE_FILES = window.glade \
 			boolean_property.glade \
 			enum_property.glade \
diff --git a/tests/files/Makefile.in b/tests/files/Makefile.in
index c8d7660..8db7ed5 100644
--- a/tests/files/Makefile.in
+++ b/tests/files/Makefile.in
@@ -258,6 +258,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -344,6 +346,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -635,6 +638,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 EXTRA_DIST = \
 	barcode.png \
 	cbr_stream.mp3 \
diff --git a/tests/icles/Makefile.in b/tests/icles/Makefile.in
index d609fbe..f8e654c 100644
--- a/tests/icles/Makefile.in
+++ b/tests/icles/Makefile.in
@@ -327,6 +327,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -413,6 +415,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -704,6 +707,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 @USE_SOUNDTOUCH_FALSE@GST_SOUNDTOUCH_TESTS = 
 @USE_SOUNDTOUCH_TRUE@GST_SOUNDTOUCH_TESTS = pitch-test
 @USE_SOUNDTOUCH_TRUE@pitch_test_SOURCES = pitch-test.c
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 28071b9..0c7237c 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -258,6 +258,8 @@
 GMYTH_CFLAGS = @GMYTH_CFLAGS@
 GMYTH_LIBS = @GMYTH_LIBS@
 GNUSTEP_CONFIG = @GNUSTEP_CONFIG@
+GRAPHENE_CFLAGS = @GRAPHENE_CFLAGS@
+GRAPHENE_LIBS = @GRAPHENE_LIBS@
 GREP = @GREP@
 GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
 GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
@@ -344,6 +346,7 @@
 HAVE_GL = @HAVE_GL@
 HAVE_GLES2 = @HAVE_GLES2@
 HAVE_GLU = @HAVE_GLU@
+HAVE_GRAPHENE = @HAVE_GRAPHENE@
 HAVE_GSM = @HAVE_GSM@
 HAVE_GTK3 = @HAVE_GTK3@
 HAVE_JPEG = @HAVE_JPEG@
@@ -635,6 +638,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+wayland_scanner = @wayland_scanner@
 templatefiles = \
 	element-templates/audiodecoder \
 	element-templates/audioencoder \
diff --git a/win32/common/config.h b/win32/common/config.h
index dd4fefb..b1949b0 100644
--- a/win32/common/config.h
+++ b/win32/common/config.h
@@ -86,7 +86,7 @@
 #define GST_PACKAGE_ORIGIN "Unknown package origin"
 
 /* GStreamer package release date/time for plugins as YYYY-MM-DD */
-#define GST_PACKAGE_RELEASE_DATETIME "2014-05-21"
+#define GST_PACKAGE_RELEASE_DATETIME "2014-06-22"
 
 /* Define if static plugins should be built */
 #undef GST_PLUGIN_BUILD_STATIC
@@ -271,6 +271,9 @@
 /* Define to 1 if you have the `gmtime_r' function. */
 #undef HAVE_GMTIME_R
 
+/* Use graphene */
+#undef HAVE_GRAPHENE
+
 /* Define to enable GSettings plugin (used by gsettings). */
 #undef HAVE_GSETTINGS
 
@@ -631,7 +634,7 @@
 #define PACKAGE_NAME "GStreamer Bad Plug-ins"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GStreamer Bad Plug-ins 1.3.2"
+#define PACKAGE_STRING "GStreamer Bad Plug-ins 1.3.3"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "gst-plugins-bad"
@@ -640,7 +643,7 @@
 #undef PACKAGE_URL
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.3.2"
+#define PACKAGE_VERSION "1.3.3"
 
 /* directory where plugins are located */
 #ifdef _DEBUG
@@ -680,7 +683,7 @@
 #undef USE_EGL_RPI
 
 /* Version number of package */
-#define VERSION "1.3.2"
+#define VERSION "1.3.3"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */